Documentation TYPO3 par Ameos |
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com) 00006 * All rights reserved 00007 * 00008 * This script is part of the TYPO3 project. The TYPO3 project is 00009 * free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * The GNU General Public License can be found at 00015 * http://www.gnu.org/copyleft/gpl.html. 00016 * A copy is found in the textfile GPL.txt and important notices to the license 00017 * from the author is found in LICENSE.txt distributed with these scripts. 00018 * 00019 * 00020 * This script is distributed in the hope that it will be useful, 00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 * GNU General Public License for more details. 00024 * 00025 * This copyright notice MUST APPEAR in all copies of the script! 00026 ***************************************************************/ 00051 unset($MCONF); 00052 require('conf.php'); 00053 require($BACK_PATH.'init.php'); 00054 require($BACK_PATH.'template.php'); 00055 $LANG->includeLLFile('EXT:lang/locallang_mod_web_info.xml'); 00056 require_once (PATH_t3lib.'class.t3lib_scbase.php'); 00057 00058 $BE_USER->modAccess($MCONF,1); 00059 00060 00061 00070 class SC_mod_web_info_index extends t3lib_SCbase { 00071 00072 // Internal, dynamic: 00073 var $be_user_Array; 00074 var $CALC_PERMS; 00075 var $pageinfo; 00076 00082 function main() { 00083 global $BE_USER,$LANG,$BACK_PATH; 00084 00085 // Access check... 00086 // The page will show only if there is a valid page and if this page may be viewed by the user 00087 $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause); 00088 $access = is_array($this->pageinfo) ? 1 : 0; 00089 00090 if (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id)) { 00091 $this->CALC_PERMS = $BE_USER->calcPerms($this->pageinfo); 00092 if ($BE_USER->user['admin'] && !$this->id) { 00093 $this->pageinfo=array('title' => '[root-level]','uid'=>0,'pid'=>0); 00094 } 00095 00096 $this->doc = t3lib_div::makeInstance('mediumDoc'); 00097 $this->doc->backPath = $BACK_PATH; 00098 $this->doc->docType = 'xhtml_trans'; 00099 $this->doc->tableLayout = Array ( 00100 '0' => Array ( 00101 '0' => Array('<td valign="top"><b>','</b></td>'), 00102 "defCol" => Array('<td><img src="'.$this->doc->backPath.'clear.gif" width="10" height="1" alt="" /></td><td valign="top"><b>','</b></td>') 00103 ), 00104 "defRow" => Array ( 00105 "0" => Array('<td valign="top">','</td>'), 00106 "defCol" => Array('<td><img src="'.$this->doc->backPath.'clear.gif" width="10" height="1" alt="" /></td><td valign="top">','</td>') 00107 ) 00108 ); 00109 00110 // JavaScript 00111 $this->doc->JScode = $this->doc->wrapScriptTags(' 00112 script_ended = 0; 00113 function jumpToUrl(URL) { // 00114 document.location = URL; 00115 } 00116 '); 00117 $this->doc->postCode=$this->doc->wrapScriptTags(' 00118 script_ended = 1; 00119 if (top.fsMod) top.fsMod.recentIds["web"] = '.intval($this->id).'; 00120 '); 00121 00122 00123 // Setting up the context sensitive menu: 00124 $CMparts=$this->doc->getContextMenuCode(); 00125 $this->doc->bodyTagAdditions = $CMparts[1]; 00126 $this->doc->JScode.=$CMparts[0]; 00127 $this->doc->postCode.= $CMparts[2]; 00128 00129 $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'. 00130 $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path',1).': '. 00131 '<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-50)).'</span>'; 00132 00133 // Draw the header. 00134 $this->doc->form = '<form action="index.php" method="post" name="webinfoForm">'; 00135 $this->content.=$this->doc->startPage($LANG->getLL('title')); 00136 $this->content.=$this->doc->header($LANG->getLL('title')); 00137 $this->content.=$this->doc->spacer(5); 00138 $this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function']))); 00139 $this->content.=$this->doc->divider(5); 00140 00141 00142 $vContent = $this->doc->getVersionSelector($this->id,1); 00143 if ($vContent) { 00144 $this->content.=$this->doc->section('',$vContent); 00145 } 00146 00147 $this->extObjContent(); 00148 00149 00150 00151 00152 // Info Module CSH: 00153 $this->content.= t3lib_BEfunc::cshItem('_MOD_web_info', '', $GLOBALS['BACK_PATH'], '<br/>|', FALSE, 'margin-top: 30px;'); 00154 00155 // ShortCut 00156 if ($BE_USER->mayMakeShortcut()) { 00157 $this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name'])); 00158 } 00159 00160 $this->content.=$this->doc->spacer(10); 00161 } else { 00162 // If no access or if ID == zero 00163 $this->doc = t3lib_div::makeInstance('mediumDoc'); 00164 $this->doc->backPath = $BACK_PATH; 00165 00166 $this->content.=$this->doc->startPage($LANG->getLL('title')); 00167 $this->content.=$this->doc->header($LANG->getLL('title')); 00168 $this->content.=$this->doc->spacer(5); 00169 $this->content.=$this->doc->spacer(10); 00170 } 00171 } 00172 00178 function printContent() { 00179 00180 $this->content.=$this->doc->endPage(); 00181 echo $this->content; 00182 } 00183 } 00184 00185 // Include extension? 00186 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/web/info/index.php']) { 00187 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/web/info/index.php']); 00188 } 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 // Make instance: 00202 $SOBE = t3lib_div::makeInstance('SC_mod_web_info_index'); 00203 $SOBE->init(); 00204 00205 // Include files? 00206 foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE); 00207 $SOBE->checkExtObj(); // Checking for first level external objects 00208 00209 // Repeat Include files! - if any files has been added by second-level extensions 00210 foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE); 00211 $SOBE->checkSubExtObj(); // Checking second level external objects 00212 00213 $SOBE->main(); 00214 $SOBE->printContent(); 00215 ?>