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

📄 index.php

📁 Typo3, 开源里边最强大的
💻 PHP
📖 第 1 页 / 共 4 页
字号:
	 * Wraps the title.	 *	 * @param	string		[See parent]	 * @param	array		[See parent]	 * @return	string	 */	function wrapTitle($str,$row)	{		return $str;	}	/**	 * Wraps the plus/minus icon - in this case we just return blank which means we STRIP AWAY the plus/minus icon!	 *	 * @param	string		[See parent]	 * @param	string		[See parent]	 * @param	string		[See parent]	 * @return	string	 */	function PM_ATagWrap($icon,$cmd,$bMark='')	{		return '';	}	/**	 * Wrapping the icon of the element/page. Normally a click menu is wrapped around the icon, but in this case only a title parameter is set.	 *	 * @param	string		Icon image tag.	 * @param	array		Row.	 * @return	string		Icon with title attribute added.	 */	function wrapIcon($icon,$row)	{			// Add title attribute to input icon tag		$title = $GLOBALS['SOBE']->localPath($row['path']);		$theIcon = $this->addTagAttributes($icon,($this->titleAttrib ? $this->titleAttrib.'="'.htmlspecialchars($title).'"' : ''));		return $theIcon;	}	/**	 * This will make sure that no position data is acquired from the BE_USER uc variable.	 *	 * @return	void	 */	function initializePositionSaving()	{		$this->stored=array();	}}/** * Extension class for printing a folder tree: All folders * * @author	Kasper Skaarhoj <kasperYYYY@typo3.com> * @package TYPO3 * @subpackage tx_beuser */class printAllFolderTree extends localFolderTree {	var $expandFirst=1;	var $expandAll=1;	/**	 * Wraps the plus/minus icon - in this case we just return blank which means we STRIP AWAY the plus/minus icon!	 *	 * @param	string		[See parent]	 * @param	string		[See parent]	 * @param	string		[See parent]	 * @return	string	 */	function PM_ATagWrap($icon,$cmd,$bMark='')	{		return $icon;	}}/** * Extension class of beuserauth class. * * @author	Kasper Skaarhoj <kasperYYYY@typo3.com> * @package TYPO3 * @subpackage tx_beuser */class local_beUserAuth extends t3lib_beUserAuth {	var $ext_pageIdsFromMounts='';					// List of mounted page ids (from browsetree class when selecting mountpoints)	var $ext_non_readAccessPageArray=array();		// Storage for non-readable webmounts, see returnWebmounts()	/**	 * Returns an array of the webmounts for the user, with non-readable webmounts filtered out.	 * If there are non-readable webmounts they are registered in $this->ext_non_readAccessPageArray	 * (Extending function in parent class)	 *	 * @param	string		alternative select clause (default is getPagePermsClause(1)). For instance to make sure that ALL webmounts are selected regardless of whether the user has read access or not, you can set this to "1=1".	 * @return	array		Webmounts id's	 */	function returnWebmounts($pClause='')	{			// Get array of webmounts:		$webmounts = (string)($this->groupData['webmounts'])!='' ? explode(',',$this->groupData['webmounts']) : Array();			// Get select clause:		$pClause=$pClause?$pClause:$this->getPagePermsClause(1);			// Traverse mounts, check if they are readable:		foreach($webmounts as $k => $id)	{			$rec=t3lib_BEfunc::getRecord('pages',$id,'*',' AND '.$pClause);			if (!is_array($rec))	{				$this->ext_non_readAccessPageArray[$id]=t3lib_BEfunc::getRecord('pages',$id);				unset($webmounts[$k]);			}		}		return $webmounts;	}	/**	 * Based on the content of ->ext_non_readAccessPageArray (see returnWebmounts()) it generates visually formatted information about these non-readable mounts.	 *	 * @return	string		HTML content showing which DB-mounts were not accessible for the user	 */	function ext_non_readAccessPages()	{		$lines=array();		foreach($this->ext_non_readAccessPageArray as $pA)	{			if ($pA)	$lines[]=t3lib_BEfunc::getRecordPath($pA['uid'],'',15);		}		if (count($lines))	{			return '<table bgcolor="red" border="0" cellpadding="0" cellspacing="0">				<tr>					<td align="center"><font color="white"><strong>The user has no read access to these DB-mounts!</strong></font></td>				</tr>				<tr>					<td>'.implode('</td></tr><tr><td>',$lines).'</td>				</tr>			</table>';		}	}	/**	 * This returns the where-clause needed to select the user with respect flags like deleted, hidden, starttime, endtime	 *	 * @return	string	 */	function user_where_clause()	{		return  'AND pid=0 ';	}	/**	 * Creates the overview information based on which analysis topics were selected.	 *	 * @param	array		Array of analysis topics	 * @param	array		Array of the selected analysis topics (from session variable somewhere)	 * @param	boolean		If set, the full trees of pages/folders are printed.	 * @return	array		Array with accumulated HTML content.	 */	function ext_printOverview($uInfo,$compareFlags,$printTrees=0)	{			// Prepare for filemount and db-mount		if ($printTrees)	{	// ... this is if we see the detailed view for a user:				// Page tree object:			$className=t3lib_div::makeInstanceClassName(!$this->isAdmin() ? 'printAllPageTree_perms' : 'printAllPageTree');			$pagetree = new $className($this,$this->returnWebmounts());	// Here, only readable webmounts are returned (1=1)			$pagetree->addField('perms_user',1);			$pagetree->addField('perms_group',1);			$pagetree->addField('perms_everybody',1);			$pagetree->addField('perms_userid',1);			$pagetree->addField('perms_groupid',1);			$pagetree->addField('editlock',1);				// Folder tree object:			$className=t3lib_div::makeInstanceClassName('printAllFolderTree');			$foldertree = new $className($this,$this->returnFilemounts());		} else {				// Page tree object:			$className=t3lib_div::makeInstanceClassName('localPageTree');			$pagetree = new $className($this,$this->returnWebmounts('1=1'));	// Here, ALL webmounts are returned (1=1)				// Folder tree object:			$className=t3lib_div::makeInstanceClassName('localFolderTree');			$foldertree = new $className($this,$this->returnFilemounts());		}			// Names for modules:		$modNames = array(			'web' => 'Web',			'web_layout' => 'Page',			'web_modules' => 'Modules',			'web_info' => 'Info',			'web_perms' => 'Access',			'web_func' => 'Func',			'web_list' => 'List',			'web_ts' => 'Template',			'file' => 'File',			'file_list' => 'List',			'file_images' => 'Images',			'doc' => 'Doc.',			'help' => 'Help',			'help_about' => 'About',			'help_quick' => 'User manual',			'help_welcome' => 'Welcome',			'user' => 'User',			'user_setup' => 'Setup',			'user_task' => 'Task center'		);			// Traverse the enabled analysis topics:		$out=array();		foreach($uInfo as $k => $v)	{			if ($compareFlags[$k])	{				switch($k)	{					case 'filemounts':						$out[$k] = $foldertree->getBrowsableTree();					break;					case 'webmounts':							// Print webmounts:						$pagetree->addSelfId=1;						$out[$k] = $this->ext_non_readAccessPages();	// Add HTML for non-readable webmounts (only shown when viewing details of a user - in overview/comparison ALL mounts are shown)						$out[$k].= $pagetree->getBrowsableTree();		// Add HTML for readable webmounts.						$this->ext_pageIdsFromMounts=implode(',',array_unique($pagetree->ids));		// List of mounted page ids					break;					case 'tempPath':						$out[$k] = $GLOBALS['SOBE']->localPath($v);					break;					case 'pagetypes_select':						$pageTypes = explode(',',$v);						reset($pageTypes);						while(list($kk,$vv)=each($pageTypes))	{							$pageTypes[$kk]=$GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('pages','doktype',$vv));						}						$out[$k] = implode('<br />',$pageTypes);					break;					case 'tables_select':					case 'tables_modify':						$tables = explode(',',$v);						reset($tables);						while(list($kk,$vv)=each($tables))	{							if ($vv)	{								$tables[$kk]='<span class="nobr">'.t3lib_iconWorks::getIconImage($vv,array(),$GLOBALS['BACK_PATH'],'align="top"').$GLOBALS['LANG']->sL($GLOBALS['TCA'][$vv]['ctrl']['title']).'</span>';							}						}						$out[$k] = implode('<br />',$tables);					break;					case 'non_exclude_fields':						$nef = explode(',',$v);						reset($nef);						$table='';						$pout=array();						while(list($kk,$vv)=each($nef))	{							if ($vv)	{								list($thisTable,$field) = explode(':',$vv);								if ($thisTable!=$table)	{									$table=$thisTable;									t3lib_div::loadTCA($table);									$pout[]='<span class="nobr">'.t3lib_iconWorks::getIconImage($table,array(),$GLOBALS['BACK_PATH'],'align="top"').$GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['ctrl']['title']).'</span>';								}								if ($GLOBALS['TCA'][$table]['columns'][$field])	{									$pout[]='<span class="nobr"> - '.ereg_replace(':$','',$GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['columns'][$field]['label'])).'</span>';								}							}						}						$out[$k] = implode('<br />',$pout);					break;					case 'groupList':					case 'firstMainGroup':						$uGroups = explode(',',$v);						reset($uGroups);						$table='';						$pout=array();						while(list($kk,$vv)=each($uGroups))	{							if ($vv)	{								$uGRow = t3lib_BEfunc::getRecord('be_groups',$vv);								$pout[]='<tr><td nowrap="nowrap">'.t3lib_iconWorks::getIconImage('be_groups',$uGRow,$GLOBALS['BACK_PATH'],'align="top"').'&nbsp;'.htmlspecialchars($uGRow['title']).'&nbsp;&nbsp;</td><td width=1% nowrap="nowrap">'.$GLOBALS['SOBE']->elementLinks('be_groups',$uGRow).'</td></tr>';							}						}						$out[$k] = '<table border="0" cellpadding="0" cellspacing="0" width="100%">'.implode('',$pout).'</table>';					break;					case 'modules':						$mods = explode(',',$v);						reset($mods);						$mainMod='';						$pout=array();						while(list($kk,$vv)=each($mods))	{							if ($vv)	{								list($thisMod,$subMod) = explode('_',$vv);								if ($thisMod!=$mainMod)	{									$mainMod=$thisMod;									$pout[]='<span class="nobr">'.($modNames[$mainMod]?$modNames[$mainMod]:$mainMod).'</span>';								}								if ($subMod)	{									$pout[]='<span class="nobr"> - '.($modNames[$mainMod.'_'.$subMod]?$modNames[$mainMod.'_'.$subMod]:$mainMod.'_'.$subMod).'</span>';								}							}						}						$out[$k] = implode('<br />',$pout);					break;					case 'userTS':						$tmpl = t3lib_div::makeInstance('t3lib_tsparser_ext');	// Defined global here!						$tmpl->tt_track = 0;	// Do not log time-performance information						$tmpl->fixedLgd=0;						$tmpl->linkObjects=0;						$tmpl->bType='';						$tmpl->ext_expandAllNotes=1;						$tmpl->ext_noPMicons=1;						$out[$k] = $tmpl->ext_getObjTree($v,'','','','','1');					break;					case 'userTS_hl':						$tsparser = t3lib_div::makeInstance('t3lib_TSparser');						$tsparser->lineNumberOffset=0;						$out[$k] = $tsparser->doSyntaxHighlight($v,0,1);					break;					case 'explicit_allowdeny':							// Explode and flip values:						$nef = array_flip(explode(',',$v));						$pout = array();						$theTypes = t3lib_BEfunc::getExplicitAuthFieldValues();								// Icons:						$icons = array(							'ALLOW' => '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/icon_ok2.gif','').' class="absmiddle" alt="" />',							'DENY' => '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/icon_fatalerror.gif','').' class="absmiddle" alt="" />',						);							// Traverse types:						foreach($theTypes as $tableFieldKey => $theTypeArrays)	{							if (is_array($theTypeArrays['items']))	{								$pout[] = '<b>'.$theTypeArrays['tableFieldLabel'].'</b>';									// Traverse options for this field:								foreach($theTypeArrays['items'] as $itemValue => $itemContent)	{									$v = $tableFieldKey.':'.$itemValue.':'.$itemContent[0];									if (isset($nef[$v]))	{										unset($nef[$v]);										$pout[] = $icons[$itemContent[0]].'['.$itemContent[2].'] '.$itemContent[1];									} else {										$pout[] = '<em style="color: #666666;">'.$icons[($itemContent[0]=='ALLOW' ? 'DENY' : 'ALLOW')].'['.$itemContent[2].'] '.$itemContent[1].'</em>';									}								}								$pout[] = '';							}						}							// Add remaining:						if (count($nef))	{							$pout = array_merge($pout, array_keys($nef));						}							// Implode for display:						$out[$k] = implode('<br />',$pout);					break;					case 'allowed_languages':							// Explode and flip values:						$nef = array_flip(explode(',',$v));						$pout = array();							// Get languages:						$items = t3lib_BEfunc::getSystemLanguages();							// Traverse values:						foreach($items as $iCfg)	{							if (isset($nef[$iCfg[1]]))	{								unset($nef[$iCfg[1]]);								if (strlen($iCfg[2]))	{									$icon = '<img '.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/'.$iCfg[2]).' class="absmiddle" style="margin-right: 5px;" alt="" />';								} else {									$icon = '';								}								$pout[] = $icon.$iCfg[0];							}						}							// Add remaining:						if (count($nef))	{							$pout = array_merge($pout, array_keys($nef));

⌨️ 快捷键说明

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