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