コード例 #1
0
ファイル: admin.php プロジェクト: magix-cms/mailchimp
 /**
  * Construct class
  */
 public function __construct()
 {
     if (class_exists('backend_model_message')) {
         $this->message = new backend_model_message();
     }
     if (magixcjquery_filter_request::isGet('getlang')) {
         $this->getlang = magixcjquery_form_helpersforms::inputNumeric($_GET['getlang']);
     }
     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('idapi')) {
         $this->idapi = magixcjquery_form_helpersforms::inputClean($_POST['idapi']);
     }
     if (magixcjquery_filter_request::isPost('list_id')) {
         $this->list_id = magixcjquery_form_helpersforms::inputClean($_POST['list_id']);
     }
     if (magixcjquery_filter_request::isPost('idlist')) {
         $this->idlist = magixcjquery_form_helpersforms::inputNumeric($_POST['idlist']);
     }
     $this->template = new backend_controller_plugins();
 }
コード例 #2
0
ファイル: admin.php プロジェクト: biggtfish/magixcms
 /**
  *
  */
 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('section')) {
         $this->section = magixcjquery_form_helpersforms::inputClean($_GET['section']);
     }
     if (magixcjquery_filter_request::isGet('pluginame')) {
         $this->pluginame = magixcjquery_form_helpersforms::inputClean($_GET['pluginame']);
     }
     if (magixcjquery_filter_request::isGet('getlang')) {
         $this->getlang = (int) magixcjquery_filter_isVar::isPostNumeric($_GET['getlang']);
     }
     if (magixcjquery_filter_request::isPost('config_var')) {
         $this->config_var = magixcjquery_form_helpersforms::arrayClean($_POST['config_var']);
     }
     if (magixcjquery_filter_request::isPost('config_value')) {
         $this->config_value = $_POST['config_value'];
     }
 }
コード例 #3
0
ファイル: upgrade.php プロジェクト: biggtfish/magixcms
 /**
  *  @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']);
     }
 }
コード例 #4
0
ファイル: ajax.php プロジェクト: biggtfish/magixcms
 /**
  * Constructor
  */
 public function __construct()
 {
     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 = (int) magixcjquery_filter_isVar::isPostNumeric($_GET['getlang']);
     }
 }
コード例 #5
0
ファイル: theming.php プロジェクト: biggtfish/magixcms
 /**
  * function construct
  */
 function __construct()
 {
     if (class_exists('backend_model_message')) {
         $this->message = new backend_model_message();
     }
     if (magixcjquery_filter_request::isPost('theme')) {
         $this->ptheme = magixcjquery_form_helpersforms::inputClean($_POST['theme']);
     }
     if (magixcjquery_filter_request::isGet('action')) {
         $this->action = magixcjquery_form_helpersforms::inputClean($_GET['action']);
     }
 }
コード例 #6
0
ファイル: public.php プロジェクト: biggtfish/magixcms
 /**
  * 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();
 }
コード例 #7
0
ファイル: public.php プロジェクト: magix-cms/mailchimp
 /**
  * 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();
 }
コード例 #8
0
ファイル: sitemap.php プロジェクト: biggtfish/magixcms
 /**
  * @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']);
     }
 }
コード例 #9
0
ファイル: imagesize.php プロジェクト: biggtfish/magixcms
 /**
  * Constructeur
  */
 public function __construct()
 {
     if (class_exists('backend_model_message')) {
         $this->message = new backend_model_message();
     }
     if (magixcjquery_filter_request::isPost('width') and magixcjquery_filter_request::isPost('height')) {
         $this->width = magixcjquery_filter_isVar::isPostNumeric($_POST['width']);
         $this->height = magixcjquery_filter_isVar::isPostNumeric($_POST['height']);
     }
     if (magixcjquery_filter_request::isPost('img_resizing')) {
         $this->img_resizing = magixcjquery_form_helpersforms::inputClean($_POST['img_resizing']);
     }
     if (magixcjquery_filter_request::isPost('id_size_img')) {
         $this->id_size_img = magixcjquery_filter_isVar::isPostNumeric($_POST['id_size_img']);
     }
 }
コード例 #10
0
/**
 * Smarty {static_metas} function plugin
 *
 * Type:     function
 * Name:     static_metas
 * Date:     January, 2010
 * Purpose:  Ajoute une métas statique
 * Examples: {static_metas param=""}
 * Output:   
 * @link 
 * @author   Gerits Aurelien
 * @version  1.1
 * @param array
 * @param Smarty
 * @return string
 */
function smarty_function_static_metas($params, $template)
{
    $param = !empty($params['param']) ? $params['param'] : "";
    $dynamic = $params['dynamic'];
    if (!isset($param)) {
        trigger_error("config: missing 'param' parameter");
        return;
    }
    if ($param == null) {
        if (empty($dynamic)) {
            $seo = magixglobal_model_system::extract_domain();
        } else {
            $seo = $dynamic;
        }
    } elseif ($param != null) {
        $seo = $param;
    }
    return magixcjquery_form_helpersforms::inputClean($seo);
}
コード例 #11
0
ファイル: googletools.php プロジェクト: biggtfish/magixcms
 /**
  * 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']);
     }
 }
コード例 #12
0
ファイル: employee.php プロジェクト: biggtfish/magixcms
 /**
  * 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']);
     }
 }
コード例 #13
0
ファイル: login.php プロジェクト: biggtfish/magixcms
 /**
  * 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']);
     }
 }
コード例 #14
0
ファイル: admin.php プロジェクト: magix-cms/ogone
 /**
  * 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();
 }
コード例 #15
0
/**
 * Smarty plugin
 * @package     Smarty
 * @subpackage  plugins
 * Type:        function
 * Name:        widget_news_display
 * date:        25/12/2013
 * Update:      10/03/2013
 * Examples:    {widget_news_display}
 * @author      Sire Sam (sire-sam.be)
 * @link        htt://www.sire-sam.be, http://www.magix-dev.be
 * @author      Gerits Aurelien
 * @version     1.1
 * @param       array
 * @param       Smarty
 * @return      string
 */
function smarty_function_widget_news_display($params, $template)
{
    $ModelSystem = new magixglobal_model_system();
    $ModelRewrite = new magixglobal_model_rewrite();
    $ModelConstructor = new magixglobal_model_constructor();
    $ModelNews = new frontend_model_news();
    $ModelPager = new magixglobal_model_pager();
    $Debug = new magixcjquery_debug_magixfire();
    // Set and load data
    $current = $ModelSystem->setCurrentId();
    $conf = is_array($params['conf']) ? $params['conf'] : array();
    $data = $ModelNews->getData($conf, $current);
    // Set Pagination
    $pagination['html'] = null;
    if (isset($data['total']) and isset($data['limit'])) {
        $pagination['src'] = $ModelPager->setPaginationData($data['total'], $data['limit'], '/' . $current['lang']['iso'] . $ModelRewrite->mod_news_lang($current['lang']['iso']), $current['news']['pagination']['id'], '/');
        $pagination['html'] = $ModelConstructor->formatPaginationHtml($pagination['src'], $current['news']['pagination']['id']);
        unset($data['total']);
        unset($data['limit']);
    }
    $current = $current['news'];
    // Format data
    $html = null;
    if ($data != null) {
        $pattern['default'] = patternNews();
        $pattern['custom'] = null;
        if ($params['pattern']) {
            $pattern['custom'] = is_array($params['pattern']) ? $params['pattern'] : patternNews($params['pattern']);
        }
        $pattern['global'] = $ModelConstructor->mergeHtmlPattern($pattern['default'], $pattern['custom']);
        $i = 0;
        $items['html'] = null;
        foreach ($data as $row) {
            $i++;
            $itemData = $ModelNews->setItemData($row, $current);
            // *** set item html structure & var
            $pattern['global']['is_active'] = $itemData['active'] === true ? 1 : 0;
            $pattern['global']['id'] = isset($itemData['id']) ? $itemData['id'] : 0;
            $pattern['global']['url'] = isset($itemData['uri']) ? $itemData['uri'] : '#';
            $pattern['item'] = $ModelConstructor->setItemPattern($pattern['global'], $i);
            // *** Reset iteration if item is last of the line
            if ($pattern['item']['is_last'] == 1) {
                $i = 0;
            }
            // *** in case diplay is null, we take default value
            if ($pattern['item']['display'][1] == null) {
                $pattern['item']['display'][1] = $pattern['default']['display'][1];
            }
            $imgSize = isset($pattern['item']['img']['size']) ? $pattern['item']['img']['size'] : 'small';
            if (isset($itemData['imgSrc'][$imgSize])) {
                $itemData['imgSrc'] = $itemData['imgSrc'][$imgSize];
            } else {
                $itemData['imgSrc'] = $itemData['imgSrc']['default'];
            }
            // *** format item loop (foreach element)
            $itemHtml = null;
            foreach ($pattern['item']['display'][1] as $elem_type) {
                $pattern['elem'] = $pattern['item'][$elem_type];
                if (array_search($elem_type, $pattern['item']['display'][1])) {
                    switch ($elem_type) {
                        case 'name':
                            $elem = $itemData['name'];
                            break;
                        case 'img':
                            $elem = '<img src="' . $itemData['imgSrc'] . '" alt="' . $itemData['name'] . '"/>';
                            break;
                        case 'descr':
                            $elem = magixcjquery_form_helpersforms::inputCleanTruncate(magixcjquery_form_helpersforms::inputTagClean($itemData['content']), $pattern['item']['descr']['lenght'], $pattern['item']['descr']['delemiter']);
                            break;
                        case 'date':
                            $elem = $ModelConstructor->formatDateHtml($itemData['date']['publish'], $pattern['item']);
                            break;
                        case 'tag':
                            $elem = $itemData['tag'];
                            break;
                        default:
                            $elem = null;
                    }
                    if ($elem != null or isset($pattern['elem']['before']) or isset($pattern['elem']['after'])) {
                        $itemHtml .= $pattern['elem']['before'];
                        $itemHtml .= $elem;
                        $itemHtml .= $pattern['elem']['after'];
                    }
                }
            }
            // *** item construct
            $items['html'] .= $pattern['item']['item']['before'];
            $items['html'] .= $itemHtml;
            $items['html'] .= $pattern['item']['item']['after'];
        }
        // *** container construct
        $html = isset($params['title']) ? $params['title'] : '';
        $html .= $pattern['global']['container']['before'];
        $html .= isset($params['prepend']) ? $params['prepend'] : null;
        $html .= $items['html'];
        $html .= isset($params['append']) ? $params['append'] : null;
        $html .= $pattern['global']['container']['after'];
        $html .= $pagination['html'];
    }
    return $html;
}
コード例 #16
0
ファイル: admin.php プロジェクト: magix-cms/blocklink
 /**
  * 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();
 }
コード例 #17
0
ファイル: plugins.php プロジェクト: biggtfish/magixcms
 /**
  * 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']);
     }
 }
コード例 #18
0
ファイル: admin.php プロジェクト: magix-cms/cartpay
 /**
  * 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();
     }
 }
コード例 #19
0
ファイル: constructor.php プロジェクト: biggtfish/magixcms
 /**
  * [truncat] 'clean html' tag and 'trim' $string[value] where $conf[value][trim] = xx caracters + $conf[value][delemiter]
  * [dateFormat] format (date_time)$string[value] in '<span class="$conf[value][dateFormat][key]">$conf[value][dateFormat][key]|val</span>'
  * @param array $string
  * @param array $conf
  * @return array
  */
 public function formatString($string, $conf)
 {
     if (!is_array($conf)) {
         return array();
     }
     if (is_array($string)) {
         foreach ($string as $k => $v) {
             if (isset($conf[$k])) {
                 foreach ($conf[$k] as $operation => $setting) {
                     switch ($operation) {
                         case 'truncat':
                             if (!is_int($setting)) {
                                 continue;
                             }
                             $delim = $conf[$k]['delemiter'] ? $conf[$k]['delemiter'] : '';
                             $string[$k] = magixcjquery_form_helpersforms::inputCleanTruncate(magixcjquery_form_helpersforms::inputTagClean($v), $setting, $delim);
                             break;
                         case 'dateFormat':
                             if (is_array($setting)) {
                                 $this->formatDateHtml($v, $setting);
                             }
                     }
                 }
             }
         }
     }
     return $string;
 }
コード例 #20
0
ファイル: access.php プロジェクト: biggtfish/magixcms
 /**
  * Constructor
  */
 public function __construct()
 {
     $this->message = new backend_model_message();
     if (class_exists('backend_model_access')) {
         $this->model_access = new backend_model_access();
     }
     if (magixcjquery_filter_request::isGet('action')) {
         $this->action = magixcjquery_form_helpersforms::inputClean($_GET['action']);
     }
     if (magixcjquery_filter_request::isGet('edit')) {
         $this->edit = magixcjquery_filter_isVar::isPostNumeric($_GET['edit']);
     }
     //profile
     if (magixcjquery_filter_request::isPost('role_name')) {
         $this->role_name = magixcjquery_form_helpersforms::inputClean($_POST['role_name']);
     }
     //access
     if (magixcjquery_filter_request::isPost('id_module')) {
         $this->id_module = magixcjquery_filter_isVar::isPostNumeric($_POST['id_module']);
     }
     if (magixcjquery_filter_request::isPost('plugins')) {
         $this->plugins = magixcjquery_form_helpersforms::inputClean($_POST['plugins']);
     }
     if (magixcjquery_filter_request::isPost('view_access')) {
         $this->view_access = magixcjquery_form_helpersforms::inputClean($_POST['view_access']);
     }
     if (magixcjquery_filter_request::isPost('add_access')) {
         $this->add_access = magixcjquery_form_helpersforms::inputClean($_POST['add_access']);
     }
     if (magixcjquery_filter_request::isPost('edit_access')) {
         $this->edit_access = magixcjquery_form_helpersforms::inputClean($_POST['edit_access']);
     }
     if (magixcjquery_filter_request::isPost('delete_access')) {
         $this->delete_access = magixcjquery_form_helpersforms::inputClean($_POST['delete_access']);
     }
     if (magixcjquery_filter_request::isPost('id_access')) {
         $this->id_access = magixcjquery_form_helpersforms::inputClean($_POST['id_access']);
     }
     if (magixcjquery_filter_request::isPost('delete_role')) {
         $this->delete_role = magixcjquery_form_helpersforms::inputClean($_POST['delete_role']);
     }
 }
コード例 #21
0
ファイル: admin.php プロジェクト: biggtfish/magixcms
 /**
  * Construct class
  */
 public function __construct()
 {
     if (class_exists('backend_model_message')) {
         $this->message = new backend_model_message();
     }
     if (magixcjquery_filter_request::isPost('mail_contact')) {
         $this->mail_contact = magixcjquery_form_helpersforms::inputClean($_POST['mail_contact']);
     }
     if (magixcjquery_filter_request::isPost('delete_contact')) {
         $this->delete_contact = (int) magixcjquery_filter_isVar::isPostNumeric($_POST['delete_contact']);
     }
     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']);
     }
 }
コード例 #22
0
ファイル: swift.php プロジェクト: magix-cms/magixcms-3
 /**
  * Le contenu du message (email,sujet,contenu,...)
  * @param string $subject
  * @param array|string $from
  * @param array|string $recipient
  * @param string $bodyhtml
  * @param bool $setReadReceiptTo
  * @internal param void $sw_message
  * @internal param string $bodytxt
  * @return \Swift_Mime_Message
  * @access public
  * @static
  */
 public function body_mail($subject, $from = array(), $recipient = array(), $bodyhtml, $setReadReceiptTo = false)
 {
     $sw_message = Swift_Message::newInstance();
     $sw_message->getHeaders()->get('Content-Type')->setValue('text/html');
     $sw_message->getHeaders()->get('Content-Type')->setParameter('charset', 'utf-8');
     $sw_message->setSubject($subject)->setEncoder(Swift_Encoding::get8BitEncoding())->setFrom($from)->setTo($recipient)->setBody($bodyhtml, 'text/html')->addPart(magixcjquery_form_helpersforms::inputTagClean($bodyhtml), 'text/plain');
     if ($setReadReceiptTo) {
         $sw_message->setReadReceiptTo($setReadReceiptTo);
     }
     return $sw_message;
 }
コード例 #23
0
ファイル: news.php プロジェクト: biggtfish/magixcms
 /**
  * 
  * 
  */
 public function __construct()
 {
     if (class_exists('backend_model_access')) {
         $this->model_access = new backend_model_access();
     }
     if (class_exists('backend_model_message')) {
         $this->message = new backend_model_message();
     }
     if (magixcjquery_filter_request::isSession('keyuniqid_admin')) {
         $this->idadmin = magixcjquery_filter_isVar::isPostNumeric($_SESSION['id_admin']);
     }
     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('edit')) {
         $this->edit = magixcjquery_filter_isVar::isPostNumeric($_GET['edit']);
     }
     if (magixcjquery_filter_request::isGet('getlang')) {
         $this->getlang = (int) magixcjquery_filter_isVar::isPostNumeric($_GET['getlang']);
     }
     if (magixcjquery_filter_request::isPost('idnews')) {
         $this->idnews = magixcjquery_filter_isVar::isPostNumeric($_POST['idnews']);
     }
     if (magixcjquery_filter_request::isPost('n_title')) {
         $this->n_title = magixcjquery_form_helpersforms::inputClean($_POST['n_title']);
     }
     if (magixcjquery_filter_request::isPost('n_uri')) {
         $this->n_uri = magixcjquery_url_clean::rplMagixString($_POST['n_uri']);
     }
     if (magixcjquery_filter_request::isPost('n_content')) {
         $this->n_content = $_POST['n_content'];
     }
     if (isset($_FILES['n_image']["name"])) {
         $this->n_image = magixcjquery_url_clean::rplMagixString($_FILES['n_image']["name"]);
     }
     if (magixcjquery_filter_request::isPost('idlang')) {
         $this->idlang = magixcjquery_filter_isVar::isPostNumeric($_POST['idlang']);
     }
     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;
     }
     if (magixcjquery_filter_request::isPost('published')) {
         $this->published = magixcjquery_filter_isVar::isPostNumeric($_POST['published']);
     }
     if (magixcjquery_filter_request::isPost('delete_news')) {
         $this->delete_news = magixcjquery_filter_isVar::isPostNumeric($_POST['delete_news']);
     }
     if (magixcjquery_filter_request::isPost('delete_image')) {
         $this->delete_image = magixcjquery_filter_isVar::isPostNumeric($_POST['delete_image']);
     }
     /**
      * Système de tags
      */
     if (magixcjquery_filter_request::isPost('name_tag')) {
         $this->name_tag = (string) magixcjquery_url_clean::make2tagString($_POST['name_tag']);
     }
     if (magixcjquery_filter_request::isPost('delete_tag')) {
         $this->delete_tag = magixcjquery_form_helpersforms::inputClean($_POST['delete_tag']);
     }
     //SEARCH
     if (magixcjquery_filter_request::isGet('get_search_news')) {
         $this->get_search_news = magixcjquery_form_helpersforms::inputClean($_GET['get_search_news']);
     }
     if (magixcjquery_filter_request::isPost('news_search')) {
         $this->news_search = magixcjquery_form_helpersforms::inputClean($_POST['news_search']);
     }
     //plugin
     if (magixcjquery_filter_request::isGet('plugin')) {
         $this->plugin = magixcjquery_form_helpersforms::inputClean($_GET['plugin']);
     }
 }
コード例 #24
0
ファイル: config.php プロジェクト: biggtfish/magixcms
 /**
  * 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']);
     }
 }
コード例 #25
0
ファイル: language.php プロジェクト: biggtfish/magixcms
 /**
  * function construct class
  *
  */
 public function __construct()
 {
     if (magixcjquery_filter_request::isGet('adminLanguage')) {
         self::$adminLanguage = magixcjquery_form_helpersforms::inputClean($_GET['adminLanguage']);
     }
 }
コード例 #26
0
ファイル: admin.php プロジェクト: magix-cms/faq
 /**
  * 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('content')) {
         $this->content = magixcjquery_form_helpersforms::inputCleanQuote($_POST['content']);
     }
     # EDIT PAGE
     if (magixcjquery_filter_request::isPOST('idqa')) {
         $this->idqa = magixcjquery_form_helpersforms::inputNumeric($_POST['idqa']);
     }
     # 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();
 }
コード例 #27
0
/**
 * Smarty plugin
 * @package     Smarty
 * @subpackage  plugins
 * Type:        function
 * Name:        widget_catalog_display
 * Date:        27/09/2013
 * Update:      05/03/2013
 * @author      Samuel Lesire
 * @author      Gerits Aurelien
 * @link        htt://www.sire-sam.be, http://www.magix-dev.be
 * @version     1.1
 * @param       array
 * @param       Smarty
 * @return      string
 */
function smarty_function_widget_catalog_display($params, $template)
{
    $ModelSystem = new magixglobal_model_system();
    $ModelConstructor = new magixglobal_model_constructor();
    $ModelCatalog = new frontend_model_catalog();
    // Set and load data
    $current = $ModelSystem->setCurrentId();
    $conf = is_array($params['conf']) ? $params['conf'] : array();
    $data = $ModelCatalog->getData($conf, $current);
    $html = null;
    if ($data != null) {
        $pattern['default'] = patternCatalog();
        $pattern['custom'] = null;
        if ($params['pattern']) {
            $pattern['custom'] = is_array($params['pattern']) ? $params['pattern'] : patternCatalog($params['pattern']);
        }
        $pattern['global'] = $ModelConstructor->mergeHtmlPattern($pattern['default'], $pattern['custom']);
        // *** format items loop (foreach item)
        // ** Loop management var
        $deep = 1;
        $deep_minus = $deep - 1;
        $deep_plus = $deep + 1;
        $pass_trough = 0;
        $data_empty = false;
        // ** Loop format & output var
        $row = array();
        $items = array();
        $i[$deep] = 0;
        // *** boucle / loop
        do {
            // *** loop management START
            if ($pass_trough == 0) {
                // Si je n'ai plus de données à traiter je vide ma variable
                $row[$deep] = null;
            } else {
                // Sinon j'active le traitement des données
                $pass_trough = 0;
            }
            // Si je suis au premier niveaux et que je n'ai pas de donnée à traiter
            if ($deep == 1 and $row[$deep] == null) {
                // récupération des données dans $data
                $row[$deep] = array_shift($data);
            }
            // Si ma donnée possède des sous-donnée sous-forme de tableau
            if (isset($row[$deep]['subdata'])) {
                if (is_array($row[$deep]['subdata']) and $row[$deep]['subdata'] != null) {
                    // On monte d'une profondeur
                    $deep++;
                    $deep_minus++;
                    $deep_plus++;
                    // on récupére la  première valeur des sous-données en l'éffacant du tableau d'origine
                    $row[$deep] = array_shift($row[$deep_minus]['subdata']);
                    // Désactive le traitement des données
                    $pass_trough = 1;
                }
            } elseif ($deep != 1) {
                if ($row[$deep] == null) {
                    if ($row[$deep_minus]['subdata'] == null) {
                        // Si je n'ai pas de sous-données & pas de données à traiter & pas de frères à récupérer dans mon parent
                        // ====> désactive le tableaux de sous-données du parent et retourne au niveau de mon parent
                        unset($row[$deep_minus]['subdata']);
                        unset($i[$deep]);
                        $items[$deep] = $pattern['item']['container']['before'] . $items[$deep] . $pattern['item']['container']['after'];
                        $deep--;
                        $deep_minus = $deep - 1;
                        $deep_plus = $deep + 1;
                    } else {
                        // Je récupère un frère dans mon parent
                        $row[$deep] = array_shift($row[$deep_minus]['subdata']);
                    }
                    // Désactive le traitement des données
                    $pass_trough = 1;
                }
            }
            // *** loop management END
            // *** list format START
            if ($row[$deep] != null and $pass_trough != 1) {
                $i[$deep]++;
                // Construit doonées de l'item en array avec clée nominative unifiée ('name' => 'monname,'descr' => '<p>ma descr</p>,...)
                $itemData = $ModelCatalog->setItemData($row[$deep], $current['catalog']);
                // Configuration de la structure HTML de l'item
                $pattern['global']['is_current'] = $itemData['active'];
                $pattern['global']['id'] = isset($itemData['id']) ? $itemData['id'] : 0;
                $pattern['global']['url'] = isset($itemData['url']) ? $itemData['url'] : '#';
                $pattern['item'] = $ModelConstructor->setItemPattern($pattern['global'], $i[$deep], $deep);
                // Récupération de la taille de l'image
                if (isset($pattern['global']['img']['size_' . $deep])) {
                    $row[$deep]['img_size'] = $pattern['global']['img']['size_' . $deep];
                } elseif (isset($pattern['global']['img']['size'])) {
                    $row[$deep]['img_size'] = $pattern['global']['img']['size'];
                } else {
                    $row[$deep]['img_size'] = 'medium';
                }
                $imgSize = isset($pattern['item']['img']['size']) ? $pattern['item']['img']['size'] : 'small';
                if (isset($itemData['imgSrc'][$imgSize])) {
                    $itemData['imgSrc'] = $itemData['imgSrc'][$imgSize];
                } else {
                    $itemData['imgSrc'] = $itemData['imgSrc']['default'];
                }
                // remise à zero du compteur si élément est le dernier de la ligne
                if ($pattern['item']['is_last'] == 1) {
                    $i[$deep] = 0;
                }
                // Récupération de l'affichage pour le niveau
                $pattern['item']['display'] = is_array($pattern['global']['display'][$deep]) ? $pattern['global']['display'][$deep] : $pattern['global']['display'][1];
                if ($pattern['item']['display'] == null) {
                    $pattern['item']['display'] = $pattern['default']['display'][1];
                }
                // Récupération des sous-données (enfants)
                if (isset($items[$deep_plus]) != null) {
                    $subitems = $items[$deep_plus];
                    $items[$deep_plus] = null;
                } else {
                    $subitems = null;
                }
                $item = null;
                foreach ($pattern['item']['display'] as $elem_type) {
                    // BOUCLE de formatage des éléments contenus dans item
                    $pattern['elem'] = $pattern['item'][$elem_type];
                    if (array_search($elem_type, $pattern['item']['display'])) {
                        // Config class link
                        $item_classLink = null;
                        if (isset($pattern['elem']['classLink'])) {
                            $item_classLink = ' class="' . $pattern['elem']['classLink'] . '"';
                            $item_classLink = $pattern['elem']['classLink'] == 'none' ? 'none' : $item_classLink;
                        }
                        // Format element on switch
                        switch ($elem_type) {
                            case 'name':
                                $elem = $item_classLink != 'none' ? '<a' . $item_classLink . ' href="' . $itemData['url'] . '" title="' . $itemData['name'] . '">' : '';
                                $elem .= $itemData['name'];
                                $elem .= $item_classLink != 'none' ? '</a>' : '';
                                break;
                            case 'img':
                                $elem = $item_classLink != 'none' ? '<a' . $item_classLink . ' href="' . $itemData['url'] . '" title="' . $itemData['name'] . '">' : '';
                                $elem .= '<img src="' . $itemData['imgSrc'] . '" alt="' . $itemData['name'] . '"/>';
                                $elem .= $item_classLink != 'none' ? '</a>' : '';
                                break;
                            case 'descr':
                                $elem = magixcjquery_form_helpersforms::inputCleanTruncate(magixcjquery_form_helpersforms::inputTagClean($itemData['content']), $pattern['item']['descr']['lenght'], $pattern['item']['descr']['delemiter']);
                                break;
                            case 'price':
                                if (is_numeric($itemData['price'])) {
                                    $elem = $itemData['price'] . $pattern['item']['price']['currency'];
                                } else {
                                    $elem = null;
                                }
                                break;
                            default:
                                $elem = null;
                        }
                        if ($elem != null) {
                            $item .= $pattern['elem']['before'];
                            $item .= $elem;
                            $item .= $pattern['elem']['after'];
                        }
                    }
                }
                $items[$deep] .= $pattern['item']['item']['before'];
                $items[$deep] .= $item;
                $items[$deep] .= $subitems;
                $items[$deep] .= $pattern['item']['item']['after'];
            }
            // *** list format END
            // Si $data est vide => arrête la boucle
            if (empty($data) and $row[1] == null) {
                $data_empty = true;
            }
        } while ($data_empty == false);
        // *** container construct
        if ($items[1] != null) {
            $html = isset($params['title']) ? $params['title'] : '';
            $html .= $pattern['global']['container']['before'];
            $html .= isset($params['prepend']) ? $params['prepend'] : null;
            $html .= $items[1];
            $html .= isset($params['append']) ? $params['append'] : null;
            $html .= $pattern['global']['container']['after'];
        } else {
            $html = null;
        }
    }
    return $html;
}
コード例 #28
0
ファイル: catalog.php プロジェクト: biggtfish/magixcms
 /**
  * @access public
  * Constructor
  */
 public function __construct()
 {
     if (class_exists('backend_model_access')) {
         $this->model_access = new backend_model_access();
     }
     if (class_exists('backend_model_message')) {
         $this->message = new backend_model_message();
     }
     if (magixcjquery_filter_request::isSession('keyuniqid_admin')) {
         $this->idadmin = magixcjquery_filter_isVar::isPostNumeric($_SESSION['id_admin']);
     }
     //Catégories
     if (magixcjquery_filter_request::isPost('clibelle')) {
         $this->clibelle = magixcjquery_form_helpersforms::inputClean($_POST['clibelle']);
     }
     if (magixcjquery_filter_request::isPost('pathclibelle')) {
         $this->pathclibelle = magixcjquery_form_helpersforms::inputClean($_POST['pathclibelle']);
     }
     if (magixcjquery_filter_request::isPost('c_content')) {
         $this->c_content = magixcjquery_form_helpersforms::inputCleanQuote($_POST['c_content']);
     }
     //Sous catégories
     if (magixcjquery_filter_request::isPost('slibelle')) {
         $this->slibelle = magixcjquery_form_helpersforms::inputClean($_POST['slibelle']);
     }
     if (magixcjquery_filter_request::isPost('pathslibelle')) {
         $this->pathslibelle = magixcjquery_url_clean::rplMagixString($_POST['slibelle'], array('dot' => false, 'ampersand' => 'strict', 'cspec' => '', 'rspec' => ''));
     }
     if (magixcjquery_filter_request::isPost('order_pages')) {
         $this->order_pages = magixcjquery_form_helpersforms::arrayClean($_POST['order_pages']);
     }
     if (magixcjquery_filter_request::isPost('s_content')) {
         $this->s_content = magixcjquery_form_helpersforms::inputCleanQuote($_POST['s_content']);
     }
     if (magixcjquery_filter_request::isPost('idclc')) {
         $this->idclc = (int) magixcjquery_filter_isVar::isPostNumeric($_POST['idclc']);
     }
     if (magixcjquery_filter_request::isPost('idcls')) {
         $this->idcls = (int) magixcjquery_filter_isVar::isPostNumeric($_POST['idcls']);
     }
     if (magixcjquery_filter_request::isPost('idlang')) {
         $this->idlang = (int) magixcjquery_filter_isVar::isPostNumeric($_POST['idlang']);
     }
     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::isPost('titlecatalog')) {
         $this->titlecatalog = (string) magixcjquery_form_helpersforms::inputClean($_POST['titlecatalog']);
     }
     if (magixcjquery_filter_request::isPost('urlcatalog')) {
         $this->urlcatalog = magixcjquery_form_helpersforms::inputClean($_POST['urlcatalog']);
     }
     if (magixcjquery_filter_request::isPost('desccatalog')) {
         $this->desccatalog = (string) magixcjquery_form_helpersforms::inputCleanQuote($_POST['desccatalog']);
     }
     if (magixcjquery_filter_request::isPost('price')) {
         $this->price = magixcjquery_form_helpersforms::inputClean($_POST['price']);
     }
     // Remove
     if (magixcjquery_filter_request::isPost('delete_catalog')) {
         $this->delete_catalog = magixcjquery_filter_isVar::isPostNumeric($_POST['delete_catalog']);
     }
     if (magixcjquery_filter_request::isPost('delete_image')) {
         $this->delete_image = magixcjquery_form_helpersforms::inputClean($_POST['delete_image']);
     }
     if (magixcjquery_filter_request::isPost('delete_product')) {
         $this->delete_product = magixcjquery_filter_isVar::isPostNumeric($_POST['delete_product']);
     }
     if (magixcjquery_filter_request::isPost('delete_galery')) {
         $this->delete_galery = magixcjquery_filter_isVar::isPostNumeric($_POST['delete_galery']);
     }
     if (magixcjquery_filter_request::isPost('delete_category')) {
         $this->delete_category = magixcjquery_filter_isVar::isPostNumeric($_POST['delete_category']);
     }
     if (magixcjquery_filter_request::isPost('delete_subcategory')) {
         $this->delete_subcategory = magixcjquery_filter_isVar::isPostNumeric($_POST['delete_subcategory']);
     }
     if (magixcjquery_filter_request::isGet('page')) {
         // si numéric
         if (magixcjquery_filter_isVar::isPostNumeric($_GET['page'])) {
             $this->getpage = (int) intval($_GET['page']);
         } else {
             // Sinon retourne la première page
             $this->getpage = 1;
         }
     } else {
         $this->getpage = 1;
     }
     if (isset($_FILES['imgcatalog']["name"])) {
         $this->imgcatalog = magixcjquery_url_clean::rplMagixString($_FILES['imgcatalog']["name"]);
     }
     if (isset($_FILES['img_c']["name"])) {
         $this->img_c = magixcjquery_url_clean::rplMagixString($_FILES['img_c']["name"]);
     }
     if (isset($_FILES['img_s']["name"])) {
         $this->img_s = magixcjquery_url_clean::rplMagixString($_FILES['img_s']["name"]);
     }
     if (magixcjquery_filter_request::isGet('idclc')) {
         $this->getidclc = (int) magixcjquery_filter_isVar::isPostNumeric($_GET['idclc']);
     }
     if (magixcjquery_filter_request::isPost('idproduct')) {
         $this->idproduct = (int) magixcjquery_filter_isVar::isPostNumeric($_POST['idproduct']);
     }
     /**
      * Recherche de fiche catalogue
      */
     if (isset($_POST['product_search'])) {
         $this->product_search = magixcjquery_form_helpersforms::inputClean($_POST['product_search']);
     }
     if (magixcjquery_filter_request::isGet('name_product')) {
         $this->name_product = magixcjquery_form_helpersforms::inputClean($_GET['name_product']);
     }
     if (magixcjquery_filter_request::isGet('name_category')) {
         $this->name_category = magixcjquery_form_helpersforms::inputClean($_GET['name_category']);
     }
     // galery
     if (magixcjquery_filter_request::isPost('img_order')) {
         $this->img_order = magixcjquery_form_helpersforms::arrayClean($_POST['img_order']);
     }
     //Global
     if (magixcjquery_filter_request::isGet('section')) {
         $this->section = magixcjquery_form_helpersforms::inputClean($_GET['section']);
     }
     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('plugin')) {
         $this->plugin = magixcjquery_form_helpersforms::inputClean($_GET['plugin']);
     }
     //JQUERY CALLBACK
     if (magixcjquery_filter_request::isGet('callback')) {
         $this->callback = (string) magixcjquery_form_helpersforms::inputClean($_GET['callback']);
     }
     if (magixcjquery_filter_request::isGet('title_search')) {
         $this->title_search = magixcjquery_form_helpersforms::inputClean($_GET['title_search']);
     }
     //Copy
     if (magixcjquery_filter_request::isPost('copy')) {
         $this->copy = magixcjquery_filter_isVar::isPostNumeric($_POST['copy']);
     }
     if (magixcjquery_filter_request::isPost('move')) {
         $this->move = magixcjquery_filter_isVar::isPostNumeric($_POST['move']);
     }
 }
コード例 #29
0
ファイル: seo.php プロジェクト: biggtfish/magixcms
 public function __construct()
 {
     if (class_exists('backend_model_message')) {
         $this->message = new backend_model_message();
     }
     if (magixcjquery_filter_request::isPost('attribute')) {
         $this->attribute = magixcjquery_form_helpersforms::inputClean($_POST['attribute']);
     }
     if (magixcjquery_filter_request::isPost('idmetas')) {
         $this->idmetas = magixcjquery_filter_isVar::isPostNumeric($_POST['idmetas']);
     }
     if (magixcjquery_filter_request::isPost('strrewrite')) {
         $this->strrewrite = magixcjquery_form_helpersforms::inputClean($_POST['strrewrite']);
     }
     if (magixcjquery_filter_request::isPost('level')) {
         $this->level = magixcjquery_filter_isVar::isPostNumeric($_POST['level']);
     }
     if (magixcjquery_filter_request::isGet('edit')) {
         $this->edit = magixcjquery_filter_isVar::isPostNumeric($_GET['edit']);
     }
     if (magixcjquery_filter_request::isPost('delete_metas')) {
         $this->delete_metas = magixcjquery_filter_isVar::isPostNumeric($_POST['delete_metas']);
     }
     //Global
     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 = (int) magixcjquery_filter_isVar::isPostNumeric($_GET['getlang']);
     }
 }
コード例 #30
0
ファイル: system.php プロジェクト: biggtfish/magixcms
 /**
  * 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;
 }