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;} </style> <script src="<?php echo _MODULE_DIR_ . $module->name; ?>
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]); $pos++; } } } if (isset($_GET['lofajax']) && $_GET['task'] == 'deleteItem') { $json_data = array(); $json_data['result'] = 1; if ($table = Tools::getValue('class_tr')) { $ids = explode('_', $table); if (Validate::isLoadedObject($obj = new LofItem($ids[2]))) { if (!$obj->delete()) { $json_data['result'] = 0; $json_data['error'] = $module->l('can\'t delete'); } } else { $json_data['result'] = 0; $json_data['error'] = $module->l('can\'t create object'); } } die(json_encode($json_data)); } if (isset($_GET['lofajax']) && $_GET['task'] == 'updateBlock') { $json_data = array(); $json_data['result'] = 1; if (Validate::isLoadedObject($obj = new LofBlock(Tools::getValue('id_loffc_block')))) { $errors = array(); $titles = array(); foreach ($module->_languages as $language) {