$request->setView('Closed'); $application->redirect($request); } } else { if ($current_file == $application->getPagenameByViewname('Closed')) { $request = new Request(); $request->setView('Index'); $application->redirect($request); } } } else { if ($session->is_Set("DEBUG_MODE")) { $session->un_Set("DEBUG_MODE"); } if ($current_file == basename($application->getPagenameByViewname('Closed'))) { $request = new Request(); $request->setView('Index'); $application->redirect($request); } } $application->outputTagErrors(); if ($usr->isUserSignedIn() == FALSE) { # redirect to Users_CustomerLogin # exit(); } CProfiler::start('processAction'); $application->processAction(); CProfiler::stop('processAction'); $application->redirectToAnotherProtocol(); CProfiler::start('API & Render');
loadClass('RESTResponse'); loadClass('REST_Errors'); if ($application->getCurrentProtocol() !== "https") { $e = new REST_Errors(); $e->IncorrectRestProtocol(); $e->send(); exit; } if (!isset($_GET['alogin']) || !isset($_GET['apassword'])) { $e = new REST_Errors(); $e->UndefinedLoginPassword(); $e->send(); exit; } loadActionClass('SignIn'); $signin = new SignIn(); $acountInfo = null; if ($signin->isValidAcount($_GET['alogin'], md5($_GET['apassword']), $acountInfo)) { modApiFunc("Users", "setCurrentUserID", $acountInfo['id']); } else { $e = new REST_Errors(); $e->IncorrectLoginPassword(); $e->send(); exit; } if ($usr->isUserSignedIn() == FALSE) { } $_GET['asc_action'] = 'REST_Request_Action'; CProfiler::start('processAction'); $application->processAction(); CProfiler::stop('processAction');
CTrace::setId(getmypid()); foreach ($tracelog as $trace_cfg) { if ($trace_cfg['enabled'] == 'yes') { $r = new CTraceLogRotation($trace_cfg['file'], $trace_cfg['rotation']['size'], $trace_cfg['rotation']['rotate']); $r->rotate(); $tw = new CTraceWriter($trace_cfg['file'], $trace_cfg['template'], new CTraceFilter($trace_cfg['filter'])); CTrace::registerWriter($tw); } } } // must be defined after CTrace initialization. // all php notices, warnings and errors will be logged, so we need to set E_ALL level //error_reporting(E_ERROR); //set_error_handler('__error_handler__', E_ERROR); CTrace::inf('Request: ' . getCurrentURL()); CProfiler::start('init'); $bootstrap = new Bootstrap(); $bootstrap->preboot(); //CTrace::inf('Point 1 (after preboot)'); $bootstrap->preloadCorePHP(); do_action('init'); //CTrace::inf('Point 2 (after preloading core php)'); $bootstrap->preloadModulesPHP(); //CTrace::inf('Point 3 (after preloading modules php)'); global $zone; if ($zone == 'CustomerZone') { $bootstrap->preloadModulesViewsCzPHP(); //CTrace::inf('Point 3 (after preloading modules views php)'); } $bootstrap->boot(); //CTrace::inf('Point 4 (after boot)');