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

📄 index.php

📁 Typo3, 开源里边最强大的
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?php/****************************************************************  Copyright notice**  (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)*  All rights reserved**  This script is part of the TYPO3 project. The TYPO3 project is*  free software; you can redistribute it and/or modify*  it under the terms of the GNU General Public License as published by*  the Free Software Foundation; either version 2 of the License, or*  (at your option) any later version.**  The GNU General Public License can be found at*  http://www.gnu.org/copyleft/gpl.html.*  A copy is found in the textfile GPL.txt and important notices to the license*  from the author is found in LICENSE.txt distributed with these scripts.***  This script is distributed in the hope that it will be useful,*  but WITHOUT ANY WARRANTY; without even the implied warranty of*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the*  GNU General Public License for more details.**  This copyright notice MUST APPEAR in all copies of the script!***************************************************************//** * Module: TypoScript Tools * * * 	$TYPO3_CONF_VARS["MODS"]["web_ts"]["onlineResourceDir"]  = Directory of default resources. Eg. "fileadmin/res/" or so. * * * @author	Kasper Sk錼h鴍 <kasperYYYY@typo3.com> */unset($MCONF);require ("conf.php");require ($BACK_PATH."init.php");require ($BACK_PATH."template.php");require_once (PATH_t3lib."class.t3lib_page.php");require_once (PATH_t3lib."class.t3lib_tstemplate.php");require_once (PATH_t3lib."class.t3lib_tsparser_ext.php");require_once (PATH_t3lib."class.t3lib_scbase.php");$BE_USER->modAccess($MCONF,1);// ***************************// Script Classes// ***************************class SC_mod_web_ts_index extends t3lib_SCbase {	var $perms_clause;	var $e;	var $sObj;	var $edit;	var $textExtensions = 'html,htm,txt,css,tmpl,inc,js';	var $modMenu_type = "";	var $modMenu_dontValidateList = "ts_browser_toplevel_setup,ts_browser_toplevel_const,ts_browser_TLKeys_setup,ts_browser_TLKeys_const";	var $modMenu_setDefaultList = "ts_browser_linkObjects,ts_browser_fixedLgd";	function init()	{		global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;		parent::init();		$this->id = intval(t3lib_div::_GP("id"));		$this->e = t3lib_div::_GP("e");		$this->sObj = t3lib_div::_GP("sObj");		$this->edit = t3lib_div::_GP("edit");		$this->perms_clause = $BE_USER->getPagePermsClause(1);		if (t3lib_div::_GP("clear_all_cache"))	{			$this->include_once[]=PATH_t3lib."class.t3lib_tcemain.php";		}	}	function clearCache()	{		if (t3lib_div::_GP("clear_all_cache"))	{			$tce = t3lib_div::makeInstance("t3lib_TCEmain");			$tce->stripslashes_values=0;			$tce->start(Array(),Array());			$tce->clear_cacheCmd("all");		}	}	function main()	{		global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;		// Access check...		// The page will show only if there is a valid page and if this page may be viewed by the user		$pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);		$access = is_array($pageinfo) ? 1 : 0;		if ($this->id && $access)	{			$this->doc = t3lib_div::makeInstance("template");			$this->doc->backPath = $BACK_PATH;				// JavaScript			$this->doc->JScode = '		<script language="javascript" type="text/javascript">			script_ended = 0;			function jumpToUrl(URL)	{				window.location.href = URL;			}			function uFormUrl(aname)	{				document.forms[0].action = "index.php?id='.$this->id.'#"+aname;			}			function brPoint(lnumber,t)	{				window.location.href = "index.php?id='.$this->id.'&SET[function]=tx_tstemplateobjbrowser&SET[ts_browser_type]="+(t?"setup":"const")+"&breakPointLN="+lnumber;				return false;			}		</script>		';			$this->doc->postCode='		<script language="javascript" type="text/javascript">			script_ended = 1;			if (top.fsMod) top.fsMod.recentIds["web"] = '.intval($this->id).';		</script>		';			$this->doc->inDocStylesArray[] = '				TABLE#typo3-objectBrowser A { text-decoration: none; }			';				// Setting up the context sensitive menu:			$CMparts=$this->doc->getContextMenuCode();			$this->doc->bodyTagAdditions = $CMparts[1];			$this->doc->JScode.=$CMparts[0];			$this->doc->postCode.= $CMparts[2];			$headerSection = $this->doc->getHeader("pages",$pageinfo,$pageinfo["_thePath"]).'<br>'.				$LANG->sL("LLL:EXT:lang/locallang_core.php:labels.path").': '.				'<span title="'.htmlspecialchars($pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($pageinfo['_thePath'],-50)).'</span>';				// Draw the header.			$this->doc->form='<form action="index.php?id='.$this->id.'" method="post" enctype="'.$GLOBALS["TYPO3_CONF_VARS"]["SYS"]["form_enctype"].'" name="editForm">';			$this->content.=$this->doc->startPage("Template Tools");			$this->content.=$this->doc->header("Template Tools");			$this->content.=$this->doc->spacer(5);			$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,"SET[function]",$this->MOD_SETTINGS["function"],$this->MOD_MENU["function"])));			$this->extObjContent();			// ShortCut			if ($BE_USER->mayMakeShortcut())	{				$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon("id,e,sObj,template","function,ts_browser_type,constant_editor_cat",$this->MCONF["name"]));			}			$this->content.=$this->doc->spacer(10);		} else {				// If no access or if ID == zero			$this->doc = t3lib_div::makeInstance("mediumDoc");			$this->doc->backPath = $BACK_PATH;			$this->content.=$this->doc->startPage("Template Tools");			$this->content.=$this->doc->header("Template Tools");			$this->content.=$this->doc->spacer(5);				// Template pages:			$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(						'pages.uid, count(*) AS count, max(sys_template.root) AS root_max_val, min(sys_template.root) AS root_min_val',						'pages,sys_template',						'pages.uid=sys_template.pid'.							t3lib_BEfunc::deleteClause('pages').							t3lib_BEfunc::versioningPlaceholderClause('pages').							t3lib_BEfunc::deleteClause('sys_template').							t3lib_BEfunc::versioningPlaceholderClause('sys_template'),						'pages.uid'					);			$templateArray = array();			$pArray = array();			while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))	{				$this->setInPageArray(					$pArray,					t3lib_BEfunc::BEgetRootLine ($row["uid"],"AND 1=1"),					$row				);			}			$lines = array();			$lines[] = '<tr class="bgColor5">				<td nowrap><strong>Page name</strong></td>				<td nowrap><strong># Templates</strong></td>				<td nowrap><strong>Is Root?</strong></td>				<td nowrap><strong>Is Ext?</strong></td>				</tr>';			$lines = array_merge($lines,$this->renderList($pArray));			$table = '<table border=0 cellpadding=0 cellspacing=1>'.implode("",$lines).'</table>';			$this->content.= $this->doc->section("",'			<BR>			This is an overview of the pages in the database containing one or more template records. Click a page title to go to the page.			<BR><BR>			'.$table);		//	debug($pArray);			// ********************************************			// RENDER LIST of pages with templates, END			// ********************************************			// ShortCut			if ($BE_USER->mayMakeShortcut())	{				$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon("id","",$this->MCONF["name"]));			}			$this->content.=$this->doc->spacer(10);		}	}	function printContent()	{

⌨️ 快捷键说明

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