* @copyright 2007-2015 Orange35 * @license http://creativecommons.org/licenses/by-nc-sa/3.0/ */ include_once('../../../config/config.inc.php'); include_once('../../../init.php'); include_once('../advancedhotspotslider.php'); $context = Context::getContext(); $home_slider = new AdvancedHotspotSlider(); $slides = array(); if (!Tools::isSubmit('secure_key') || Tools::getValue('secure_key') != $home_slider->secure_key || !Tools::getValue('action')) die('1'); if ('updateSlidesPosition' == Tools::getValue('action') && Tools::getValue('slides')) { $home_slider->updatePositions(Tools::getValue('slides')); $home_slider->clearCache(); echo '1'; } if ('changeStatus' == Tools::getValue('action') && Tools::getValue('id')) { $res = $home_slider->changeStatus(Tools::getValue('id')); $home_slider->clearCache(); if (false === $res) die(Tools::jsonEncode(array('status' => 'decline'))); else die(Tools::jsonEncode(array('status' => 'ok', 'active' => $res))); }