> ------------------------------------------------------------------------------ See main.inc.php for release information EStat_AIP : classe to manage plugin admin pages --------------------------------------------------------------------------- */ include_once('estat_root.class.inc.php'); include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCTabSheet.class.inc.php'); include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); // need to load GPC language file for filterBox object translations load_language('plugin.lang', GPC_PATH); class EStat_AIP extends EStat_root { protected $tabsheet; public function __construct($prefixeTable, $filelocation) { parent::__construct($prefixeTable, $filelocation); $this->loadConfig(); $this->initEvents(); } public function __destruct() { unset($this->tabsheet); parent::__destruct(); } /** * initialize events call for the plugin */ public function initEvents() { parent::initEvents(); } public function loadCSS() { global $template; parent::loadCSS(); GPCCore::addUI('gpcCSS'); GPCCore::addHeaderCSS('estat.css', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles().".css"); GPCCore::addHeaderCSS('estat.cssT', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles().'_'.$template->get_themeconf('name').".css"); } /** * display the administration page */ public function manage() { global $template; GPCCore::addUI('categorySelector,inputList,dynamicTable,canvasDraw.graph,inputPath,inputTreeList,inputExportBox,download'); GPCCore::addHeaderJS('estat.PM', ESTAT_PATH.'js/estatPM.js', array('jquery')); GPCCore::addHeaderJS('estat.IM', ESTAT_PATH.'js/estatIM.js', array('jquery')); $template->set_filename('plugin_admin_content', dirname(__FILE__)."/admin/estat_admin.tpl"); $estatTabsheet = new GPCTabSheet('estatTabsheet', 'ESTAT_MAIN_TABSHEET', 'tabsheet gcBorder', 'eTab'); /* $estatTabsheet->add('synthesis', l10n('estat_synthesis'), '', true, "$.EStatManagePages('changePage', 'Synthesis');"); */ $estatTabsheet->add('stats_by_period', l10n('estat_by_period'), '', true, "$.EStatManagePages('changePage', 'Stats_by_period')"); $estatTabsheet->add('stats_by_category', l10n('estat_by_category'), '', false, "$.EStatManagePages('changePage', 'Stats_by_category')"); $estatTabsheet->add('stats_by_image', l10n('estat_by_image'), '', false, "$.EStatManagePages('changePage', 'Stats_by_image')"); $estatTabsheet->add('stats_by_ip', l10n('estat_by_ip'), '', false, "$.EStatManagePages('changePage', 'Stats_by_ip')"); $estatTabsheet->add('logs', l10n('estat_history'), '', false, "$.EStatManagePages('changePage', 'History')"); /* $estatTabsheet->add('config', l10n('estat_config'), '', false, "$.EStatManagePages('changePage', 'Config')"); $estatTabsheet->add('tools', l10n('estat_tools'), '', false, "$.EStatManagePages('changePage', 'Tools')"); */ $estatTabsheet->assign(); $template_plugin=Array( 'ESTAT_VERSION' => "".$this->getPluginName()." ".l10n('estat_release').ESTAT_VERSION, 'ESTAT_TITLE' => "", 'urlRequest' => $this->getAdminLink('ajax'), 'urlRequestExport' => $this->getAdminLink('ajaxExport'), 'token' => get_pwg_token(), 'itemPerPage' => $this->config['global.itemPerPage'] ); $template->assign('plugin', $template_plugin); $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); $this->checkBuildStatPeriod(true, $this->config['compress.method']=='gz'); } } //class ?>