⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.php

📁 Typo3, 开源里边最强大的
💻 PHP
📖 第 1 页 / 共 2 页
字号:
		}			// Simulate selector box:		if ($this->simulateSelector)	{			$this->content.=$this->doc->section($LANG->getLL('simulate').':',$this->simulateSelector.t3lib_BEfunc::cshItem('_MOD_user_setup', 'simuser', $GLOBALS['BACK_PATH'],'|'),1,0,($this->simUser?2:0));		}			// Languages:		$opt = array();		$opt['000000000']='					<option value="">'.$LANG->getLL('lang_default',1).'</option>';		$theLanguages = t3lib_div::trimExplode('|',TYPO3_languages);			// Character set conversion object:		$csConvObj = t3lib_div::makeInstance('t3lib_cs');			// traverse the number of languages:		foreach($theLanguages as $val)	{			if ($val!='default')	{				$localLabel = '  -  ['.htmlspecialchars($GLOBALS['LOCAL_LANG']['default']['lang_'.$val]).']';				$unavailable = $val!='default' && !@is_dir(PATH_typo3conf.'l10n/'.$val) ? '1' : '';				$opt[$GLOBALS['LOCAL_LANG']['default']['lang_'.$val].'--'.$val]='					<option value="'.$val.'"'.($BE_USER->uc['lang']==$val?' selected="selected"':'').($unavailable ? ' class="c-na"' : '').'>'.$LANG->getLL('lang_'.$val,1).$localLabel.'</option>';			}		}		ksort($opt);		$code='				<select name="data[lang]">'.					implode('',$opt).'				</select>'.				t3lib_BEfunc::cshItem('_MOD_user_setup', 'language', $GLOBALS['BACK_PATH'],'|');				if ($BE_USER->uc['lang'] && !@is_dir(PATH_typo3conf.'l10n/'.$BE_USER->uc['lang']))	{					$code.= '<table border="0" cellpadding="0" cellspacing="0" class="warningbox"><tr><td>'.								$this->doc->icons(3).								'The selected language is not available before the language pack is installed.<br />'.								($BE_USER->isAdmin()? 'You can use the Extension Manager to easily download and install new language packs.':'Please ask your system administrator to do this.').							'</td></tr></table>';				}		$this->content.=$this->doc->section($LANG->getLL('language').':',$code,0,1);			// 'Startup' section:		$code = Array();		$code[2][1] = $this->setLabel('condensedMode','condensedMode');		$code[2][2] = '<input type="checkbox" name="data[condensedMode]"'.($BE_USER->uc['condensedMode']?' checked="checked"':'').' />';		$code[3][1] = $this->setLabel('noMenuMode','noMenuMode');		$code[3][2] = '<select name="data[noMenuMode]">			<option value=""'.(!$BE_USER->uc['noMenuMode']?' selected="selected"':'').'>'.$this->setLabel('noMenuMode_def').'</option>			<option value="1"'.($BE_USER->uc['noMenuMode'] && (string)$BE_USER->uc['noMenuMode']!="icons"?' selected="selected"':'').'>'.$this->setLabel('noMenuMode_sel').'</option>			<option value="icons"'.((string)$BE_USER->uc['noMenuMode']=='icons'?' selected="selected"':'').'>'.$this->setLabel('noMenuMode_icons').'</option>		</select>';		if (t3lib_extMgm::isLoaded('taskcenter'))	{			$code[4][1] = $this->setLabel('startInTaskCenter','startInTaskCenter');			$code[4][2] = '<input type="checkbox" name="data[startInTaskCenter]"'.($BE_USER->uc['startInTaskCenter']?' checked="checked"':'').' />';		}		$code[5][1] = $this->setLabel('showThumbs','thumbnailsByDefault');		$code[5][2] = '<input type="checkbox" name="data[thumbnailsByDefault]"'.($BE_USER->uc['thumbnailsByDefault']?' checked="checked"':'').' />';		$code[6][1] = $this->setLabel('helpText');		$code[6][2] = '<input type="checkbox" name="data[helpText]"'.($BE_USER->uc['helpText']?' checked="checked"':'').' />';		$code[7][1] = $this->setLabel('maxTitleLen','titleLen');		$code[7][2] = '<input type="text" name="data[titleLen]" value="'.$BE_USER->uc['titleLen'].'"'.$GLOBALS['TBE_TEMPLATE']->formWidth(5).' maxlength="5" />';		$this->content.=$this->doc->section($LANG->getLL('opening').':',$this->doc->table($code),0,1);			// Advanced Operations:		$code = Array();		$code[1][1] = $this->setLabel('copyLevels');		$code[1][2] = '<input type="text" name="data[copyLevels]" value="'.$BE_USER->uc['copyLevels'].'"'.$GLOBALS['TBE_TEMPLATE']->formWidth(5).' maxlength="5" /> '.$this->setLabel('levels','copyLevels');		$code[2][1] = $this->setLabel('recursiveDelete');		$code[2][2] = '<input type="checkbox" name="data[recursiveDelete]"'.($BE_USER->uc['recursiveDelete']?' checked="checked"':'').' />';		$this->content.=$this->doc->section($LANG->getLL('functions').":",$this->doc->table($code),0,1);			// Edit		$code = Array();		$code[2][1] = $this->setLabel('edit_wideDocument');		$code[2][2] = '<input type="checkbox" name="data[edit_wideDocument]"'.($BE_USER->uc['edit_wideDocument']?' checked="checked"':'').' />';		if ($GLOBALS['TYPO3_CONF_VARS']['BE']['RTEenabled'])	{			$code[3][1] = $this->setLabel('edit_RTE');			$code[3][2] = '<input type="checkbox" name="data[edit_RTE]"'.($BE_USER->uc['edit_RTE']?' checked="checked"':'').' />';		}		$code[4][1] = $this->setLabel('edit_docModuleUpload');		$code[4][2] = '<input type="checkbox" name="data[edit_docModuleUpload]"'.($BE_USER->uc['edit_docModuleUpload']?' checked="checked"':'').' />';		$code[6][1] = $this->setLabel('edit_showFieldHelp');		$code[6][2] = '<select name="data[edit_showFieldHelp]">			<option value=""></option>			<option value="icon"'.($BE_USER->uc['edit_showFieldHelp']=='icon'?' selected="selected"':'').'>'.$this->setLabel('edit_showFieldHelp_icon').'</option>			<option value="text"'.($BE_USER->uc['edit_showFieldHelp']=='text'?' selected="selected"':'').'>'.$this->setLabel('edit_showFieldHelp_message').'</option>		</select>';		$code[7][1] = $this->setLabel('disableCMlayers');		$code[7][2] = '<input type="checkbox" name="data[disableCMlayers]"'.($BE_USER->uc['disableCMlayers']?' checked="checked"':'').' />';		$this->content.=$this->doc->section($LANG->getLL('edit_functions').":",$this->doc->table($code),0,1);			// Personal data		$code = Array();		$code[1][1] = $this->setLabel('beUser_realName');		$code[1][2] = '<input type="text" name="ext_beuser[realName]" value="'.htmlspecialchars($BE_USER->user['realName']).'"'.$GLOBALS['TBE_TEMPLATE']->formWidth(20).' />';		$code[2][1] = $this->setLabel('beUser_email');		$code[2][2] = '<input type="text" name="ext_beuser[email]" value="'.htmlspecialchars($BE_USER->user['email']).'"'.$GLOBALS['TBE_TEMPLATE']->formWidth(20).' />';		$code[3][1] = $this->setLabel('emailMeAtLogin').' ('.$GLOBALS['BE_USER']->user['email'].')';		$code[3][2] = '<input type="checkbox" name="data[emailMeAtLogin]"'.($BE_USER->uc['emailMeAtLogin']?' checked="checked"':'').' />';		$code[4][1] = $this->setLabel('newPassword');		$code[4][2] = '<input type="password" name="ext_beuser[password1]" value=""'.$GLOBALS['TBE_TEMPLATE']->formWidth(20).' onchange="this.value=this.value?MD5(this.value):\'\';" />';		$code[5][1] = $this->setLabel('newPasswordAgain');		$code[5][2] = '<input type="password" name="ext_beuser[password2]" value=""'.$GLOBALS['TBE_TEMPLATE']->formWidth(20).' onchange="this.value=this.value?MD5(this.value):\'\'" />';		$this->content.=$this->doc->section($LANG->getLL('personal_data').":",$this->doc->table($code),0,1);			// Submit:		$this->content.=$this->doc->spacer(20);		$this->content.=$this->doc->section('','			<input type="submit" name="submit" value="'.$LANG->getLL('save').'" />			 &nbsp; <label for="setValuesToDefault"><b>'.$LANG->getLL('setToStandard').':</b></label> <input type="checkbox" name="data[setValuesToDefault]" id="setValuesToDefault" />'.			 t3lib_BEfunc::cshItem('_MOD_user_setup', 'reset', $GLOBALS['BACK_PATH'],'|').'			<input type="hidden" name="simUser" value="'.$this->simUser.'" />');			// Notice		$this->content.=$this->doc->spacer(5);		$this->content.=$this->doc->section('',$LANG->getLL('activateChanges'));	}	/**	 * Prints the content / ends page	 *	 * @return	void	 */	function printContent()	{		$this->content.= $this->doc->endPage();		echo $this->content;		exit;	}	/******************************	 *	 * Helper functions	 *	 ******************************/	/**	 * Returns the backend user object, either the global OR the $this->OLD_BE_USER which is set during simulate-user operation.	 * Anyway: The REAL user is returned - the one logged in.	 *	 * @return	object		The REAL user is returned - the one logged in.	 */	function getRealScriptUserObj()	{		return is_object($this->OLD_BE_USER) ? $this->OLD_BE_USER : $GLOBALS['BE_USER'];	}	/**	 * Will make the simulate-user selector if the logged in user is administrator.	 * It will also set the GLOBAL(!) BE_USER to the simulated user selected if any (and set $this->OLD_BE_USER to logged in user)	 *	 * @return	void	 */	function simulateUser()	{		global $BE_USER,$LANG,$BACK_PATH;		// *******************************************************************************		// If admin, allow simulation of another user		// *******************************************************************************		$this->simUser = 0;		$this->simulateSelector = '';		unset($this->OLD_BE_USER);		if ($BE_USER->isAdmin())	{			$this->simUser = t3lib_div::_GP('simUser');				// Make user-selector:			$users = t3lib_BEfunc::getUserNames('username,usergroup,usergroup_cached_list,uid,realName');			$opt = array();			reset($users);			$opt[] = '<option></option>';			while(list(,$rr)=each($users))	{				if ($rr['uid']!=$BE_USER->user['uid'])	{					$opt[] = '<option value="'.$rr['uid'].'"'.($this->simUser==$rr['uid']?' selected="selected"':'').'>'.htmlspecialchars($rr['username'].' ('.$rr['realName'].')').'</option>';				}			}			$this->simulateSelector = '<select name="simulateUser" onchange="window.location.href=\'index.php?simUser=\'+this.options[this.selectedIndex].value;">'.implode('',$opt).'</select>';		}		if ($this->simUser>0)	{	// This can only be set if the previous code was executed.			$this->OLD_BE_USER = $BE_USER;	// Save old user...			unset($BE_USER);	// Unset current			$BE_USER = t3lib_div::makeInstance('t3lib_beUserAuth');	// New backend user object			$BE_USER->OS = TYPO3_OS;			$BE_USER->setBeUserByUid($this->simUser);			$BE_USER->fetchGroupData();			$BE_USER->backendSetUC();			$GLOBALS['BE_USER'] = $BE_USER;	// Must do this, because unsetting $BE_USER before apparently unsets the reference to the global variable by this name!		}	}	/**	 * Returns the label $str from getLL() and grays out the value if the $str/$key is found in $this->overrideConf array	 * Adds CSH as well if applicable.	 *	 * @param	string		Locallang key	 * @param	string		Alternative override-config key	 * @return	string		HTML output.	 */	function setLabel($str,$key='')	{		$out = $GLOBALS['LANG']->getLL($str);		if (isset($this->overrideConf[($key?$key:$str)]))	{			$out = '<span style="color:#999999">'.$out.'</span>';		}			// CSH:		$csh = t3lib_BEfunc::cshItem('_MOD_user_setup', 'option_'.$str, $GLOBALS['BACK_PATH'],'|',FALSE,'margin-bottom:0px;');		if (strlen($csh))	$csh = ': '.$csh;			// Return value:		return $out.$csh;	}}// Include extension?if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/setup/mod/index.php'])	{	include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/setup/mod/index.php']);}// Make instance:$SOBE = t3lib_div::makeInstance('SC_mod_user_setup_index');$SOBE->simulateUser();$SOBE->storeIncomingData();// These includes MUST be afterwards the settings are saved...!require ($BACK_PATH.'template.php');$LANG->includeLLFile('EXT:setup/mod/locallang.xml');$SOBE->init();$SOBE->main();$SOBE->printContent();?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -