当前位置: 首页>>代码示例>>PHP>>正文


PHP Tools::usingSecureMode方法代码示例

本文整理汇总了PHP中Tools::usingSecureMode方法的典型用法代码示例。如果您正苦于以下问题:PHP Tools::usingSecureMode方法的具体用法?PHP Tools::usingSecureMode怎么用?PHP Tools::usingSecureMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tools的用法示例。


在下文中一共展示了Tools::usingSecureMode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     $this->bootstrap = true;
     $this->className = 'Configuration';
     $this->table = 'configuration';
     parent::__construct();
     // Prevent classes which extend AdminPreferences to load useless data
     if (get_class($this) == 'AdminPreferencesController') {
         $round_mode = array(array('value' => PS_ROUND_HALF_UP, 'name' => $this->trans('Round up away from zero, when it is half way there (recommended)', array(), 'Admin.ShopParameters.Feature')), array('value' => PS_ROUND_HALF_DOWN, 'name' => $this->trans('Round down towards zero, when it is half way there', array(), 'Admin.ShopParameters.Feature')), array('value' => PS_ROUND_HALF_EVEN, 'name' => $this->trans('Round towards the next even value', array(), 'Admin.ShopParameters.Feature')), array('value' => PS_ROUND_HALF_ODD, 'name' => $this->trans('Round towards the next odd value', array(), 'Admin.ShopParameters.Feature')), array('value' => PS_ROUND_UP, 'name' => $this->trans('Round up to the nearest value', array(), 'Admin.ShopParameters.Feature')), array('value' => PS_ROUND_DOWN, 'name' => $this->trans('Round down to the nearest value', array(), 'Admin.ShopParameters.Feature')));
         $activities1 = array(0 => $this->trans('-- Please choose your main activity --', array(), 'Install'), 2 => $this->trans('Animals and Pets', array(), 'Install'), 3 => $this->trans('Art and Culture', array(), 'Install'), 4 => $this->trans('Babies', array(), 'Install'), 5 => $this->trans('Beauty and Personal Care', array(), 'Install'), 6 => $this->trans('Cars', array(), 'Install'), 7 => $this->trans('Computer Hardware and Software', array(), 'Install'), 8 => $this->trans('Download', array(), 'Install'), 9 => $this->trans('Fashion and accessories', array(), 'Install'), 10 => $this->trans('Flowers, Gifts and Crafts', array(), 'Install'), 11 => $this->trans('Food and beverage', array(), 'Install'), 12 => $this->trans('HiFi, Photo and Video', array(), 'Install'), 13 => $this->trans('Home and Garden', array(), 'Install'), 14 => $this->trans('Home Appliances', array(), 'Install'), 15 => $this->trans('Jewelry', array(), 'Install'), 1 => $this->trans('Lingerie and Adult', array(), 'Install'), 16 => $this->trans('Mobile and Telecom', array(), 'Install'), 17 => $this->trans('Services', array(), 'Install'), 18 => $this->trans('Shoes and accessories', array(), 'Install'), 19 => $this->trans('Sport and Entertainment', array(), 'Install'), 20 => $this->trans('Travel', array(), 'Install'));
         $activities2 = array();
         foreach ($activities1 as $value => $name) {
             $activities2[] = array('value' => $value, 'name' => $name);
         }
         $fields = array('PS_SSL_ENABLED' => array('title' => $this->trans('Enable SSL', array(), 'Admin.ShopParameters.Feature'), 'desc' => $this->trans('If you own an SSL certificate for your shop\'s domain name, you can activate SSL encryption (https://) for customer account identification and order processing.', array(), 'Admin.ShopParameters.Help'), 'hint' => $this->trans('If you want to enable SSL on all the pages of your shop, activate the "Enable on all the pages" option below.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0'));
         $fields['PS_SSL_ENABLED_EVERYWHERE'] = array('title' => $this->trans('Enable SSL on all pages', array(), 'Admin.ShopParameters.Feature'), 'desc' => $this->trans('When enabled, all the pages of your shop will be SSL-secured.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0', 'disabled' => Tools::getValue('PS_SSL_ENABLED', Configuration::get('PS_SSL_ENABLED')) ? false : true);
         $fields = array_merge($fields, array('PS_TOKEN_ENABLE' => array('title' => $this->trans('Increase front office security', array(), 'Admin.ShopParameters.Feature'), 'desc' => $this->trans('Enable or disable token in the Front Office to improve PrestaShop\'s security.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0', 'visibility' => Shop::CONTEXT_ALL), 'PS_ALLOW_HTML_IFRAME' => array('title' => $this->trans('Allow iframes on HTML fields', array(), 'Admin.ShopParameters.Feature'), 'desc' => $this->trans('Allow iframes on text fields like product description. We recommend that you leave this option disabled.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0'), 'PS_USE_HTMLPURIFIER' => array('title' => $this->trans('Use HTMLPurifier Library', array(), 'Admin.ShopParameters.Feature'), 'desc' => $this->trans('Clean the HTML content on text fields. We recommend that you leave this option enabled.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0'), 'PS_PRICE_ROUND_MODE' => array('title' => $this->trans('Round mode', array(), 'Admin.ShopParameters.Feature'), 'desc' => $this->trans('You can choose among 6 different ways of rounding prices. "Round up away from zero ..." is the recommended behavior.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => $round_mode, 'identifier' => 'value'), 'PS_ROUND_TYPE' => array('title' => $this->trans('Round type', array(), 'Admin.ShopParameters.Feature'), 'desc' => $this->trans('You can choose when to round prices: either on each item, each line or the total (of an invoice, for example).', array(), 'Admin.ShopParameters.Help'), 'cast' => 'intval', 'type' => 'select', 'list' => array(array('name' => $this->trans('Round on each item', array(), 'Admin.ShopParameters.Feature'), 'id' => Order::ROUND_ITEM), array('name' => $this->trans('Round on each line', array(), 'Admin.ShopParameters.Feature'), 'id' => Order::ROUND_LINE), array('name' => $this->trans('Round on the total', array(), 'Admin.ShopParameters.Feature'), 'id' => Order::ROUND_TOTAL)), 'identifier' => 'id'), 'PS_PRICE_DISPLAY_PRECISION' => array('title' => $this->trans('Number of decimals', array(), 'Admin.ShopParameters.Feature'), 'desc' => $this->trans('Choose how many decimals you want to display', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isUnsignedInt', 'cast' => 'intval', 'type' => 'text', 'class' => 'fixed-width-xxl'), 'PS_DISPLAY_SUPPLIERS' => array('title' => $this->trans('Display brands and suppliers', array(), 'Admin.ShopParameters.Feature'), 'desc' => $this->trans('Enable brands and suppliers pages on your front office even when their respective modules are disabled.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_DISPLAY_BEST_SELLERS' => array('title' => $this->trans('Display best sellers', array(), 'Admin.ShopParameters.Feature'), 'desc' => $this->trans('Enable best sellers page on your front office even when its respective module is disabled.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_MULTISHOP_FEATURE_ACTIVE' => array('title' => $this->trans('Enable Multistore', array(), 'Admin.ShopParameters.Feature'), 'desc' => $this->trans('The multistore feature allows you to manage several e-shops with one Back Office. If this feature is enabled, a "Multistore" page will be available in the "Advanced Parameters" menu.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'visibility' => Shop::CONTEXT_ALL), 'PS_SHOP_ACTIVITY' => array('title' => $this->trans('Main Shop Activity', array(), 'Admin.ShopParameters.Feature'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => $activities2, 'identifier' => 'value')));
         // No HTTPS activation if you haven't already.
         if (!Tools::usingSecureMode() && !Configuration::get('PS_SSL_ENABLED')) {
             $fields['PS_SSL_ENABLED']['type'] = 'disabled';
             $fields['PS_SSL_ENABLED']['disabled'] = '<a class="btn btn-link" href="https://' . Tools::getShopDomainSsl() . Tools::safeOutput($_SERVER['REQUEST_URI']) . '">' . $this->trans('Please click here to check if your shop supports HTTPS.', array(), 'Admin.ShopParameters.Feature') . '</a>';
         }
         $this->fields_options = array('general' => array('title' => $this->trans('General', array(), 'Admin.Global'), 'icon' => 'icon-cogs', 'fields' => $fields, 'submit' => array('title' => $this->trans('Save', array(), 'Admin.Actions'))));
     }
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:25,代码来源:AdminPreferencesController.php

示例2: __construct

 public function __construct()
 {
     $this->name = 'megaboxs';
     $this->arrHook = array('displayMegaboxs', 'displayFooter', 'displayHomeBottomColumn', 'displayBottomColumn', 'hookdisplayHome', 'displayLeftColumn', 'displayRightColumn');
     $this->arrLayout = array('default' => $this->l('Default'));
     $this->arrMenuType = array('link' => $this->l('Link'), 'image' => $this->l('Image'), 'html' => $this->l('Custom HTML'), 'module' => $this->l('Module'));
     $this->arrFlickrFeedapi = array('photos_public.gne' => $this->l('Public photos & video'), 'photos_friends.gne' => $this->l('Friends photostream'), 'photos_faves.gne' => $this->l('Public favorites from a user'), 'groups_discuss.gne' => $this->l('Group discussions'), 'groups_pool.gne' => $this->l('Group pools'), 'forums.gne' => $this->l('Forum discussions'), 'activity.gne' => $this->l('Recent activity on your photostream'), 'photos_comments.gne' => $this->l('Recent comments you made'));
     $this->arrGroupType = array('link' => $this->l('Link'), 'product' => $this->l('Product'), 'module' => $this->l('Module'), 'html' => $this->l('Html'), 'contact' => $this->l('Contact form'), 'twitter_feed' => $this->l('Twitter feed'), 'flickr_feed' => $this->l('Flickr feed'), 'store_map' => $this->l('Store map'));
     $this->arrProductOrderBy = array('seller' => $this->l('Seller'), 'price' => $this->l('Price'), 'discount' => $this->l('Discount'), 'date_add' => $this->l('Add Date'), 'position' => $this->l('Position'), 'review' => $this->l('Review'), 'view' => $this->l('View'), 'rate' => $this->l('Rates'));
     $this->arrProductOrderWay = array('asc' => $this->l('Ascending'), 'desc' => $this->l('Descending'));
     $this->arrProductOnCondition = array('all' => $this->l('All'), 'new' => $this->l('New'), 'used' => $this->l('Used'), 'refurbished' => $this->l('Refurbished'));
     $this->arrProductOnSale = array('2' => $this->l('All'), '0' => $this->l('No'), '1' => $this->l('Yes'));
     $this->arrProductOnNew = array('2' => $this->l('All'), '0' => $this->l('No'), '1' => $this->l('Yes'));
     $this->arrProductOnDiscount = array('2' => $this->l('All'), '0' => $this->l('No'), '1' => $this->l('Yes'));
     $this->arrProductType = array('auto' => $this->l('Auto'), 'manual' => $this->l('Manual'));
     $this->arrCol = array('0' => $this->l('None'), '1' => $this->l('Col 1'), '2' => $this->l('Col 2'), '3' => $this->l('Col 3'), '4' => $this->l('Col 4'), '5' => $this->l('Col 5'), '6' => $this->l('Col 6'), '7' => $this->l('Col 7'), '8' => $this->l('Col 8'), '9' => $this->l('Col 9'), '10' => $this->l('Col 10'), '11' => $this->l('Col 11'), '12' => $this->l('Col 12'));
     $this->secure_key = Tools::encrypt($this->name);
     $this->pathImage = dirname(__FILE__) . '/images/';
     if (Tools::usingSecureMode()) {
         $this->liveImage = _PS_BASE_URL_SSL_ . __PS_BASE_URI__ . 'modules/' . $this->name . '/images/';
     } else {
         $this->liveImage = _PS_BASE_URL_ . __PS_BASE_URI__ . 'modules/' . $this->name . '/images/';
     }
     $this->tab = 'front_office_features';
     $this->version = '1.0';
     $this->author = 'OVIC-SOFT';
     $this->bootstrap = true;
     parent::__construct();
     $this->displayName = $this->l('Mega boxs Module');
     $this->description = $this->l('Mega boxs Module');
     $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
     $this->datas = dirname(__FILE__) . '/datas/';
 }
开发者ID:zangles,项目名称:lennyba,代码行数:33,代码来源:megaboxs.php

示例3: __construct

 public function __construct()
 {
     global $cookie;
     $this->className = 'Configuration';
     $this->table = 'configuration';
     $max_upload = (int) ini_get('upload_max_filesize');
     $max_post = (int) ini_get('post_max_size');
     $upload_mb = min($max_upload, $max_post);
     $timezones = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT name FROM ' . _DB_PREFIX_ . 'timezone');
     $taxes[] = array('id' => 0, 'name' => $this->l('None'));
     foreach (Tax::getTaxes((int) $cookie->id_lang) as $tax) {
         $taxes[] = array('id' => $tax['id_tax'], 'name' => $tax['name']);
     }
     $order_process_type = array(array('value' => PS_ORDER_PROCESS_STANDARD, 'name' => $this->l('Standard (5 steps)')), array('value' => PS_ORDER_PROCESS_OPC, 'name' => $this->l('One page checkout')));
     $round_mode = array(array('value' => PS_ROUND_UP, 'name' => $this->l('superior')), array('value' => PS_ROUND_DOWN, 'name' => $this->l('inferior')), array('value' => PS_ROUND_HALF, 'name' => $this->l('classical')));
     $cms_tab = array(0 => array('id' => 0, 'name' => $this->l('None')));
     foreach (CMS::listCms($cookie->id_lang) as $cms_file) {
         $cms_tab[] = array('id' => $cms_file['id_cms'], 'name' => $cms_file['meta_title']);
     }
     $this->_fieldsGeneral = array('PS_SHOP_ENABLE' => array('title' => $this->l('Enable Shop'), 'desc' => $this->l('Activate or deactivate your shop. Deactivate your shop while you perform maintenance on it. Please note that the webservice will not be disabled'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_MAINTENANCE_IP' => array('title' => $this->l('Maintenance IP'), 'desc' => $this->l('IP addresses allowed to access the Front Office even if shop is disabled. Use a comma to separate them (e.g., 42.24.4.2,127.0.0.1,99.98.97.96)'), 'validation' => 'isGenericName', 'type' => 'maintenance_ip', 'size' => 30, 'default' => ''), 'PS_SSL_ENABLED' => array('title' => $this->l('Enable SSL'), 'desc' => $this->l('If your hosting provider allows SSL, you can activate SSL encryption (https://) for customer account identification and order processing'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0'), 'PS_COOKIE_CHECKIP' => array('title' => $this->l('Check IP on the cookie'), 'desc' => $this->l('Check the IP address of the cookie in order to avoid your cookie being stolen'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0'), 'PS_COOKIE_LIFETIME_FO' => array('title' => $this->l('Lifetime of the Front Office cookie'), 'desc' => $this->l('Indicate the number of hours'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'text', 'default' => '480'), 'PS_COOKIE_LIFETIME_BO' => array('title' => $this->l('Lifetime of the Back Office cookie'), 'desc' => $this->l('Indicate the number of hours'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'text', 'default' => '480'), 'PS_TOKEN_ENABLE' => array('title' => $this->l('Increase Front Office security'), 'desc' => $this->l('Enable or disable token on the Front Office in order to improve PrestaShop security'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0'), 'PS_HELPBOX' => array('title' => $this->l('Back Office help boxes'), 'desc' => $this->l('Enable yellow help boxes which are displayed under form fields in the Back Office'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_ORDER_PROCESS_TYPE' => array('title' => $this->l('Order process type'), 'desc' => $this->l('You can choose the order process type as either standard (5 steps) or One Page Checkout'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => $order_process_type, 'identifier' => 'value'), 'PS_GUEST_CHECKOUT_ENABLED' => array('title' => $this->l('Enable guest checkout'), 'desc' => $this->l('Your guest can make an order without registering'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_CONDITIONS' => array('title' => $this->l('Terms of service'), 'desc' => $this->l('Require customers to accept or decline terms of service before processing the order'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'js' => array('on' => 'onchange="changeCMSActivationAuthorization()"', 'off' => 'onchange="changeCMSActivationAuthorization()"')), 'PS_CONDITIONS_CMS_ID' => array('title' => $this->l('Conditions of use of CMS page'), 'desc' => $this->l('Choose the Conditions of use of CMS page'), 'validation' => 'isInt', 'type' => 'select', 'list' => $cms_tab, 'identifier' => 'id', 'cast' => 'intval'), 'PS_GIFT_WRAPPING' => array('title' => $this->l('Offer gift-wrapping'), 'desc' => $this->l('Suggest gift-wrapping to customer and possibility of leaving a message'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_GIFT_WRAPPING_PRICE' => array('title' => $this->l('Gift-wrap pricing'), 'desc' => $this->l('Set a price for gift-wrapping'), 'validation' => 'isPrice', 'cast' => 'floatval', 'type' => 'price'), 'PS_GIFT_WRAPPING_TAX' => array('title' => $this->l('Gift-wrapping tax'), 'desc' => $this->l('Set a tax for gift-wrapping'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => $taxes, 'identifier' => 'id'), 'PS_ATTACHMENT_MAXIMUM_SIZE' => array('title' => $this->l('Maximum attachment size'), 'desc' => $this->l('Set the maximum size of attached files (in Megabytes ).') . ' ' . $this->l('Maximum:') . ' ' . ((int) str_replace('M', '', ini_get('post_max_size')) > (int) str_replace('M', '', ini_get('upload_max_filesize')) ? ini_get('upload_max_filesize') : ini_get('post_max_size')), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'text', 'default' => '2'), 'PS_RECYCLABLE_PACK' => array('title' => $this->l('Offer recycled packaging'), 'desc' => $this->l('Suggest recycled packaging to customer'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_CART_FOLLOWING' => array('title' => $this->l('Save cart content and re-display it at login'), 'desc' => $this->l('Recall and display contents of shopping cart following customer login'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_PRICE_ROUND_MODE' => array('title' => $this->l('Round mode'), 'desc' => $this->l('You can choose how to round prices: always round superior; always round inferior, or classic rounding'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => $round_mode, 'identifier' => 'value'), 'PRESTASTORE_LIVE' => array('title' => $this->l('Automatically check for module updates'), 'desc' => $this->l('New modules and updates are displayed on the modules page'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_HIDE_OPTIMIZATION_TIPS' => array('title' => $this->l('Hide optimization tips'), 'desc' => $this->l('Hide optimization tips on the back office homepage'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_DISPLAY_SUPPLIERS' => array('title' => $this->l('Display suppliers and manufacturers'), 'desc' => $this->l('Display manufacturers and suppliers list even if corresponding blocks are disabled'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_FORCE_SMARTY_2' => array('title' => $this->l('Use Smarty 2 instead of 3'), 'desc' => $this->l('Enable if your theme is incompatible with Smarty 3 (you should update your theme, since Smarty 2 will be unsupported from PrestaShop v1.5)'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_LIMIT_UPLOAD_FILE_VALUE' => array('title' => $this->l('Limit upload file value'), 'desc' => $this->l('Define the limit upload for a downloadable product, this value has to be inferior or equal to your server\'s maximum upload file ') . sprintf('(%s MB).', $upload_mb), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'limit', 'default' => '1'), 'PS_LIMIT_UPLOAD_IMAGE_VALUE' => array('title' => $this->l('Limit upload image value'), 'desc' => $this->l('Define the limit upload for an image, this value has to be inferior or equal to your server\'s maximum upload file ') . sprintf('(%s MB).', $upload_mb), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'limit', 'default' => '1'));
     if (function_exists('date_default_timezone_set')) {
         $this->_fieldsGeneral['PS_TIMEZONE'] = array('title' => $this->l('Time Zone:'), 'validation' => 'isAnything', 'type' => 'select', 'list' => $timezones, 'identifier' => 'name');
     }
     // No HTTPS activation if you haven't already.
     if (!Tools::usingSecureMode() && !_PS_SSL_ENABLED_) {
         $this->_fieldsGeneral['PS_SSL_ENABLED']['type'] = 'disabled';
         $this->_fieldsGeneral['PS_SSL_ENABLED']['disabled'] = '<a href="https://' . Tools::getShopDomainSsl() . Tools::safeOutput($_SERVER['REQUEST_URI']) . '">' . $this->l('Please click here to use HTTPS protocol before enabling SSL.') . '</a>';
     }
     parent::__construct();
 }
开发者ID:Evil1991,项目名称:PrestaShop-1.4,代码行数:30,代码来源:AdminPreferences.php

示例4: __construct

 public function __construct()
 {
     $this->name = 'megamenus';
     $this->arrHook = array('displayVerticalMenu', 'displayHorizontalMenu', 'displayLeftColumn', 'displayTopColumn', 'displayMegamenuLeft', 'displayMegamenuRight');
     $this->arrLayout = array('vertical_left' => $this->l('Vertical Left'), 'horizontal_top' => $this->l('Horizontal Top'));
     $this->arrMenuType = array('link' => $this->l('Link'), 'image' => $this->l('Image'), 'html' => $this->l('Custom HTML'), 'module' => $this->l('Module'));
     $this->arrGroupType = array('link' => $this->l('Link'), 'product' => $this->l('Product'), 'module' => $this->l('Module'));
     $this->arrProductOrderBy = array('seller' => $this->l('Seller'), 'price' => $this->l('Price'), 'discount' => $this->l('Discount'), 'date_add' => $this->l('Add Date'), 'position' => $this->l('Position'), 'review' => $this->l('Review'), 'rate' => $this->l('Rates'));
     $this->arrProductOrderWay = array('asc' => $this->l('Ascending'), 'desc' => $this->l('Descending'));
     $this->arrProductOnCondition = array('all' => $this->l('All'), 'new' => $this->l('New'), 'used' => $this->l('Used'), 'refurbished' => $this->l('Refurbished'));
     $this->arrProductOnSale = array('2' => $this->l('All'), '0' => $this->l('No'), '1' => $this->l('Yes'));
     $this->arrProductOnNew = array('2' => $this->l('All'), '0' => $this->l('No'), '1' => $this->l('Yes'));
     $this->arrProductOnDiscount = array('2' => $this->l('All'), '0' => $this->l('No'), '1' => $this->l('Yes'));
     $this->arrProductType = array('auto' => $this->l('Auto'), 'manual' => $this->l('Manual'));
     $this->arrCol = array('0' => $this->l('None'), '1' => $this->l('Col 1'), '2' => $this->l('Col 2'), '3' => $this->l('Col 3'), '4' => $this->l('Col 4'), '5' => $this->l('Col 5'), '6' => $this->l('Col 6'), '7' => $this->l('Col 7'), '8' => $this->l('Col 8'), '9' => $this->l('Col 9'), '10' => $this->l('Col 10'), '11' => $this->l('Col 11'), '12' => $this->l('Col 12'));
     $this->secure_key = Tools::encrypt($this->name);
     $this->pathImage = dirname(__FILE__) . '/images/';
     if (Tools::usingSecureMode()) {
         $this->liveImage = _PS_BASE_URL_SSL_ . __PS_BASE_URI__ . 'modules/' . $this->name . '/images/';
     } else {
         $this->liveImage = _PS_BASE_URL_ . __PS_BASE_URI__ . 'modules/' . $this->name . '/images/';
     }
     $this->tab = 'front_office_features';
     $this->version = '2.0';
     $this->author = 'OVIC-SOFT';
     $this->bootstrap = true;
     parent::__construct();
     $this->displayName = $this->l('Mega menus Module');
     $this->description = $this->l('Mega menus Module');
     $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
     $this->datas = dirname(__FILE__) . '/datas/';
 }
开发者ID:zangles,项目名称:lennyba,代码行数:32,代码来源:megamenus.php

示例5: __construct

 public function __construct()
 {
     $this->bootstrap = true;
     $this->context = Context::getContext();
     $this->className = 'Configuration';
     $this->table = 'configuration';
     // Prevent classes which extend AdminPreferences to load useless data
     if (get_class($this) == 'AdminPreferencesController') {
         $round_mode = array(array('value' => PS_ROUND_UP, 'name' => $this->l('superior')), array('value' => PS_ROUND_DOWN, 'name' => $this->l('inferior')), array('value' => PS_ROUND_HALF, 'name' => $this->l('classical')));
         $activities1 = array(0 => $this->l('-- Please choose your main activity --'), 2 => $this->l('Animals and Pets'), 3 => $this->l('Art and Culture'), 4 => $this->l('Babies'), 5 => $this->l('Beauty and Personal Care'), 6 => $this->l('Cars'), 7 => $this->l('Computer Hardware and Software'), 8 => $this->l('Download'), 9 => $this->l('Fashion and accessories'), 10 => $this->l('Flowers, Gifts and Crafts'), 11 => $this->l('Food and beverage'), 12 => $this->l('HiFi, Photo and Video'), 13 => $this->l('Home and Garden'), 14 => $this->l('Home Appliances'), 15 => $this->l('Jewelry'), 1 => $this->l('Lingerie and Adult'), 16 => $this->l('Mobile and Telecom'), 17 => $this->l('Services'), 18 => $this->l('Shoes and accessories'), 19 => $this->l('Sport and Entertainment'), 20 => $this->l('Travel'));
         $activities2 = array();
         foreach ($activities1 as $value => $name) {
             $activities2[] = array('value' => $value, 'name' => $name);
         }
         $fields = array('PS_SSL_ENABLED' => array('title' => $this->l('Enable SSL'), 'desc' => $this->l('If your hosting provider allows SSL, you can activate SSL encryption (https://) for customer account identification and order processing.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0'));
         if (Tools::getValue('PS_SSL_ENABLED', Configuration::get('PS_SSL_ENABLED'))) {
             $fields['PS_SSL_ENABLED_EVERYWHERE'] = array('title' => $this->l('Force the SSL on all the pages'), 'desc' => $this->l('Force all your store to use SSL.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0');
         }
         $fields = array_merge($fields, array('PS_TOKEN_ENABLE' => array('title' => $this->l('Increase Front Office security'), 'desc' => $this->l('Enable or disable token in the Front Office to improve PrestaShop\'s security.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0', 'visibility' => Shop::CONTEXT_ALL), 'PS_ALLOW_HTML_IFRAME' => array('title' => $this->l('Allow iframes on HTML fields'), 'desc' => $this->l('Allow iframes on text fields like product description. We recommend that you leave this option disabled.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0'), 'PS_USE_HTMLPURIFIER' => array('title' => $this->l('Use HTMLPurifier Library'), 'desc' => $this->l('Clean the HTML content on text fields. We recommend that you leave this option enabled.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0'), 'PS_PRICE_ROUND_MODE' => array('title' => $this->l('Round mode'), 'desc' => $this->l('You can choose how to round prices: always round up, always round down or classic rounding (up if > .5, down if < .5).'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => $round_mode, 'identifier' => 'value'), 'PS_DISPLAY_SUPPLIERS' => array('title' => $this->l('Display suppliers and manufacturers'), 'desc' => $this->l('Enable suppliers and manufacturers pages on your Front Office even when their respective modules are disabled.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_DISPLAY_BEST_SELLERS' => array('title' => $this->l('Display best sellers'), 'desc' => $this->l('Enable best sellers page on your Front Office even when it\'s respective module is disabled.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_MULTISHOP_FEATURE_ACTIVE' => array('title' => $this->l('Enable Multistore'), 'desc' => $this->l('The multistore feature allows you to manage several e-shops with one Back Office. If this feature is enabled, a "Multistore" page will be available in the "Advanced Parameters" menu.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'visibility' => Shop::CONTEXT_ALL), 'PS_SHOP_ACTIVITY' => array('title' => $this->l('Main Shop Activity'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => $activities2, 'identifier' => 'value')));
         // No HTTPS activation if you haven't already.
         if (!Tools::usingSecureMode() && !Configuration::get('PS_SSL_ENABLED')) {
             $fields['PS_SSL_ENABLED']['type'] = 'disabled';
             $fields['PS_SSL_ENABLED']['disabled'] = '<a class="btn btn-link" href="https://' . Tools::getShopDomainSsl() . Tools::safeOutput($_SERVER['REQUEST_URI']) . '">' . $this->l('Please click here to use HTTPS protocol before enabling SSL.') . '</a>';
         }
         $this->fields_options = array('general' => array('title' => $this->l('General'), 'icon' => 'icon-cogs', 'fields' => $fields, 'submit' => array('title' => $this->l('Save'))));
     }
     parent::__construct();
 }
开发者ID:WhisperingTree,项目名称:etagerca,代码行数:28,代码来源:AdminPreferencesController.php

示例6: init

 public function init()
 {
     if (parent::$initialized) {
         return;
     }
     $ret = parent::init();
     // This override is part of the cloudcache module, so the cloudcache.php file exists
     require_once dirname(__FILE__) . '/../../modules/cloudcache/cloudcache.php';
     // As parent::init() set the parent::$initialized flag, all below will be done only once.
     $module = new CloudCache();
     if (!$module->active || !Configuration::get('CLOUDCACHE_API_ACTIVE')) {
         return $ret;
     }
     // Use global because 1.4 only, 1.5 is in an other file
     global $smarty;
     $assignArray = array('img_ps_dir' => _PS_IMG_, 'img_cat_dir' => _THEME_CAT_DIR_, 'img_lang_dir' => _THEME_LANG_DIR_, 'img_prod_dir' => _THEME_PROD_DIR_, 'img_manu_dir' => _THEME_MANU_DIR_, 'img_sup_dir' => _THEME_SUP_DIR_, 'img_ship_dir' => _THEME_SHIP_DIR_, 'img_store_dir' => _THEME_STORE_DIR_, 'img_col_dir' => _THEME_COL_DIR_, 'img_dir' => _THEME_IMG_DIR_, 'css_dir' => _THEME_CSS_DIR_, 'js_dir' => _THEME_JS_DIR_, 'pic_dir' => _THEME_PROD_PIC_DIR_);
     $httHost = Tools::getHttpHost();
     $useSSL = isset($this->ssl) && $this->ssl && Configuration::get('PS_SSL_ENABLED') && Tools::usingSecureMode() ? true : false;
     $protocol_content = $useSSL ? 'https://' : 'http://';
     foreach ($assignArray as $assignKey => $assignValue) {
         if (substr($assignValue, 0, 1) == '/' || $protocol_content == 'https://') {
             $smarty->assign($assignKey, $protocol_content . Tools::getMediaServer($assignValue) . $assignValue);
         } else {
             $smarty->assign($assignKey, $assignValue);
         }
     }
     return $ret;
 }
开发者ID:rtajmahal,项目名称:PrestaShop-modules,代码行数:28,代码来源:FrontController.php

示例7: content_56a4d3ac4bfc77_48271231

 function content_56a4d3ac4bfc77_48271231($_smarty_tpl)
 {
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('favorite_products_url_add' => preg_replace("%(?<!\\\\)'%", "\\'", $_smarty_tpl->tpl_vars['link']->value->getModuleLink('favoriteproducts', 'actions', array('process' => 'add'), Tools::usingSecureMode()))), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('favorite_products_url_remove' => preg_replace("%(?<!\\\\)'%", "\\'", $_smarty_tpl->tpl_vars['link']->value->getModuleLink('favoriteproducts', 'actions', array('process' => 'remove'), Tools::usingSecureMode()))), $_smarty_tpl);
     if (isset($_GET['id_product'])) {
         echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('favorite_products_id_product' => intval($_GET['id_product'])), $_smarty_tpl);
     }
 }
开发者ID:kelvinsugi,项目名称:kertasmakanan,代码行数:8,代码来源:12bb665b1ad5a4343d99a8f657ec336a0bcbc606.file.favoriteproducts-header.tpl.php

示例8: _selectProtocol

 private static function _selectProtocol(&$url)
 {
     $useSSL = Configuration::get('PS_SSL_ENABLED') && Tools::usingSecureMode();
     if (preg_match('#(.*)\\.' . Configuration::get('CLOUDCACHE_API_COMPANY_ID') . '\\.netdna-cdn.com$#', $url, $matches) && $useSSL) {
         $url = $matches[1] . '-' . Configuration::get('CLOUDCACHE_API_COMPANY_ID') . '.netdna-ssl.com';
     }
     return $useSSL ? 'https://' : 'http://';
 }
开发者ID:rtajmahal,项目名称:PrestaShop-modules,代码行数:8,代码来源:Tools.php

示例9: _hookCommon

 /**
  * _hookAll has to be called in each hookXXX methods. This is made to avoid code duplication.
  *
  * @param mixed $params
  * @return void
  */
 private function _hookCommon($params)
 {
     global $smarty;
     $smarty->assign('ENT_QUOTES', ENT_QUOTES);
     $smarty->assign('search_ssl', (int) Tools::usingSecureMode());
     $smarty->assign('ajaxsearch', Configuration::get('PS_SEARCH_AJAX'));
     $smarty->assign('instantsearch', Configuration::get('PS_INSTANT_SEARCH'));
     return true;
 }
开发者ID:Evil1991,项目名称:PrestaShop-1.4,代码行数:15,代码来源:blocksearch.php

示例10: content_569352d8b26b20_05748756

 function content_569352d8b26b20_05748756($_smarty_tpl)
 {
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('isMobile' => $_smarty_tpl->tpl_vars['mobile_device']->value), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('baseDir' => $_smarty_tpl->tpl_vars['content_dir']->value), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('baseUri' => $_smarty_tpl->tpl_vars['base_uri']->value), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('static_token' => $_smarty_tpl->tpl_vars['static_token']->value), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('token' => $_smarty_tpl->tpl_vars['token']->value), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('priceDisplayPrecision' => $_smarty_tpl->tpl_vars['priceDisplayPrecision']->value * $_smarty_tpl->tpl_vars['currency']->value->decimals), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('priceDisplayMethod' => $_smarty_tpl->tpl_vars['priceDisplay']->value), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('roundMode' => $_smarty_tpl->tpl_vars['roundMode']->value), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('isLogged' => intval($_smarty_tpl->tpl_vars['is_logged']->value)), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('isGuest' => intval($_smarty_tpl->tpl_vars['is_guest']->value)), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('page_name' => htmlspecialchars($_smarty_tpl->tpl_vars['page_name']->value, ENT_QUOTES, 'UTF-8', true)), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('contentOnly' => $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['boolval'][0][0]->boolval($_smarty_tpl->tpl_vars['content_only']->value)), $_smarty_tpl);
     if (isset($_smarty_tpl->tpl_vars['cookie']->value->id_lang)) {
         echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('id_lang' => intval($_smarty_tpl->tpl_vars['cookie']->value->id_lang)), $_smarty_tpl);
     }
     $_smarty_tpl->smarty->_tag_stack[] = array('addJsDefL', array('name' => 'FancyboxI18nClose'));
     $_block_repeat = true;
     echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name' => 'FancyboxI18nClose'), null, $_smarty_tpl, $_block_repeat);
     while ($_block_repeat) {
         ob_start();
         echo smartyTranslate(array('s' => 'Close'), $_smarty_tpl);
         $_block_content = ob_get_clean();
         $_block_repeat = false;
         echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name' => 'FancyboxI18nClose'), $_block_content, $_smarty_tpl, $_block_repeat);
     }
     array_pop($_smarty_tpl->smarty->_tag_stack);
     $_smarty_tpl->smarty->_tag_stack[] = array('addJsDefL', array('name' => 'FancyboxI18nNext'));
     $_block_repeat = true;
     echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name' => 'FancyboxI18nNext'), null, $_smarty_tpl, $_block_repeat);
     while ($_block_repeat) {
         ob_start();
         echo smartyTranslate(array('s' => 'Next'), $_smarty_tpl);
         $_block_content = ob_get_clean();
         $_block_repeat = false;
         echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name' => 'FancyboxI18nNext'), $_block_content, $_smarty_tpl, $_block_repeat);
     }
     array_pop($_smarty_tpl->smarty->_tag_stack);
     $_smarty_tpl->smarty->_tag_stack[] = array('addJsDefL', array('name' => 'FancyboxI18nPrev'));
     $_block_repeat = true;
     echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name' => 'FancyboxI18nPrev'), null, $_smarty_tpl, $_block_repeat);
     while ($_block_repeat) {
         ob_start();
         echo smartyTranslate(array('s' => 'Previous'), $_smarty_tpl);
         $_block_content = ob_get_clean();
         $_block_repeat = false;
         echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name' => 'FancyboxI18nPrev'), $_block_content, $_smarty_tpl, $_block_repeat);
     }
     array_pop($_smarty_tpl->smarty->_tag_stack);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('usingSecureMode' => $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['boolval'][0][0]->boolval(Tools::usingSecureMode())), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('ajaxsearch' => $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['boolval'][0][0]->boolval(Configuration::get('PS_SEARCH_AJAX'))), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('instantsearch' => $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['boolval'][0][0]->boolval(Configuration::get('PS_INSTANT_SEARCH'))), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('quickView' => $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['boolval'][0][0]->boolval($_smarty_tpl->tpl_vars['quick_view']->value)), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('displayList' => $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['boolval'][0][0]->boolval(Configuration::get('PS_GRID_PRODUCT'))), $_smarty_tpl);
 }
开发者ID:ac3gam3r,项目名称:Maxokraft,代码行数:56,代码来源:0ad33e4c3361efaeeba49a067966819f787bc509.file.global.tpl.php

示例11: initContent

 public function initContent()
 {
     if (!Tools::usingSecureMode() && Configuration::get('PS_SSL_ENABLED')) {
         // You can uncomment these lines if you want to force https even from localhost and automatically redirect
         // header('HTTP/1.1 301 Moved Permanently');
         // header('Location: '.Tools::getShopDomainSsl(true).$_SERVER['REQUEST_URI']);
         // exit();
         $clientIsMaintenanceOrLocal = in_array(Tools::getRemoteAddr(), array_merge(array('127.0.0.1'), explode(',', Configuration::get('PS_MAINTENANCE_IP'))));
         // If ssl is enabled, https protocol is required. Exception for maintenance and local (127.0.0.1) IP
         if ($clientIsMaintenanceOrLocal) {
             $warningSslMessage = Tools::displayError('SSL is activated. However, your IP is allowed to enter unsecure mode for maintenance or local IP issues.');
         } else {
             $url = 'https://' . Tools::safeOutput(Tools::getServerName()) . Tools::safeOutput($_SERVER['REQUEST_URI']);
             $warningSslMessage = sprintf(Translate::ppTags(Tools::displayError('SSL is activated. Please connect using the following link to [1]log into secure mode (https://)[/1]', false), array('<a href="%s">')), $url);
         }
         $this->context->smarty->assign('warningSslMessage', $warningSslMessage);
     }
     if (file_exists(_PS_ADMIN_DIR_ . '/../install')) {
         $this->context->smarty->assign('wrong_install_name', true);
     }
     if (basename(_PS_ADMIN_DIR_) == 'admin' && file_exists(_PS_ADMIN_DIR_ . '/../admin/')) {
         $rand = 'admin' . sprintf('%03d', rand(0, 999)) . Tools::strtolower(Tools::passwdGen(6)) . '/';
         if (@rename(_PS_ADMIN_DIR_ . '/../admin/', _PS_ADMIN_DIR_ . '/../' . $rand)) {
             Tools::redirectAdmin('../' . $rand);
         } else {
             $this->context->smarty->assign(array('wrong_folder_name' => true));
         }
     } else {
         $rand = basename(_PS_ADMIN_DIR_) . '/';
     }
     $this->context->smarty->assign(array('randomNb' => $rand, 'adminUrl' => Tools::getCurrentUrlProtocolPrefix() . Tools::getShopDomain() . __PS_BASE_URI__ . $rand));
     // Redirect to admin panel
     if (Tools::isSubmit('redirect') && Validate::isControllerName(Tools::getValue('redirect'))) {
         $this->context->smarty->assign('redirect', Tools::getValue('redirect'));
     } else {
         $tab = new Tab((int) $this->context->employee->default_tab);
         $this->context->smarty->assign('redirect', $this->context->link->getAdminLink($tab->class_name));
     }
     if ($nb_errors = count($this->errors)) {
         $this->context->smarty->assign(array('errors' => $this->errors, 'nbErrors' => $nb_errors, 'shop_name' => Tools::safeOutput(Configuration::get('PS_SHOP_NAME')), 'disableDefaultErrorOutPut' => true));
     }
     if ($email = Tools::getValue('email')) {
         $this->context->smarty->assign('email', $email);
     }
     if ($password = Tools::getValue('password')) {
         $this->context->smarty->assign('password', $password);
     }
     $this->setMedia();
     $this->initHeader();
     parent::initContent();
     $this->initFooter();
     //force to disable modals
     $this->context->smarty->assign('modals', null);
 }
开发者ID:ortegon000,项目名称:tienda,代码行数:54,代码来源:AdminLoginController.php

示例12: _hookCommon

 /**
  * _hookAll has to be called in each hookXXX methods. This is made to avoid code duplication.
  * 
  * @param mixed $params 
  * @return void
  */
 private function _hookCommon($params)
 {
     global $smarty;
     $smarty->assign('ENT_QUOTES', ENT_QUOTES);
     $smarty->assign('search_ssl', (int) Tools::usingSecureMode());
     $ajaxSearch = (int) Configuration::get('PS_SEARCH_AJAX');
     $smarty->assign('ajaxsearch', $ajaxSearch);
     $instantSearch = (int) Configuration::get('PS_INSTANT_SEARCH');
     $smarty->assign(array('instantsearch' => $instantSearch, 'order_process' => Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order'));
     if ($ajaxSearch) {
         Tools::addCSS(_PS_CSS_DIR_ . 'jquery.autocomplete.css');
         Tools::addJS(_PS_JS_DIR_ . 'jquery/jquery.autocomplete.js');
     }
     Tools::addCSS(_THEME_CSS_DIR_ . 'product_list.css');
     Tools::addCSS($this->_path . 'blocksearch.css', 'all');
     return true;
 }
开发者ID:srikanthash09,项目名称:codetestdatld,代码行数:23,代码来源:blocksearch.php

示例13: __construct

 public function __construct()
 {
     $this->context = Context::getContext();
     $this->className = 'Configuration';
     $this->table = 'configuration';
     // Prevent classes which extend AdminPreferences to load useless data
     if (get_class($this) == 'AdminPreferencesController') {
         $round_mode = array(array('value' => PS_ROUND_UP, 'name' => $this->l('superior')), array('value' => PS_ROUND_DOWN, 'name' => $this->l('inferior')), array('value' => PS_ROUND_HALF, 'name' => $this->l('classical')));
         $fields = array('PS_SSL_ENABLED' => array('title' => $this->l('Enable SSL'), 'desc' => $this->l('If your hosting provider allows SSL, you can activate SSL encryption (https://) for customer account identification and order processing'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0'), 'PS_TOKEN_ENABLE' => array('title' => $this->l('Increase Front Office security'), 'desc' => $this->l('Enable or disable token on the Front Office in order to improve PrestaShop security'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0', 'visibility' => Shop::CONTEXT_ALL), 'PS_PRICE_ROUND_MODE' => array('title' => $this->l('Round mode'), 'desc' => $this->l('You can choose how to round prices: always round superior; always round inferior, or classic rounding'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => $round_mode, 'identifier' => 'value'), 'PS_DISPLAY_SUPPLIERS' => array('title' => $this->l('Display suppliers and manufacturers'), 'desc' => $this->l('Display suppliers and manufacturers lists even if corresponding blocks are disabled'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_MULTISHOP_FEATURE_ACTIVE' => array('title' => $this->l('Enable Multistore'), 'desc' => $this->l('Multistore feature allows you to manage several shops with one back-office. If this feature is enabled, a "Multistore" page will be available in the "Advanced Parameters" menu.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'visibility' => Shop::CONTEXT_ALL));
         // No HTTPS activation if you haven't already.
         if (!Tools::usingSecureMode() && !Configuration::get('PS_SSL_ENABLED')) {
             $fields['PS_SSL_ENABLED']['type'] = 'disabled';
             $fields['PS_SSL_ENABLED']['disabled'] = '<a href="https://' . Tools::getShopDomainSsl() . Tools::safeOutput($_SERVER['REQUEST_URI']) . '">' . $this->l('Please click here to use HTTPS protocol before enabling SSL.') . '</a>';
         }
         $this->fields_options = array('general' => array('title' => $this->l('General'), 'icon' => 'tab-preferences', 'fields' => $fields, 'submit' => array('title' => $this->l('   Save   '), 'class' => 'button')));
     }
     parent::__construct();
 }
开发者ID:rrameshsat,项目名称:Prestashop,代码行数:18,代码来源:AdminPreferencesController.php

示例14: __construct

 public function __construct()
 {
     $this->name = 'customparallax';
     $this->arrLayout = array('default' => $this->l('Default layout'), 'newsletter' => $this->l('Newsletter parallax'), 'section' => $this->l('Section layout'));
     $this->arrType = array('html' => 'Html', 'module' => 'Module');
     $this->pathImage = dirname(__FILE__) . '/images/';
     if (Tools::usingSecureMode()) {
         $this->liveImage = _PS_BASE_URL_SSL_ . __PS_BASE_URI__ . 'modules/' . $this->name . '/images/';
     } else {
         $this->liveImage = _PS_BASE_URL_ . __PS_BASE_URI__ . 'modules/' . $this->name . '/images/';
     }
     $this->secure_key = Tools::encrypt('03f7f2dd252d299bca5180ac51ddddbf:' . $this->name);
     self::$sameDatas = dirname(__FILE__) . '/samedatas/';
     $this->tab = 'front_office_features';
     $this->version = '2.0';
     $this->author = 'OVIC-SOFT';
     $this->bootstrap = true;
     parent::__construct();
     $this->displayName = $this->l('Custom Parallax module');
     $this->description = $this->l('Custom Parallax module');
     $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
 }
开发者ID:zangles,项目名称:lennyba,代码行数:22,代码来源:customparallax.php

示例15: content_530ff8eb595d17_88242252

 function content_530ff8eb595d17_88242252($_smarty_tpl)
 {
     if (!is_callable('smarty_modifier_escape')) {
         include '/Applications/MAMP/htdocs/prestashop/tools/smarty/plugins/modifier.escape.php';
     }
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('baseDir' => $_smarty_tpl->tpl_vars['content_dir']->value), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('baseUri' => $_smarty_tpl->tpl_vars['base_uri']->value), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('static_token' => $_smarty_tpl->tpl_vars['static_token']->value), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('token' => $_smarty_tpl->tpl_vars['token']->value), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('priceDisplayPrecision' => $_smarty_tpl->tpl_vars['priceDisplayPrecision']->value * $_smarty_tpl->tpl_vars['currency']->value->decimals), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('priceDisplayMethod' => $_smarty_tpl->tpl_vars['priceDisplay']->value), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('roundMode' => $_smarty_tpl->tpl_vars['roundMode']->value), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('logged' => $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['boolval'][0][0]->boolval($_smarty_tpl->tpl_vars['logged']->value)), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('page_name' => smarty_modifier_escape($_smarty_tpl->tpl_vars['page_name']->value, 'html', 'UTF-8')), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('contentOnly' => $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['boolval'][0][0]->boolval($_smarty_tpl->tpl_vars['content_only']->value)), $_smarty_tpl);
     if (isset($_smarty_tpl->tpl_vars['cookie']->value->id_lang)) {
         echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('id_lang' => intval($_smarty_tpl->tpl_vars['cookie']->value->id_lang)), $_smarty_tpl);
     }
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('usingSecureMode' => $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['boolval'][0][0]->boolval(Tools::usingSecureMode())), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('ajaxsearch' => $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['boolval'][0][0]->boolval(Configuration::get('PS_SEARCH_AJAX'))), $_smarty_tpl);
     echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('instantsearch' => $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['boolval'][0][0]->boolval(Configuration::get('PS_INSTANT_SEARCH'))), $_smarty_tpl);
 }
开发者ID:dev-lav,项目名称:htdocs,代码行数:22,代码来源:07c0df336cb455c96a561229777c85c4707a0a94.file.global.tpl.php


注:本文中的Tools::usingSecureMode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。