本文整理汇总了PHP中Tools::getAdminTokenLite方法的典型用法代码示例。如果您正苦于以下问题:PHP Tools::getAdminTokenLite方法的具体用法?PHP Tools::getAdminTokenLite怎么用?PHP Tools::getAdminTokenLite使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tools
的用法示例。
在下文中一共展示了Tools::getAdminTokenLite方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderForm
public function renderForm()
{
$root_category = Category::getRootCategory();
$root_category = array('id_category' => $root_category->id, 'name' => $root_category->name);
$cats = array();
if ($c = Configuration::get('yamarket_с_categories')) {
$uc = unserialize($c);
if (is_array($uc)) {
$cats = $uc;
}
}
$this->fields_form[0]['form'] = array('legend' => array('title' => $this->l('Settings'), 'image' => _PS_ADMIN_IMG_ . 'information.png'), 'input' => array(array('type' => 'text', 'label' => $this->l('Shop Name'), 'desc' => $this->l('Shop name in yandex market'), 'name' => 'yamarket_с_shop'), array('type' => 'text', 'label' => $this->l('Сompany name'), 'desc' => $this->l('Your company name'), 'name' => 'yamarket_с_company'), array('type' => 'text', 'label' => $this->l('Shipping cost'), 'desc' => $this->l('Shipping cost in shop region'), 'name' => 'yamarket_с_shippingcost'), array('type' => 'text', 'label' => $this->l('Information'), 'desc' => $this->l('Information about minimal order cost, minimal product quantity or prepayment'), 'name' => 'yamarket_с_info'), array('type' => 'switch', 'label' => $this->l('Gzip compression'), 'desc' => $this->l('Compress export file'), 'name' => 'yamarket_с_gzip', 'values' => array(array('id' => 'yamarket_с_gzip_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'yamarket_с_gzip_off', 'value' => 0, 'label' => $this->l('Disabled')))), array('type' => 'switch', 'label' => $this->l('Combinations'), 'desc' => $this->l('Export combinations'), 'name' => 'yamarket_с_combinations', 'values' => array(array('id' => 'yamarket_с_combinations_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'yamarket_с_combinations_off', 'value' => 0, 'label' => $this->l('Disabled')))), array('type' => 'checkbox', 'label' => $this->l('Shipping'), 'desc' => $this->l('Delivery, pickup and store'), 'name' => 'yamarket_с_shipping', 'is_bool' => false, 'values' => array('id' => 'id', 'name' => 'label', 'query' => array(array('id' => '[1]', 'val' => 1, 'label' => $this->l('Delivery availability')), array('id' => '[2]', 'val' => 1, 'label' => $this->l('Pickup in store availability')), array('id' => '[3]', 'val' => 1, 'label' => $this->l('Can buy in Store'))))), array('type' => 'switch', 'label' => $this->l('Currencies'), 'desc' => $this->l('If not checked will be used default currency'), 'name' => 'yamarket_с_currencies', 'values' => array(array('id' => 'yamarket_с_currencies_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'yamarket_с_currencies_off', 'value' => 0, 'label' => $this->l('Disabled')))), array('type' => 'radio', 'label' => $this->l('Availability'), 'desc' => $this->l('Product availability'), 'name' => 'yamarket_с_availability', 'is_bool' => false, 'values' => array(array('id' => 'yamarket_с_availability_0', 'value' => 0, 'label' => $this->l('All avaible')), array('id' => 'yamarket_с_availability_1', 'value' => 1, 'label' => $this->l('If quantity >0, then avaible, else on request')), array('id' => 'yamarket_с_availability_2', 'value' => 2, 'label' => $this->l('If quantity = 0, product not exported')), array('id' => 'yamarket_с_availability_3', 'value' => 3, 'label' => $this->l('All on request')))), array('type' => 'categories', 'label' => $this->l('Categories'), 'desc' => $this->l('Categories to export. If necessary, subcategories must be checked too.'), 'name' => 'yamarket_с_categories', 'tree' => array('use_search' => false, 'id' => 'categoryBox', 'use_checkbox' => true, 'selected_categories' => $cats))), 'submit' => array('name' => 'submityamarket_с', 'title' => $this->l('Save')));
$this->fields_form[1]['form'] = array('legend' => array('title' => $this->l('Yandex Market configuration information'), 'image' => _PS_ADMIN_IMG_ . 'information.png'), 'input' => array(array('type' => 'text', 'label' => $this->l('Static url'), 'desc' => $this->l('URL to download file generated by cron or Export button.'), 'name' => 'url1'), array('type' => 'text', 'label' => $this->l('Dinamic url'), 'desc' => $this->l('URL to download dinamicaly generated export file.'), 'name' => 'url2'), array('type' => 'text', 'label' => $this->l('Cron url'), 'desc' => $this->l('URL to regenerate export file by cron.'), 'name' => 'url3')));
$helper = new HelperForm();
$helper->module = $this;
$helper->show_toolbar = false;
$helper->table = $this->table;
$lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
$helper->default_form_language = $lang->id;
$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
$helper->identifier = $this->identifier;
$helper->submit_action = 'submityamarket_с';
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
return $helper->generateForm($this->fields_form);
}
示例2: getContent
public function getContent()
{
if (Tools::isSubmit('updatePositions')) {
$this->updatePositionsDnd();
}
$helper = new HelperList();
// Obligatoire
$helper->shopLinkType = '';
// Obligatoire. Correspondant souvent à id_*
$helper->identifier = 'id_example_data';
// Permet de ne pas afficher le header complet.
$helper->simple_header = true;
//
$helper->module = $this;
// Important.
$helper->token = Tools::getAdminTokenLite('AdminModules');
// Permet de définir le champ sur lequel est associé les positions.
$helper->position_identifier = 'position';
// Si utilisation des positions, obligatoire.
$helper->orderBy = 'position';
$helper->orderWay = 'ASC';
// Permet de définir l'ID de la table. Le terme "module-" en préfixe est TRES important.
$helper->table_id = 'module-helperlist_positions';
// Ou encore
$helper->table_id = 'module-' . $this->name;
// Permet de récupérer les champs/headers de la liste. On passe par une méthode, par lisitibilité du code.
$fields_list = $this->getListHeader();
// Permet de récupérer les enregistrements/lignes de la liste. On passe par une méthode, par lisibilité du code.
$values = $this->getListValues();
return $helper->generateList($values, $fields_list);
}
示例3: displayForm
public function displayForm()
{
// Get default Language
$default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
// Init Fields form array
$fields_form[0]['form'] = array('legend' => array('title' => $this->l('Settings')), 'input' => array(array('type' => 'text', 'label' => $this->l('ID Facebook:'), 'name' => 'facebookgraph_id', 'size' => '100', 'desc' => $this->l('A Facebook Platform application ID that administers this page.')), array('type' => 'text', 'label' => $this->l('Name shop:'), 'name' => 'facebookgraph_name', 'size' => '100', 'desc' => $this->l('Name of this shop.')), array('type' => 'text', 'label' => $this->l('Url shop:'), 'name' => 'facebookgraph_url', 'size' => '100', 'desc' => $this->l('The canonical URL of this shop.')), array('type' => 'text', 'label' => $this->l('Type shop:'), 'name' => 'facebookgraph_type', 'size' => '100', 'desc' => $this->l('The type of this shop.')), array('type' => 'text', 'label' => $this->l('Title:'), 'name' => 'facebookgraph_title', 'size' => '100', 'desc' => $this->l('The title of this shop.')), array('type' => 'text', 'label' => $this->l('Description:'), 'name' => 'facebookgraph_description', 'size' => '100', 'desc' => $this->l('A one to two sentence description of this shop.')), array('type' => 'text', 'label' => $this->l('Image url:'), 'name' => 'facebookgraph_image', 'size' => '100', 'desc' => $this->l('An image URL which should represent your shop within the graph. The image must be at least 50px by 50px (though minimum 200px by 200px is preferred) and have a maximum aspect ratio of 3:1. We support PNG, JPEG and GIF formats.'))), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
$helper = new HelperForm();
// Module, t oken and currentIndex
$helper->module = $this;
$helper->name_controller = $this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;
// Language
$helper->default_form_language = $default_lang;
$helper->allow_employee_form_lang = $default_lang;
// Title and toolbar
$helper->title = $this->displayName;
$helper->show_toolbar = true;
// false -> remove toolbar
$helper->toolbar_scroll = true;
// yes - > Toolbar is always visible on the top of the screen.
$helper->submit_action = 'submit' . $this->name;
$helper->toolbar_btn = array('save' => array('desc' => $this->l('Save'), 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')), 'back' => array('href' => AdminController::$currentIndex . '&token=' . Tools::getAdminTokenLite('AdminModules'), 'desc' => $this->l('Back to list')));
// Load current value
$helper->fields_value['facebookgraph_id'] = Configuration::get('facebookgraph_id');
$helper->fields_value['facebookgraph_type'] = Configuration::get('facebookgraph_type');
$helper->fields_value['facebookgraph_title'] = Configuration::get('facebookgraph_title');
$helper->fields_value['facebookgraph_url'] = Configuration::get('facebookgraph_url');
$helper->fields_value['facebookgraph_name'] = Configuration::get('facebookgraph_name');
$helper->fields_value['facebookgraph_image'] = Configuration::get('facebookgraph_image');
$helper->fields_value['facebookgraph_description'] = Configuration::get('facebookgraph_description');
return $helper->generateForm($fields_form);
}
示例4: renderForm
public function renderForm()
{
$fields_form = array('form' => array('legend' => array('title' => $this->l('Homepage categories'), 'icon' => ''), 'input' => array(array('type' => 'cat_choice', 'label' => '', 'name' => 'cats')), 'submit' => array('name' => 'submitBlockhomecats', 'title' => $this->l('Save'))));
$lang = $this->context->language;
if ($selectedCats = Configuration::get('MOD_BLOCKHOMECATS_CATS')) {
$selectedCats = explode(',', $selectedCats);
foreach ($selectedCats as $index => $id_category) {
$selectedCats[$index] = new Category($id_category, $this->context->language->id);
}
} else {
$selectedCats = null;
}
$helper = new HelperForm();
$helper->show_toolbar = false;
$helper->default_form_language = $lang->id;
$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
$helper->module = $this;
$helper->identifier = 'id_blocklink';
$helper->submit_action = 'submit';
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->fields_value = array('text' => 'text');
$categories = Category::getNestedCategories(2, $this->context->language->id, false);
$helper->tpl_vars = array('allCats' => $this->getAllCats(current($categories)), 'selectedCats' => $selectedCats);
return $helper->generateForm(array($fields_form));
}
示例5: displayTop
/**
* displays available actions in the top of the order list
*/
public function displayTop()
{
$header = "<fieldset>";
$header .= "<div id='header_sceau'>\n\t\t\t\t<div class='sceau_control'>\n\t\t\t\t\t<a href='index.php?tab=AdminSceau&action=ResendOrders&token=" . Tools::getAdminTokenLite('AdminSceau') . "'>\n\t\t\t\t\t\t<img src='" . _PS_BASE_URL_ . __PS_BASE_URI__ . "modules/fianetsceau/img/sceauresend14.png'/>" . $this->l('Resend orders') . "\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t</div>";
$header .= '</fieldset>';
echo $header;
}
示例6: initContent
public function initContent()
{
//$this->setTemplate('feditorbackend.tpl');
parent::initContent();
$fronteditorlink = $this->context->link->getModuleLink('iqitcontentcreator', 'Editor', array('iqit_fronteditor_token' => $this->module->getFrontEditorToken(), 'admin_webpath' => $this->context->controller->admin_webpath, 'id_employee' => is_object($this->context->employee) ? (int) $this->context->employee->id : Tools::getValue('id_employee')));
$module_link = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->module->name . '&tab_module=' . $this->module->tab . '&token=' . Tools::getAdminTokenLite('AdminModules') . '&module_name=' . $this->module->name;
$toolbar = ' <div id="preloader">
<div id="status"> </div>
</div><div id="fronteditor-toolbar" class="clearfix">
<div class="toolbar-action">
<a href="' . $module_link . '" class="btn btn-danger iqlogo">
<i class="icon-angle-left"></i> Back to backend
</a>
</div>
<div class="toolbar-action">
<button type="button" class="btn btn-default switch-guides-btn">Toggle guides</button>
</div>
<div class="toolbar-action pull-right">
<button type="button" class="btn btn-success update-fronteditor-action" ><i class="icon icon-save"></i> Update</button>
</div>
<div class="toolbar-action pull-right"><button type="button" class="btn btn-default switch-front-view-btn" data-preview-type="preview-d" ><i class="icon-desktop"></i> </button></div>
<div class="toolbar-action pull-right"><button type="button" class="btn btn-default switch-front-view-btn" data-preview-type="preview-t" ><i class="icon-tablet"></i> </button></div>
<div class="toolbar-action pull-right"><button type="button" class="btn btn-default switch-front-view-btn" data-preview-type="preview-p" ><i class="icon-mobile"></i> </button></div>
<div class="toolbar-action pull-right">View</div>
</div>';
$content = $toolbar . '<iframe id="ffpreview" name="ffpreview" height="100%" width="100%" src="' . $fronteditorlink . '"> </iframe>';
$this->context->smarty->assign(array('content' => $content));
}
示例7: initFieldsetCloudCache
public function initFieldsetCloudCache()
{
if (!class_exists('CloudCache')) {
$this->fields_form[6]['form'] = array('legend' => array('title' => $this->l('CloudCache'), 'image' => '../img/admin/subdomain.gif'), 'desc' => $this->l('Performance matters! Improve speed and conversions the easy way.') . '<br />' . $this->l('CloudCache supercharges your site in minutes through its state-of-the-art content delivery network.') . '<br /><br />' . $this->l('Subscribe now using the code "presta25" and get an exclusive discount of 25% per month on every available package.') . '<br /><br />
<a style="color: blue" href="index.php?controller=AdminModules&token=' . Tools::getAdminTokenLite('AdminModules') . '&filtername=cloudcache" id="installCloudCache">> ' . $this->l('Click here to install the CloudCache module for PrestaShop') . '</a><br />');
}
}
示例8: displayForm
public function displayForm()
{
// Get default Language
$default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
// Init Fields form array
$fields_form[0]['form'] = array('legend' => array('title' => $this->l('Product Update')), 'input' => array(array('type' => 'text', 'label' => $this->l('List'), 'name' => 'PRODUCTUPDATE_LIST', 'size' => 20, 'required' => true)), 'submit' => array('title' => $this->l('Update'), 'class' => 'button'));
$helper = new HelperForm();
// Module, t oken and currentIndex
$helper->module = $this;
$helper->name_controller = $this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;
// Language
$helper->default_form_language = $default_lang;
$helper->allow_employee_form_lang = $default_lang;
// Title and toolbar
$helper->title = $this->displayName;
$helper->show_toolbar = true;
// false -> remove toolbar
$helper->toolbar_scroll = true;
// yes - > Toolbar is always visible on the top of the screen.
$helper->submit_action = 'submit' . $this->name;
$helper->toolbar_btn = array('save' => array('desc' => $this->l('Save'), 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')), 'back' => array('href' => AdminController::$currentIndex . '&token=' . Tools::getAdminTokenLite('AdminModules'), 'desc' => $this->l('Back to list')));
// Load current value
$helper->fields_value['PRODUCTUPDATE_LIST'] = Configuration::get('PRODUCTUPDATE_LIST');
return $helper->generateForm($fields_form);
}
示例9: displayForm
public function displayForm()
{
// Get default language
$default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
// Init Fields form array
$fields_form[0]['form'] = array('legend' => array('title' => $this->l('Ustawienia Integracyjne')), 'input' => array(array('type' => 'text', 'label' => $this->l('Hash sklepu w Shopconnector'), 'name' => 'SHOPCONNECTORMODULE_HASH', 'size' => 20, 'required' => true)), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
$helper = new HelperForm();
if (!extension_loaded('mcrypt')) {
echo '<div style="padding: 20px; text-align: center; background-color: yellow; font-weight: bold;">Do poprawnego działania wtyczki ShopConnector wymagane jest zainstalowanie rozszerzenia PHP mcrypt.</div>';
}
// Module, token and currentIndex
$helper->module = $this;
$helper->name_controller = $this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;
// Language
$helper->default_form_language = $default_lang;
$helper->allow_employee_form_lang = $default_lang;
// Title and toolbar
$helper->title = $this->displayName;
$helper->show_toolbar = true;
// false -> remove toolbar
$helper->toolbar_scroll = true;
// yes - > Toolbar is always visible on the top of the screen.
$helper->submit_action = 'submit' . $this->name;
$helper->toolbar_btn = array('save' => array('desc' => $this->l('Save'), 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')), 'back' => array('href' => AdminController::$currentIndex . '&token=' . Tools::getAdminTokenLite('AdminModules'), 'desc' => $this->l('Back to list')));
// Load current value
$helper->fields_value['SHOPCONNECTORMODULE_HASH'] = Configuration::get('SHOPCONNECTORMODULE_HASH');
return $helper->generateForm($fields_form);
}
示例10: renderConfigurationForm
public function renderConfigurationForm()
{
$lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
$langs = Language::getLanguages();
$id_shop = (int) $this->context->shop->id;
foreach ($langs as $key => $language) {
$options[] = array('id_option' => $language['id_lang'], 'name' => $language['name']);
}
$cats = $this->getCategories($lang->id, true, $id_shop);
$categories[] = array('id_option' => 99999, 'name' => 'All');
foreach ($cats as $key => $cat) {
$categories[] = array('id_option' => $cat['id_category'], 'name' => $cat['name']);
}
$inputs = array(array('type' => 'select', 'label' => $this->l('Language'), 'desc' => $this->l('Choose a language you wish to export'), 'name' => 'export_language', 'class' => 't', 'options' => array('query' => $options, 'id' => 'id_option', 'name' => 'name')), array('type' => 'text', 'label' => $this->l('Delimiter'), 'name' => 'export_delimiter', 'value' => ',', 'desc' => $this->l('The character to separate the fields')), array('type' => 'radio', 'label' => $this->l('Export active products?'), 'name' => 'export_active', 'values' => array(array('id' => 'active_off', 'value' => 0, 'label' => 'no, export all products.'), array('id' => 'active_on', 'value' => 1, 'label' => 'yes, export only active products')), 'is_bool' => true), array('type' => 'select', 'label' => $this->l('Product Category'), 'desc' => $this->l('Choose a product category you wish to export'), 'name' => 'export_category', 'class' => 't', 'options' => array('query' => $categories, 'id' => 'id_option', 'name' => 'name')));
$fields_form = array('form' => array('legend' => array('title' => $this->l('Export Options'), 'icon' => 'icon-cogs'), 'input' => $inputs, 'submit' => array('title' => $this->l('Export'))));
$helper = new HelperForm();
$helper->show_toolbar = false;
$helper->default_form_language = $lang->id;
$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
$this->fields_form = array();
$helper->identifier = $this->identifier;
$helper->submit_action = 'submitExport';
$helper->currentIndex = self::$currentIndex;
$helper->token = Tools::getAdminTokenLite('AdminExportProducts');
$helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
return $helper->generateForm(array($fields_form));
}
示例11: __construct
public function __construct()
{
$this->name = 'adminmarketingestep5';
$this->bootstrap = true;
$this->module = 'expressmailing';
$this->context = Context::getContext();
$this->lang = false;
$this->default_form_language = $this->context->language->id;
$this->campaign_id = (int) Tools::getValue('campaign_id');
if (empty($this->campaign_id)) {
Tools::redirectAdmin('index.php?controller=AdminMarketingX&token=' . Tools::getAdminTokenLite('AdminMarketingX'));
exit;
}
parent::__construct();
$this->session_api = new SessionApi();
// On regarde si le compte est toujours en activité
// --------------------------------------------------------------------------------
if ($this->session_api->connectFromCredentials('email')) {
// Si le compte est toujours en activité :
// 1/ on crée une liste de diffusion pour le mailing actuel
// 2/ on update le message HTML
// 3/ puis on passe à l'étape 6
// -------------------------------------------
if ($this->updateApiListMessage()) {
Tools::redirectAdmin('index.php?controller=AdminMarketingEStep6&campaign_id=' . $this->campaign_id . '&token=' . Tools::getAdminTokenLite('AdminMarketingEStep6'));
exit;
}
}
}
示例12: __construct
public function __construct()
{
$id_seller_home = AgileSellerManager::get_current_logged_seller_home_category_id();
$id_category = intval(Tools::getValue('id_category'));
$id_parent = intval(Tools::getValue('id_parent'));
if ($id_seller_home > 0) {
$url2sellerhome = "./index.php?controller=AdminCategories&id_category=" . $id_seller_home . "&viewcategory&token=" . Tools::getAdminTokenLite("AdminCategories");
if ($id_category == 0 && $id_parent == 0) {
Tools::redirectAdmin($url2sellerhome);
}
if ($id_category > 0 && $id_category != $id_seller_home && !AgileHelper::isSuccessor($id_seller_home, $id_category)) {
Tools::redirectAdmin($url2sellerhome);
}
if ($id_parent > 0 && $id_parent != $id_seller_home && !AgileHelper::isSuccessor($id_seller_home, $id_category)) {
Tools::redirectAdmin($url2sellerhome);
}
}
parent::__construct();
if (Module::isInstalled('agilemultipleseller')) {
$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));
if (!$this->is_seller) {
$this->bulk_actions['assignto'] = array('text' => $this->l('Assign to seller'), 'confirm' => $this->l('Assign selected items to the seller?'));
}
}
if (Module::isInstalled('agilemultipleseller')) {
$this->agilemultipleseller_list_override();
}
}
示例13: __construct
public function __construct()
{
$this->name = 'adminmarketingsstep7';
$this->bootstrap = true;
$this->module = 'expressmailing';
$this->context = Context::getContext();
$this->lang = false;
$this->default_form_language = $this->context->language->id;
$this->campaign_id = (int) Tools::getValue('campaign_id');
if (empty($this->campaign_id)) {
Tools::redirectAdmin('index.php?controller=AdminMarketingX&token=' . Tools::getAdminTokenLite('AdminMarketingX'));
exit;
}
parent::__construct();
// API initialization
// ------------------
include _PS_MODULE_DIR_ . $this->module->name . '/controllers/admin/session_api.php';
$this->session_api = new SessionApi();
// Checking the session
// --------------------
if (!$this->session_api->connectFromCredentials('sms')) {
Tools::redirectAdmin('index.php?controller=AdminMarketingSStep4&token=' . Tools::getAdminTokenLite('AdminMarketingSStep4'));
exit;
}
// Enfin, on retrouve les éléments depuis la base de données + de l'API
// --------------------------------------------------------------------
$this->getFieldsValues();
}
示例14: __construct
public function __construct()
{
$this->name = 'adminmarketingestep8';
$this->bootstrap = true;
$this->module = 'expressmailing';
$this->context = Context::getContext();
$this->lang = false;
$this->default_form_language = $this->context->language->id;
$this->campaign_id = (int) Tools::getValue('campaign_id');
if (empty($this->campaign_id)) {
Tools::redirectAdmin('index.php?controller=AdminMarketingX&token=' . Tools::getAdminTokenLite('AdminMarketingX'));
exit;
}
parent::__construct();
// On retrouve l'ID du message sur l'API
// -------------------------------------
$this->campaign_api_message_id = $this->getApiMessageId();
// API initialization
// ------------------
include _PS_MODULE_DIR_ . $this->module->name . '/controllers/admin/session_api.php';
$this->session_api = new SessionApi();
// Checking the session
// --------------------
if (!$this->session_api->connectFromCredentials('email')) {
Tools::redirectAdmin('index.php?controller=AdminMarketingEStep5&token=' . Tools::getAdminTokenLite('AdminMarketingEStep5'));
exit;
}
}
示例15: __construct
public function __construct()
{
$this->name = 'payplug';
$this->tab = 'payments_gateways';
$this->version = '1.0.1';
$this->author = 'PayPlug';
$this->module_key = '1ee28a8fb5e555e274bd8c2e1c45e31a';
parent::__construct();
// For 1.6
$this->bootstrap = true;
// Backward compatibility
if (version_compare(_PS_VERSION_, '1.5', '<')) {
require _PS_MODULE_DIR_ . $this->name . '/backward_compatibility/backward.php';
}
// Add warning if prestashop is an older version than 1.4
if (version_compare(_PS_VERSION_, '1.4', '<')) {
$this->warning = $this->l('Sorry Payplug is not compatible with Prestashop for versions < 1.4. Please delete the payplug directory in the Prestashop modules directory for your Prestashop system to get back to normal.');
}
$this->currencies = true;
$this->currencies_mode = 'checkbox';
// Change descriptionn and display name
$this->displayName = $this->l('PayPlug – Simple and secure online payments');
$this->description = $this->l('The simplest online payment solution: no setup fees, no fixed fees, and no merchant account required!');
$this->confirmUninstall = $this->l('Are you sure you wish to uninstall this module and delete your settings?');
if (version_compare(_PS_VERSION_, '1.5', '<')) {
$cookie_admin = new Cookie('psAdmin', Tools::substr($_SERVER['PHP_SELF'], Tools::strlen(__PS_BASE_URI__), -10));
if (Tools::getValue('tab') == 'AdminPayment' && Tools::getValue('token') != Tools::getAdminTokenLite('AdminPayment')) {
// Force admin status
$this->context->cookie->profile = $cookie_admin->profile;
$url = 'index.php?tab=AdminPayment';
$url .= '&token=' . Tools::getAdminTokenLite('AdminPayment');
Tools::redirectAdmin($url);
}
}
}