$dms, 'user'=>$user)); if($user->getLogin() != 'cli_scheduler') { header('WWW-Authenticate: Basic realm="'.$settings->_siteName.'"'); header('HTTP/1.0 401 Unauthorized'); echo "Wrong user"; exit; } $mode = 'list'; if(!empty($_GET['mode']) && in_array($_GET['mode'], array('list', 'run', 'dryrun', 'check'))) $mode = $_GET['mode']; $task = ''; if(!empty($_GET['task'])) $task = $_GET['task']; $controller->setParam('settings', $settings); $controller->setParam('logger', $logger); $controller->setParam('mode', $mode); $controller->setParam('task', $task); if(!$controller->run()) { echo getMLText("error_occured"); exit; } add_log_line(); exit();