/** * Constructor * set the default table * * @return void */ public function __construct($table_name) { parent::__construct($table_name); // update areas tables $areas = $this->db->query('SELECT id FROM areas WHERE id > 1 AND private = 1'); foreach ($areas as $i) { $this->areas_tables[$i->id] = array('table' => 'x3_members', 'session' => 'uid', 'username' => 'title', 'mail' => 'mail', 'last_in' => 'last_in'); } }
/** * Constructor * Initialize site model * * * @return void */ public function __construct() { parent::__construct('sites'); // get area $this->area = $this->set_data(); // if no language is set by route set area predefined language $this->lang = empty(X4Route_core::$lang) ? $this->area->lang : X4Route_core::$lang; // set language X4Route_core::set_lang($this->lang); // get site $this->site = $this->get_site($this->area->id); if (!$this->area || !$this->site) { header('Location: ' . ROOT . 'public/msg/message/_page_not_found'); die; } // set now $this->now = time(); // Load site parameters $this->to_define(); }
/** * Constructor * * @param integer $id_area Area ID * @param string $lang Language code * @param integer $id_page Page ID * @param string $from Parent page URL * @return void */ public function __construct($id_area = 0, $lang = '', $id_page = 0, $from = '') { // set default table parent::__construct('pages'); if ($id_page) { // create object by Page ID $data = $this->db->query_row('SELECT p.id_area, p.lang, p.xfrom FROM pages p JOIN areas a ON a.id = p.id_area WHERE p.id = ' . intval($id_page)); // override parameters $id_area = $data->id_area; $lang = $data->lang; $from = $data->xfrom; } // initialize object $this->id_area = $id_area; $this->lang = $lang; $this->xfrom = $from; $this->menu = new Menu_model(); }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('groups'); }
/** * Constructor: set reference table * * @return void */ public function __construct() { // set default table parent::__construct('privs'); }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('menus'); }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('languages'); }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('contexts'); }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('sections'); }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('dictionary'); }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('widgets'); }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('themes'); }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('files'); $this->file_path = APATH . 'files/filemanager/'; }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('templates'); }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('modules'); }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('matches'); }
/** * Initialize dictionary model * * @param string area name * @param string language code * @return void */ public function __construct($area, $lang) { parent::__construct('dictionary'); $this->area = $area; $this->lang = $lang; }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('articles'); }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('categories'); }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('users'); }
/** * Constructor * set the default table * * @return void */ public function __construct() { parent::__construct('articles'); $this->time = time(); }