本文整理匯總了PHP中ModuleAdminController::initContent方法的典型用法代碼示例。如果您正苦於以下問題:PHP ModuleAdminController::initContent方法的具體用法?PHP ModuleAdminController::initContent怎麽用?PHP ModuleAdminController::initContent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ModuleAdminController
的用法示例。
在下文中一共展示了ModuleAdminController::initContent方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: initContent
public function initContent()
{
if ($this->action == "select_delete") {
$this->context->smarty->assign(array("delete_form" => true, "url_delete" => htmlentities($_SERVER["REQUEST_URI"]), "boxes" => $this->boxes));
}
parent::initContent();
}
示例2: initContent
public function initContent()
{
$admin_seur = new AdminSeur(false);
if (!$admin_seur->module_enabled_and_configured) {
$admin_seur->displayModuleConfigurationWarning();
$this->content = $admin_seur->content;
return parent::initContent();
}
$this->display = 'view';
$this->module_instance = Module::getInstanceByName('seur');
Context::getContext()->controller->addJqueryUI('ui.datepicker');
if (Tools::getValue('verDetalle')) {
$response = Expedition::getExpeditions($admin_seur->getExpeditionData());
$this->tpl_view_vars = array('datos' => $admin_seur->displayFormDeliveries($response, true));
} elseif (Tools::getValue('createPickup')) {
$error_response = Pickup::createPickup();
if (!empty($error_response)) {
$this->tpl_view_vars = array('datos' => $admin_seur->displayFormDeliveries(null, null, $error_response));
} else {
$this->tpl_view_vars = array('datos' => $admin_seur->displayFormDeliveries());
}
} elseif (Tools::getValue('submitFilter')) {
$response = Expedition::getExpeditions($admin_seur->getExpeditionData());
$this->tpl_view_vars = array('datos' => $admin_seur->displayFormDeliveries($response, false));
} else {
$this->tpl_view_vars = array('datos' => $admin_seur->displayFormDeliveries());
}
$this->content = $admin_seur->content;
$this->fields_list = $admin_seur->fields_list;
parent::initContent();
}
示例3: initContent
public function initContent()
{
$info = '';
$query = 'SELECT `name` FROM `ps_hook`';
$sql = Db::getInstance()->executeS($query);
if (Tools::getAdminTokenLite('AdminModules') == Tools::getValue('token')) {
if (Tools::isSubmit('btnSubmit')) {
$info = $this->postProcess();
}
}
//Get links
$controller_link = Context::getContext()->link->getAdminLink('AdminPSMGen');
$this->context->smarty->assign('path', _MODULE_DIR_ . $this->module->name . '/');
$this->context->smarty->assign('controller_link', $controller_link);
$this->context->smarty->assign('info', $info);
$i = 0;
$array_installhooks = array();
//$array_check = array();
for ($i = 0; $i < count($sql); $i++) {
$hook = $sql[$i];
$hook['id'] = 'hooks_' . $hook['name'];
$hook['value'] = $hook['name'];
$hook['label'] = $hook['name'];
$sql[$i] = $hook;
$array_installhooks[$i] = array('name' => 'install_' . $hook['id'], 'id' => 'install_' . $hook['id'], 'value' => 'install_' . $hook['id'], 'label' => 'install_' . $hook['id']);
}
$this->context->smarty->assign('sql', $sql);
$this->context->smarty->assign('array_installhooks', $array_installhooks);
// $this->context->smarty->assign('content_only' => '1');
// $form = $this->displayForm($sql);
// $this->context->smarty->assign('form1', $form);
$this->setTemplate('../../../../modules/' . $this->module->name . '/views/templates/admin/admintemplate.tpl');
//$smarty->assign('items', $items_list);
parent::initContent();
}
示例4: initContent
public function initContent()
{
$data = array();
$htm = $this->context->smarty->createTemplate(_PS_MODULE_DIR_ . 'smartblog/views/templates/admin/aboutus.tpl', $data)->fetch();
$this->content = $htm;
return parent::initContent();
}
示例5: 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));
}
示例6: initContent
public function initContent()
{
$this->multiple_fieldsets = true;
if (Tools::isSubmit('regenerateThumbnails')) {
SimpleBlogPost::regenerateThumbnails();
Tools::redirectAdmin(self::$currentIndex . '&token=' . Tools::getValue('token') . '&conf=9');
}
$this->context->smarty->assign(array('content' => $this->content, 'url_post' => self::$currentIndex . '&token=' . $this->token));
parent::initContent();
}
示例7: initContent
public function initContent()
{
if (!Configuration::hasKey('ERP_LICENCE') || Configuration::get('ERP_LICENCE') == '') {
$this->warnings[] = '<a href="?controller=AdminModules&configure=erpillicopresta&token=' . Tools::getAdminTokenLite('AdminModules') . '">' . $this->l('Your license has not been validated yet, please go to your module configuration page to validate it.') . '</a>';
} elseif (Configuration::get('ERP_BLACKLIST') == '1') {
$this->errors[] = sprintf($this->l('Your license is blacklisted, please contact our technical support to this email: %s .'), ERP_EMAIL_SUPPORT);
} elseif (Configuration::get('ERP_LICENCE_VALIDITY') == '0') {
$this->errors[] = sprintf($this->l('Your license number is not valid, please contact our technical support to this mail adress: %s.'), ERP_EMAIL_SUPPORT);
} else {
$link_conf = '<br/><a href="?controller=AdminModules&configure=erpillicopresta&token=' . Tools::getAdminTokenLite('AdminModules') . '">' . $this->l('Go to your back-office, module tab, page 1-Click ERP.') . '</a>';
$this->informations[] = $this->l('Win up to 2hours a day in your store management with 1-Click ERP! Optimise your module in your Back-Office, Module tab, Page 1-Click ERP!') . $link_conf;
}
parent::initContent();
}
示例8: initContent
public function initContent()
{
$htm = '<p id="smartextra"><img src="http://referals.smartdatasoft.com/images/logo.png"><b>Smartdatasoft is a Prestashop certified and authorized
Prestashop partner developing brand. With some of very outstanding Prestashop project like-
opensource blog module, Revolution Slider and others; it is already a name of trust and quality among web clients. With continuous Total Quality Management (TQM) philosophy, inventive creativity
and reliable after sales service concept, Smartdatasoft is trying to bring a difference among marketplace.</b></p>
<p id="smartextra"><a href="http://www.prestashop.com/en/web-agency-partners/bronze/smartdatasoft"><img src="http://smartdatasoft.com/envato-add/prestashop_partner.png"></a>
<a href="http://themeforest.net/user/smartdatasoft/?ref=smartdatasoft"><img src="http://smartdatasoft.com/envato-add/mecror-prestashop/envato-branding-envato1.png"></a>
<a href="http://addons.prestashop.com/en/69_smartdatasoft"><img height="56" width="305" src="http://medias1.prestastore.com/themes/prestastore/img/logo_addons.png"></a>
<a href="http://facebook.com/pages/SmartDataSoft/332747343429694"><img src="http://smartdatasoft.com/envato-add/mecror-prestashop/envato-branding-facebook1.png"></a> <a href="http://twitter.com/smartdatasoft">
<img src="http://smartdatasoft.com/envato-add/mecror-prestashop/envato-branding-twitter1.png"></a>
</p>';
$this->content = $htm . '<fieldset class="width3" id="smartdatasoft-content">
<style>
#smartdatasoft-content {
padding: 0;
width: 99%;
padding-left: 1.3em;
background: white;
}
#smartdatasoft-content #smartextra{
display:none;
}
#smartextra img{
vertical-align: bottom;
}
p{
verticle-align:bottom;
}
.bootstrap h3, .bootstrap .h3 {
font-size: 13px;
}
</style></fieldset>
<script type="text/javascript">
$.post(
"ajax-tab.php",
{
tab: \'AdminAboutUs\',
token: \'' . $this->token . '\',
ajax: \'1\',
action:\'GetSmartThemes\',
page:\'themes\'
}, function(a){
$("#smartdatasoft-content").html("<legend><img src=\'../img/admin/prestastore.gif\' class=\'middle\' />Live from SmartDataSoft Addons!</legend>"+a);
});
</script>';
return parent::initContent();
}
示例9: initContent
public function initContent()
{
$info = '';
if (Tools::getAdminTokenLite('AdminModules') == Tools::getValue('token')) {
if (Tools::isSubmit('btnSubmit')) {
$info = $this->postProcess();
}
}
//Get links
$controller_link = Context::getContext()->link->getAdminLink('ValidatorPSMGen');
$this->context->smarty->assign('path', _MODULE_DIR_ . $this->module->name . '/');
$this->context->smarty->assign('controller_link', $controller_link);
$this->context->smarty->assign('info', $info);
//$form = $this->_display_admin();
//$this->context->smarty->assign('form1', $form);
// $this->context->smarty->assign('content_only' => '1');
$this->setTemplate('../../../../modules/' . $this->module->name . '/views/templates/admin/validatortemplate.tpl');
//$smarty->assign('items', $items_list);
parent::initContent();
}
示例10: initContent
public function initContent()
{
parent::initContent();
theme_check_memory_limit(true);
if (Tools::getIsset('invalid_urls')) {
// base and server urls have to start with the same symbols
$this->errors[] = $this->l(sprintf('An error has occurred. The Themler start URL %s does not match Shop Domain or SSL Domain %s. This may be due to one of the following reasons: 1. server protocol does not match (HTTP/HTTPS) 2. www prefix is missing in one of the links', $this->_serverUrl . $_SERVER['REQUEST_URI'], $this->_baseUrl));
}
if (Tools::getIsset('invalid_php_version')) {
$this->errors[] = $this->l(sprintf('Unable to open theme. Your server is running php version %s but Themler requires %s or higher. Please upgrade PHP version to continue.', $this->_php_version, $this->_required_php_version));
}
if (Tools::getIsset('no_project')) {
$this->errors[] = $this->l(sprintf('The theme `%s` cannot be opened because /project/project.json file is missing or corrupted.', $this->_getThemeName()));
}
if ($this->ajax) {
try {
$themeName = $this->_getThemeName();
$this->_checkPermissions($themeName);
moveInnerPreview($themeName);
$data = $this->_getThemlerData($themeName);
echo $this->_buildPage($themeName);
} catch (PermissionsException $e) {
die(buildErrorsPage($e->getMessage()));
}
} else {
$edit = Tools::getValue('edit', '');
if (!empty($edit)) {
$title = $this->l('Slider settings');
$this->content .= $this->renderThemeSettingsForm();
} else {
$title = $this->l('List of Themes');
$this->content .= $this->_formRendererHelper->renderThemesListForm($this->getThemesInfo());
}
$this->context->smarty->assign(array('content' => $this->content, 'title' => $title));
}
}
示例11: initContent
public function initContent()
{
$this->content = $this->displayWarning($this->l('1. Module is working in test mode. Please backup your store data before export.'));
$this->content .= $this->displayWarning($this->l('2. Exported archive contains the following store data: Address, Alias, Attachments, Attributes,
Carriers, Categories, CMS Categories, CMS Pages, Configurations(only custom fields), Contacts, Countries, Currencies, Deliveries, Features, Home Slides, Images, Infos, Languages,
Manufacturers, Products, Product Attributes, Product Packs, Specific Prices, States, Stock Available, Suppliers, Taxes, Zones and non-prestashop tables.'));
$this->content .= $this->displayWarning($this->l('3. Export and import are fully functional only with single langue stores. Only one language can be used for export and import.'));
$this->content .= $this->displayWarning($this->l('4. We do not guarantee the correct work of exported erchive with other third party importing tools.'));
$this->content .= $this->renderConfigurationForm();
parent::initContent();
}
示例12: ajaxProcessEditOrder
public function ajaxProcessEditOrder()
{
if ((int) Tools::getValue('id_order_detail') < 1) {
return 'Appuntamento non trovato.';
}
$copy_order = false;
if ((bool) Tools::getIsset('copyorder')) {
$copy_order = true;
}
$order_detail = new AphOrderDetail(Tools::getValue('id_order_detail'));
$order = new Order($order_detail->id_order);
$customer = new Customer($order->id_customer);
$address = new Address($order->id_address_invoice);
$this->context->smarty->assign('id_order', empty($copy_order) ? $order_detail->id_order : NULL);
$this->context->smarty->assign('id_order_detail', empty($copy_order) ? $order_detail->id_order_detail : NULL);
$this->context->smarty->assign('id_customer', $order->id_customer);
$this->context->smarty->assign('delivery_date', $order_detail->delivery_date);
$this->context->smarty->assign('delivery_date_lang', date('d/m/Y', strtotime($order_detail->delivery_date)));
$this->context->smarty->assign('delivery_time_from', substr($order_detail->delivery_time_from, 0, 5));
$this->context->smarty->assign('delivery_time_to', substr($order_detail->delivery_time_to, 0, 5));
$this->context->smarty->assign('id_employee', empty($copy_order) ? $order_detail->id_employee : NULL);
$this->context->smarty->assign('other', $order_detail->note);
$this->context->smarty->assign('firstname', $customer->firstname);
$this->context->smarty->assign('lastname', $customer->lastname);
$this->context->smarty->assign('id_gender', $customer->id_gender);
$this->context->smarty->assign('email', $customer->email);
$this->context->smarty->assign('phone', !empty($address->phone_mobile) ? $address->phone_mobile : $address->phone);
$selected = array($order_detail->product_id);
$products = array('selected' => array(), 'unselected' => array());
$results = Db::getInstance()->executeS('
SELECT DISTINCT name, p.id_product as id
FROM ' . _DB_PREFIX_ . 'product p
LEFT JOIN `' . _DB_PREFIX_ . 'product_lang` pl
ON (p.`id_product` = pl.`id_product`
AND pl.`id_lang` = ' . (int) Context::getContext()->language->id . Shop::addSqlRestrictionOnLang('pl') . ')
' . Shop::addSqlAssociation('product', 'p') . '
WHERE id_lang = ' . (int) Context::getContext()->language->id . '
ORDER BY name');
foreach ($results as $row) {
$products[in_array($row['id'], $selected) ? 'selected' : 'unselected'][] = $row;
}
$choose_content = Context::getContext()->smarty->createTemplate(_PS_MODULE_DIR_ . $this->module->name . '/views/templates/admin/controllers/calendar/product_itemlist.tpl');
$choose_content->assign('product_itemlist', $products);
$this->context->smarty->assign('product_choose_content', $choose_content->fetch());
$employees = AphEmployeeProduct::getEmployeesByShop((int) $this->context->shop->id);
$this->context->smarty->assign('employees', $employees);
$options_time = array();
$time_slice = Configuration::get('APH_CALENDAR_TIME_SLICE');
for ($hours = 0; $hours < 24; $hours++) {
// the interval for hours is '1'
for ($mins = 0; $mins < 60; $mins += $time_slice) {
// the interval for mins is 'APH_CALENDAR_TIME_SLICE'
$options_time[str_pad($hours, 2, '0', STR_PAD_LEFT) . ':' . str_pad($mins, 2, '0', STR_PAD_LEFT)] = str_pad($hours, 2, '0', STR_PAD_LEFT) . ':' . str_pad($mins, 2, '0', STR_PAD_LEFT);
}
}
$this->context->smarty->assign('options_time', $options_time);
$this->context->smarty->assign(array('current_id_lang' => Context::getContext()->language->id, 'link' => Context::getContext()->link, 'current_index' => self::$currentIndex));
$jsVars = array('language' => $this->context->language->iso_code, 'slotDuration' => '00:' . Configuration::get('APH_CALENDAR_TIME_SLICE') . ':00');
$this->setJsVars($jsVars);
$this->content .= $this->context->smarty->fetch(_PS_MODULE_DIR_ . $this->module->name . '/views/templates/admin/controllers/calendar/order.tpl');
return parent::initContent();
}
示例13: initContent
public function initContent()
{
parent::initContent();
}
示例14: initContent
public function initContent()
{
$this->multiple_fieldsets = true;
if (Tools::isSubmit('regenerateThumbnails')) {
SimpleBlogPost::regenerateThumbnails();
Tools::redirectAdmin(self::$currentIndex . '&token=' . Tools::getValue('token') . '&conf=9');
}
if (Tools::isSubmit('submitExportSettings')) {
header("Content-type: text/plain");
header("Content-Disposition: attachment; filename=ph_simpleblog_configuration_" . date('d-m-Y') . ".txt");
$configs = array();
foreach ($this->fields_options as $category_data) {
if (!isset($category_data['fields'])) {
continue;
}
$fields = $category_data['fields'];
foreach ($fields as $field => $values) {
if ($values['type'] == 'textLang') {
$configs[$field] = self::getValueForLangs($field);
} else {
$configs[$field] = Configuration::get($field);
}
}
}
echo serialize($configs);
exit;
}
$this->context->smarty->assign(array('content' => $this->content, 'url_post' => self::$currentIndex . '&token=' . $this->token));
parent::initContent();
}
示例15: initContent
public function initContent()
{
$this->show_toolbar = false;
parent::initContent();
}