Exemplo n.º 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']);
     }
 }
Exemplo n.º 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']);
     }
 }
Exemplo n.º 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();
     }
 }
Exemplo n.º 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']);
     }
 }
Exemplo n.º 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);
}
Exemplo n.º 7
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();
 }
Exemplo n.º 8
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']);
     }
 }
Exemplo n.º 9
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('icon')) {
         $this->icon = magixcjquery_form_helpersforms::inputClean($_POST['icon']);
     }
     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']);
     }
     # EDIT PAGE
     if (magixcjquery_filter_request::isPOST('idadv')) {
         $this->idadv = magixcjquery_form_helpersforms::inputNumeric($_POST['idadv']);
     }
     # DELETE PAGE
     if (magixcjquery_filter_request::isPOST('delete')) {
         $this->delete = magixcjquery_form_helpersforms::inputNumeric($_POST['delete']);
     }
     # ORDER PAGE
     if (magixcjquery_filter_request::isPost('order')) {
         $this->order = magixcjquery_form_helpersforms::arrayClean($_POST['order']);
     }
     $this->template = new backend_controller_plugins();
 }
Exemplo n.º 10
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']);
     }
 }
Exemplo n.º 11
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']);
     }
 }
Exemplo n.º 12
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']);
     }
 }
Exemplo n.º 13
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();
 }
Exemplo n.º 14
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']);
     }
 }
Exemplo n.º 15
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();
     }
 }
Exemplo n.º 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');
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 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');
     }
 }
Exemplo n.º 18
0
 /**
  * Affiche les pages de l'administration du plugin
  * @access public
  */
 public function run()
 {
     $header = new magixglobal_model_header();
     $create = new backend_controller_plugins();
     if (self::install_table($create) == true) {
         if (magixcjquery_filter_request::isGet('getlang')) {
             if (isset($this->action)) {
                 if ($this->action == 'json') {
                     $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->jsonList();
                 } elseif ($this->action == 'list') {
                     $create->display('list.tpl');
                 } elseif ($this->action == 'add') {
                     $this->add();
                 } elseif ($this->action == 'remove') {
                     if (isset($this->delete_contact)) {
                         $this->remove();
                     }
                 }
             } elseif (isset($this->tab)) {
                 $create->display('about.tpl');
             }
         } 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('index.tpl');
             }
         }
     }
 }
/**
 * Smarty {widget_lang_display} function plugin
 *
 * Type:     function
 * Name:     widget_lang_display
 * Date:     03/01/2013
 * Date Update : 12/01/2013
 * Output:
 * @author   Sire Sam (http://www.sire-sam.be)
 * @author   Gerits Aurélien (http://www.magix-dev.be)
 * @link
 * @version  1.0
 * @param $params
 * @param $template
 * @return string
 */
function smarty_function_widget_lang_display($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();
    $output = null;
    if ($data != null) {
        // *** set default html structure
        $strucHtml_default = array('container' => array('before' => '<ul class="nav">', 'after' => '</ul>'), 'item' => array('before' => '<li>', 'after' => '</li>'), 'icon' => array('before' => ' ', 'after' => ' '), 'name' => array('before' => ' ', 'after' => ' '), 'iso' => array('before' => '(', 'after' => ')'), 'current' => array('class' => ' current'), 'last' => array('class' => ' last', 'col' => 1));
        // *** Set default elem to display
        $strucHtml_default['allow'] = array('', 'icon', 'name', 'iso');
        $strucHtml_default['display'] = array(1 => array('', 'icon', 'name', 'iso'));
        // *** Update html struct & item setting with custom var (params['structureHTML']) @TODO vérifier si le paramaètre htmlDispaly tj opérationnel
        $structHtml_custom = $params['htmlStructure'] ? $params['htmlStructure'] : null;
        $strucHtml = $ModelConstructor->mergeHtmlPattern($strucHtml_default, $structHtml_custom);
        // *** Set translation var
        $t_go_to_version = frontend_model_template::getConfigVars('go_to_version');
        // *** format items loop (foreach item)
        $items = null;
        $i = 0;
        foreach ($data as $row) {
            $i++;
            // *** set additional var in htmlStruct
            $strucHtml['is_current'] = $iso_current == $row['iso'] ? 1 : 0;
            $strucHtml['is_last'] = 0;
            if ($i == $strucHtml['last']['col']) {
                $strucHtml['is_last'] = 1;
                $i = 0;
            }
            // *** in case diplay is null, we take default value
            if ($strucHtml['display'][1] == null) {
                $strucHtml['display'][1] = $strucHtml_default['display'][1];
            }
            // *** set link class
            $item_classLink = null;
            if ($strucHtml['is_last'] == 1 or $strucHtml['is_current'] == 1) {
                $item_class = ' class="';
                $item_class .= $strucHtml['is_last'] == 1 ? $strucHtml['last']['class'] : '';
                $item_class .= $strucHtml['is_current'] == 1 ? $strucHtml['current']['class'] : '';
                $item_class .= '"';
            }
            // *** format item loop (foreach element)
            $item = null;
            foreach ($strucHtml['display'][1] as $elem_type) {
                $strucHtml_elem = $strucHtml[$elem_type];
                if (array_search($elem_type, $strucHtml['display'][1])) {
                    switch ($elem_type) {
                        case 'name':
                            $elem = ucfirst($row['language']);
                            break;
                        case 'icon':
                            $elem = '<img src="/skin/' . frontend_model_template::frontendTheme()->themeSelected() . '/img/lang/' . $row['iso'] . '.png" alt="' . $row['name'] . '"/>';
                            break;
                        case 'iso':
                            $elem = $row['iso'];
                            break;
                        default:
                            $elem = null;
                    }
                    // *** elem construct
                    if ($elem != null) {
                        $item .= $strucHtml_elem['before'];
                        $item .= $elem;
                        $item .= $strucHtml_elem['after'];
                    }
                }
            }
            // *** item construct
            $items .= $strucHtml['item']['before'];
            $items .= '<a href="/' . $row['iso'] . '/" hreflang="' . $row['iso'] . '" title="' . ucfirst($t_go_to_version) . ': ' . $row['language'] . '">';
            $items .= $item;
            $items .= '</a>';
            $items .= $strucHtml['item']['after'];
        }
        // *** container construct
        $output .= $strucHtml['container']['before'];
        $output .= isset($params['htmlPrepend']) ? $params['htmlPrepend'] : null;
        $output .= $items;
        $output .= isset($params['htmlAppend']) ? $params['htmlAppend'] : null;
        $output .= $strucHtml['container']['after'];
    }
    return $output;
}
Exemplo n.º 20
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');
     }
 }
Exemplo n.º 21
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('catalog'), array('catalog_'), false);
     $access = $this->model_access->module_access("backend_controller_catalog");
     $create->assign('access', $access);
     if (isset($this->section)) {
         if ($this->section === 'category') {
             if (isset($this->getlang)) {
                 if (isset($this->action)) {
                     if ($this->action === 'list') {
                         if (magixcjquery_filter_request::isGet('json_list_category')) {
                             $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_listing_category();
                         } elseif (isset($this->name_category)) {
                             $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_autocomplete_category();
                         }
                     } elseif ($this->action === 'add') {
                         if (isset($this->clibelle)) {
                             $this->addCategory($create);
                         }
                     } elseif ($this->action === 'edit') {
                         if (isset($this->edit)) {
                             $data = parent::s_catalog_category_data($this->edit);
                             $create->assign('plugin', $plugin->menu_item_plugin('catalog_category'));
                             if (magixcjquery_filter_request::isGet('json_uri_category')) {
                                 $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_category($data);
                             } elseif (magixcjquery_filter_request::isGet('json_list_subcategory')) {
                                 $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_listing_subcategory();
                             } else {
                                 if (isset($this->tab)) {
                                     if ($this->tab === 'image') {
                                         if (isset($this->img_c)) {
                                             $this->update_category_image($data);
                                         } elseif (magixcjquery_filter_request::isGet('ajax_category_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_category_image($create, $data['img_c']);
                                         } else {
                                             $this->load_category_edit_data($create, $data);
                                             $create->display('catalog/category/edit.tpl');
                                         }
                                     } elseif ($this->tab === 'subcat') {
                                         if (isset($this->slibelle)) {
                                             $this->addSubCategory($create);
                                         } elseif (isset($this->order_pages)) {
                                             $this->update_order_subcategory();
                                         } elseif (isset($this->delete_subcategory)) {
                                             $this->remove_subcategory();
                                         } else {
                                             $this->load_category_edit_data($create, $data);
                                             $create->display('catalog/category/edit.tpl');
                                         }
                                     } elseif ($this->tab === 'product') {
                                         if (isset($this->order_pages)) {
                                             $this->update_order_category_product();
                                         } elseif (magixcjquery_filter_request::isGet('json_category_product')) {
                                             $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_listing_category_product();
                                         } elseif (isset($this->delete_product)) {
                                             $this->remove_product_category();
                                         } else {
                                             $this->load_category_edit_data($create, $data);
                                             $create->display('catalog/category/edit.tpl');
                                         }
                                     }
                                 } elseif (isset($this->plugin)) {
                                     // Chargement du plugin dans le produit du catalogue (edition)
                                     $this->load_category_edit_data($create, $data);
                                     $param_arr = array($this->plugin, $this->getlang, $this->edit);
                                     $plugin->extend_module($this->plugin, 'catalog_category', $param_arr);
                                 } else {
                                     if (isset($this->clibelle)) {
                                         $this->update_category($create);
                                     } elseif (isset($this->delete_image)) {
                                         $this->remove_category_image();
                                     } else {
                                         $this->load_category_edit_data($create, $data);
                                         $create->display('catalog/category/edit.tpl');
                                     }
                                 }
                             }
                         } else {
                             if (isset($this->order_pages)) {
                                 $this->update_order_category();
                             }
                         }
                     } elseif ($this->action === 'remove') {
                         $this->remove_category($create);
                     }
                 } else {
                     $create->display('catalog/category/list.tpl');
                 }
             }
         } elseif ($this->section === 'subcategory') {
             if (isset($this->getlang)) {
                 if (isset($this->action)) {
                     if ($this->action === 'add') {
                     } elseif ($this->action === 'edit') {
                         if (isset($this->edit)) {
                             $data = parent::s_catalog_subcategory_data($this->edit);
                             $create->assign('plugin', $plugin->menu_item_plugin('catalog_subcategory'));
                             if (isset($this->tab)) {
                                 if ($this->tab === 'image') {
                                     if (magixcjquery_filter_request::isGet('ajax_subcategory_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_subcategory_image($create, $data['img_s']);
                                     } elseif (isset($this->img_s)) {
                                         $this->update_subcategory_image($data);
                                     } else {
                                         $this->load_subcategory_edit_data($create, $data);
                                         $create->display('catalog/subcategory/edit.tpl');
                                     }
                                 } elseif ($this->tab === 'product') {
                                     if (isset($this->order_pages)) {
                                         $this->update_order_subcategory_product();
                                     } elseif (magixcjquery_filter_request::isGet('json_subcategory_product')) {
                                         $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_listing_subcategory_product();
                                     } elseif (isset($this->delete_product)) {
                                         $this->remove_product_category();
                                     } else {
                                         $this->load_subcategory_edit_data($create, $data);
                                         $create->display('catalog/subcategory/edit.tpl');
                                     }
                                 }
                             } else {
                                 if (magixcjquery_filter_request::isGet('json_uri_subcategory')) {
                                     $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_subcategory($data);
                                 } elseif (isset($this->slibelle)) {
                                     $this->update_subcategory($create);
                                 } elseif (isset($this->delete_image)) {
                                     $this->remove_subcategory_image();
                                 } elseif (isset($this->plugin)) {
                                     // Chargement du plugin dans le produit du catalogue (edition)
                                     $this->load_subcategory_edit_data($create, $data);
                                     $param_arr = array($this->plugin, $this->getlang, $this->edit);
                                     $plugin->extend_module($this->plugin, 'catalog_subcategory', $param_arr);
                                 } else {
                                     $this->load_subcategory_edit_data($create, $data);
                                     $create->display('catalog/subcategory/edit.tpl');
                                 }
                             }
                         }
                     }
                 }
             }
         } elseif ($this->section === 'product') {
             if (isset($this->getlang)) {
                 if (isset($this->action)) {
                     if ($this->action === 'list') {
                         if (magixcjquery_filter_request::isGet('json_listing_product')) {
                             $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_listing_product(20);
                         } elseif (magixcjquery_filter_request::isGet('idclc')) {
                             $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_idcls($this->getidclc);
                         } elseif (isset($this->title_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_list_product();
                         } elseif (isset($this->name_product)) {
                             $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_autocomplete_product();
                         }
                     } elseif ($this->action === 'add') {
                         if (isset($this->titlecatalog)) {
                             $this->addProduct($create);
                         }
                     } elseif ($this->action === 'edit') {
                         $data = parent::s_catalog_data($this->edit);
                         $create->assign('plugin', $plugin->menu_item_plugin('catalog_product'));
                         if (isset($this->tab)) {
                             if ($this->tab === 'image') {
                                 if (isset($this->imgcatalog)) {
                                     $this->update_product_image($data);
                                 } elseif (magixcjquery_filter_request::isGet('ajax_product_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_product_image($create, $data['imgcatalog']);
                                 } else {
                                     $this->load_product_edit_data($create, $data);
                                     $create->display('catalog/product/edit.tpl');
                                 }
                             } elseif ($this->tab === 'category') {
                                 if (magixcjquery_filter_request::isGet('json_product_category')) {
                                     $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_listing_product_category();
                                 } elseif (isset($this->idclc)) {
                                     $this->add_product_category();
                                 } elseif (isset($this->delete_product)) {
                                     $this->remove_product_category();
                                 } else {
                                     $this->load_product_edit_data($create, $data);
                                     $create->assign('array_list_category', $this->array_list_category());
                                     $create->display('catalog/product/edit.tpl');
                                 }
                             } elseif ($this->tab === 'product') {
                                 if (isset($this->idproduct)) {
                                     $this->addProductRel($create);
                                 } elseif (magixcjquery_filter_request::isGet('json_product_rel')) {
                                     $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_listing_product_rel();
                                 } elseif (isset($this->delete_product)) {
                                     $this->remove_product_rel();
                                 } else {
                                     $this->load_product_edit_data($create, $data);
                                     $create->display('catalog/product/edit.tpl');
                                 }
                             } elseif ($this->tab === 'galery') {
                                 if (magixcjquery_filter_request::isGet('json_list_galery')) {
                                     $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_galery();
                                 } elseif (isset($this->img_order)) {
                                     $this->update_order_galery();
                                 } elseif (isset($this->imgcatalog)) {
                                     $this->add_galery_image();
                                 } elseif (isset($this->delete_galery)) {
                                     $this->remove_product_galery();
                                 } else {
                                     $this->load_product_edit_data($create, $data);
                                     $create->display('catalog/product/edit.tpl');
                                 }
                             }
                         } else {
                             if (isset($this->delete_image)) {
                                 $this->remove_product_image();
                             }
                             if (isset($this->titlecatalog)) {
                                 $this->update_product($create);
                             } elseif (isset($this->plugin)) {
                                 // Chargement du plugin dans le produit du catalogue (edition)
                                 $this->load_product_edit_data($create, $data);
                                 $param_arr = array($this->plugin, $this->getlang, $this->edit);
                                 $plugin->extend_module($this->plugin, 'catalog_product', $param_arr);
                             } else {
                                 $this->load_product_edit_data($create, $data);
                                 $create->display('catalog/product/edit.tpl');
                             }
                         }
                     } elseif ($this->action === 'remove') {
                         $this->remove_product();
                     } elseif ($this->action === 'copy') {
                         if (isset($this->copy)) {
                             $this->copy_product();
                         }
                     } elseif ($this->action === 'move') {
                         if (isset($this->move)) {
                             $this->move_product();
                         }
                     }
                 } else {
                     $create->assign('select_lang', $this->lang_select());
                     $create->assign('pagination', $this->product_pagination(20));
                     $create->display('catalog/product/list.tpl');
                 }
             }
         }
     } 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->product_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_product();
         } else {
             $create->display('catalog/index.tpl');
         }
     }
 }
Exemplo n.º 22
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']);
     }
 }
Exemplo n.º 23
0
 /**
  *
  */
 function __construct()
 {
     $this->setting = frontend_model_setting::select_uniq_setting('css_inliner');
     $this->mail = new magixglobal_model_mail('mail');
     if (magixcjquery_filter_request::isGet('add_cart')) {
         $this->add_cart = magixcjquery_form_helpersforms::inputNumeric($_GET['add_cart']);
     }
     if (magixcjquery_filter_request::isGet('delete_item')) {
         $this->delete_item = magixcjquery_form_helpersforms::inputNumeric($_GET['delete_item']);
     }
     if (magixcjquery_filter_request::isGet('get_nbr_items')) {
         $this->get_nbr_items = magixcjquery_form_helpersforms::inputClean($_GET['get_nbr_items']);
     }
     if (magixcjquery_filter_request::isGet('get_price_items')) {
         $this->get_price_items = magixcjquery_form_helpersforms::inputClean($_GET['get_price_items']);
     }
     if (magixcjquery_filter_request::isGet('get_amount_to_pay')) {
         $this->get_amount_to_pay = magixcjquery_form_helpersforms::inputNumeric($_GET['get_amount_to_pay']);
     }
     if (magixcjquery_filter_request::isGet('json_cart')) {
         $this->json_cart = magixcjquery_form_helpersforms::inputNumeric($_GET['json_cart']);
     }
     if (magixcjquery_filter_request::isPost('item_to_delete')) {
         $this->item_to_delete = magixcjquery_form_helpersforms::inputNumeric($_POST['item_to_delete']);
     }
     if (magixcjquery_filter_request::isPost('id_cart_to_send')) {
         $this->id_cart_to_send = magixcjquery_form_helpersforms::inputClean($_POST['id_cart_to_send']);
     }
     if (magixcjquery_filter_request::isGet('send_devis')) {
         $this->devis_to_send = magixcjquery_form_helpersforms::inputClean($_GET['send_devis']);
     }
     if (magixcjquery_filter_request::isGet('booking')) {
         $this->booking = magixcjquery_form_helpersforms::inputClean($_GET['booking']);
     }
     if (magixcjquery_filter_request::isGet('pstring1')) {
         $this->pstring1 = magixcjquery_form_helpersforms::inputClean($_GET['pstring1']);
     }
     if (magixcjquery_filter_request::isPost('idcatalog')) {
         $this->idcatalog = magixcjquery_form_helpersforms::inputNumeric($_POST['idcatalog']);
     }
     if (magixcjquery_filter_request::isPost('booking_quantity')) {
         $this->booking_quantity = magixcjquery_form_helpersforms::inputNumeric($_POST['booking_quantity']);
     }
     if (magixcjquery_filter_request::isPost('quantity_qty')) {
         $this->quantity_qty = magixcjquery_form_helpersforms::inputNumeric($_POST['quantity_qty']);
     }
     if (magixcjquery_filter_request::isPost('attr')) {
         $this->attr = magixcjquery_form_helpersforms::inputNumeric($_POST['attr']);
     }
     if (magixcjquery_filter_request::isPost('item_qty')) {
         $this->item_qty = magixcjquery_form_helpersforms::inputNumeric($_POST['item_qty']);
     }
     if (magixcjquery_filter_request::isPost('item_attr')) {
         $this->item_attr = magixcjquery_form_helpersforms::inputNumeric($_POST['item_attr']);
     }
     if (magixcjquery_filter_request::isGet('pstring2')) {
         $this->pstring2 = magixcjquery_form_helpersforms::inputClean($_GET['pstring2']);
     }
     //
     if (magixcjquery_filter_request::isPost('tva_country')) {
         $this->tva_country = magixcjquery_form_helpersforms::inputClean($_POST['tva_country']);
     }
     //IMAGE
     if (isset($_FILES['logo_perso']["name"])) {
         $this->logo_perso = magixcjquery_url_clean::rplMagixString($_FILES['logo_perso']["name"]);
     }
     if (magixcjquery_filter_request::isPost('logo')) {
         $this->logo = magixcjquery_form_helpersforms::inputClean($_POST['logo']);
     }
     if (magixcjquery_filter_request::isSession('idprofil')) {
         $this->idprofil_session = magixcjquery_form_helpersforms::inputNumeric($_SESSION['idprofil']);
     }
     // template
     $this->template = new frontend_controller_plugins();
     //Frais de transport
     $this->shipping_price = $this->template->getTplVars('shipping');
     //Frais de transport offert au dessus du montant
     $this->free_shipping_amount = '0.00';
     //Montant de la TVA
     $this->tva_amount = 00;
     $this->modelSystem = new magixglobal_model_system();
     // Module
     if (class_exists('plugins_cartpay_module')) {
         $this->module = new plugins_cartpay_module();
     }
     if (magixcjquery_filter_request::isGet('mod')) {
         $this->mod = magixcjquery_form_helpersforms::inputClean($_GET['mod']);
     }
     if (magixcjquery_filter_request::isGet('action')) {
         $this->action = magixcjquery_form_helpersforms::inputClean($_GET['action']);
     }
 }
Exemplo n.º 24
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;
 }
Exemplo n.º 25
0
 /**
  * function construct class
  *
  */
 public function __construct()
 {
     if (magixcjquery_filter_request::isGet('adminLanguage')) {
         self::$adminLanguage = magixcjquery_form_helpersforms::inputClean($_GET['adminLanguage']);
     }
 }
Exemplo n.º 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;
 }
Exemplo n.º 27
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');
         }
     }
 }
Exemplo n.º 28
0
 /**
  * @throws Exception
  */
 public function run()
 {
     if (self::install_table() == true) {
         if (magixcjquery_filter_request::isGet('getlang')) {
             $api = parent::getApi();
             if (isset($this->tab)) {
                 if ($this->tab == 'about') {
                     $this->template->display('about.tpl');
                 } else {
                     if ($this->tab == 'list') {
                         if (isset($this->action)) {
                             switch ($this->action) {
                                 case 'add':
                                     $this->addList();
                                     $this->notify('add');
                                     break;
                                 case 'deleteList':
                                     $this->delList();
                                     $this->notify('delete');
                                     break;
                             }
                         }
                         $this->template->assign('account', $api['account_api']);
                         $this->template->assign('list', $this->getList($api['idapi']));
                         $this->template->assign('getListCall', $this->setListCall());
                         $this->template->display('list.tpl');
                     } else {
                         if ($this->tab == 'account') {
                             switch ($this->action) {
                                 case 'save':
                                     if ($this->idapi != null) {
                                         $this->saveApi();
                                         $this->notify('save');
                                     }
                                     $this->template->assign('account', $this->idapi);
                                     break;
                                 case 'deleteApi':
                                     $this->delApi($api);
                                     $this->notify('reset');
                                     break;
                                 default:
                                     if ($api != null) {
                                         $this->template->assign('account', $api['account_api']);
                                     }
                             }
                             $this->template->display('account.tpl');
                         }
                     }
                 }
             } else {
                 if ($api != null) {
                     $this->template->assign('account', $api['account_api']);
                 }
                 $this->template->display('account.tpl');
             }
         }
     }
 }
Exemplo n.º 29
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');
         }
     }
 }
Exemplo n.º 30
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');
         }
     }
 }