Beispiel #1
0
 /**
  * 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');
     }
 }
Beispiel #2
0
 /**
  * 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();
 }
Beispiel #3
0
    /**
     * 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();
    }
Beispiel #4
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('groups');
 }
Beispiel #5
0
 /**
  * Constructor: set reference table
  *
  * @return  void
  */
 public function __construct()
 {
     // set default table
     parent::__construct('privs');
 }
Beispiel #6
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('menus');
 }
Beispiel #7
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('languages');
 }
Beispiel #8
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('contexts');
 }
Beispiel #9
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('sections');
 }
Beispiel #10
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('dictionary');
 }
Beispiel #11
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('widgets');
 }
Beispiel #12
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('themes');
 }
Beispiel #13
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('files');
     $this->file_path = APATH . 'files/filemanager/';
 }
Beispiel #14
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('templates');
 }
Beispiel #15
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('modules');
 }
Beispiel #16
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('matches');
 }
Beispiel #17
0
 /**
  * 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;
 }
Beispiel #18
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('articles');
 }
Beispiel #19
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('categories');
 }
Beispiel #20
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('users');
 }
Beispiel #21
0
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('articles');
     $this->time = time();
 }