Пример #1
0
	private function loadSystem() {
		ini_set('error_reporting', E_ERROR | E_WARNING | E_PARSE);
		//ini_set('error_reporting', E_ERROR);
		ini_set('mysql.connect_timeout', 1);
		ini_set('default_socket_timeout', 120);
		//ini_set('error_reporting', E_ALL);
		
		define(LIBS_DIR, self::$root_path . '/_sources/libraries');
		define(SMARTY_DIR, LIBS_DIR . '/smarty/');
		
		define('DATA1', '%d/%m/%Y às %H:%M');
		define('DATA2', '%d/%m/%Y');
		define('DATA3', '%d/%m');
		define('DATA4', '%d/%m às %H:%M');
		
		require(LIBS_DIR . '/class.mysql.php');
		require(LIBS_DIR . '/class.functions.php');
		require(LIBS_DIR . '/smarty/SmartyBC.class.php');
		require(LIBS_DIR . '/class.input.php');
		require(LIBS_DIR . '/class.loader.php');
		require(LIBS_DIR . '/class.emailer.php');
		require(LIBS_DIR . '/class.imagem.php');
		require(LIBS_DIR . '/class.session.php');
		require(LIBS_DIR . '/class.arrays.php');
		require(LIBS_DIR . '/class.pagination.php');
		
		$this->loadSmarty();
		$this->loadDataBase();
		
		$this->session = new Session();
		$this->load = new Loader();
		
		$this->arrays = new Arrays();

		$this->emailer = new Emailer();

		$this->pagination = new Pagination();
		
		$this->input = Input::parse_incoming();
		$this->func  = new Functions();
		
		if ($this->loadAdmin) {
			require(LIBS_DIR . '/class.admin.php');
			$this->admin 		= new Admin();
			require(LIBS_DIR . '/class.adminchecklogin.php');
			$adminchecklogin 	= new AdminCheckLogin();
			if ($this->loginRequerido)
				$adminchecklogin->checkLoginAdmin();	
		} else {
			require(LIBS_DIR . '/class.site.php');
			$this->site 		= new Site();
		}
	}
Пример #2
0
 private function loadSystem()
 {
     ini_set('error_reporting', E_ERROR | E_WARNING | E_PARSE);
     //ini_set('error_reporting', E_ERROR);
     //ini_set('error_reporting', E_ALL);
     ini_set('mysql.connect_timeout', 120);
     ini_set('default_socket_timeout', 120);
     define(LIBS_DIR, self::$root_path . '/_sources/libraries');
     define(SMARTY_DIR, LIBS_DIR . '/smarty/');
     define('DATA1', '%d/%m/%Y às %H:%M');
     define('DATA2', '%d/%m/%Y');
     define('DATA3', '%d/%m');
     define('DATA4', '%d/%m às %H:%M');
     require LIBS_DIR . '/class.mysql.php';
     require LIBS_DIR . '/class.functions.php';
     require LIBS_DIR . '/smarty/SmartyBC.class.php';
     require LIBS_DIR . '/class.input.php';
     require LIBS_DIR . '/class.log.php';
     require LIBS_DIR . '/class.loader.php';
     require LIBS_DIR . '/class.session.php';
     require LIBS_DIR . '/class.arrays.php';
     $this->loadSmarty();
     $this->loadDataBase();
     $this->session = new Session();
     //$this->session->endSession();
     $this->load = new Loader();
     $this->arrays = new Arrays();
     $this->log = new Log();
     $this->input = Input::parse_incoming();
     $this->func = new Functions();
     if ($this->loadAdmin) {
         require LIBS_DIR . '/class.admin.php';
         require LIBS_DIR . '/../global/admin.global.php';
         $this->admin = new Admin();
         //recupera  o cliente pela sessao e seta na url_portal para os links.
         $dominioCliente = $this->session->getItem('session_empresa_cliente');
         if (!empty($dominioCliente)) {
             self::$url_portal = self::$url_site . $dominioCliente . '/';
         }
         if ($this->loginRequerido) {
             require LIBS_DIR . '/class.admin.checklogin.php';
             $adminchecklogin = new AdminCheckLogin();
             $adminchecklogin->checkLoginAdmin();
         }
     } elseif ($this->loadPortal) {
         require LIBS_DIR . '/class.portal.php';
         $this->site = new Portal();
         //recupera  o cliente pela sessao e seta na url_portal para os links.
         $dominioCliente = $this->session->getItem('session_empresa_cliente');
         if (!empty($dominioCliente)) {
             self::$url_portal = self::$url_site . $dominioCliente . '/';
         }
     } else {
         require LIBS_DIR . '/class.site.php';
         //$this->session->deleteItem('session_empresa_cliente');
         $this->site = new Site();
     }
 }