* All rights reserved * * This script is part of the TYPO3 project. The TYPO3 project is * free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ /** * Plugin 'nG6' for the 'nG6' extension. * * @author PF bioinformatique de Toulouse <> */ require_once(PATH_tslib.'class.tslib_pibase.php'); require_once(t3lib_extMgm::extPath('nG6').'/lib/class.tx_nG6_utils.php'); require_once(t3lib_extMgm::extPath('nG6').'/lib/class.tx_nG6_db.php'); require_once(t3lib_extMgm::extPath('nG6').'/res/smarty/libs/Smarty.class.php'); class tx_nG6_pi6 extends tslib_pibase { var $prefixId = 'tx_nG6_pi6'; // Same as class name var $scriptRelPath = 'pi6/class.tx_nG6_pi6.php'; // Path to this script relative to the extension dir. var $extKey = 'nG6'; // The extension key. //var $pi_checkCHash = TRUE; /** * Main method of your PlugIn * * @param string $content: The content of the PlugIn * @param array $conf: The PlugIn Configuration * @return The content that should be displayed on the website */ function main($content,$conf) { if (strstr($this->cObj->currentRecord,'tt_content')) { $conf['pidList'] = $this->cObj->data['pages']; $conf['recursive'] = $this->cObj->data['recursive']; } $this->pi_loadLL(); $this->conf=$conf; $this->pi_setPiVarDefaults(); $this->pi_USER_INT_obj=1; // Add the jquery libs + the tree plugins and its css $GLOBALS['TSFE']->additionalHeaderData[$this->prefixId] = ' '; $smarty = new Smarty(); $smarty->setTemplateDir(t3lib_extMgm::extPath('nG6').'/pi6'); $smarty->setCompileDir(t3lib_extMgm::extPath('nG6').'/res/smarty/templates_c'); $smarty->setCacheDir(t3lib_extMgm::extPath('nG6').'/res/smarty/cache'); $smarty->setConfigDir(t3lib_extMgm::extPath('nG6').'/res/smarty/configs'); $smarty->security = true; $smarty->security_settings['MODIFIER_FUNCS'] = array('count'); $group_list = tx_nG6_db::get_group_list(); $smarty->assign('login_user', $GLOBALS['TSFE']->loginUser); $smarty->assign('user_id', $GLOBALS['TSFE']->fe_user->user['uid']); $smarty->assign('group_list', $group_list); $smarty->assign('data_folder', $this->conf["data"]); $smarty->assign('server_url', $this->conf['server_url']); $distribution = tx_nG6_db::select_projects_repartition('create_user', 'title'); $smarty->assign('distribution', $distribution); $smarty->assign('ng6_admin_users', tx_nG6_db::get_ng6_admin_users() ); $smarty->assign('ng6_purge_projects', tx_nG6_db::select_obsolete_list_retention_data_info( )); $txNG6Utils = new tx_nG6_utils; $smarty->assign_by_ref('tx_nG6_utils', $txNG6Utils); return $smarty->fetch('administration_view.tpl'); } } if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/nG6/pi6/class.tx_nG6_pi6.php']) { include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/nG6/pi6/class.tx_nG6_pi6.php']); } ?>