<?php include_once dirname(__FILE__) . '/../../config/config.inc.php'; include_once dirname(__FILE__) . '/../../init.php'; include_once dirname(__FILE__) . '/defines.php'; include_once dirname(__FILE__) . '/classes/LofBlock.php'; include_once dirname(__FILE__) . '/classes/LofItem.php'; include_once dirname(__FILE__) . '/lofadvancecustom.php'; global $cookie; $module = new lofadvancecustom(); $adminfolder = $module->getFolderAdmin(); $id_lang = Tools::getValue('id_lang'); if (Tools::getValue('secure_key') != $module->secure_key) { die('Secure key is invalid.'); } ?> <html> <head> <title><?php echo $module->l('Pop up'); ?> </title> <link href="<?php echo __PS_BASE_URI__; ?> css/admin.css" type="text/css" rel="stylesheet"/> <style> body{height:100%;background-color: #FFFFFF;} #container{height:100%} #content{height:90%;border: none;padding: 0px;}
<?php include dirname(__FILE__) . '/../../config/config.inc.php'; include dirname(__FILE__) . '/../../init.php'; include dirname(__FILE__) . '/classes/LofBlock.php'; global $cookie; include dirname(__FILE__) . '/lofadvancecustom.php'; $module = new lofadvancecustom(); if (isset($_POST['lofajax']) && $_POST['task'] == 'gethook') { $module_name = Tools::getValue('module_name'); $hook_name = Tools::getValue('hook_name'); $content = $module->getParamHooks($module_name, $hook_name); die($content); } if (isset($_GET['lofajax']) && $_GET['task'] == 'positionItem' && Tools::getValue('action') == 'dnd') { $blocks = LofBlock::getBlocks(false, $cookie->id_lang); if ($blocks) { foreach ($blocks as $b) { if (Tools::getValue('loftable-' . $b['id_loffc_block'])) { $table = Tools::getValue('loftable-' . $b['id_loffc_block']); } } } if (isset($table)) { $pos = 0; foreach ($table as $key => $row) { $ids = explode('_', $row); Db::getInstance()->Execute(' UPDATE `' . _DB_PREFIX_ . 'loffc_block_item` SET `position` = ' . (int) $pos . ' WHERE `id_loffc_block_item` = ' . (int) $ids[2] . ' AND `id_loffc_block` = ' . (int) $ids[1]);