Web hosts - Chapter 4: Architecture of an Intranet Application //
Chapter 4: Architecture of an Intranet Application // load error handler $this->has_error = null; $this->set_error_handler(); // start session if (strstr($this->get_type(), WEB )) { session_start(); $this->user_id = (! empty($_SESSION[ SESSION_USER_ID ])) ? $_SESSION[ SESSION_USER_ID ] : null; $this->user_name = (! empty($_SESSION[ SESSION_USERNAME ])) ? $_SESSION[ SESSION_USERNAME ]: null;; $this->user_email = (! empty($_SESSION[ SESSION_USERNAME ])) ? $_SESSION[ SESSION_USERNAME ]: null;; $this->set_url(); if ($this->auto_chk_session) $this->check_session(); if (! empty($this->app_db_url) && $this->auto_connect && ! $this>connect()) { $this->alert( APP_FAILED ); } if ($this->auto_authorize && ! $this->authorize()) { $this->alert( UNAUTHORIZED_ACCESS ); } } } function getEMAIL() { return $this->user_email; } Continued