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

📄 index.php

📁 Typo3, 开源里边最强大的
💻 PHP
📖 第 1 页 / 共 5 页
字号:
<?php/****************************************************************  Copyright notice**  (c) 1999-2007 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: Workspace manager * * $Id: index.php 2425 2007-07-16 14:48:27Z mundaun $ * * @author	Kasper Skaarhoj <kasperYYYY@typo3.com> * @author	Dmitry Dulepov <typo3@accio.lv> *//** * [CLASS/FUNCTION INDEX of SCRIPT] * * * *  120: class SC_mod_user_ws_index extends t3lib_SCbase * *              SECTION: Standard module initialization *  157:     function menuConfig() *  204:     function init() *  282:     function main() *  323:     function printContent() * *              SECTION: Module content: Publish *  353:     function moduleContent_publish() *  454:     function displayVersionDetails($details) *  463:     function displayWorkspaceOverview() *  538:     function displayWorkspaceOverview_list($pArray, $tableRows=array(), $c=0, $warnAboutVersions=FALSE) *  731:     function displayWorkspaceOverview_pageTreeIconTitle($pageUid, $title, $indentCount) *  746:     function displayWorkspaceOverview_stageCmd($table,&$rec_off) *  836:     function displayWorkspaceOverview_commandLinks($table,&$rec_on,&$rec_off,$vType) *  912:     function displayWorkspaceOverview_commandLinksSub($table,$rec,$origId) *  962:     function displayWorkspaceOverview_setInPageArray(&$pArray,$rlArr,$table,$row) *  993:     function subElements($uid,$treeLevel,$origId=0) * 1096:     function subElements_getNonPageRecords($tN, $uid, &$recList) * 1126:     function subElements_renderItem(&$tCell,$tN,$uid,$rec,$origId,$iconMode,$HTMLdata) * 1195:     function markupNewOriginals() * 1217:     function createDiffView($table, $diff_1_record, $diff_2_record) * *              SECTION: Module content: Workspace list * 1349:     function moduleContent_workspaceList() * 1364:     function workspaceList_displayUserWorkspaceList() * 1441:     function workspaceList_getUserWorkspaceList() * 1483:     function workspaceList_formatWorkspaceData(&$wksp) * 1525:     function workspaceList_getWebMountPoints(&$wksp) * 1574:     function workspaceList_getFileMountPoints(&$wksp) * 1627:     function workspaceList_displayUserWorkspaceListHeader() * 1647:     function workspaceList_getUserList(&$wksp) * 1674:     function workspaceList_getUserListForSysWorkspace(&$wksp) * 1701:     function workspaceList_getUserListWithAccess(&$list, $access) * 1774:     function workspaceList_displayIcons($currentWorkspace, &$wksp) * 1822:     function workspaceList_hasEditAccess(&$wksp) * 1834:     function workspaceList_createFakeWorkspaceRecord($uid) * *              SECTION: Helper functions * 1899:     function formatVerId($verId) * 1909:     function formatWorkspace($wsid) * 1936:     function formatCount($count) * 1964:     function versionsInOtherWS($table,$uid) * 1994:     function showStageChangeLog($table,$id,$stageCommands) * * TOTAL FUNCTIONS: 37 * (This index is automatically created/updated by the extension "extdeveval") * */	// Initialize module:unset($MCONF);require ('conf.php');require ($BACK_PATH.'init.php');require ($BACK_PATH.'template.php');$BE_USER->modAccess($MCONF,1);	// Include libraries of various kinds used inside:$LANG->includeLLFile('EXT:lang/locallang_mod_user_ws.xml');$LANG->includeLLFile('EXT:lang/locallang_misc.xml');require_once(PATH_t3lib.'class.t3lib_scbase.php');require_once(PATH_typo3.'mod/user/ws/class.wslib.php');require_once(PATH_t3lib.'class.t3lib_diff.php');require_once(PATH_t3lib.'class.t3lib_pagetree.php');require_once(PATH_t3lib.'class.t3lib_tcemain.php');/** * Module: Workspace manager * * @author	Kasper Skaarhoj <kasperYYYY@typo3.com> * @package TYPO3 * @subpackage core */class SC_mod_user_ws_index extends t3lib_SCbase {		// Static:	var $pageTreeIndent = 8;	var $pageTreeIndent_titleLgd = 30;		// Default variables for backend modules	var $MCONF = array();				// Module configuration	var $MOD_MENU = array();			// Module menu items	var $MOD_SETTINGS = array();		// Module session settings	var $doc;							// Document Template Object	var $content;						// Accumulated content		// Internal:	var $showWorkspaceCol = 0;	var $formatWorkspace_cache = array();	var $formatCount_cache = array();	var $targets = array();		// Accumulation of online targets.	var $pageModule = '';	var $publishAccess = FALSE;	var $be_user_Array = array();	var $be_user_Array_full = array();	// not blinded, used by workspace listing	var $stageIndex = array();	/*********************************	 *	 * Standard module initialization	 *	 *********************************/	/**	 * Initialize menu configuration	 *	 * @return	void	 */	function menuConfig()	{		global	$LANG;			// Menu items:		$this->MOD_MENU = array(			'function' => array(				'publish' => $LANG->getLL('menuitem_review'),				'workspaces' => $LANG->getLL('menuitem_workspaces'),			),			'filter' => array(				1 => $LANG->getLL('filter_drafts'),				2 => $LANG->getLL('filter_archive'),				0 => $LANG->getLL('filter_all'),			),			'display' => array(				0 => '['.$LANG->getLL('shortcut_onlineWS').']',				-98 => $LANG->getLL('label_offlineWSes'),				-99 => $LANG->getLL('label_allWSes'),				-1 => '['.$LANG->getLL('shortcut_offlineWS').']'			),			'diff' => array(				0 => $LANG->getLL('diff_no_diff'),				1 => $LANG->getLL('diff_show_inline'),				2 => $LANG->getLL('diff_show_popup'),			),			'expandSubElements' => '',		);			// Add workspaces:		if ($GLOBALS['BE_USER']->workspace===0)	{	// Spend time on this only in online workspace because it might take time:			$workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers','sys_workspace','pid=0'.t3lib_BEfunc::deleteClause('sys_workspace'),'','title');			foreach($workspaces as $rec)	{				if ($GLOBALS['BE_USER']->checkWorkspace($rec))	{					$this->MOD_MENU['display'][$rec['uid']] = '['.$rec['uid'].'] '.$rec['title'];				}			}		}			// CLEANSE SETTINGS		$this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], 'ses');	}	/**	 * Standard init function of a module.	 *	 * @return	void	 */	function init()	{		global $BACK_PATH, $BE_USER;			// Setting module configuration:		$this->MCONF = $GLOBALS['MCONF'];			// Initialize Document Template object:		$this->doc = t3lib_div::makeInstance('noDoc');		$this->doc->backPath = $BACK_PATH;		$this->doc->docType = 'xhtml_trans';			// JavaScript		$plusIcon = t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/ol/plusbullet.gif', 'width="18" height="16"', 1);		$minusIcon = t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/ol/minusbullet.gif', 'width="18" height="16"', 1);		$this->doc->JScode = $this->doc->wrapScriptTags('			script_ended = 0;			function jumpToUrl(URL)	{	//				window.location.href = URL;			}			function hlSubelements(origId, verId, over, diffLayer)	{	//				if (over)	{					document.getElementById(\'orig_\'+origId).attributes.getNamedItem("class").nodeValue = \'typo3-ver-hl\';					document.getElementById(\'ver_\'+verId).attributes.getNamedItem("class").nodeValue = \'typo3-ver-hl\';					if (diffLayer)	{						document.getElementById(\'diff_\'+verId).style.visibility = \'visible\';					}				} else {					document.getElementById(\'orig_\'+origId).attributes.getNamedItem("class").nodeValue = \'typo3-ver\';					document.getElementById(\'ver_\'+verId).attributes.getNamedItem("class").nodeValue = \'typo3-ver\';					if (diffLayer)	{						document.getElementById(\'diff_\'+verId).style.visibility = \'hidden\';					}				}			}			function expandCollapse(rowNumber)	{	//				elementId = \'wl_\' + rowNumber;				element = document.getElementById(elementId);				image = document.getElementById(elementId + \'i\');				if (element.style)	{					if (element.style.display == \'none\')	{						element.style.display = \'\';						image.src = \'' . $minusIcon . '\';					} else {						element.style.display = \'none\';						image.src = \'' . $plusIcon . '\';					}				}			}		');		$this->doc->form = '<form action="index.php" method="post" name="pageform">';			// Setting up the context sensitive menu:		$CMparts = $this->doc->getContextMenuCode();		$this->doc->JScode.= $CMparts[0];		$this->doc->bodyTagAdditions = $CMparts[1];		$this->doc->postCode.= $CMparts[2];			// Add JS for dynamic tabs:		$this->doc->JScode.= $this->doc->getDynTabMenuJScode();			// If another page module was specified, replace the default Page module with the new one		$newPageModule = trim($BE_USER->getTSConfigVal('options.overridePageModule'));		$this->pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';			// Setting publish access permission for workspace:		$this->publishAccess = $BE_USER->workspacePublishAccess($BE_USER->workspace);			// Parent initialization:		parent::init();	}	/**	 * Main function for Workspace Manager module.	 *	 * @return	void	 */	function main()	{		global $LANG, $BE_USER, $BACK_PATH;		// See if we need to switch workspace		$changeWorkspace = t3lib_div::_GET('changeWorkspace');		if ($changeWorkspace != '') {			$BE_USER->setWorkspace($changeWorkspace);			$this->content = $this->doc->startPage($LANG->getLL('title'));			$this->content .= $this->doc->wrapScriptTags('top.location.href="' . $BACK_PATH . 'alt_main.php";');		}		else {				// Starting page:			$this->content.=$this->doc->startPage($LANG->getLL('title'));			$this->content.=$this->doc->header($LANG->getLL('title'));			$this->content.=$this->doc->spacer(5);				// Build top menu:			$menuItems = array();			$menuItems[] = array(				'label' => $LANG->getLL('menuitem_review'),				'content' => $this->moduleContent_publish()			);			$menuItems[] = array(				'label' => $LANG->getLL('menuitem_workspaces'),				'content' => $this->moduleContent_workspaceList()			);				// Add hidden fields and create tabs:			$content = $this->doc->getDynTabMenu($menuItems,'user_ws');			$this->content.=$this->doc->section('',$content,0,1);		}	}	/**	 * Print module content. Called as last thing in the global scope.	 *	 * @return	void	 */	function printContent()	{

⌨️ 快捷键说明

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