+ * @package TYPO3
+ * @subpackage tx_cabagsla
+ */
+class tx_version_module2 extends t3lib_SCbase{
+
+
+ /**
+ * Initializes the Module
+ * @return void
+ */
+ function init() {
+ global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
+
+ parent::init();
+ }
+
+ /**
+ * 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'),
+ '2' => $LANG->getLL('function2'),
+ '3' => $LANG->getLL('function3'),
+ )
+ );
+ 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 [type] ...
+ */
+ 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;
+
+ // initialize doc
+ $this->doc = t3lib_div::makeInstance('template');
+ $this->doc->setModuleTemplate(t3lib_extMgm::extPath('version') . 'mod2//mod_template.html');
+ $this->doc->backPath = $BACK_PATH;
+ $docHeaderButtons = $this->getButtons();
+
+ //if (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id)) {
+
+ // Decide if the menu button was clicked or it was called by workspace module
+ if(!t3lib_div::GPvar('changeItems') && !t3lib_div::GPvar('items')) {
+ header('Location: '.$this->doc->packPath.'mod/user/ws/index.php');
+ }
+
+ // Draw the form
+ $this->doc->form = '