/**
  * Returns TRUE if the logged in BE user has access to the list module.
  *
  * @return	boolean		TRUE or FALSE
  * @access	protected
  */
 function userHasAccessToListModule()
 {
     global $BE_USER;
     if (!t3lib_BEfunc::isModuleSetInTBE_MODULES('web_list')) {
         return FALSE;
     }
     if ($BE_USER->isAdmin()) {
         return TRUE;
     }
     return $BE_USER->check('modules', 'web_list');
 }
 /**
  * Rendering the content.
  *
  * @return	void
  */
 function main()
 {
     global $BE_USER, $LANG, $BACK_PATH;
     $msg = array();
     // Add a message, telling that no documents were open...
     $msg[] = '<p>' . $LANG->getLL('noDocuments_msg', 1) . '</p><br />';
     // If another page module was specified, replace the default Page module with the new one
     $newPageModule = trim($BE_USER->getTSConfigVal('options.overridePageModule'));
     $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
     // Perform some acccess checks:
     $a_wl = $BE_USER->check('modules', 'web_list');
     $a_wp = t3lib_extMgm::isLoaded('cms') && $BE_USER->check('modules', $pageModule);
     // Finding module images: PAGE
     $imgFile = $LANG->moduleLabels['tabs_images']['web_layout_tab'];
     $imgInfo = @getimagesize($imgFile);
     $img_web_layout = is_array($imgInfo) ? '<img src="../' . substr($imgFile, strlen(PATH_site)) . '" ' . $imgInfo[3] . ' alt="" />' : '';
     // Finding module images: LIST
     $imgFile = $LANG->moduleLabels['tabs_images']['web_list_tab'];
     $imgInfo = @getimagesize($imgFile);
     $img_web_list = is_array($imgInfo) ? '<img src="../' . substr($imgFile, strlen(PATH_site)) . '" ' . $imgInfo[3] . ' alt="" />' : '';
     // If either the Web>List OR Web>Page module are active, show the little message with links to those modules:
     if ($a_wl || $a_wp) {
         $msg_2 = array();
         if ($a_wp) {
             // Web>Page:
             $msg_2[] = '<strong><a href="#" onclick="top.goToModule(\'' . $pageModule . '\'); return false;">' . $LANG->getLL('noDocuments_pagemodule', 1) . $img_web_layout . '</a></strong>';
             if ($a_wl) {
                 $msg_2[] = $LANG->getLL('noDocuments_OR');
             }
         }
         if ($a_wl) {
             // Web>List
             $msg_2[] = '<strong><a href="#" onclick="top.goToModule(\'web_list\'); return false;">' . $LANG->getLL('noDocuments_listmodule', 1) . $img_web_list . '</a></strong>';
         }
         $msg[] = '<p>' . sprintf($LANG->getLL('noDocuments_msg2', 1), implode(' ', $msg_2)) . '</p><br />';
     }
     // Display the list of the most recently edited documents:
     $modObj = t3lib_div::makeInstance('tx_opendocs');
     $msg[] = '<p>' . $GLOBALS['LANG']->getLL('noDocuments_msg3', TRUE) . '</p><br />' . $modObj->renderMenu();
     // Adding the content:
     $this->content .= $this->doc->section($LANG->getLL('noDocuments'), implode(' ', $msg), 0, 1);
 }
Example #3
0
 /**
  * Administrative links for a table / record
  *
  * @param	string		Table name
  * @param	array		Record for which administrative links are generated.
  * @return	string		HTML link tags.
  */
 function adminLinks($table, $row)
 {
     global $BE_USER;
     // Edit link:
     $adminLink = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick('&edit[' . $table . '][' . $row['uid'] . ']=edit', $this->doc->backPath)) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-open') . '</a>';
     // Delete link:
     $adminLink .= '<a href="' . htmlspecialchars($this->doc->issueCommand('&cmd[' . $table . '][' . $row['uid'] . '][delete]=1')) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.delete', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-delete') . '</a>';
     if ($table == 'pages') {
         // If another page module was specified, replace the default Page module with the new one
         $newPageModule = trim($BE_USER->getTSConfigVal('options.overridePageModule'));
         $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
         // Perform some acccess checks:
         $a_wl = $BE_USER->check('modules', 'web_list');
         $a_wp = t3lib_extMgm::isLoaded('cms') && $BE_USER->check('modules', $pageModule);
         $adminLink .= '<a href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(\'' . $pageModule . '\'); return false;">' . t3lib_iconWorks::getSpriteIcon('actions-page-open') . '</a>';
         $adminLink .= '<a href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(\'web_list\'); return false;">' . t3lib_iconWorks::getSpriteIcon('actions-system-list-open') . '</a>';
         // "View page" icon is added:
         $adminLink .= '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($row['uid'], $this->doc->backPath, t3lib_BEfunc::BEgetRootLine($row['uid']))) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-view') . '</a>';
     } else {
         if ($row['pid'] == -1) {
             $getVars = '&ADMCMD_vPrev[' . rawurlencode($table . ':' . $row['t3ver_oid']) . ']=' . $row['uid'];
             // "View page" icon is added:
             $adminLink .= '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($row['_REAL_PID'], $this->doc->backPath, t3lib_BEfunc::BEgetRootLine($row['_REAL_PID']), '', '', $getVars)) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-view') . '</a>';
         }
     }
     return $adminLink;
 }
Example #4
0
    function languageRows($languageList, $elementList)
    {
        // Initialization:
        $elements = $this->explodeElement($elementList);
        $firstEl = current($elements);
        $hookObj = t3lib_div::makeInstance('tx_l10nmgr_tcemain_hook');
        $this->l10nMgrTools = t3lib_div::makeInstance('tx_l10nmgr_tools');
        $this->l10nMgrTools->verbose = FALSE;
        // Otherwise it will show records which has fields but none editable.
        $inputRecord = t3lib_BEfunc::getRecord($firstEl[0], $firstEl[1], 'pid');
        $this->sysLanguages = $this->l10nMgrTools->t8Tools->getSystemLanguages($firstEl[0] == 'pages' ? $firstEl[1] : $inputRecord['pid']);
        $languages = $this->getLanguages($languageList, $this->sysLanguages);
        if (count($languages)) {
            $tRows = array();
            // Header:
            $cells = '<td class="bgColor2 tableheader">Element:</td>';
            foreach ($languages as $l) {
                if ($l >= 1) {
                    $baseRecordFlag = '<img src="' . htmlspecialchars($GLOBALS['BACK_PATH'] . $this->sysLanguages[$l]['flagIcon']) . '" alt="' . htmlspecialchars($this->sysLanguages[$l]['title']) . '" title="' . htmlspecialchars($this->sysLanguages[$l]['title']) . '" />';
                    $cells .= '<td class="bgColor2 tableheader">' . $baseRecordFlag . '</td>';
                }
            }
            $tRows[] = $cells;
            foreach ($elements as $el) {
                $cells = '';
                // Get CURRENT online record and icon based on "t3ver_oid":
                $rec_on = t3lib_BEfunc::getRecord($el[0], $el[1]);
                $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($el[0], $rec_on);
                $icon = $this->doc->wrapClickMenuOnIcon($icon, $el[0], $rec_on['uid'], 2);
                $linkToIt = '<a href="#" onclick="' . htmlspecialchars('parent.list_frame.location.href="' . $GLOBALS['BACK_PATH'] . t3lib_extMgm::extRelPath('l10nmgr') . 'cm2/index.php?table=' . $el[0] . '&uid=' . $el[1] . '"; return false;') . '" target="listframe">
					' . t3lib_BEfunc::getRecordTitle($el[0], $rec_on, TRUE) . '
						</a>';
                if ($el[0] == 'pages') {
                    // If another page module was specified, replace the default Page module with the new one
                    $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
                    $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
                    $path_module_path = t3lib_div::resolveBackPath($GLOBALS['BACK_PATH'] . '../' . substr($GLOBALS['TBE_MODULES']['_PATHS'][$pageModule], strlen(PATH_site)));
                    $onclick = 'parent.list_frame.location.href="' . $path_module_path . '?id=' . $el[1] . '"; return false;';
                    $pmLink = '<a href="#" onclick="' . htmlspecialchars($onclick) . '" target="listframe"><i>[Edit page]</i></a>';
                } else {
                    $pmLink = '';
                }
                $cells = '<td>' . $icon . $linkToIt . $pmLink . '</td>';
                foreach ($languages as $l) {
                    if ($l >= 1) {
                        $cells .= '<td align="center">' . $hookObj->calcStat(array($el[0], $el[1]), $l) . '</td>';
                    }
                }
                $tRows[] = $cells;
            }
            return '<table border="0" cellpadding="0" cellspacing="0"><tr>' . implode('</tr><tr>', $tRows) . '</tr></table>';
        }
    }
 /**
  * Initializes several class variables
  *
  * @return	void
  */
 function initVars()
 {
     // Init users
     $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 = 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);
     }
     // If another page module was specified, replace the default Page module with the new one
     $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
     $this->pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
     // Setting publish access permission for workspace:
     $this->publishAccess = $GLOBALS['BE_USER']->workspacePublishAccess($GLOBALS['BE_USER']->workspace);
     // FIXME Should be $this->workspaceId here?
 }
 /**
  * Adding CM element for regular editing of the element!
  *
  * @param	string		Table name
  * @param	integer		UID for the current record.
  * @return	array		Item array, element in $menuItems
  * @internal
  */
 function DB_edit($table, $uid)
 {
     global $BE_USER;
     // If another module was specified, replace the default Page module with the new one
     $newPageModule = trim($BE_USER->getTSConfigVal('options.overridePageModule'));
     $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
     $editOnClick = '';
     $loc = 'top.content.list_frame';
     $addParam = '';
     $theIcon = 'actions-document-open';
     if ($this->iParts[0] == 'pages' && $this->iParts[1] && $BE_USER->check('modules', $pageModule)) {
         $theIcon = 'actions-page-open';
         $this->editPageIconSet = 1;
         if ($BE_USER->uc['classicPageEditMode'] || !t3lib_extMgm::isLoaded('cms')) {
             $addParam = '&editRegularContentFromId=' . intval($this->iParts[1]);
         } else {
             $editOnClick = 'if(' . $loc . '){' . $loc . ".location.href=top.TS.PATH_typo3+'alt_doc.php?returnUrl='+top.rawurlencode(" . $this->frameLocation($loc . '.document') . ")+'&edit[" . $table . "][" . $uid . "]=edit" . $addParam . "';}";
         }
     }
     if (!$editOnClick) {
         $editOnClick = 'if(' . $loc . '){' . $loc . ".location.href=top.TS.PATH_typo3+'alt_doc.php?returnUrl='+top.rawurlencode(" . $this->frameLocation($loc . '.document') . ")+'&edit[" . $table . "][" . $uid . "]=edit" . $addParam . "';}";
     }
     return $this->linkItem($this->label('edit'), $this->excludeIcon(t3lib_iconWorks::getSpriteIcon($theIcon)), $editOnClick . 'return hideCM();');
 }
 /**
  * Checks access to a backend module with the $MCONF passed as first argument
  *
  * @param	array		$MCONF array of a backend module!
  * @param	boolean		If set, an array will issue an error message and exit.
  * @return	boolean		Will return true if $MCONF['access'] is not set at all, if the BE_USER is admin or if the module is enabled in the be_users/be_groups records of the user (specifically enabled). Will return false if the module name is not even found in $TBE_MODULES
  */
 function modAccess($conf, $exitOnError)
 {
     if (!t3lib_BEfunc::isModuleSetInTBE_MODULES($conf['name'])) {
         if ($exitOnError) {
             t3lib_BEfunc::typo3PrintError('Fatal Error', 'This module "' . $conf['name'] . '" is not enabled in TBE_MODULES', 0);
             exit;
         }
         return FALSE;
     }
     // Workspaces check:
     if ($conf['workspaces']) {
         if ($this->workspace === 0 && t3lib_div::inList($conf['workspaces'], 'online') || $this->workspace === -1 && t3lib_div::inList($conf['workspaces'], 'offline') || $this->workspace > 0 && t3lib_div::inList($conf['workspaces'], 'custom')) {
             // ok, go on...
         } else {
             if ($exitOnError) {
                 t3lib_BEfunc::typo3PrintError('Workspace Error', 'This module "' . $conf['name'] . '" is not available under the current workspace', 0);
                 exit;
             }
             return FALSE;
         }
     }
     // Returns true if conf[access] is not set at all or if the user is admin
     if (!$conf['access'] || $this->isAdmin()) {
         return TRUE;
     }
     // If $conf['access'] is set but not with 'admin' then we return true, if the module is found in the modList
     if (!strstr($conf['access'], 'admin') && $conf['name']) {
         $acs = $this->check('modules', $conf['name']);
     }
     if (!$acs && $exitOnError) {
         t3lib_BEfunc::typo3PrintError('Access Error', 'You don\'t have access to this module.', 0);
         exit;
     } else {
         return $acs;
     }
 }
 /**
  * Checks access to a backend module with the $MCONF passed as first argument
  *
  * @param array $conf $MCONF array of a backend module!
  * @param boolean $exitOnError If set, an array will issue an error message and exit.
  * @return boolean Will return TRUE if $MCONF['access'] is not set at all, if the BE_USER is admin or if the module is enabled in the be_users/be_groups records of the user (specifically enabled). Will return FALSE if the module name is not even found in $TBE_MODULES
  * @todo Define visibility
  */
 public function modAccess($conf, $exitOnError)
 {
     if (!t3lib_BEfunc::isModuleSetInTBE_MODULES($conf['name'])) {
         if ($exitOnError) {
             throw new \RuntimeException('Fatal Error: This module "' . $conf['name'] . '" is not enabled in TBE_MODULES', 1294586446);
         }
         return FALSE;
     }
     // Workspaces check:
     if (t3lib_extMgm::isLoaded('workspaces') && $conf['workspaces']) {
         if ($this->workspace === 0 && t3lib_div::inList($conf['workspaces'], 'online') || $this->workspace === -1 && t3lib_div::inList($conf['workspaces'], 'offline') || $this->workspace > 0 && t3lib_div::inList($conf['workspaces'], 'custom')) {
         } else {
             if ($exitOnError) {
                 throw new \RuntimeException('Workspace Error: This module "' . $conf['name'] . '" is not available under the current workspace', 1294586447);
             }
             return FALSE;
         }
     }
     // Returns TRUE if conf[access] is not set at all or if the user is admin
     if (!$conf['access'] || $this->isAdmin()) {
         return TRUE;
     }
     // If $conf['access'] is set but not with 'admin' then we return TRUE, if the module is found in the modList
     if (!strstr($conf['access'], 'admin') && $conf['name']) {
         $acs = $this->check('modules', $conf['name']);
     }
     if (!$acs && $exitOnError) {
         throw new \RuntimeException('Access Error: You don\'t have access to this module.', 1294586448);
     } else {
         return $acs;
     }
 }
 /**
  * Initialize the class for various input etc.
  *
  * @return	void
  */
 function init()
 {
     global $LANG, $TCA;
     // Setting GPvars:
     $this->tfID = t3lib_div::_GP('tfID');
     // Sanitizes the tfID using whitelisting.
     if (!preg_match('/^[a-zA-Z0-9_\\-\\.\\*]*$/', $this->tfID)) {
         $this->tfID = '';
     }
     if (!$this->tfID) {
         if ($this->ffID = t3lib_div::_GP('ffID')) {
             $this->ffID = unserialize(base64_decode($this->ffID));
         }
     }
     $this->back = t3lib_div::_GP('back');
     $this->renderALL = t3lib_div::_GP('renderALL');
     // Set internal table/field to the parts of "tfID" incoming var.
     list($this->table, $this->field) = explode('.', $this->tfID);
     // limitAccess is checked if the $this->table really IS a table (and if the user is NOT a translator who should see all!)
     $showAllToUser = t3lib_BEfunc::isModuleSetInTBE_MODULES('txllxmltranslateM1') && $GLOBALS['BE_USER']->check('modules', 'txllxmltranslateM1');
     $this->limitAccess = isset($TCA[$this->table]) ? !$showAllToUser : FALSE;
 }
Example #10
0
    /**
     * Generates the JavaScript code for the backend.
     *
     * @return	void
     */
    protected function generateJavascript()
    {
        $pathTYPO3 = t3lib_div::dirname(t3lib_div::getIndpEnv('SCRIPT_NAME')) . '/';
        // If another page module was specified, replace the default Page module with the new one
        $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
        $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
        if (!$GLOBALS['BE_USER']->check('modules', $pageModule)) {
            $pageModule = '';
        }
        $menuFrameName = 'menu';
        if ($GLOBALS['BE_USER']->uc['noMenuMode'] === 'icons') {
            $menuFrameName = 'topmenuFrame';
        }
        // determine security level from conf vars and default to super challenged
        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['loginSecurityLevel']) {
            $this->loginSecurityLevel = $GLOBALS['TYPO3_CONF_VARS']['BE']['loginSecurityLevel'];
        } else {
            $this->loginSecurityLevel = 'superchallenged';
        }
        $t3Configuration = array('siteUrl' => t3lib_div::getIndpEnv('TYPO3_SITE_URL'), 'PATH_typo3' => $pathTYPO3, 'PATH_typo3_enc' => rawurlencode($pathTYPO3), 'username' => htmlspecialchars($GLOBALS['BE_USER']->user['username']), 'uniqueID' => t3lib_div::shortMD5(uniqid('')), 'securityLevel' => $this->loginSecurityLevel, 'TYPO3_mainDir' => TYPO3_mainDir, 'pageModule' => $pageModule, 'condensedMode' => $GLOBALS['BE_USER']->uc['condensedMode'] ? 1 : 0, 'inWorkspace' => $GLOBALS['BE_USER']->workspace !== 0 ? 1 : 0, 'workspaceFrontendPreviewEnabled' => $GLOBALS['BE_USER']->user['workspace_preview'] ? 1 : 0, 'veriCode' => $GLOBALS['BE_USER']->veriCode(), 'denyFileTypes' => PHP_EXTENSIONS_DEFAULT, 'moduleMenuWidth' => $this->menuWidth - 1, 'topBarHeight' => isset($GLOBALS['TBE_STYLES']['dims']['topFrameH']) ? intval($GLOBALS['TBE_STYLES']['dims']['topFrameH']) : 30, 'showRefreshLoginPopup' => isset($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) ? intval($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) : FALSE, 'listModulePath' => t3lib_extMgm::isLoaded('recordlist') ? t3lib_extMgm::extRelPath('recordlist') . 'mod1/' : '', 'debugInWindow' => $GLOBALS['BE_USER']->uc['debugInWindow'] ? 1 : 0, 'ContextHelpWindows' => array('width' => 600, 'height' => 400), 'firstWebmountPid' => intval($GLOBALS['WEBMOUNTS'][0]));
        if ($GLOBALS['LANG']->charSet !== 'utf-8') {
            $t3Configuration['username'] = $GLOBALS['LANG']->csConvObj->conv($t3Configuration['username'], $GLOBALS['LANG']->charSet, 'utf-8');
        }
        $this->js .= '
	TYPO3.configuration = ' . json_encode($t3Configuration) . ';

	/**
	 * TypoSetup object.
	 */
	function typoSetup()	{	//
		this.PATH_typo3 = TYPO3.configuration.PATH_typo3;
		this.PATH_typo3_enc = TYPO3.configuration.PATH_typo3_enc;
		this.username = TYPO3.configuration.username;
		this.uniqueID = TYPO3.configuration.uniqueID;
		this.navFrameWidth = 0;
		this.securityLevel = TYPO3.configuration.securityLevel;
		this.veriCode = TYPO3.configuration.veriCode;
		this.denyFileTypes = TYPO3.configuration.denyFileTypes;
	}
	var TS = new typoSetup();
		//backwards compatibility
	/**
	 * Frameset Module object
	 *
	 * Used in main modules with a frameset for submodules to keep the ID between modules
	 * Typically that is set by something like this in a Web>* sub module:
	 *		if (top.fsMod) top.fsMod.recentIds["web"] = "\'.intval($this->id).\'";
	 * 		if (top.fsMod) top.fsMod.recentIds["file"] = "...(file reference/string)...";
	 */
	function fsModules()	{	//
		this.recentIds=new Array();					// used by frameset modules to track the most recent used id for list frame.
		this.navFrameHighlightedID=new Array();		// used by navigation frames to track which row id was highlighted last time
		this.currentMainLoaded="";
		this.currentBank="0";
	}
	var fsMod = new fsModules();

	top.goToModule = function(modName, cMR_flag, addGetVars) {
		TYPO3.ModuleMenu.App.showModule(modName, addGetVars);
	}
	' . $this->setStartupModule();
        // Check editing of page:
        $this->handlePageEditing();
    }
    /**
     * Generates the JavaScript code for the backend,
     * and since we're loading a backend module outside of the actual backend
     * this copies parts of the backend.php
     *
     * @return	void
     */
    protected function generateJavascript()
    {
        $pathTYPO3 = t3lib_div::dirname(t3lib_div::getIndpEnv('SCRIPT_NAME')) . '/';
        // If another page module was specified, replace the default Page module with the new one
        $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
        $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
        if (!$GLOBALS['BE_USER']->check('modules', $pageModule)) {
            $pageModule = '';
        }
        $menuFrameName = 'menu';
        if ($GLOBALS['BE_USER']->uc['noMenuMode'] === 'icons') {
            $menuFrameName = 'topmenuFrame';
        }
        // determine security level from conf vars and default to super challenged
        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['loginSecurityLevel']) {
            $loginSecurityLevel = $GLOBALS['TYPO3_CONF_VARS']['BE']['loginSecurityLevel'];
        } else {
            $loginSecurityLevel = 'superchallenged';
        }
        $t3Configuration = array('siteUrl' => t3lib_div::getIndpEnv('TYPO3_SITE_URL'), 'PATH_typo3' => $pathTYPO3, 'PATH_typo3_enc' => rawurlencode($pathTYPO3), 'username' => htmlspecialchars($GLOBALS['BE_USER']->user['username']), 'uniqueID' => t3lib_div::shortMD5(uniqid('')), 'securityLevel' => $this->loginSecurityLevel, 'TYPO3_mainDir' => TYPO3_mainDir, 'pageModule' => $pageModule, 'condensedMode' => $GLOBALS['BE_USER']->uc['condensedMode'] ? 1 : 0, 'inWorkspace' => $GLOBALS['BE_USER']->workspace !== 0 ? 1 : 0, 'workspaceFrontendPreviewEnabled' => $GLOBALS['BE_USER']->user['workspace_preview'] ? 1 : 0, 'veriCode' => $GLOBALS['BE_USER']->veriCode(), 'denyFileTypes' => PHP_EXTENSIONS_DEFAULT, 'moduleMenuWidth' => $this->menuWidth - 1, 'topBarHeight' => isset($GLOBALS['TBE_STYLES']['dims']['topFrameH']) ? intval($GLOBALS['TBE_STYLES']['dims']['topFrameH']) : 30, 'showRefreshLoginPopup' => isset($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) ? intval($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) : FALSE, 'listModulePath' => t3lib_extMgm::isLoaded('recordlist') ? t3lib_extMgm::extRelPath('recordlist') . 'mod1/' : '', 'debugInWindow' => $GLOBALS['BE_USER']->uc['debugInWindow'] ? 1 : 0, 'ContextHelpWindows' => array('width' => 600, 'height' => 400));
        $t3LLLcore = array('waitTitle' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_logging_in'), 'refresh_login_failed' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_failed'), 'refresh_login_failed_message' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_failed_message'), 'refresh_login_title' => sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_title'), htmlspecialchars($GLOBALS['BE_USER']->user['username'])), 'login_expired' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.login_expired'), 'refresh_login_username' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_username'), 'refresh_login_password' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_password'), 'refresh_login_emptyPassword' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_emptyPassword'), 'refresh_login_button' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_button'), 'refresh_logout_button' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_logout_button'), 'please_wait' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.please_wait'), 'loadingIndicator' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:loadingIndicator'), 'be_locked' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.be_locked'), 'refresh_login_countdown_singular' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_countdown_singular'), 'refresh_login_countdown' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_countdown'), 'login_about_to_expire' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.login_about_to_expire'), 'login_about_to_expire_title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.login_about_to_expire_title'), 'refresh_login_refresh_button' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_refresh_button'), 'refresh_direct_logout_button' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_direct_logout_button'), 'tabs_closeAll' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:tabs.closeAll'), 'tabs_closeOther' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:tabs.closeOther'), 'tabs_close' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:tabs.close'), 'tabs_openInBrowserWindow' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:tabs.openInBrowserWindow'), 'donateWindow_title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:donateWindow.title'), 'donateWindow_message' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:donateWindow.message'), 'donateWindow_button_donate' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:donateWindow.button_donate'), 'donateWindow_button_disable' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:donateWindow.button_disable'), 'donateWindow_button_postpone' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:donateWindow.button_postpone'));
        // Convert labels/settings back to UTF-8 since json_encode() only works with UTF-8:
        if ($GLOBALS['LANG']->charSet !== 'utf-8') {
            $t3Configuration['username'] = $GLOBALS['LANG']->csConvObj->conv($t3Configuration['username'], $GLOBALS['LANG']->charSet, 'utf-8');
            $GLOBALS['LANG']->csConvObj->convArray($t3LLLcore, $GLOBALS['LANG']->charSet, 'utf-8');
        }
        $js = '
		TYPO3.configuration = ' . json_encode($t3Configuration) . ';
		TYPO3.LLL = {
			core : ' . json_encode($t3LLLcore) . '
		};

		/**
		 * TypoSetup object.
		 */
		function typoSetup()	{	//
			this.PATH_typo3 = TYPO3.configuration.PATH_typo3;
			this.PATH_typo3_enc = TYPO3.configuration.PATH_typo3_enc;
			this.username = TYPO3.configuration.username;
			this.uniqueID = TYPO3.configuration.uniqueID;
			this.navFrameWidth = 0;
			this.securityLevel = TYPO3.configuration.securityLevel;
			this.veriCode = TYPO3.configuration.veriCode;
			this.denyFileTypes = TYPO3.configuration.denyFileTypes;
		}
		var TS = new typoSetup();
			//backwards compatibility
		';
        return $js;
    }
Example #12
0
 /**
  * Initialize the class for various input etc.
  *
  * @return	void
  */
 function init()
 {
     global $LANG, $TCA;
     // Setting GPvars:
     $this->tfID = t3lib_div::_GP('tfID');
     // Sanitizes the tfID using whitelisting.
     if (!preg_match('/^[a-zA-Z0-9_\\-\\.\\*]*$/', $this->tfID)) {
         $this->tfID = '';
     }
     if (!$this->tfID) {
         if ($this->ffID = t3lib_div::_GP('ffID')) {
             $this->ffID = unserialize(base64_decode($this->ffID));
         }
     }
     $this->back = t3lib_div::_GP('back');
     $this->renderALL = t3lib_div::_GP('renderALL');
     // Set internal table/field to the parts of "tfID" incoming var.
     $identifierParts = explode('.', $this->tfID);
     // The table is the first item
     $this->table = array_shift($identifierParts);
     $this->mainKey = $this->table;
     // The field is the second one
     $this->field = array_shift($identifierParts);
     // There may be extra parts for FlexForms
     if (count($identifierParts) > 0) {
         // There's at least one extra part
         $extraIdentifierInformation = array();
         $extraIdentifierInformation[] = array_shift($identifierParts);
         // Load the TCA details of the table
         t3lib_div::loadTCA($this->table);
         // If the ds_pointerField contains a comma, it means the choice of FlexForm DS
         // is determined by 2 parameters. In this case we have an extra identifier part
         if (strpos($TCA[$this->table]['columns'][$this->field]['config']['ds_pointerField'], ',') !== FALSE) {
             $extraIdentifierInformation[] = array_shift($identifierParts);
         }
         // The remaining parts make up the FlexForm field name itself
         // (reassembled with dots)
         $flexFormField = implode('.', $identifierParts);
         // Assemble a different main key and switch field to use FlexForm field name
         $this->mainKey .= '.' . $this->field;
         foreach ($extraIdentifierInformation as $extraKey) {
             $this->mainKey .= '.' . $extraKey;
         }
         $this->field = $flexFormField;
     }
     // limitAccess is checked if the $this->table really IS a table (and if the user is NOT a translator who should see all!)
     $showAllToUser = t3lib_BEfunc::isModuleSetInTBE_MODULES('txllxmltranslateM1') && $GLOBALS['BE_USER']->check('modules', 'txllxmltranslateM1');
     $this->limitAccess = isset($TCA[$this->table]) ? !$showAllToUser : FALSE;
 }
    /**
     * Creates the content for the "edit" section ("module") of the Admin Panel
     *
     * @return	string		HTML content for the section. Consists of a string with table-rows with four columns.
     * @see display()
     */
    protected function getEditModule()
    {
        $out = $this->extGetHead('edit');
        if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_edit']) {
            // If another page module was specified, replace the default Page module with the new one
            $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
            $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
            $this->extNeedUpdate = true;
            $out .= $this->extGetItem('edit_displayFieldIcons', '', '<input type="hidden" name="TSFE_ADMIN_PANEL[edit_displayFieldIcons]" value="0" /><input type="checkbox" name="TSFE_ADMIN_PANEL[edit_displayFieldIcons]" value="1"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['edit_displayFieldIcons'] ? ' checked="checked"' : '') . ' />');
            $out .= $this->extGetItem('edit_displayIcons', '', '<input type="hidden" name="TSFE_ADMIN_PANEL[edit_displayIcons]" value="0" /><input type="checkbox" name="TSFE_ADMIN_PANEL[edit_displayIcons]" value="1"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['edit_displayIcons'] ? ' checked="checked"' : '') . ' />');
            $out .= $this->extGetItem('edit_editFormsOnPage', '', '<input type="hidden" name="TSFE_ADMIN_PANEL[edit_editFormsOnPage]" value="0" /><input type="checkbox" name="TSFE_ADMIN_PANEL[edit_editFormsOnPage]" value="1"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['edit_editFormsOnPage'] ? ' checked="checked"' : '') . ' />');
            $out .= $this->extGetItem('edit_editNoPopup', '', '<input type="hidden" name="TSFE_ADMIN_PANEL[edit_editNoPopup]" value="0" /><input type="checkbox" name="TSFE_ADMIN_PANEL[edit_editNoPopup]" value="1"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['edit_editNoPopup'] ? ' checked="checked"' : '') . ' />');
            $out .= $this->extGetItem('', $this->ext_makeToolBar());
            if (!t3lib_div::_GP('ADMCMD_view')) {
                $out .= $this->extGetItem('', '<a href="#" onclick="' . htmlspecialchars('
						if (parent.opener && parent.opener.top && parent.opener.top.TS) {
							parent.opener.top.fsMod.recentIds["web"]=' . intval($GLOBALS['TSFE']->page['uid']) . ';
							if (parent.opener.top.content && parent.opener.top.content.nav_frame && parent.opener.top.content.nav_frame.refresh_nav) {
								parent.opener.top.content.nav_frame.refresh_nav();
							}
							parent.opener.top.goToModule("' . $pageModule . '");
							parent.opener.top.focus();
						} else {
							vHWin=window.open(\'' . TYPO3_mainDir . t3lib_BEfunc::getBackendScript() . '\',\'' . md5('Typo3Backend-' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '\',\'status=1,menubar=1,scrollbars=1,resizable=1\');
							vHWin.focus();
						}
						return false;
						') . '">' . $this->extGetLL('edit_openAB') . '</a>');
            }
        }
        return $out;
    }
Example #14
0
    /**
     * Generates the JavaScript code for the backend.
     *
     * @return	void
     */
    protected function generateJavascript()
    {
        $pathTYPO3 = t3lib_div::dirname(t3lib_div::getIndpEnv('SCRIPT_NAME')) . '/';
        $goToModuleSwitch = $this->moduleMenu->getGotoModuleJavascript();
        $moduleFramesHelper = implode(LF, $this->moduleMenu->getFsMod());
        // If another page module was specified, replace the default Page module with the new one
        $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
        $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
        $menuFrameName = 'menu';
        if ($GLOBALS['BE_USER']->uc['noMenuMode'] === 'icons') {
            $menuFrameName = 'topmenuFrame';
        }
        // determine security level from conf vars and default to super challenged
        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['loginSecurityLevel']) {
            $this->loginSecurityLevel = $GLOBALS['TYPO3_CONF_VARS']['BE']['loginSecurityLevel'];
        } else {
            $this->loginSecurityLevel = 'superchallenged';
        }
        $t3Configuration = array('siteUrl' => t3lib_div::getIndpEnv('TYPO3_SITE_URL'), 'PATH_typo3' => $pathTYPO3, 'PATH_typo3_enc' => rawurlencode($pathTYPO3), 'username' => htmlspecialchars($GLOBALS['BE_USER']->user['username']), 'uniqueID' => t3lib_div::shortMD5(uniqid('')), 'securityLevel' => $this->loginSecurityLevel, 'TYPO3_mainDir' => TYPO3_mainDir, 'pageModule' => $pageModule, 'condensedMode' => $GLOBALS['BE_USER']->uc['condensedMode'] ? 1 : 0, 'inWorkspace' => $GLOBALS['BE_USER']->workspace !== 0 ? 1 : 0, 'workspaceFrontendPreviewEnabled' => $GLOBALS['BE_USER']->user['workspace_preview'] ? 1 : 0, 'veriCode' => $GLOBALS['BE_USER']->veriCode(), 'denyFileTypes' => PHP_EXTENSIONS_DEFAULT, 'moduleMenuWidth' => $this->menuWidth - 1, 'topBarHeight' => isset($GLOBALS['TBE_STYLES']['dims']['topFrameH']) ? intval($GLOBALS['TBE_STYLES']['dims']['topFrameH']) : 30, 'showRefreshLoginPopup' => isset($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) ? intval($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) : FALSE);
        $t3LLLcore = array('waitTitle' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_logging_in'), 'refresh_login_failed' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_failed'), 'refresh_login_failed_message' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_failed_message'), 'refresh_login_title' => sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_title'), htmlspecialchars($GLOBALS['BE_USER']->user['username'])), 'login_expired' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.login_expired'), 'refresh_login_username' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_username'), 'refresh_login_password' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_password'), 'refresh_login_emptyPassword' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_emptyPassword'), 'refresh_login_button' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_button'), 'refresh_logout_button' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_logout_button'), 'please_wait' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.please_wait'), 'be_locked' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.be_locked'), 'refresh_login_countdown_singular' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_countdown_singular'), 'refresh_login_countdown' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_countdown'), 'login_about_to_expire' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.login_about_to_expire'), 'login_about_to_expire_title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.login_about_to_expire_title'), 'refresh_login_refresh_button' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_login_refresh_button'), 'refresh_direct_logout_button' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.refresh_direct_logout_button'), 'tabs_closeAll' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:tabs.closeAll'), 'tabs_closeOther' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:tabs.closeOther'), 'tabs_close' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:tabs.close'), 'donateWindow_title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:donateWindow.title'), 'donateWindow_message' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:donateWindow.message'), 'donateWindow_button_donate' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:donateWindow.button_donate'), 'donateWindow_button_disable' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:donateWindow.button_disable'), 'donateWindow_button_postpone' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:donateWindow.button_postpone'));
        $t3LLLfileUpload = array('windowTitle' => $GLOBALS['LANG']->getLL('fileUpload_windowTitle'), 'buttonSelectFiles' => $GLOBALS['LANG']->getLL('fileUpload_buttonSelectFiles'), 'buttonCancelAll' => $GLOBALS['LANG']->getLL('fileUpload_buttonCancelAll'), 'infoComponentMaxFileSize' => $GLOBALS['LANG']->getLL('fileUpload_infoComponentMaxFileSize'), 'infoComponentFileUploadLimit' => $GLOBALS['LANG']->getLL('fileUpload_infoComponentFileUploadLimit'), 'infoComponentFileTypeLimit' => $GLOBALS['LANG']->getLL('fileUpload_infoComponentFileTypeLimit'), 'infoComponentOverrideFiles' => $GLOBALS['LANG']->getLL('fileUpload_infoComponentOverrideFiles'), 'processRunning' => $GLOBALS['LANG']->getLL('fileUpload_processRunning'), 'uploadWait' => $GLOBALS['LANG']->getLL('fileUpload_uploadWait'), 'uploadStarting' => $GLOBALS['LANG']->getLL('fileUpload_uploadStarting'), 'uploadProgress' => $GLOBALS['LANG']->getLL('fileUpload_uploadProgress'), 'uploadSuccess' => $GLOBALS['LANG']->getLL('fileUpload_uploadSuccess'), 'errorQueueLimitExceeded' => $GLOBALS['LANG']->getLL('fileUpload_errorQueueLimitExceeded'), 'errorQueueFileSizeLimit' => $GLOBALS['LANG']->getLL('fileUpload_errorQueueFileSizeLimit'), 'errorQueueZeroByteFile' => $GLOBALS['LANG']->getLL('fileUpload_errorQueueZeroByteFile'), 'errorQueueInvalidFiletype' => $GLOBALS['LANG']->getLL('fileUpload_errorQueueInvalidFiletype'), 'errorUploadHttp' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadHttpError'), 'errorUploadMissingUrl' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadMissingUrl'), 'errorUploadIO' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadIO'), 'errorUploadSecurityError' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadSecurityError'), 'errorUploadLimit' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadLimit'), 'errorUploadFailed' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadFailed'), 'errorUploadFileIDNotFound' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadFileIDNotFound'), 'errorUploadFileValidation' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadFileValidation'), 'errorUploadFileCancelled' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadFileCancelled'), 'errorUploadStopped' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadStopped'), 'allErrorMessageTitle' => $GLOBALS['LANG']->getLL('fileUpload_allErrorMessageTitle'), 'allErrorMessageText' => $GLOBALS['LANG']->getLL('fileUpload_allErrorMessageText'), 'allError401' => $GLOBALS['LANG']->getLL('fileUpload_allError401'), 'allError2038' => $GLOBALS['LANG']->getLL('fileUpload_allError2038'));
        // Convert labels/settings back to UTF-8 since json_encode() only works with UTF-8:
        if ($GLOBALS['LANG']->charSet !== 'utf-8') {
            $t3Configuration['username'] = $GLOBALS['LANG']->csConvObj->conv($t3Configuration['username'], $GLOBALS['LANG']->charSet, 'utf-8');
            $GLOBALS['LANG']->csConvObj->convArray($t3LLLcore, $GLOBALS['LANG']->charSet, 'utf-8');
            $GLOBALS['LANG']->csConvObj->convArray($t3LLLfileUpload, $GLOBALS['LANG']->charSet, 'utf-8');
        }
        $this->js .= '
	TYPO3.configuration = ' . json_encode($t3Configuration) . ';
	TYPO3.LLL = {
		core : ' . json_encode($t3LLLcore) . ',
		fileUpload: ' . json_encode($t3LLLfileUpload) . '
	};

	/**
	 * TypoSetup object.
	 */
	function typoSetup()	{	//
		this.PATH_typo3 = TYPO3.configuration.PATH_typo3;
		this.PATH_typo3_enc = TYPO3.configuration.PATH_typo3_enc;
		this.username = TYPO3.configuration.username;
		this.uniqueID = TYPO3.configuration.uniqueID;
		this.navFrameWidth = 0;
		this.securityLevel = TYPO3.configuration.securityLevel;
		this.veriCode = TYPO3.configuration.veriCode;
		this.denyFileTypes = TYPO3.configuration.denyFileTypes;
	}
	var TS = new typoSetup();

	var currentModuleLoaded = "";

	/**
	 * Frameset Module object
	 *
	 * Used in main modules with a frameset for submodules to keep the ID between modules
	 * Typically that is set by something like this in a Web>* sub module:
	 *		if (top.fsMod) top.fsMod.recentIds["web"] = "\'.intval($this->id).\'";
	 * 		if (top.fsMod) top.fsMod.recentIds["file"] = "...(file reference/string)...";
	 */
	function fsModules()	{	//
		this.recentIds=new Array();					// used by frameset modules to track the most recent used id for list frame.
		this.navFrameHighlightedID=new Array();		// used by navigation frames to track which row id was highlighted last time
		this.currentMainLoaded="";
		this.currentBank="0";
	}
	var fsMod = new fsModules();' . $moduleFramesHelper . ';';
        // add goToModule code
        $this->pageRenderer->addExtOnReadyCode('
			top.goToModule = ' . $goToModuleSwitch . ';
		');
        // Check editing of page:
        $this->handlePageEditing();
        $this->setStartupModule();
    }