Exemplo n.º 1
0
 public function __construct()
 {
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     parent::__construct();
     __extends($this);
     $this->instance = get_instance();
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->load->library('install');
     $this->load->library('file');
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     if ($this->instance->db_connected()) {
         $this->load->library('users_global');
         $this->data['options'] = get_meta('all');
         trigger_inits();
         // For Core menu extension, they are called after default menu.
         /**
          * 	Declare Notices : Notices are internal(system) or module/theme alert.
          **/
         set_core_vars('tendoo_notices', trigger_filters('declare_notices', array(get_core_vars('default_notices'))));
         // @since 1.4
     } else {
         $this->users_global = FALSE;
         $this->data['options'] = FALSE;
     }
 }
Exemplo n.º 2
0
 public function __construct()
 {
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     parent::__construct();
     __extends($this);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->instance = get_instance();
     $this->load->library('form_validation');
     $this->load->library('installation');
     $this->load->library('file');
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->file->css_push('font');
     /**
     		$this->file->css_push('font');
     		$this->file->css_push('app.v2');
     		$this->file->css_push('fuelux');
     		// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     		$this->file->js_push('jquery');
     		$this->file->js_push('app.min.vtendoo');
     		$this->file->js_push('tendoo_app');
     		**/
     css_push_if_not_exists('../admin-lte/bootstrap/css/bootstrap.min');
     css_push_if_not_exists('../admin-lte/font-awesome/font-awesome.4.3.0.min');
     css_push_if_not_exists('../admin-lte/dist/css/AdminLTE.min');
     css_push_if_not_exists('../admin-lte/plugins/iCheck/square/blue');
     js_push_if_not_exists('../admin-lte/plugins/jQuery/jQuery-2.1.3.min');
     js_push_if_not_exists('../admin-lte/bootstrap/js/bootstrap.min');
     js_push_if_not_exists('../admin-lte/plugins/iCheck/icheck.min');
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 }
Exemplo n.º 3
0
 public function __construct($data)
 {
     parent::__construct();
     __extends($this);
     $this->_config();
     $this->data = $data;
     $this->instance = get_instance();
     $this->opened_module = get_core_vars('opened_module');
     $this->data['module'] = get_core_vars('opened_module');
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $fileManager = get_modules('filter_namespace', 'tendoo_contents');
     if ($fileManager) {
         include_once MODULES_DIR . $fileManager['encrypted_dir'] . '/utilities.php';
         set_core_vars('fmlib', new tendoo_contents_utility());
         // Loading library
     }
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->data['inner_head'] = $this->load->view('admin/inner_head', $this->data, true);
     $this->data['lmenu'] = $this->load->view(VIEWS_DIR . '/admin/left_menu', $this->data, true, TRUE);
     $this->link = MODULES_DIR . $this->opened_module['encrypted_dir'] . '/';
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     // ???
     $this->module_metas =& $this->opened_module;
     // ???
     // $this->load->library( 'GUI' );
 }
Exemplo n.º 4
0
 public function actionIndex()
 {
     $this->title = 'Tin tức';
     //       $page = Yii::app()->getParam("page");
     //
     //
     $criteria = new CDbCriteria();
     $criteria->condition = 'taxonomy_id = :id';
     $criteria->order = 'id DESC';
     $criteria->params = array(':id' => 1);
     //
     //        $item_count = Category::model()->count($criteria);
     //        $pages = new CPagination($item_count);
     //        $pages->setPageSize(5);
     //        $pages->applyLimit($criteria);  // the trick is here!
     $of = array();
     //        $of['model'] = Category::model()->findAll($criteria);
     //        $of['item_count'] = $item_count;
     //        $of['page_size'] = 1;
     //        $of['pages'] = $pages;
     //
     //
     $criteria->limit = 10;
     $data = Category::model()->findAll($criteria);
     $total = 0;
     foreach ($data as $k => $v) {
         if (Libraries::isEnable($v->id)) {
             $total++;
         }
     }
     $this->render('index', array('category' => $data, 'total' => $total, 'page' => $of));
 }
Exemplo n.º 5
0
 public function __construct($data)
 {
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     parent::__construct();
     __extends($this);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->load->library('gui');
     $this->_config();
     $this->data = $data;
     $this->instance = get_instance();
     $this->opened_module = get_core_vars('opened_module');
     $this->data['module'] = get_core_vars('opened_module');
     $this->news = new blogster_library($this->data);
     set_core_vars('news', $this->news);
     $this->data['news'] =& $this->news;
     // Deprecated
     $this->read_slug = 'read';
     $this->options = get_meta('blogster_settings');
     set_core_vars('blogster_settings', $this->options);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->data['inner_head'] = $this->load->view('admin/inner_head', $this->data, true);
     $this->data['lmenu'] = $this->load->view(VIEWS_DIR . '/admin/left_menu', $this->data, true, TRUE);
     $this->link = MODULES_DIR . $this->opened_module['encrypted_dir'] . '/';
     /*
     	Intégration de la librarie FILE MANAGER : Gestionnaire des fichiers médias.
     */
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $fileManager = get_modules('filter_namespace', 'tendoo_contents');
     if ($fileManager) {
         include_once MODULES_DIR . $fileManager['encrypted_dir'] . '/utilities.php';
         set_core_vars('fmlib', new tendoo_contents_utility());
         // Loading library
     }
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 }
Exemplo n.º 6
0
 function __construct()
 {
     parent::__construct();
     __extends($this);
     $this->module = get_modules('filter_namespace', 'pages_editor');
     $this->_before_boot();
 }
Exemplo n.º 7
0
 public function __construct()
 {
     parent::__construct();
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->instance = get_instance();
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->load->library('users_global');
     $this->load->library('file');
     $this->load->library('pagination');
     $this->load->library('form_validation');
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     css_push_if_not_exists('font');
     css_push_if_not_exists('../admin-lte/bootstrap/css/bootstrap.min');
     css_push_if_not_exists('../admin-lte/font-awesome/font-awesome.4.3.0.min');
     css_push_if_not_exists('../admin-lte/dist/css/AdminLTE.min');
     css_push_if_not_exists('../admin-lte/plugins/iCheck/square/blue');
     js_push_if_not_exists('../admin-lte/plugins/jQuery/jQuery-2.1.3.min');
     js_push_if_not_exists('../admin-lte/bootstrap/js/bootstrap.min');
     js_push_if_not_exists('../admin-lte/plugins/iCheck/icheck.min');
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     // Has admin ?
     $this->users_global->hasAdmin() === FALSE ? $this->url->redirect(array('registration', 'superAdmin')) : false;
     // is Connected ?
     $this->users_global->isConnected() === TRUE ? $this->url->redirect(array('index')) : false;
     $this->options = get_meta('all');
     set_core_vars('tendoo_notices', trigger_filters('declare_notices', array(get_core_vars('default_notices'))));
     // @since 1.4
 }
Exemplo n.º 8
0
 static function getRoutes()
 {
     $routes = [['get:books', function () {
         return (new Books())->index();
     }], ['get:books\\/(?<id>\\d+)', function ($params) {
         return (new Books())->show($params['id']);
     }], ['post:books', function () {
         return (new Books())->store(Books::filterData($_REQUEST));
     }], ['put:books\\/(?<id>\\d+)', function ($params) {
         return (new Books())->update($params['id'], Books::filterData($_REQUEST));
     }], ['delete:books\\/(?<id>\\d+)', function ($params) {
         return (new Books())->destroy($params['id']);
     }], ['get:libs', function () {
         return (new Libraries())->index();
     }], ['get:libs\\/(?<id>\\d+)', function ($params) {
         return (new Libraries())->show($params['id']);
     }], ['post:libs', function () {
         return (new Libraries())->store(Libraries::filterData($_REQUEST));
     }], ['put:libs\\/(?<id>\\d+)', function ($params) {
         return (new Libraries())->update($params['id'], Libraries::filterData($_REQUEST));
     }], ['delete:libs\\/(?<id>\\d+)', function ($params) {
         return (new Libraries())->destroy($params['id']);
     }]];
     return $routes;
 }
Exemplo n.º 9
0
 public function __construct($data = array())
 {
     parent::__construct();
     __extends($this);
     $this->data = $data;
     $this->load->library('file');
 }
 public function __construct()
 {
     parent::__construct();
     __extends($this);
     $this->cur_module = get_modules('filter_active_namespace', 'blogster');
     $this->encrypted_dir =& $this->cur_module['encrypted_dir'];
     $this->cur_module_dir = $this->cur_module['uri_path'];
     $this->data = array();
     $this->data['cur_module'] =& $this->cur_module;
 }
Exemplo n.º 11
0
 public function __construct($data)
 {
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     parent::__construct();
     __extends($this);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->module = get_core_vars('opened_module');
     $this->lib = new page_library();
     $this->data = array();
     $this->data['current_page'] = get_core_vars('page');
     set_bread(array('link' => get_instance()->url->site_url(array($this->data['current_page'][0]['PAGE_CNAME'])), 'text' => $this->data['current_page'][0]['PAGE_CNAME']));
 }
 public function __construct()
 {
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     parent::__construct();
     __extends($this);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->cur_module = get_modules('filter_active_namespace', 'pages_editor');
     $this->encrypted_dir =& $this->cur_module['encrypted_dir'];
     $this->cur_module_dir = MODULES_DIR . $this->encrypted_dir;
     $this->data = array();
     $this->data['cur_module'] =& $this->cur_module;
 }
Exemplo n.º 13
0
 public function __construct()
 {
     parent::__construct();
     self::$ressource =& $this;
     $this->is_installed = is_file(CONFIG_DIR . 'db_config.php') ? true : false;
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     // Default page values
     $this->description = __('No description available for this page');
     $this->title = __('Untitled page');
     $this->keywords = '';
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 }
Exemplo n.º 14
0
 function authlib()
 {
     parent::libraries();
     $this->db = new Database();
     $this->handler = $this->db->handler;
     # Lets retrieve the token
     $this->token = $_COOKIE['token'];
     if (!$this->token) {
         $this->token = 0;
     }
     # Don't change this unless you are running multiple memberBoxes in the same database.
     $app_name = 'memberBox';
 }
Exemplo n.º 15
0
 public function __construct($data)
 {
     parent::__construct();
     __extends($this);
     $this->data = $data;
     $this->data['page'] = get_core_vars('page');
     $this->data['module'] = get_core_vars('module');
     $this->data['current_page'] = get_core_vars('page');
     // Setting Bread
     $this->data['current_page'] = get_core_vars('page');
     set_bread(array('link' => get_instance()->url->site_url(array($this->data['current_page'][0]['PAGE_CNAME'])), 'text' => $this->data['current_page'][0]['PAGE_CNAME']));
     // End
 }
Exemplo n.º 16
0
 public function __construct()
 {
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     parent::__construct();
     __extends($this);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->module = get_modules('filter_namespace', 'blogster');
     $this->data = array();
     $this->instance = get_instance();
     $this->user =& $this->users_global;
     $this->mod_repo = MODULES_DIR . $this->module['encrypted_dir'] . '/';
     // Post les articles programmés.
     $this->postScheduledArt();
 }
Exemplo n.º 17
0
 public function __construct()
 {
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     parent::__construct();
     __extends($this);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->config();
     // --------------------------------------------------------------------
     $this->data = array();
     $this->data['lmenu'] = $this->load->view(VIEWS_DIR . '/admin/left_menu', $this->data, true, TRUE);
     $this->data['inner_head'] = $this->load->view('admin/inner_head', $this->data, true);
     $this->opened_module = get_core_vars('opened_module');
     $this->opened_module = $this->opened_module;
     $this->lib = new page_library();
 }
Exemplo n.º 18
0
 public function actionIndex()
 {
     $this->title = 'Học offline';
     $criteria = new CDbCriteria();
     $criteria->addCondition(array('taxonomy_id =  :cid', 'state = :stt'));
     $criteria->params = array(':cid' => 8, ':stt' => 1);
     $data = Category::model()->findAll($criteria);
     $total = 0;
     foreach ($data as $k => $v) {
         if (Libraries::isEnable($v->id)) {
             $total++;
         }
     }
     $this->render('index', array('category' => $data, 'total' => $total));
 }
Exemplo n.º 19
0
 public function __construct()
 {
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     parent::__construct();
     __extends($this);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->instance = get_instance();
     $this->theme = get_core_vars('active_theme');
     $this->data = array();
     // Inclusion du ficher "library.php".
     if (file_exists(THEMES_DIR . $this->theme['encrypted_dir'] . '/library.php')) {
         include_once THEMES_DIR . $this->theme['encrypted_dir'] . '/library.php';
     }
     $this->output_files();
 }
Exemplo n.º 20
0
 static function find($id, $array = false)
 {
     $idExpanded = explode('.', $id);
     if ($idExpanded[0] == 'php') {
         //php dependency -- simple check
         $phpClass = str_replace('.', DIRECTORY_SEPARATOR, substr($id, 4));
         $phpClass = Libraries::toClass($phpClass);
         if (class_exists($phpClass) || interface_exists($phpClass)) {
             return $phpClass;
         }
     }
     if ($idExpanded[0] == 'lib') {
         //custom lib reference
         $found = array();
         foreach (Libraries::getAllClass() as $class) {
             if (CoreInterface::oneof($class, '\\Core\\Object')) {
                 if (in_array($id, $class::__getProvides())) {
                     $found[] = $class;
                 }
             }
         }
         if ($found) {
             if (count($found) == 1) {
                 return $found[0];
             }
             return $found;
         }
     }
     if ($idExpanded[0] == 'interface') {
         //everything using an interface
         $interface = implode('\\', array_slice($idExpanded, 1));
         $found = array();
         foreach (Libraries::getAllClass() as $class) {
             if (CoreInterface::oneof($class, $interface)) {
                 $found[] = $class;
             }
         }
         if ($found) {
             if (count($found) == 1 && !$array) {
                 return $found[0];
             }
             return $found;
         }
     }
     if ($array) {
         return array();
     }
 }
Exemplo n.º 21
0
 public function __construct($data)
 {
     parent::__construct();
     __extends($this);
     $this->module = get_modules('filter_namespace', 'tendoo_widget_administrator');
     $this->load->library('tendoo_admin', null, 'admin');
     if (defined('SCRIPT_CONTEXT')) {
         if (SCRIPT_CONTEXT == 'ADMIN') {
             $this->admin_context();
             // get_instance()->tendoo_admin->system_not('2 Nouveaux commentaires disponibles', 'Deux nouveaux commentaires sont dans la liste d\'attentes des [Lire la suite] ', '#', '10 mai 2013', null);
         } else {
             $this->public_context();
         }
         $this->both_context();
     }
 }
Exemplo n.º 22
0
 public function __construct($data)
 {
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     parent::__construct();
     __extends($this);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->data = $data;
     $module = get_core_vars('opened_module');
     $this->config();
     $this->opened_module = $module;
     $this->data['module'] = $module;
     $this->lib = $this->data['lib'] = $this->file_contentAdmin = new file_contentAdmin($this->data);
     $this->data['module_dir'] = MODULES_DIR . $this->opened_module['encrypted_dir'];
     $this->data['repository_dir'] = MODULES_DIR . $this->opened_module['encrypted_dir'] . '/content_repository';
     $this->data['inner_head'] = $this->load->view('admin/inner_head', $this->data, true);
     $this->data['lmenu'] = $this->load->view(VIEWS_DIR . '/admin/left_menu', $this->data, true, TRUE);
 }
Exemplo n.º 23
0
 public function __construct($data)
 {
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     parent::__construct();
     __extends($this);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->instance = get_instance();
     $this->data = $data;
     $this->tendoo =& $this->instance->tendoo;
     $this->tendoo_admin =& $this->instance->tendoo_admin;
     $this->users_global =& $this->instance->users_global;
     $module = get_core_vars('opened_module');
     $this->dir = 'tendoo-modules/' . $module['encrypted_dir'];
     if (!is_dir($this->dir . '/content_repository')) {
         mkdir($this->dir . '/content_repository');
     }
     $this->cp_dir = $this->dir . '/content_repository';
 }
Exemplo n.º 24
0
 public function __construct()
 {
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     parent::__construct();
     __extends($this);
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->news = new News_smart();
     $this->data['page'] = get_core_vars('page');
     $this->data['theme'] = get_core_vars('active_theme_object');
     $this->data['module'] = get_core_vars('module');
     $this->data['news'] =& $this->news;
     $this->data['userUtil'] =& $this->users_global;
     $this->data['setting'] = get_meta('blogster_settings');
     // Setting Bread
     $this->data['current_page'] = get_core_vars('page');
     set_bread(array('link' => get_instance()->url->site_url(array($this->data['current_page'][0]['PAGE_CNAME'])), 'text' => $this->data['current_page'][0]['PAGE_CNAME']));
     // End
 }
Exemplo n.º 25
0
 public static function Req($LibName, $Arguments = '')
 {
     if (!is_array(self::$IncludedLibs)) {
         self::$IncludedLibs = array();
     }
     if (in_array($LibName, self::$IncludedLibs)) {
         return;
     }
     if (file_exists("lib/{$LibName}.php")) {
         include "lib/{$LibName}.php";
         self::$IncludedLibs[] = $LibName;
         if (is_string($Arguments)) {
             $Arguments = array($Arguments);
         }
         $GLOBALS[$LibName] = new $LibName($Arguments);
         return true;
     } else {
         return false;
     }
 }
Exemplo n.º 26
0
 public function run()
 {
     parent::run();
     if (isset($_POST['submit_reply'])) {
         $id = $_POST['hid'];
         $model = new Mquestion();
         $model->content = Yii::app()->request->getPost('content_reply', true);
         $model->parent = $_POST['hid'];
         $model->user_id = $this->_session['login_id'];
         $model->state = 0;
         if (Libraries::get_vip($model->user_id) != 0) {
             $model->state = 1;
         }
         $model->date_create = new CDbExpression('NOW()');
         $model->save();
     }
     $data['question'] = Mquestion::model()->findAll(array("condition" => "state = 1 and parent = 0 ", "order" => "date_create desc", "limit" => 1));
     $data['u_log'] = $this->_session['login_id'];
     $this->render('member_question', $data);
 }
Exemplo n.º 27
0
 public function __construct()
 {
     parent::__construct();
     // -=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=
     $this->db = get_db();
     $this->instance = get_instance();
     // -=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=
     $this->createUserAvatarDir();
     // -=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=
     $this->superAdmin = 0;
     // -=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=
     $this->connection_status = FALSE;
     if ($this->cookiesLogin() == FALSE) {
         // log user if not yet connected
         if ($this->session->started()) {
             $this->authUser($this->session->userdata('PSEUDO'), $this->session->userdata('PASSWORD'), FALSE, FALSE);
         }
     }
     $this->menuStatus = 'show_menu';
 }
Exemplo n.º 28
0
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $this->addToolbar();
     $model = new Danhngon();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['Danhngon'])) {
         $model->attributes = $_POST['Danhngon'];
         Libraries::check($model->attributes);
         $model->created_date = new CDbExpression('NOW()');
         $model->title = $model->title;
         //$model->validate();
         //Libraries::check($model->getErrors());
         $model->audio = str_replace("/06.WWW/", "", $model->audio);
         if ($model->save()) {
             $this->redirect(array('index'));
         }
     }
     $this->render('form', array('model' => $model));
 }
Exemplo n.º 29
0
 public function __construct($data)
 {
     parent::__construct();
     $this->instance = get_instance();
     $this->tendoo = $this->instance->tendoo;
     $this->module = get_core_vars('opened_module');
     $this->moduleNamespace = $this->module['namespace'];
     // retreive namespace
     $this->tendoo_admin =& $this->instance->tendoo_admin;
     $this->data =& $data;
     $this->notice =& $this->instance->notice;
     $this->data['module_dir'] = $this->module['uri_path'];
     $this->lib = new widhandler_lib($this->data);
     $this->data['lib'] =& $this->lib;
     $this->data['inner_head'] = $this->load->view('admin/inner_head', $this->data, true);
     $this->data['lmenu'] = $this->load->view(VIEWS_DIR . '/admin/left_menu', $this->data, true, TRUE);
     if (!current_user()->can('manage_widgets@tendoo_widget_administrator')) {
         $this->instance->url->redirect(array('admin', 'index?notice=access-denied'));
     }
 }
Exemplo n.º 30
0
 public function __construct()
 {
     parent::__construct();
     $this->instance = get_instance();
     $this->db = get_db();
     $this->data = array();
     $this->options = get_core_vars('options');
     // -=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=-=-=-=-=-=--=
     $this->libraries_loader();
     //	Affecting Libraries */
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     set_core_vars('admin_menu_items', array('dashboard', 'menu', 'about', 'users', 'controllers', 'installer', 'modules', 'themes', 'settings', 'roles', 'frontend'));
     // @since 1.4
     set_core_vars('admin_menu_position', array('after', 'before'));
     // @since 1.4
     // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $this->__admin_widgets();
     // USING core WiDGET and thoses defined through init
     $this->__creating_menus();
     trigger_inits();
     // For Core menu extension, they are called after default menu.
     $this->notices_loader();
     $this->file_loader();
     if (get_user_meta('tendoo_status') == false && get_instance()->url->method() != 'about') {
         get_instance()->url->redirect(array('admin', 'about'));
     }
     /**
      * 	Declare Notices : Notices are internal(system) or module/theme alert.
      **/
     set_core_vars('tendoo_notices', trigger_filters('declare_notices', array(get_core_vars('default_notices'))));
     // @since 1.4
     set_page('description', translate('Dashboard') . ' | ' . get('core_version'));
     /*$this->tendoo_admin->system_not('Modifier vos param&ecirc;tre de s&eacute;curit&eacute;', 'Mettez vous &agrave; jour avec cette version', '#', '10 mai 2013', null);*/
     // Set Default View
     set_core_vars('inner_head', $this->load->view('admin/inner_head', array(), true, false), 'read_only');
     set_core_vars('lmenu', $this->load->view('admin/left_menu', array(), true, false), 'read_only');
 }