* @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ include_once(dirname(__FILE__).'/AdminStatsTab.php'); include_once(PS_ADMIN_DIR.'/tabs/AdminPreferences.php'); class AdminStatsConf extends AdminPreferences { public function __construct() { $this->_fieldsSettings = array( 'PS_STATS_RENDER' => array('title' => $this->l('Graph engine'), 'validation' => 'isGenericName'), 'PS_STATS_GRID_RENDER' => array('title' => $this->l('Grid engine'), 'validation' => 'isGenericName'), 'PS_STATS_OLD_CONNECT_AUTO_CLEAN' => array( 'title' => $this->l('Auto-clean period'), 'validation' => 'isGenericName')); parent::__construct(); } public function postProcess() { if (Tools::getValue('submitSettings')) { if ($this->tabAccess['edit'] === '1') $this->_postConfig($this->_fieldsSettings); else $this->_errors[] = Tools::displayError('You do not have permission to edit here.'); } } public function display() { global $currentIndex, $cookie; $graphEngine = Configuration::get('PS_STATS_RENDER'); $gridEngine = Configuration::get('PS_STATS_GRID_RENDER'); $autoclean = Configuration::get('PS_STATS_OLD_CONNECT_AUTO_CLEAN'); $arrayGraphEngines = ModuleGraphEngine::getGraphEngines(); $arrayGridEngines = ModuleGridEngine::getGridEngines(); $autocleanPeriod = array('never' => $this->l('Never'), 'week' => $this->l('Week'), 'month' => $this->l('Month'), 'year' => $this->l('Year')); echo '
'; } }