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

📄 class.tx_cms_layout.php

📁 Typo3, 开源里边最强大的
💻 PHP
📖 第 1 页 / 共 5 页
字号:
					</table>';					// CSH:				$out.= t3lib_BEfunc::cshItem($this->descrTable,'columns_single',$GLOBALS['BACK_PATH']);			} else {				$out = '<br/><br/>'.$GLOBALS['SOBE']->doc->icons(1).'Sorry, you cannot view a single language in this localization mode (Default Language Binding is enabled)<br/><br/>';			}		}			// Add the big buttons to page:		if ($this->option_showBigButtons)	{			$bArray=array();			if (!$GLOBALS['SOBE']->current_sys_language)	{				if ($this->ext_CALC_PERMS&2)	$bArray[0]=$GLOBALS['SOBE']->doc->t3Button(t3lib_BEfunc::editOnClick('&edit[pages]['.$id."]=edit",$this->backPath,''),$GLOBALS['LANG']->getLL('editPageProperties'));			} else {				if ($this->doEdit && $GLOBALS['BE_USER']->check('tables_modify','pages_language_overlay'))	{					list($languageOverlayRecord) = t3lib_BEfunc::getRecordsByField('pages_language_overlay','pid',$id,'AND sys_language_uid='.intval($GLOBALS['SOBE']->current_sys_language));					$bArray[0]=$GLOBALS['SOBE']->doc->t3Button(t3lib_BEfunc::editOnClick('&edit[pages_language_overlay]['.$languageOverlayRecord['uid']."]=edit",$this->backPath,''),$GLOBALS['LANG']->getLL('editPageProperties_curLang'));				}			}			if ($this->ext_CALC_PERMS&4 || $this->ext_CALC_PERMS&2)	$bArray[1]=$GLOBALS['SOBE']->doc->t3Button("window.location.href='".$this->backPath."move_el.php?table=pages&uid=".$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))."';",$GLOBALS['LANG']->getLL('move_page'));			if ($this->ext_CALC_PERMS&8)	$bArray[2]=$GLOBALS['SOBE']->doc->t3Button("window.location.href='".$this->backPath."db_new.php?id=".$id.'&pagesOnly=1&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))."';",$GLOBALS['LANG']->getLL('newPage2'));			if ($this->doEdit && $this->ext_function==1) $bArray[3]=$GLOBALS['SOBE']->doc->t3Button("window.location.href='db_new_content_el.php?id=".$id.'&sys_language_uid='.$GLOBALS['SOBE']->current_sys_language.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))."';",$GLOBALS['LANG']->getLL('newPageContent2'));			$out = '				<table border="0" cellpadding="4" cellspacing="0" class="typo3-page-buttons">					<tr>						<td>'.implode('</td>						<td>',$bArray).'</td>					</tr>				</table>				<img src="clear.gif" width="1" height="5" alt="" /><br />				'.t3lib_BEfunc::cshItem($this->descrTable,'button_panel',$GLOBALS['BACK_PATH']).	// CSH				$out;		}			// Return content:		return $out;	}	/**	 * Renders Frontend Users from the fe_users table from page id	 *	 * @param	integer		Page id	 * @return	string		HTML for the listing	 */	function getTable_fe_users($id)	{		$this->addElement_tdParams=array(			'username'=>' nowrap="nowrap"',			'password'=>' nowrap="nowrap"',			'usergroup'=>' nowrap="nowrap"',			'name'=>' nowrap="nowrap"',			'address'=>' nowrap="nowrap"',			'zip'=>' nowrap="nowrap"',			'city'=>' nowrap="nowrap"',			'email'=>' nowrap="nowrap"',			'telephone'=>' nowrap="nowrap"'		);		$fList = 'username,password,usergroup,name,email,telephone,address,zip,city';		$out = $this->makeOrdinaryList('fe_users',$id, $fList, 1);		$this->addElement_tdParams=array();		return $out;	}	/**	 * Renders records from the sys_notes table from page id	 * NOTICE: Requires the sys_note extension to be loaded.	 *	 * @param	integer		Page id	 * @return	string		HTML for the listing	 */	function getTable_sys_note($id)	{		global $TCA;		if (!t3lib_extMgm::isLoaded('sys_note'))	return '';			// INIT:		$perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);		$tree = $this->getTreeObject($id,intval($GLOBALS['SOBE']->MOD_SETTINGS['pages_levels']),$perms_clause);		$this->itemLabels =array();		foreach($TCA['sys_note']['columns'] as $name => $val)	{			$this->itemLabels[$name]=$GLOBALS['LANG']->sL($val['label']);		}			// If page ids were found, select all sys_notes from the page ids:		$out='';		if (count($tree->ids))		{			$delClause = t3lib_BEfunc::deleteClause('sys_note').t3lib_BEfunc::versioningPlaceholderClause('sys_note');			$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_note', 'pid IN ('.implode(',',$tree->ids).') AND (personal=0 OR cruser='.intval($GLOBALS['BE_USER']->user['uid']).')'.$delClause);			$dbCount = $GLOBALS['TYPO3_DB']->sql_num_rows($result);				// If sys_notes were found, render them:			if ($dbCount)	{				$this->fieldArray = explode(',','__cmds__,info,note');					// header line is drawn				$theData = Array();				$theData['__cmds__'] ='';				$theData['info'] = '<b>Info</b><br /><img src="clear.gif" height="1" width="220" alt="" />';				$theData['note'] = '<b>Note</b>';				$out.=$this->addelement(1,'',$theData,' class="c-headLine"',20);					// half line is drawn				$theData = Array();				$theData['info'] = $this->widthGif;				$out.=$this->addelement(0,'',$theData);				$this->no_noWrap=1;					// Items				$this->eCounter=$this->firstElementNumber;				while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))	{					t3lib_BEfunc::workspaceOL('sys_note', $row);					list($flag,$code) = $this->fwd_rwd_nav();					$out.=$code;					if ($flag)	{						$color = Array (							0 => '',		// No category							1 => ' class="bgColor4"',		// Instructions							2 => ' class="bgColor2"',		// Template							3 => '',		// Notes							4 => ' class="bgColor5"'		// To-do						);						$tdparams = $color[$row['category']];						$info = Array();;						$theData = Array();						$this->getProcessedValue('sys_note','subject,category,author,email,personal',$row,$info);						$cont=implode('<br />',$info);						$head = '<b>Page:</b> '.t3lib_BEfunc::getRecordPath($row['pid'],$perms_clause,10).'<br />';						$theData['__cmds__']= $this->getIcon('sys_note',$row);						$theData['info'] = $head.$cont;						$theData['note'] = nl2br($row['message']);						$out.=$this->addelement(1,'',$theData,$tdparams,20);							// half line is drawn						$theData = Array();						$theData['info'] = $this->widthGif;						$out.=$this->addelement(0,'',$theData);					}					$this->eCounter++;				}					// Wrap it all in a table:				$out='					<table border="0" cellpadding="1" cellspacing="2" width="480" class="typo3-page-sysnote">						'.$out.'					</table>';			}		}		return $out;	}	/**	 * Renders records from the tt_board table from page id	 * NOTICE: Requires the tt_board extension to be loaded.	 *	 * @param	integer		Page id	 * @return	string		HTML for the listing	 */	function getTable_tt_board($id)	{			// Initialize:		$delClause = t3lib_BEfunc::deleteClause('tt_board').t3lib_BEfunc::versioningPlaceholderClause('tt_board');		$queryParts = $this->makeQueryArray('tt_board', $id, 'AND parent=0');		$this->setTotalItems($queryParts);		$dbCount = 0;			// If items were selected, make query:		if ($this->totalItems)	{			$result = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryParts);			$dbCount = $GLOBALS['TYPO3_DB']->sql_num_rows($result);		}			// If results came out of that, render the list:		$out='';		if ($dbCount)	{				// Setting fields to display first:			if ($GLOBALS['SOBE']->MOD_SETTINGS['tt_board']=='expand')	{				$this->fieldArray = explode(',','subject,author,date,age');			} else {				$this->fieldArray = explode(',','subject,author,date,age,replys');			}				// Header line is drawn			$theData = Array();			$theData['subject'] = '<b>'.$GLOBALS['LANG']->getLL('tt_board_subject',1).'</b>';			$theData['author'] = '<b>'.$GLOBALS['LANG']->getLL('tt_board_author',1).'</b>';			$theData['date'] = '<b>'.$GLOBALS['LANG']->getLL('tt_board_date',1).'</b>';			$theData['age'] = '<b>'.$GLOBALS['LANG']->getLL('tt_board_age',1).'</b>';			if ($GLOBALS['SOBE']->MOD_SETTINGS['tt_board']!='expand') {				$theData['replys'] = '<b>'.$GLOBALS['LANG']->getLL('tt_board_RE',1).'</b>';			}			$out.=$this->addelement(1,'',$theData,' class="c-headLine"',20);				// half line is drawn			$theData = Array();			$theData['subject'] = $this->widthGif;			$out.=$this->addelement(0,'',$theData);				// Items			$this->eCounter=$this->firstElementNumber;			while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))	{				t3lib_BEfunc::workspaceOL('tt_board', $row);				list($flag,$code) = $this->fwd_rwd_nav();				$out.=$code;				if ($flag)	{					$theRows = Array();					$theRows = $this->tt_board_getTree ($theRows,$row['uid'],$id,$delClause,'');					$out.=$this->tt_board_drawItem('tt_board',$row,count($theRows));					if ($GLOBALS['SOBE']->MOD_SETTINGS['tt_board']=='expand')	{						reset($theRows);						while(list($n,$sRow)=each($theRows))	{							$out.=$this->tt_board_drawItem('tt_board',$sRow,0);						}					}				}				$this->eCounter++;			}				// Wrap it all in a table:			$out='				<table border="0" cellpadding="0" cellspacing="0" class="typo3-page-listTTboard">					'.$out.'				</table>';		}		return $out;	}	/**	 * Renders address records from the tt_address table from page id	 * NOTICE: Requires the tt_address extension to be loaded.	 *	 * @param	integer		Page id	 * @return	string		HTML for the listing	 */	function getTable_tt_address($id)	{			// Define fieldlist to show:		switch($GLOBALS['SOBE']->MOD_SETTINGS['tt_address'])	{			case 1:				$icon = 0;				$fList = 'name,address,zip,city,country';			break;			case 2:				$icon = 1;				$fList = 'name;title;email;company,image';			break;			default:				$icon = 0;				$fList = 'name,email,www,phone,fax,mobile';			break;		}			// Create listing		$out = $this->makeOrdinaryList('tt_address',$id, $fList, $icon);		return $out;	}	/**	 * Renders link records from the tt_links table from page id	 * NOTICE: Requires the tt_links extension to be loaded.	 *	 * @param	integer		Page id	 * @return	string		HTML for the listing	 */	function getTable_tt_links($id)	{			// Define fieldlist to show:		switch($GLOBALS['SOBE']->MOD_SETTINGS['tt_links'])	{			case 1:				$fList = 'title,hidden,url';			break;			case 2:				$fList = 'title;url,note2';			break;			default:				$fList = 'title;url,note';			break;		}		$out = $this->makeOrdinaryList('tt_links',$id, $fList,1);		return $out;	}	/**	 * Renders link records from the tt_links table from page id	 * NOTICE: Requires the tt_links extension to be loaded.	 *	 * @param	integer		Page id	 * @return	string		HTML for the listing	 */	function getTable_tt_guest($id)	{			// Define fieldlist to show:		$fList = 'title;cr_name;cr_email,note';		$out = $this->makeOrdinaryList('tt_guest',$id, $fList, 1);		return $out;	}	/**	 * Renders news items from the tt_news table from page id	 * NOTICE: Requires the tt_news extension to be loaded.	 *	 * @param	integer		Page id	 * @return	string		HTML for the listing	 */	function getTable_tt_news($id)	{		$this->addElement_tdParams=array(			'title'=>' nowrap="nowrap"',			'datetime'=>' nowrap="nowrap"',			'starttime'=>' nowrap="nowrap"',			'author'=>' nowrap="nowrap"'		);		$fList = 'title,author,author_email,datetime,starttime,category,image';		$out = $this->makeOrdinaryList('tt_news',$id, $fList, 1);		$this->addElement_tdParams=array();		return $out;	}	/**	 * Renders calender elements link records from the tt_calender table from page id	 * NOTICE: Requires the tt_calender extension to be loaded.	 *	 * @param	integer		Page id	 * @return	string		HTML for the listing	 */	function getTable_tt_calender($id)	{		$type=$GLOBALS['SOBE']->MOD_SETTINGS['tt_calender'];		switch($type)	{			case 'date':					// Date default				$fList = 'date,title';				$icon=0;				$out = $this->makeOrdinaryList('tt_calender',$id, $fList, $icon, ' AND type=0');				return $out;			break;			case 'date_ext':					// Date extended

⌨️ 快捷键说明

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