} // if task details needed for ajax step-by-step run if ($get['mode'] == 'query') { $get['task_name'] = $_GET['task_name']; } $_GET = $get; unset($get); $_GET['s'] = ADMIN_PATH; // sign of admin side for controllers run from dispatcher // Load all initial set up require_once DIR_ROOT . '/core/init.php'; unset($_GET['s']); // not needed anymore ADebug::checkpoint('init end'); // Currency $registry->set('currency', new ACurrency($registry)); //ok... let's start tasks $tm = new ATaskManager(); if ($_GET['mode'] == 'query') { //$output = array(); $tm->getTask(); //TODO: in the future need to add ability json response for task result } elseif ($_GET['mode'] == 'run') { //try to remove execution time limitation (can not work on some hosts!) ini_set("max_execution_time", "0"); //start do tasks one by one $tm->runTasks(); } ADebug::checkpoint('app end'); //display debug info ADebug::display();