public static function logout() { Session::close(); Application::appInit(); }
protected function loginUser() { if ($id = Application::param('user_id')) { Session::close(); Application::appInit(); $user_class = constant('SYSTEM_USER'); $user = new $user_class(); $user->clauseSafe('user_id', $id); $user->read(); Application::current()->setUser($user); SiteNavigation::init($user->getHandlerTree()); } }
for ($i = 1; $i < count($argv); $i++) { $split = explode('=', $argv[$i]); $name = $split[0]; $value = $split[1]; $_POST[$name] = $value; } } else { die('In order to run from the command line, please set the COMMAND_LINE_HOST variable in master.config.php'); } } else { $is_command_line = false; } /*create a new application of type APPLICATION as defined in sys.config.php*/ try { ob_start(); $app = Application::appInit(); $app->setCommandLine($is_command_line); //die('Here'); $app->run(); echo str_replace('</view-rsml>', '', ob_get_clean()); //ob_flush(); //echo "<br />DEBUG: here<br />\n"; } catch (Exception $exc) { if (constant('DEVELOPMENT')) { require_once 'managed_code/uncaught_exception.php'; } else { ob_end_clean(); try { if (class_exists('ForgetSms')) { if (defined('ADMIN_FSMS_USER') && defined('ADMIN_FSMS_PASS') && defined('ADMIN_FSMS_MOBILE')) { $user = constant('ADMIN_FSMS_USER');