Пример #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.');
     }
 }
Пример #2
0
 /**
  *
  */
 public function GetSumOfCardChanges()
 {
     require_once PATH_INCLUDE . '/TableMng.php';
     TableMng::init();
     $temp = TableMng::query('SELECT SUM(changed_cardID) FROM BabeskCards');
     return $temp[0]["SUM(changed_cardID)"];
 }
Пример #3
0
 public function __construct()
 {
     if (!isset($_SESSION)) {
         require_once "../include/path.php";
         $this->initEnvironment();
         $this->initSmarty();
     }
     require_once PATH_ACCESS . '/UserManager.php';
     require_once PATH_INCLUDE . '/functions.php';
     require_once PATH_INCLUDE . '/DataContainer.php';
     require_once PATH_INCLUDE . '/TableMng.php';
     require_once PATH_INCLUDE . '/Acl.php';
     require_once PATH_INCLUDE . '/ModuleExecutionInputParser.php';
     require_once PATH_INCLUDE . '/Logger.php';
     require_once 'WebInterface.php';
     TableMng::init();
     $this->_userManager = new UserManager();
     $this->_loggedIn = isset($_SESSION['uid']);
     $this->_interface = new WebInterface($this->_smarty);
     $this->initDatabaseConnections();
     $this->_logger = new Logger($this->_pdo);
     $this->_logger->categorySet('Web');
     $this->_acl = new Acl($this->_logger, $this->_pdo);
     $this->_moduleExecutionParser = new ModuleExecutionInputParser();
     $this->_moduleExecutionParser->setSubprogramPath('root/web');
     $this->initLanguage();
 }
Пример #4
0
 private function init($dataContainer)
 {
     defined('_WEXEC') or die("Access denied");
     $this->_smarty = $dataContainer->getSmarty();
     $this->_interface = new WebInterface($this->_smarty);
     require_once PATH_INCLUDE . '/TableMng.php';
     TableMng::init();
     $this->setEditor();
 }
Пример #5
0
 public function __construct()
 {
     TableMng::init();
     $this->environmentInit();
 }