Example #1
0
 /**
  * function construct
  *
  */
 function __construct()
 {
     $FilterRequest = new magixcjquery_filter_request();
     $FilterVar = new magixcjquery_filter_isVar();
     if ($FilterRequest->isGet('getidpage_p')) {
         $this->idParent = $FilterVar->isPostAlphaNumeric($_GET['getidpage_p']);
     }
     if ($FilterRequest->isGet('getidpage')) {
         $this->idPage = $FilterVar->isPostNumeric($_GET['getidpage']);
     }
 }
Example #2
0
 /**
  * function construct
  *
  */
 function __construct()
 {
     $FilterRequest = new magixcjquery_filter_request();
     $FilterVar = new magixcjquery_filter_isVar();
     if ($FilterRequest->isGet('idclc')) {
         $this->idCat = $FilterVar->isPostNumeric($_GET['idclc']);
     }
     if ($FilterRequest->isGet('idcls')) {
         $this->idSubcat = $FilterVar->isPostNumeric($_GET['idcls']);
     }
     if ($FilterRequest->isGet('idproduct')) {
         $this->idProduct = $FilterVar->isPostNumeric($_GET['idproduct']);
     }
 }
Example #3
0
 /**
  * function construct
  */
 function __construct()
 {
     if (magixcjquery_filter_request::isGet('strLangue')) {
         $this->getlang = magixcjquery_filter_join::getCleanAlpha($_GET['strLangue'], 3);
     } else {
         $this->getlang = frontend_model_template::current_Language();
     }
 }
Example #4
0
 /**
  * function construct
  */
 function __construct()
 {
     $FilterRequest = new magixcjquery_filter_request();
     $CleanUrl = new magixcjquery_url_clean();
     if ($FilterRequest->isGet('getnews')) {
         $this->idNews = magixcjquery_filter_var::clean($_GET['getnews']);
     }
     if ($FilterRequest->isGet('getdate')) {
         $this->dateNews = $_GET['getdate'];
     }
     $this->idPagination = 1;
     if ($FilterRequest->isGet('page') and is_numeric($_GET['page'])) {
         $this->idPagination = intval($_GET['page']);
     }
     if ($FilterRequest->isGet('tag')) {
         $this->idTag = $CleanUrl->make2tagString($_GET['tag']);
     }
 }
Example #5
0
 /**
  *  @access public construct
  */
 public function __construct()
 {
     if (magixcjquery_filter_request::isGet('action')) {
         $this->action = magixcjquery_form_helpersforms::inputClean($_GET['action']);
     }
     if (magixcjquery_filter_request::isPost('version')) {
         $this->version = magixcjquery_form_helpersforms::inputClean($_POST['version']);
     }
 }
/**
 * Smarty {widget_lang_data} function plugin
 *
 * Type:     function
 * Name:     widget_lang_data
 * Date:     24/03/2015
 * Update:
 * Output:
 * @author   Gerits Aurélien (http://www.magix-cms.com)
 * @link
 * @version  1.0
 * @param $params
 * @param $template
 * @return string
 */
function smarty_function_widget_lang_data($params, $template)
{
    $ModelConstructor = new magixglobal_model_constructor();
    // *** Catch location var
    $iso_current = magixcjquery_filter_request::isGet('strLangue');
    // *** Load SQL DATA
    $data = frontend_db_lang::s_fetch_lang();
    $assign = isset($params['assign']) ? $params['assign'] : 'data';
    $template->assign($assign, $data);
}
Example #7
0
 /**
  * Constructor
  */
 public function __construct()
 {
     if (magixcjquery_filter_request::isSession('id_admin')) {
         $this->id_admin = $_SESSION['id_admin'];
     }
     if (magixcjquery_filter_request::isSession('email_admin')) {
         $this->email_admin = $_SESSION['email_admin'];
     }
     if (magixcjquery_filter_request::isSession('keyuniqid_admin')) {
         $this->keyuniqid_admin = $_SESSION['keyuniqid_admin'];
     }
 }
Example #8
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     if (magixcjquery_filter_request::isGet('strLangue')) {
         $this->getlang = magixcjquery_form_helpersforms::inputClean($_GET['strLangue']);
     }
     if (magixcjquery_filter_request::isGet('pstring1')) {
         $this->pstring1 = magixcjquery_form_helpersforms::inputClean($_GET['pstring1']);
     }
     if (magixcjquery_filter_request::isGet('pnum1')) {
         $this->pnum1 = magixcjquery_form_helpersforms::inputNumeric($_GET['pnum1']);
     }
     $this->template = new frontend_controller_plugins();
 }
Example #9
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     if (magixcjquery_filter_request::isPost('email_chimp')) {
         $this->email_chimp = magixcjquery_form_helpersforms::inputClean($_POST['email_chimp']);
     }
     if (magixcjquery_filter_request::isPost('firstname_chimp')) {
         $this->firstname_chimp = magixcjquery_form_helpersforms::inputClean($_POST['firstname_chimp']);
     }
     if (magixcjquery_filter_request::isPost('lastname_chimp')) {
         $this->lastname_chimp = magixcjquery_form_helpersforms::inputClean($_POST['lastname_chimp']);
     }
     $this->template = new frontend_controller_plugins();
 }
Example #10
0
 /**
  * @access public
  * Constructor
  */
 function __construct()
 {
     if (class_exists('backend_model_message')) {
         $this->message = new backend_model_message();
     }
     if (magixcjquery_filter_request::isGet('action')) {
         $this->action = magixcjquery_form_helpersforms::inputClean($_GET['action']);
     }
     if (magixcjquery_filter_request::isGet('tab')) {
         $this->tab = magixcjquery_form_helpersforms::inputClean($_GET['tab']);
     }
     if (magixcjquery_filter_request::isPost('clear')) {
         $this->clear = (string) magixcjquery_form_helpersforms::inputClean($_POST['clear']);
     }
 }
Example #11
0
 /**
  * @access public
  * Constructor
  */
 public function __construct()
 {
     if (class_exists('backend_model_message')) {
         $this->message = new backend_model_message();
     }
     if (magixcjquery_filter_request::isPost('xml_type')) {
         $this->xml_type = magixcjquery_form_helpersforms::inputClean($_POST['xml_type']);
     }
     if (magixcjquery_filter_request::isPost('tools_type')) {
         $this->tools_type = magixcjquery_form_helpersforms::inputClean($_POST['tools_type']);
     }
     if (magixcjquery_filter_request::isPost('idlang')) {
         $this->idlang = magixcjquery_filter_isVar::isPostNumeric($_POST['idlang']);
     }
 }
Example #12
0
 /**
  * Retourne la langue en cours de session sinon retourne fr par défaut
  * @return string
  * @access public
  * @static
  */
 public static function current_Language()
 {
     if (isset(self::$adminLanguage)) {
         if (!empty(self::$adminLanguage)) {
             $lang = magixcjquery_filter_join::getCleanAlpha($_SESSION['adminLanguage'], 3);
         } else {
             $lang = 'fr';
         }
     } else {
         if (magixcjquery_filter_request::isSession('adminLanguage')) {
             $lang = magixcjquery_filter_join::getCleanAlpha($_SESSION['adminLanguage'], 3);
         } else {
             $lang = 'fr';
         }
     }
     return $lang;
 }
Example #13
0
 /**
  * Constructor
  */
 function __construct()
 {
     if (magixcjquery_filter_request::isPost('lastname_admin')) {
         $this->lastname_admin = magixcjquery_form_helpersforms::inputClean($_POST['lastname_admin']);
     }
     if (magixcjquery_filter_request::isPost('firstname_admin')) {
         $this->firstname_admin = magixcjquery_form_helpersforms::inputClean($_POST['firstname_admin']);
     }
     if (magixcjquery_filter_request::isPost('pseudo_admin')) {
         $this->pseudo_admin = magixcjquery_form_helpersforms::inputClean($_POST['pseudo_admin']);
     }
     if (magixcjquery_filter_request::isPost('email_admin')) {
         $this->email_admin = magixcjquery_form_helpersforms::inputClean($_POST['email_admin']);
     }
     if (magixcjquery_filter_request::isPost('passwd_admin')) {
         $this->passwd_admin = magixcjquery_form_helpersforms::inputClean(sha1($_POST['passwd_admin']));
     }
     if (magixcjquery_filter_request::isGet('action')) {
         $this->action = magixcjquery_form_helpersforms::inputClean($_GET['action']);
     }
 }
Example #14
0
 /**
  * Function construct
  */
 function __construct()
 {
     if (class_exists('backend_model_message')) {
         $this->message = new backend_model_message();
     }
     if (magixcjquery_filter_request::isPost('webmaster')) {
         $this->webmaster = magixcjquery_form_helpersforms::inputClean($_POST['webmaster']);
     }
     if (magixcjquery_filter_request::isPost('analytics')) {
         $this->analytics = magixcjquery_form_helpersforms::inputClean($_POST['analytics']);
     }
     if (magixcjquery_filter_request::isPost('googleplus')) {
         $this->googleplus = magixcjquery_form_helpersforms::inputClean($_POST['googleplus']);
     }
     if (magixcjquery_filter_request::isPost('robots')) {
         $this->robots = magixcjquery_form_helpersforms::inputClean($_POST['robots']);
     }
     if (magixcjquery_filter_request::isGet('action')) {
         $this->action = magixcjquery_form_helpersforms::inputClean($_GET['action']);
     }
 }
Example #15
0
 /**
  * constructeur
  */
 public function __construct()
 {
     if (class_exists('backend_model_message')) {
         $this->message = new backend_model_message();
     }
     // Global
     if (magixcjquery_filter_request::isGet('getlang')) {
         $this->getlang = magixcjquery_filter_isVar::isPostNumeric($_GET['getlang']);
     }
     if (magixcjquery_filter_request::isGet('edit')) {
         $this->edit = magixcjquery_filter_isVar::isPostNumeric($_GET['edit']);
     }
     if (magixcjquery_filter_request::isGet('action')) {
         $this->action = magixcjquery_form_helpersforms::inputClean($_GET['action']);
     }
     if (magixcjquery_filter_request::isGet('tab')) {
         $this->tab = magixcjquery_form_helpersforms::inputClean($_GET['tab']);
     }
     // Dédié
     if (magixcjquery_filter_request::isGet('plugin')) {
         $this->plugin = magixcjquery_form_helpersforms::inputClean($_GET['plugin']);
     }
     if (magixcjquery_filter_request::isGet('id')) {
         $this->id = (int) magixcjquery_filter_isVar::isPostNumeric($_GET['id']);
     }
     if (magixcjquery_filter_request::isPost('pspid_og')) {
         $this->pspid_og = magixcjquery_form_helpersforms::inputClean($_POST['pspid_og']);
     }
     if (magixcjquery_filter_request::isPost('passphrase_og')) {
         $this->passphrase_og = magixcjquery_form_helpersforms::inputClean($_POST['passphrase_og']);
     }
     if (magixcjquery_filter_request::isPost('formaction_og')) {
         $this->formaction_og = magixcjquery_form_helpersforms::inputClean($_POST['formaction_og']);
     }
     $this->header = new magixglobal_model_header();
     $this->template = new backend_controller_plugins();
 }
Example #16
0
 /**
  * Execution des scripts de la classe
  */
 public function run()
 {
     $header = new magixglobal_model_header();
     $create = new backend_controller_template();
     if (magixcjquery_filter_request::isGet('getlang')) {
     } else {
         if (isset($this->action)) {
             if ($this->action == 'list') {
                 if (isset($this->tab)) {
                     if ($this->tab === 'snippet') {
                         $header->head_expires("Mon, 26 Jul 1997 05:00:00 GMT");
                         $header->head_last_modified(gmdate("D, d M Y H:i:s") . "GMT");
                         $header->pragma();
                         $header->cache_control("nocache");
                         $header->getStatus('200');
                         $header->javascript_header("UTF-8");
                         $this->jsSnippet('snippet');
                     }
                 }
             }
         }
     }
 }
Example #17
0
 /**
  * execution du module d'accès
  */
 public function run()
 {
     $header = new magixglobal_model_header();
     $create = new backend_controller_template();
     $create->addConfigFile(array('users'), array('users_'), false);
     $access = $this->model_access->module_access("backend_controller_access");
     $all_access = $this->model_access->all_data_employee($this->model_access->data_session());
     //print_r($all_access);
     $create->assign('access', $access);
     $create->assign('all_access', $all_access);
     //if($access['view'] == 1)
     if ($this->action == 'add') {
         if (isset($this->role_name)) {
             $this->add_profile($this->role_name);
         } elseif (isset($this->id_module)) {
             $this->add_new_access($this->id_module);
         } else {
             $create->display('access/add.tpl');
         }
     } elseif ($this->action == 'list') {
         if (magixcjquery_filter_request::isGet('json_profiles')) {
             $header->head_expires("Mon, 26 Jul 1997 05:00:00 GMT");
             $header->head_last_modified(gmdate("D, d M Y H:i:s") . "GMT");
             $header->pragma();
             $header->cache_control("nocache");
             $header->getStatus('200');
             $header->json_header("UTF-8");
             $this->listing_profile();
         } elseif (magixcjquery_filter_request::isGet('json_access')) {
             $header->head_expires("Mon, 26 Jul 1997 05:00:00 GMT");
             $header->head_last_modified(gmdate("D, d M Y H:i:s") . "GMT");
             $header->pragma();
             $header->cache_control("nocache");
             $header->getStatus('200');
             $header->json_header("UTF-8");
             $this->listing_access();
         } else {
             $create->display('access/list.tpl');
         }
     } elseif ($this->action == 'edit') {
         if (isset($this->role_name)) {
             $this->edit_profile($this->role_name);
         } elseif ($this->id_access) {
             $this->edit_access();
         } else {
             $this->load_data_profile($create);
             $create->display('access/edit.tpl');
         }
     } elseif ($this->action == 'remove') {
         if (isset($this->delete_role)) {
             $this->remove_role($this->delete_role);
         }
     } else {
         $access = new backend_model_access();
         /*print "<pre>";
           print_r($access->listPlugins());
           print "</pre>";*/
         $create->display('access/list.tpl');
     }
 }
Example #18
0
 /**
  *
  */
 public function run()
 {
     $header = new magixglobal_model_header();
     if (magixcjquery_filter_request::isGet('json_check')) {
         $header->head_expires("Mon, 26 Jul 1997 05:00:00 GMT");
         $header->head_last_modified(gmdate("D, d M Y H:i:s") . "GMT");
         $header->pragma();
         $header->cache_control("nocache");
         $header->getStatus('200');
         $header->json_header("UTF-8");
         $this->json_check();
     } elseif (magixcjquery_filter_request::isGet('json_chmod')) {
         $header->head_expires("Mon, 26 Jul 1997 05:00:00 GMT");
         $header->head_last_modified(gmdate("D, d M Y H:i:s") . "GMT");
         $header->pragma();
         $header->cache_control("nocache");
         $header->getStatus('200');
         $header->json_header("UTF-8");
         $this->json_chmod();
     } else {
         app_model_smarty::getInstance()->display('analysis/index.tpl');
     }
 }
Example #19
0
 /**
  * protected var for dbLayer
  *
  * @var void
  */
 function __construct()
 {
     if (class_exists('backend_model_message')) {
         $this->message = new backend_model_message();
     }
     if (magixcjquery_filter_request::isPost('passwd_admin')) {
         $this->passwd_admin = sha1(magixcjquery_form_helpersforms::inputClean($_POST['passwd_admin']));
     }
     if (magixcjquery_filter_request::isPost('hashtoken')) {
         $this->hashtoken = magixcjquery_filter_var::escapeHTML($_POST['hashtoken']);
     }
     if (magixcjquery_filter_request::isGet('logout')) {
         $this->logout = magixcjquery_filter_isVar::isPostAlpha($_GET['logout']);
     }
     if (magixcjquery_filter_request::isPost('email_admin')) {
         $this->email_admin = magixcjquery_filter_isVar::isMail($_POST['email_admin']);
     }
     //LOSTPASSWORD
     if (magixcjquery_filter_request::isPost('lo_email_admin')) {
         $this->lo_email_admin = magixcjquery_filter_isVar::isMail($_POST['lo_email_admin']);
     }
 }
Example #20
0
 /**
  * Construct class
  */
 public function __construct()
 {
     if (class_exists('backend_model_message')) {
         $this->message = new backend_model_message();
     }
     if (magixcjquery_filter_request::isGet('action')) {
         $this->action = magixcjquery_form_helpersforms::inputClean($_GET['action']);
     }
     if (magixcjquery_filter_request::isGet('tab')) {
         $this->tab = magixcjquery_form_helpersforms::inputClean($_GET['tab']);
     }
     if (magixcjquery_filter_request::isGet('getlang')) {
         $this->getlang = magixcjquery_form_helpersforms::inputNumeric($_GET['getlang']);
     }
     if (magixcjquery_filter_request::isGet('edit')) {
         $this->edit = magixcjquery_form_helpersforms::inputNumeric($_GET['edit']);
     }
     # ADD PAGE
     if (magixcjquery_filter_request::isPost('title')) {
         $this->title = magixcjquery_form_helpersforms::inputClean($_POST['title']);
     }
     if (magixcjquery_filter_request::isPost('type')) {
         $this->ltype = magixcjquery_form_helpersforms::inputClean($_POST['type']);
     }
     if (magixcjquery_filter_request::isPost('content')) {
         $this->content = magixcjquery_form_helpersforms::inputClean($_POST['content']);
     }
     if (magixcjquery_filter_request::isPost('url')) {
         $this->url = magixcjquery_form_helpersforms::inputClean($_POST['url']);
     }
     if (magixcjquery_filter_request::isPost('blank')) {
         $this->blank = magixcjquery_form_helpersforms::inputClean($_POST['blank']);
     }
     # EDIT LINK
     if (magixcjquery_filter_request::isPOST('idlink')) {
         $this->idlink = magixcjquery_form_helpersforms::inputNumeric($_POST['idlink']);
     }
     # DELETE LINK
     if (magixcjquery_filter_request::isPOST('delete')) {
         $this->delete = magixcjquery_form_helpersforms::inputNumeric($_POST['delete']);
     }
     # ORDER LINK
     if (magixcjquery_filter_request::isPost('order')) {
         $this->order = magixcjquery_form_helpersforms::arrayClean($_POST['order']);
     }
     // Ajax search
     if (magixcjquery_filter_request::isGet('search_type')) {
         $this->type = magixcjquery_form_helpersforms::inputClean($_GET['search_type']);
     }
     if (magixcjquery_filter_request::isGet('q')) {
         $this->q = magixcjquery_form_helpersforms::inputClean($_GET['q']);
     }
     $this->template = new backend_controller_plugins();
 }
Example #21
0
 /**
  * Constructor
  */
 public function __construct()
 {
     if (magixcjquery_filter_request::isGet('name')) {
         $this->nameplugin = magixcjquery_form_helpersforms::inputClean($_GET['name']);
     }
     if (magixcjquery_filter_request::isGet('getlang')) {
         $this->getlang = (int) magixcjquery_filter_isVar::isPostNumeric($_GET['getlang']);
     }
     if (magixcjquery_filter_request::isGet('plugin')) {
         $this->plugin = magixcjquery_form_helpersforms::inputClean($_GET['plugin']);
     }
 }
Example #22
0
 /**
  * construct
  */
 public function __construct()
 {
     $this->country = new backend_controller_country();
     $this->translation = new backend_controller_template();
     if (class_exists('backend_model_message')) {
         $this->message = new backend_model_message();
     }
     if (magixcjquery_filter_request::isGet('tab')) {
         $this->tab = magixcjquery_form_helpersforms::inputClean($_GET['tab']);
     }
     if (magixcjquery_filter_request::isGet('edit')) {
         $this->edit = magixcjquery_filter_isVar::isPostNumeric($_GET['edit']);
     }
     if (magixcjquery_filter_request::isGet('action')) {
         $this->action = magixcjquery_form_helpersforms::inputClean($_GET['action']);
     }
     if (magixcjquery_filter_request::isGet('plugin')) {
         $this->plugin = magixcjquery_form_helpersforms::inputClean($_GET['plugin']);
     }
     //GET
     if (magixcjquery_filter_request::isGet('page')) {
         // si numéric
         if (is_numeric($_GET['page'])) {
             $this->getpage = intval($_GET['page']);
         } else {
             // Sinon retourne la première page
             $this->getpage = 1;
         }
     } else {
         $this->getpage = 1;
     }
     // POST
     /* ################# CONFIG ###################*/
     if (magixcjquery_filter_request::isPost('mail_order')) {
         $this->mail_order = magixcjquery_form_helpersforms::inputClean($_POST['mail_order']);
     }
     if (magixcjquery_filter_request::isPost('mail_order_from')) {
         $this->mail_order_from = magixcjquery_form_helpersforms::inputClean($_POST['mail_order_from']);
     }
     if (magixcjquery_filter_request::isPost('online_payment')) {
         $this->online_payment = 1;
     }
     if (magixcjquery_filter_request::isPost('profil')) {
         $this->profil = 1;
     }
     if (magixcjquery_filter_request::isPost('bank_wire')) {
         $this->bank_wire = 1;
     }
     if (magixcjquery_filter_request::isPost('hipay')) {
         $this->hipay = 1;
     }
     if (magixcjquery_filter_request::isPost('ogone')) {
         $this->ogone = 1;
     }
     if (magixcjquery_filter_request::isPost('shipping')) {
         $this->shipping = 1;
     }
     if (magixcjquery_filter_request::isPost('account_owner')) {
         $this->account_owner = magixcjquery_form_helpersforms::inputClean($_POST['account_owner']);
     }
     if (magixcjquery_filter_request::isPost('contact_details')) {
         $this->contact_details = magixcjquery_form_helpersforms::inputClean($_POST['contact_details']);
     }
     if (magixcjquery_filter_request::isPost('bank_address')) {
         $this->bank_address = magixcjquery_form_helpersforms::inputClean($_POST['bank_address']);
     }
     /* ################### TVA #####################*/
     // Config
     if (magixcjquery_filter_request::isPost('amount_tva_1')) {
         $this->amount_tva_1 = magixcjquery_form_helpersforms::inputClean($_POST['amount_tva_1']);
     }
     if (magixcjquery_filter_request::isPost('amount_tva_2')) {
         $this->amount_tva_2 = magixcjquery_form_helpersforms::inputClean($_POST['amount_tva_2']);
     }
     if (magixcjquery_filter_request::isPost('zone_tva_1')) {
         $this->zone_tva_1 = magixcjquery_form_helpersforms::inputClean($_POST['zone_tva_1']);
     }
     if (magixcjquery_filter_request::isPost('zone_tva_2')) {
         $this->zone_tva_2 = magixcjquery_form_helpersforms::inputClean($_POST['zone_tva_2']);
     }
     // TVA
     if (magixcjquery_filter_request::isPost('remove_tva')) {
         $this->remove_tva = magixcjquery_form_helpersforms::inputClean($_POST['remove_tva']);
     }
     if (magixcjquery_filter_request::isPost('iso')) {
         $this->iso = magixcjquery_form_helpersforms::inputClean($_POST['iso']);
     }
     if (magixcjquery_filter_request::isPost('country')) {
         $this->country = magixcjquery_form_helpersforms::inputClean($_POST['country']);
     }
     if (magixcjquery_filter_request::isPost('idtvac')) {
         $this->idtvac = magixcjquery_form_helpersforms::inputClean($_POST['idtvac']);
     }
     $this->header = new magixglobal_model_header();
     $this->template = new backend_controller_plugins();
     if (class_exists('plugins_cartpay_module')) {
         $this->module = new plugins_cartpay_module();
     }
 }
Example #23
0
 /**
  * Retourne la langue en cours de session sinon retourne fr par défaut
  * @return string
  * @access public 
  * @static
  */
 public static function current_Language()
 {
     if (magixcjquery_filter_request::isGet('strLangue')) {
         $lang = self::getLanguage();
     } else {
         $db = frontend_db_lang::s_default_language();
         if ($db != null) {
             $lang = $db['iso'];
         } else {
             if (magixcjquery_filter_request::isSession('strLangue')) {
                 $lang = magixcjquery_filter_join::getCleanAlpha($_SESSION['strLangue'], 3);
             }
         }
     }
     return $lang;
 }
Example #24
0
 /**
  * 
  * Execute la fonction run
  */
 public function run()
 {
     $header = new magixglobal_model_header();
     $create = new backend_controller_template();
     $create->addConfigFile(array('seo'), array('seo_'), false);
     if (magixcjquery_filter_request::isGet('getlang')) {
         if (isset($this->action)) {
             if ($this->action == 'list') {
                 if (magixcjquery_filter_request::isGet('json_list_seo')) {
                     $header->head_expires("Mon, 26 Jul 1997 05:00:00 GMT");
                     $header->head_last_modified(gmdate("D, d M Y H:i:s") . "GMT");
                     $header->pragma();
                     $header->cache_control("nocache");
                     $header->getStatus('200');
                     $header->json_header("UTF-8");
                     $this->json_list_metas();
                 } else {
                     $this->select_attribute($create);
                     $this->select_level($create);
                     $this->select_metas($create);
                     $create->display('seo/list.tpl');
                 }
             } elseif ($this->action == 'add') {
                 if (isset($this->strrewrite)) {
                     $this->add();
                 }
             } elseif ($this->action == 'edit') {
                 if (isset($this->edit)) {
                     $data = parent::s_rewrite_data($this->edit);
                     if (isset($this->strrewrite)) {
                         $this->update();
                     } else {
                         $this->load_rewrite($create, $data);
                         $this->select_attribute($create, $data['attribute']);
                         $this->select_level($create, $data['level']);
                         $this->select_metas($create, $data['idmetas']);
                         $create->display('seo/edit.tpl');
                     }
                 }
             } elseif ($this->action == 'remove') {
                 if (isset($this->delete_metas)) {
                     $this->remove_rewrite();
                 }
             }
         }
     } else {
         if (magixcjquery_filter_request::isGet('json_graph')) {
             $header->head_expires("Mon, 26 Jul 1997 05:00:00 GMT");
             $header->head_last_modified(gmdate("D, d M Y H:i:s") . "GMT");
             $header->pragma();
             $header->cache_control("nocache");
             $header->getStatus('200');
             $header->json_header("UTF-8");
             $this->json_graph();
         } else {
             $create->display('seo/index.tpl');
         }
     }
 }
Example #25
0
 /**
  * Execute le module dans l'administration
  * @access public
  */
 public function run()
 {
     $header = new magixglobal_model_header();
     $create = new backend_controller_template();
     $plugin = new backend_controller_plugins();
     $create->addConfigFile(array('news'), array('news_'), false);
     $access = $this->model_access->module_access("backend_controller_news");
     $create->assign('access', $access);
     if (magixcjquery_filter_request::isGet('getlang')) {
         if (isset($this->action)) {
             if ($this->action == 'list') {
                 $max = 20;
                 if (magixcjquery_filter_request::isGet('json_list_news')) {
                     $header->head_expires("Mon, 26 Jul 1997 05:00:00 GMT");
                     $header->head_last_modified(gmdate("D, d M Y H:i:s") . "GMT");
                     $header->pragma();
                     $header->cache_control("nocache");
                     $header->getStatus('200');
                     $header->json_header("UTF-8");
                     $this->json_list_news($max);
                 } else {
                     $create->assign('pagination', $this->news_pagination($max));
                     $create->display('news/list.tpl');
                 }
             } elseif ($this->action == 'add') {
                 if (isset($this->n_title)) {
                     $this->insert_news_data();
                 }
             } elseif ($this->action == 'edit') {
                 if (isset($this->edit)) {
                     $data = parent::s_news_data($this->edit);
                     $create->assign('plugin', $plugin->menu_item_plugin('news'));
                     if (magixcjquery_filter_request::isGet('json_urinews')) {
                         $header->head_expires("Mon, 26 Jul 1997 05:00:00 GMT");
                         $header->head_last_modified(gmdate("D, d M Y H:i:s") . "GMT");
                         $header->pragma();
                         $header->cache_control("nocache");
                         $header->getStatus('200');
                         $header->json_header("UTF-8");
                         $this->json_uri($data);
                     } elseif (magixcjquery_filter_request::isGet('ajax_image')) {
                         $header->head_expires("Mon, 26 Jul 1997 05:00:00 GMT");
                         $header->head_last_modified(gmdate("D, d M Y H:i:s") . "GMT");
                         $header->pragma();
                         $header->cache_control("nocache");
                         $header->getStatus('200');
                         $header->html_header("UTF-8");
                         $this->ajax_image($create, $data['n_image']);
                     } elseif (isset($this->n_image)) {
                         $this->update_news_image();
                     } elseif (isset($this->n_title)) {
                         $this->update_news_data();
                     } elseif (isset($this->name_tag)) {
                         $this->add_reltag();
                     } elseif (isset($this->delete_tag)) {
                         $this->remove_tag();
                     } else {
                         if (isset($this->plugin)) {
                             // Chargement du plugin dans les actualités (edition)
                             $this->load_edit_data($create, $data);
                             $param_arr = array($this->plugin, $this->getlang, $this->edit);
                             $plugin->extend_module($this->plugin, 'news', $param_arr);
                         } else {
                             $this->load_edit_data($create, $data);
                             $create->display('news/edit.tpl');
                         }
                     }
                 } else {
                     if (isset($this->published)) {
                         $this->update_published();
                     }
                 }
             } elseif ($this->action == 'remove') {
                 if (isset($this->delete_news)) {
                     $this->remove_news();
                 } elseif (isset($this->delete_image)) {
                     $this->remove_image();
                 }
             }
         }
     } else {
         if (magixcjquery_filter_request::isGet('json_graph')) {
             $header->head_expires("Mon, 26 Jul 1997 05:00:00 GMT");
             $header->head_last_modified(gmdate("D, d M Y H:i:s") . "GMT");
             $header->pragma();
             $header->cache_control("nocache");
             $header->getStatus('200');
             $header->json_header("UTF-8");
             $this->json_graph();
         } elseif (isset($this->news_search)) {
             $header->head_expires("Mon, 26 Jul 1997 05:00:00 GMT");
             $header->head_last_modified(gmdate("D, d M Y H:i:s") . "GMT");
             $header->pragma();
             $header->cache_control("nocache");
             $header->getStatus('200');
             $header->json_header("UTF-8");
             $this->json_url_news();
         } else {
             $create->display('news/index.tpl');
         }
     }
 }
Example #26
0
 /**
  * Retourne un tableaux contenant les identifiant actif (int OR string)
  * @access public
  * @static
  * @return array
  */
 public static function setCurrentId()
 {
     $ModelTemplate = new frontend_model_template();
     $FilterRequest = new magixcjquery_filter_request();
     $HelperClean = new magixcjquery_form_helpersforms();
     $current = array();
     $current['news']['record']['id'] = null;
     if ($FilterRequest->isGet('getnews')) {
         $current['news']['record']['id'] = $HelperClean->inputAlphaNumeric($_GET['getnews']);
     }
     $current['news']['pagination']['id'] = 1;
     if ($FilterRequest->isGet('page')) {
         $current['news']['pagination']['id'] = $HelperClean->inputNumeric($_GET['page']);
     }
     $current['news']['tag']['id'] = null;
     if ($FilterRequest->isGet('tag')) {
         $current['news']['tag']['id'] = $HelperClean->inputClean($_GET['tag']);
     }
     $current['cms']['record']['id'] = null;
     if ($FilterRequest->isGet('getidpage')) {
         $current['cms']['record']['id'] = $HelperClean->inputNumeric($_GET['getidpage']);
     }
     $current['cms']['parent']['id'] = null;
     if ($FilterRequest->isGet('getidpage_p')) {
         $current['cms']['parent']['id'] = $HelperClean->inputNumeric($_GET['getidpage_p']);
     }
     $current['catalog']['category']['id'] = null;
     if ($FilterRequest->isGet('idclc')) {
         $current['catalog']['category']['id'] = $HelperClean->inputNumeric($_GET['idclc']);
     }
     $current['catalog']['subcategory']['id'] = null;
     if ($FilterRequest->isGet('idcls')) {
         $current['catalog']['subcategory']['id'] = $HelperClean->inputNumeric($_GET['idcls']);
     }
     $current['catalog']['product']['id'] = null;
     if ($FilterRequest->isGet('idproduct')) {
         $current['catalog']['product']['id'] = $HelperClean->inputNumeric($_GET['idproduct']);
     }
     $current['lang']['iso'] = $ModelTemplate->current_Language();
     return $current;
 }
Example #27
0
 /**
  * Execution du plugin
  */
 public function run()
 {
     $header = new magixglobal_model_header();
     $create = new backend_controller_plugins();
     if (magixcjquery_filter_request::isGet('getlang')) {
         if (isset($this->action)) {
             if ($this->action == 'list') {
                 $create->assign('array_plugin_i18n', $this->list_plugin($create));
                 $create->display('list.tpl');
             } elseif ($this->action == 'edit') {
                 if (isset($this->section)) {
                     if (isset($this->config_value)) {
                         $header->html_header("UTF-8");
                         $this->saveFiles($create, $this->section);
                     } else {
                         $create->assign('array_config_file', $this->getConfigFile($this->section));
                         $create->display('edit.tpl');
                     }
                 }
             }
         } elseif (isset($this->tab)) {
             $create->display('about.tpl');
         }
     }
 }
Example #28
0
 /**
  * @access public 
  * Execute la classe
  */
 public function run()
 {
     $create = new backend_controller_template();
     $create->addConfigFile(array('config'), array('config_'), false);
     if (magixcjquery_filter_request::isPost('id_size_img')) {
         $this->update_img();
     } else {
         backend_controller_template::assign('img_size_forms_catalog', $this->load_img_forms('catalog'));
         backend_controller_template::assign('img_size_forms_news', $this->load_img_forms('news'));
         backend_controller_template::assign('img_size_forms_plugins', $this->load_img_forms('plugins'));
         backend_controller_template::display('config/imagesize.tpl');
     }
 }
Example #29
0
 * http://www.magix-cms.com, magix-cms.com http://www.magix-cjquery.com
 * @license    Dual licensed under the MIT or GPL Version 3 licenses.
 * @version    1.0
 * @author Gérits Aurélien <*****@*****.**>
 * @name index
 *
 */
/**
 * Charge toutes les Classes de l'application
 */
$baseadmin = 'baseadmin.php';
if (file_exists($baseadmin)) {
    require $baseadmin;
    if (!defined('PATHADMIN')) {
        throw new Exception('PATHADMIN is not defined');
    }
}
require '../lib/mcbackend.php';
/**
 * Autoload Frontend
 */
$members = new backend_controller_login();
$members->securePage();
$members->closeSession();
if (magixcjquery_filter_request::isSession('keyuniqid_admin')) {
    backend_controller_config::load_attribute_config();
    if (!headers_sent()) {
        header('location: ' . magixcjquery_html_helpersHtml::getUrl() . '/admin/dashboard.php');
        exit;
    }
}
Example #30
0
 /**
  * Constructor
  */
 function __construct()
 {
     /**
      * path for reading file config.php.in
      */
     self::$config_in = self::dirConfig() . 'config.php.in';
     /*
      * path for create file config.php
      */
     self::$configfile = self::dirConfig() . 'config.php';
     //
     if (magixcjquery_filter_request::isPost('M_DBDRIVER')) {
         $this->M_DBDRIVER = $_POST['M_DBDRIVER'];
     }
     if (magixcjquery_filter_request::isPost('M_DBHOST')) {
         $this->M_DBHOST = $_POST['M_DBHOST'];
     }
     if (magixcjquery_filter_request::isPost('M_DBUSER')) {
         $this->M_DBUSER = $_POST['M_DBUSER'];
     }
     if (magixcjquery_filter_request::isPost('M_DBPASSWORD')) {
         $this->M_DBPASSWORD = $_POST['M_DBPASSWORD'];
     }
     if (magixcjquery_filter_request::isPost('M_DBNAME')) {
         $this->M_DBNAME = $_POST['M_DBNAME'];
     }
     if (magixcjquery_filter_request::isPost('M_LOG')) {
         $this->M_LOG = $_POST['M_LOG'];
     }
     if (magixcjquery_filter_request::isPost('M_FIREPHP')) {
         $this->M_FIREPHP = $_POST['M_FIREPHP'];
     }
     if (magixcjquery_filter_request::isGet('action')) {
         $this->action = magixcjquery_form_helpersforms::inputClean($_GET['action']);
     }
 }