<?php
// Rewrite-less endpoint for local/dev servers.
// Do NOT redirect: some setups/canonical rules can cause loops, and Windows paths in Location are invalid.

define('DATALIFEENGINE', true);
define('ROOT_DIR', dirname(__FILE__) . '/..');
define('ENGINE_DIR', ROOT_DIR . '/engine');

require_once(ENGINE_DIR . '/classes/plugins.class.php');

$period = isset($_GET['period']) ? (string)$_GET['period'] : '';
$period = strtolower(trim($period));
$period = preg_replace('/[^a-z]/', '', $period);

$_GET['do'] = $_REQUEST['do'] = 'top100';

if ($period) {
	$_GET['period'] = $_REQUEST['period'] = $period;
}

require_once(DLEPlugins::Check(ROOT_DIR . '/engine/init.php'));
