includeLLFile('EXT:lang/locallang_show_rechis.xml'); $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_mod_web_list.xml'); $GLOBALS['LANG']->includeLLFile('EXT:wse_events/mod1/locallang.xml'); require_once (PATH_t3lib . 'class.t3lib_scbase.php'); // This checks permissions and exits if the users has no permission for entry. $GLOBALS['BE_USER']->modAccess($MCONF, 1); /** * Module 'WSE Events' for the 'wse_events' extension. * * @author Michael Oehlhof * @package TYPO3 * @subpackage wse_events */ class tx_wseevents_module1 extends t3lib_SCbase { var $pageInfo; /** an array of available sub modules */ var $availableSubModules; /** the currently selected sub module */ var $subModule; /** Variable for session data */ var $my_vars; /** Variable for selected menu function */ var $selectedFunction; /** * Initializes the Module * * @return void */ function init() { # global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS; /* * This is a workaround for the wrong generated links. The workaround is needed to * get the right values from the GET Parameter. This workaround is from Elmar Hinz * who also noted this in the bug tracker (http://bugs.typo3.org/view.php?id=2178). */ $matches = array(); foreach ($GLOBALS['_GET'] as $key => $value) { if (preg_match('/amp;(.*)/', $key, $matches)) { $GLOBALS['_GET'][$matches[1]] = $value; } } /* --- END OF Workaround --- */ parent::init(); $this->id = intval($this->id); } /** * Adds items to the ->MOD_MENU array. Used for the function menu selector. * * @return void */ function menuConfig() { global $LANG; $this->MOD_MENU = Array ( 'function' => Array ( '1' => $LANG->getLL('function1'), // Event data '2' => $LANG->getLL('function2'), // Common data '3' => $LANG->getLL('function3'), // Session planning ) ); parent::menuConfig(); } /** * Main function of the module. Write the content to $this->content * If you chose "web" as main module, you will need to consider the $this->id parameter which will contain the uid-number of the page clicked in the page tree * * @return void ... */ function main() { global $BE_USER, $LANG, $BACK_PATH; //, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS; // Access check! // The page will show only if there is a valid page and if this page may be viewed by the user $this->pageInfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause); $access = is_array($this->pageInfo) ? 1 : 0; if (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id) && ($this->id>0)) { // Get session data $this->my_vars = $GLOBALS["BE_USER"]->getSessionData("tx_wseevents"); // Draw the header. $this->doc = t3lib_div::makeInstance('bigDoc'); $this->doc->backPath = $BACK_PATH; $this->doc->form='