コード例 #1
0
ファイル: X4Auth_model.php プロジェクト: paolocerto/x3cms
 /**
  * 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
ファイル: X4Site_model.php プロジェクト: paolocerto/x3cms
 /**
  * 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
ファイル: Page_model.php プロジェクト: paolocerto/x3cms
    /**
     * 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
ファイル: Group_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('groups');
 }
コード例 #5
0
ファイル: Permission_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor: set reference table
  *
  * @return  void
  */
 public function __construct()
 {
     // set default table
     parent::__construct('privs');
 }
コード例 #6
0
ファイル: Menu_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('menus');
 }
コード例 #7
0
ファイル: Language_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('languages');
 }
コード例 #8
0
ファイル: Context_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('contexts');
 }
コード例 #9
0
ファイル: Section_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('sections');
 }
コード例 #10
0
ファイル: Dictionary_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('dictionary');
 }
コード例 #11
0
ファイル: Widget_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('widgets');
 }
コード例 #12
0
ファイル: Theme_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('themes');
 }
コード例 #13
0
ファイル: File_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('files');
     $this->file_path = APATH . 'files/filemanager/';
 }
コード例 #14
0
ファイル: Template_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('templates');
 }
コード例 #15
0
ファイル: X4Plugin_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('modules');
 }
コード例 #16
0
ファイル: X4Matches_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('matches');
 }
コード例 #17
0
ファイル: X4Dict_model.php プロジェクト: paolocerto/x3cms
 /**
  * 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
ファイル: Category_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('categories');
 }
コード例 #20
0
ファイル: User_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('users');
 }
コード例 #21
0
ファイル: Article_model.php プロジェクト: paolocerto/x3cms
 /**
  * Constructor
  * set the default table
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('articles');
     $this->time = time();
 }