Beispiel #1
0
 public function __construct()
 {
     if (!isset($_SESSION)) {
         $this->initEnvironment();
     } else {
         if (!validSession()) {
             die(_g('The session is invalid, please login again'));
         }
     }
     try {
         $this->initSmarty();
         TableMng::init();
         $this->_adminInterface = new AdminInterface(NULL, $this->_smarty);
         // AdminInterface has used global $smarty, workaround
         AdminInterface::$smartyHelper = $this->_smarty;
         $this->_moduleExecutionParser = new ModuleExecutionInputParser();
         $this->_moduleExecutionParser->setSubprogramPath('root/administrator');
         $this->loadVersion();
         $this->initDatabaseConnections();
         $this->_logger = new Logger($this->_pdo);
         $this->_logger->categorySet('Administrator');
         $this->_acl = new Acl($this->_logger, $this->_pdo);
     } catch (MySQLConnectionException $e) {
         die('Sorry, could not connect to the database.');
     }
 }