/** * Basic initialization of the class * * @return void */ function init() { $this->MCONF = $GLOBALS['MCONF']; $this->menuConfig(); $this->switchUser(t3lib_div::_GP('SwitchUser')); // ************************** // Initializing // ************************** $this->doc = t3lib_div::makeInstance('template'); $this->doc->backPath = $GLOBALS['BACK_PATH']; $this->doc->setModuleTemplate('templates/beuser.html'); $this->doc->form = '<form action="" method="post">'; // JavaScript $this->doc->JScode = $this->doc->wrapScriptTags(' script_ended = 0; function jumpToUrl(URL) { // window.location.href = URL; } ' . $this->doc->redirectUrls()); }
/** * Standard init function of a module. * * @return void */ function init() { global $BE_USER, $LANG, $BACK_PATH, $TYPO3_CONF_VARS; /** * Extension Categories (static var) * Content must be redundant with the same internal variable as in class.tx_extrep.php! */ $this->categories = array('be' => $GLOBALS['LANG']->getLL('category_BE'), 'module' => $GLOBALS['LANG']->getLL('category_BE_modules'), 'fe' => $GLOBALS['LANG']->getLL('category_FE'), 'plugin' => $GLOBALS['LANG']->getLL('category_FE_plugins'), 'misc' => $GLOBALS['LANG']->getLL('category_miscellanous'), 'services' => $GLOBALS['LANG']->getLL('category_services'), 'templates' => $GLOBALS['LANG']->getLL('category_templates'), 'example' => $GLOBALS['LANG']->getLL('category_examples'), 'doc' => $GLOBALS['LANG']->getLL('category_documentation')); /** * Extension States * Content must be redundant with the same internal variable as in class.tx_extrep.php! */ $this->states = tx_em_Tools::getStates(); $this->script = 'mod.php?M=tools_em'; $this->privacyNotice = $GLOBALS['LANG']->getLL('privacy_notice'); $securityMessage = $GLOBALS['LANG']->getLL('security_warning_extensions') . '<br /><br />' . sprintf($GLOBALS['LANG']->getLL('security_descr'), '<a href="http://typo3.org/teams/security/" target="_blank">', '</a>'); $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $securityMessage, $GLOBALS['LANG']->getLL('security_header'), t3lib_FlashMessage::INFO); $this->securityHint = $flashMessage->render(); $this->excludeForPackaging = $GLOBALS['TYPO3_CONF_VARS']['EXT']['excludeForPackaging']; // Setting module configuration: $this->MCONF = $GLOBALS['MCONF']; // Setting GPvars: $this->CMD = is_array(t3lib_div::_GP('CMD')) ? t3lib_div::_GP('CMD') : array(); $this->lookUpStr = trim(t3lib_div::_GP('lookUp')); $this->listRemote = t3lib_div::_GP('ter_connect'); $this->listRemote_search = trim(t3lib_div::_GP('ter_search')); $this->noDocHeader = intval(t3lib_div::_GP('nodoc') > 0); $this->settings = t3lib_div::makeInstance('tx_em_Settings'); $this->install = t3lib_div::makeInstance('tx_em_Install', $this); if (t3lib_div::_GP('silentMode') || $this->noDocHeader) { $this->CMD['silentMode'] = 1; $this->noDocHeader = 1; } if ($this->CMD['silentMode']) { $this->install->setSilentMode(TRUE); } // Configure menu $this->menuConfig(); // Setting internal static: $this->requiredExt = t3lib_div::trimExplode(',', t3lib_extMgm::getRequiredExtensionList(), TRUE); // Initialize Document Template object: $this->doc = t3lib_div::makeInstance('template'); $this->doc->backPath = $BACK_PATH; $this->doc->setModuleTemplate('templates/em_index.html'); // Initialize helper objects $this->api = t3lib_div::makeInstance('tx_em_API'); $this->terConnection = t3lib_div::makeInstance('tx_em_Connection_Ter', $this); $this->terConnection->wsdlURL = $TYPO3_CONF_VARS['EXT']['em_wsdlURL']; $this->xmlHandler = t3lib_div::makeInstance('tx_em_Tools_XmlHandler'); $this->xmlHandler->emObj = $this; $this->xmlHandler->useObsolete = $this->MOD_SETTINGS['display_obsolete']; // Initialize newListing if (isset($this->MOD_MENU['function']['extensionmanager'])) { $this->extensionmanager = t3lib_div::makeInstance('tx_em_ExtensionManager', $this); } else { $this->extensionmanager =& $this; } // Output classes $this->extensionList = t3lib_div::makeInstance('tx_em_Extensions_List', $this); $this->extensionDetails = t3lib_div::makeInstance('tx_em_Extensions_Details', $this); $this->translations = t3lib_div::makeInstance('tx_em_Translations', $this); // the id is needed for getting same styles TODO: general table styles $this->doc->bodyTagId = 'typo3-mod-tools-em-index-php'; // JavaScript $this->doc->JScode = $this->doc->wrapScriptTags(' script_ended = 0; function jumpToUrl(URL) { // window.location.href = URL; } '); // Reload left frame menu if ($this->CMD['refreshMenu']) { $this->doc->JScode .= $this->doc->wrapScriptTags(' if(top.refreshMenu) { top.refreshMenu(); } else { top.TYPO3ModuleMenu.refreshMenu(); } '); } // Descriptions: $this->descrTable = '_MOD_' . $this->MCONF['name']; if ($BE_USER->uc['edit_showFieldHelp']) { $LANG->loadSingleTableDescription($this->descrTable); } // Setting username/password etc. for upload-user: $this->fe_user['username'] = $this->MOD_SETTINGS['fe_u']; $this->fe_user['password'] = $this->MOD_SETTINGS['fe_p']; parent::init(); $this->handleExternalFunctionValue('singleDetails'); }
/** * Main function for Workspace Manager module. * * @return void */ function main() { global $LANG, $BE_USER, $BACK_PATH; // See if we need to switch workspace $changeWorkspace = t3lib_div::_GET('changeWorkspace'); if ($changeWorkspace != '') { $BE_USER->setWorkspace($changeWorkspace); $this->content .= $this->doc->wrapScriptTags('top.location.href="' . $BACK_PATH . t3lib_BEfunc::getBackendScript() . '";'); } else { // Starting page: $this->content .= $this->doc->header($LANG->getLL('title')); $this->content .= $this->doc->spacer(5); // Get usernames and groupnames $be_group_Array = t3lib_BEfunc::getListGroupNames('title,uid'); $groupArray = array_keys($be_group_Array); // Need 'admin' field for t3lib_iconWorks::getIconImage() $this->be_user_Array_full = $this->be_user_Array = t3lib_BEfunc::getUserNames('username,usergroup,usergroup_cached_list,uid,admin,workspace_perms'); if (!$GLOBALS['BE_USER']->isAdmin()) { $this->be_user_Array = t3lib_BEfunc::blindUserNames($this->be_user_Array, $groupArray, 1); } // Build top menu: $menuItems = array(); $menuItems[] = array('label' => $LANG->getLL('menuitem_review'), 'content' => $this->moduleContent_publish()); $menuItems[] = array('label' => $LANG->getLL('menuitem_workspaces'), 'content' => $this->moduleContent_workspaceList()); // Add hidden fields and create tabs: $content = $this->doc->getDynTabMenu($menuItems, 'user_ws'); $this->content .= $this->doc->section('', $content, 0, 1); // Setting up the buttons and markers for docheader $docHeaderButtons = $this->getButtons(); // $markers['CSH'] = $docHeaderButtons['csh']; } $markers['CONTENT'] = $this->content; // Build the <body> for the module $this->content = $this->doc->startPage($LANG->getLL('title')); $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); $this->content .= $this->doc->endPage(); $this->content = $this->doc->insertStylesAndJS($this->content); }
/** * Standard init function of a module. * * @return void */ function init() { global $BE_USER, $LANG, $BACK_PATH, $TYPO3_CONF_VARS; /** * Extension Categories (static var) * Content must be redundant with the same internal variable as in class.tx_extrep.php! */ $this->categories = array('be' => $GLOBALS['LANG']->getLL('category_BE'), 'module' => $GLOBALS['LANG']->getLL('category_BE_modules'), 'fe' => $GLOBALS['LANG']->getLL('category_FE'), 'plugin' => $GLOBALS['LANG']->getLL('category_FE_plugins'), 'misc' => $GLOBALS['LANG']->getLL('category_miscellanous'), 'services' => $GLOBALS['LANG']->getLL('category_services'), 'templates' => $GLOBALS['LANG']->getLL('category_templates'), 'example' => $GLOBALS['LANG']->getLL('category_examples'), 'doc' => $GLOBALS['LANG']->getLL('category_documentation')); /** * Extension States * Content must be redundant with the same internal variable as in class.tx_extrep.php! */ $this->states = array('alpha' => $GLOBALS['LANG']->getLL('state_alpha'), 'beta' => $GLOBALS['LANG']->getLL('state_beta'), 'stable' => $GLOBALS['LANG']->getLL('state_stable'), 'experimental' => $GLOBALS['LANG']->getLL('state_experimental'), 'test' => $GLOBALS['LANG']->getLL('state_test'), 'obsolete' => $GLOBALS['LANG']->getLL('state_obsolete'), 'excludeFromUpdates' => $GLOBALS['LANG']->getLL('state_exclude_from_updates')); /** * "TYPE" information; labels, paths, description etc. */ $this->typeLabels = array('S' => $GLOBALS['LANG']->getLL('type_system'), 'G' => $GLOBALS['LANG']->getLL('type_global'), 'L' => $GLOBALS['LANG']->getLL('type_local')); $this->typeDescr = array('S' => $GLOBALS['LANG']->getLL('descr_system'), 'G' => $GLOBALS['LANG']->getLL('descr_global'), 'L' => $GLOBALS['LANG']->getLL('descr_local')); // Setting paths of install scopes: $this->typePaths = array('S' => TYPO3_mainDir . 'sysext/', 'G' => TYPO3_mainDir . 'ext/', 'L' => 'typo3conf/ext/'); $this->typeBackPaths = array('S' => '../../../', 'G' => '../../../', 'L' => '../../../../' . TYPO3_mainDir); $this->privacyNotice = $GLOBALS['LANG']->getLL('privacy_notice'); $securityMessage = $GLOBALS['LANG']->getLL('security_warning_extensions') . '<br /><br />' . sprintf($GLOBALS['LANG']->getLL('security_descr'), '<a href="http://typo3.org/teams/security/" target="_blank">', '</a>'); $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $securityMessage, $GLOBALS['LANG']->getLL('security_header'), t3lib_FlashMessage::INFO); $this->securityHint = $flashMessage->render(); $this->excludeForPackaging = $GLOBALS['TYPO3_CONF_VARS']['EXT']['excludeForPackaging']; // Setting module configuration: $this->MCONF = $GLOBALS['MCONF']; // Setting GPvars: $this->CMD = is_array(t3lib_div::_GP('CMD')) ? t3lib_div::_GP('CMD') : array(); $this->lookUpStr = trim(t3lib_div::_GP('lookUp')); $this->listRemote = t3lib_div::_GP('ter_connect'); $this->listRemote_search = trim(t3lib_div::_GP('ter_search')); // Configure menu $this->menuConfig(); // Setting internal static: if ($TYPO3_CONF_VARS['EXT']['allowSystemInstall']) { $this->systemInstall = 1; } $this->requiredExt = t3lib_div::trimExplode(',', $TYPO3_CONF_VARS['EXT']['requiredExt'], 1); // Initialize helper object $this->terConnection = t3lib_div::makeInstance('SC_mod_tools_em_terconnection'); $this->terConnection->emObj = $this; $this->terConnection->wsdlURL = $TYPO3_CONF_VARS['EXT']['em_wsdlURL']; $this->xmlhandler = t3lib_div::makeInstance('SC_mod_tools_em_xmlhandler'); $this->xmlhandler->emObj = $this; $this->xmlhandler->useObsolete = $this->MOD_SETTINGS['display_obsolete']; // Initialize Document Template object: $this->doc = t3lib_div::makeInstance('template'); $this->doc->backPath = $BACK_PATH; $this->doc->setModuleTemplate('templates/em_index.html'); // JavaScript $this->doc->JScode = $this->doc->wrapScriptTags(' script_ended = 0; function jumpToUrl(URL) { // window.location.href = URL; } '); // Reload left frame menu if ($this->CMD['refreshMenu']) { $this->doc->JScode .= $this->doc->wrapScriptTags(' if(top.refreshMenu) { top.refreshMenu(); } else { top.TYPO3ModuleMenu.refreshMenu(); } '); } // Descriptions: $this->descrTable = '_MOD_' . $this->MCONF['name']; if ($BE_USER->uc['edit_showFieldHelp']) { $LANG->loadSingleTableDescription($this->descrTable); } // Setting username/password etc. for upload-user: $this->fe_user['username'] = $this->MOD_SETTINGS['fe_u']; $this->fe_user['password'] = $this->MOD_SETTINGS['fe_p']; parent::init(); $this->handleExternalFunctionValue('singleDetails'); }