Esempio n. 1
0
 /**
  * PHP5 constructor
  *
  * @global object $objTemplate
  * @global array $_ARRAYLANG
  */
 function __construct()
 {
     global $objTemplate, $_ARRAYLANG, $objDatabase;
     $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_MODULE_PATH . '/immo/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->_objFile = new File();
     if (function_exists('mysql_set_charset')) {
         mysql_set_charset("utf8");
         //this is important for umlauts
     }
     // initialise the session array
     if (!isset($_SESSION['immo'])) {
         $_SESSION['immo'] = array();
     }
     // Run parent constructor
     parent::__construct();
 }
Esempio n. 2
0
 /**
  * Constructor
  * @global mixed   $objDatabase ADODB abstraction layer object
  * @param  string  $pageContent HTML template (@see /index.php)
  */
 function __construct($pageContent)
 {
     global $objDatabase;
     $this->frontLang = isset($_GET['immoLang']) ? intval($_GET['immoLang']) : 1;
     $objRS = $objDatabase->Execute("    SELECT count(1) as cnt FROM " . DBPREFIX . "module_immo_fieldname WHERE\n                                        lang_id = 1 AND lower(name) LIKE '%aufzählung%'");
     $this->_listingCount = $objRS->fields['cnt'];
     $this->_objTpl = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->_objTpl->setTemplate($pageContent);
     if (function_exists('mysql_set_charset')) {
         mysql_set_charset("utf8");
         //this is important for umlauts
     }
     // initialise the session array
     if (!isset($_SESSION['immo'])) {
         $_SESSION['immo'] = array();
     }
     parent::__construct();
 }