/**
  *
  */
 public function __construct()
 {
     $this->Register = Register::getInstance();
     $this->setPhpSettings();
     $this->touchStartTime();
     $this->Register['Cache'] = new Cache();
     $viewerLoader = new Fps_Viewer_Loader(array('template_root' => ROOT . '/template/' . getTemplateName() . '/html/'));
     $this->Register['Viewer'] = new Fps_Viewer_Manager($viewerLoader);
     if (isInstall()) {
         $this->registerCustomTemplateFunctions();
         $this->Register['DB'] = class_exists('PDO') && Config::read('use_pdo') ? FpsPDO::get() : FpsDataBase::get();
         $this->Register['UserAuth'] = new UserAuth();
         $this->Register['Log'] = new Logination();
     }
     $this->Register['DocParser'] = new Document_Parser();
     $this->Register['ACL'] = new ACL(ROOT . '/sys/settings/');
     $this->Register['PrintText'] = new PrintText();
     $this->Register['Validate'] = new Validate(function ($errors) {
         $Register = Register::getInstance();
         return $Register['DocParser']->wrapErrors($errors);
     });
     $this->Register['ModManager'] = new ModulesManager(ROOT . '/sys/settings/modules_access.php');
     $this->Register['PluginController'] = new Plugins();
     $this->Register['URL'] = new AtmUrl();
     $this->Register['Protector'] = new Protect();
     if (isInstall()) {
         $this->inputCheck();
         $this->initProtect();
         $this->initUser();
         $this->loadLanguages();
     }
 }
Example #2
0
## @subpackege    Admin module                  ##
## @copyright     ©Andrey Brykin 2010-2014      ##
## @Last mod.     2014/01/10                    ##
##################################################
##################################################
##												##
## any partial or not partial extension         ##
## CMS AtomX,without the consent of the         ##
## author, is illegal                           ##
##################################################
## Любое распространение                        ##
## CMS AtomX или ее частей,                     ##
## без согласия автора, является не законным    ##
##################################################
header('Content-Type: text/html; charset=utf-8');
if (!isInstall()) {
    redirect('/install');
}
$FpsDB = $Register['DB'];
//TODO
$ACL = $Register['ACL'];
$_SESSION['lang'] = Config::read('language');
/*
pr(time());
pr($_SESSION['adm_panel_authorize']);
die();
*/
if (ADM_REFER_PROTECTED == 1) {
    $script_name = !empty($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
    $script_name = strrchr($script_name, '/');
    if ($script_name != '/index.php') {