Documentation TYPO3 par Ameos

index.php

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 ***************************************************************/
00052 unset($MCONF);
00053 require('conf.php');
00054 require($BACK_PATH.'init.php');
00055 require($BACK_PATH.'template.php');
00056 $LANG->includeLLFile('EXT:lang/locallang_mod_web_func.xml');
00057 require_once(PATH_t3lib.'class.t3lib_scbase.php');
00058 
00059 $BE_USER->modAccess($MCONF,1);
00060 
00061 
00062 
00071 class SC_mod_web_func_index extends t3lib_SCbase {
00072 
00073                 // Internal, dynamic:
00074         var $pageinfo;
00075         var $fileProcessor;
00076 
00077 
00078 
00084         function main() {
00085                 global $BE_USER,$LANG,$BACK_PATH;
00086 
00087                 // Access check...
00088                 // The page will show only if there is a valid page and if this page may be viewed by the user
00089                 $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
00090                 $access = is_array($this->pageinfo) ? 1 : 0;
00091 
00092 
00093                 // **************************
00094                 // Main
00095                 // **************************
00096                 if ($this->id && $access)       {
00097                         $this->doc = t3lib_div::makeInstance('mediumDoc');
00098                         $this->doc->backPath = $BACK_PATH;
00099                         $this->doc->docType = 'xhtml_trans';
00100 
00101                                 // JavaScript
00102                         $this->doc->JScode = $this->doc->wrapScriptTags('
00103                                 script_ended = 0;
00104                                 function jumpToUrl(URL) {       //
00105                                         document.location = URL;
00106                                 }
00107                         ');
00108                         $this->doc->postCode=$this->doc->wrapScriptTags('
00109                                 script_ended = 1;
00110                                 if (top.fsMod) top.fsMod.recentIds["web"] = '.intval($this->id).';
00111                         ');
00112 
00113 
00114                                 // Setting up the context sensitive menu:
00115                         $CMparts=$this->doc->getContextMenuCode();
00116                         $this->doc->bodyTagAdditions = $CMparts[1];
00117                         $this->doc->JScode.=$CMparts[0];
00118                         $this->doc->postCode.= $CMparts[2];
00119 
00120                         $this->doc->form='<form action="index.php" method="post"><input type="hidden" name="id" value="'.$this->id.'" />';
00121 
00122                         $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.
00123                                 $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path').': '.
00124                                 '<span title="'.htmlspecialchars($this->pageinfo['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-50)).'</span>';
00125 
00126                                 // Draw the header.
00127                         $this->content.=$this->doc->startPage($LANG->getLL('title'));
00128                         $this->content.=$this->doc->header($LANG->getLL('title'));
00129                         $this->content.=$this->doc->spacer(5);
00130                         $this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));
00131                         $this->content.=$this->doc->divider(5);
00132 
00133 
00134                         $vContent = $this->doc->getVersionSelector($this->id,1);
00135                         if ($vContent)  {
00136                                 $this->content.=$this->doc->section('',$vContent);
00137                         }
00138 
00139 
00140                         $this->extObjContent();
00141 
00142 
00143 
00144                                 // Function Module CSH:
00145                         $this->content.= t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH'],'<br/><br/>|', FALSE, 'margin-top: 30px;');
00146 
00147                                 // ShortCut
00148                         if ($BE_USER->mayMakeShortcut())        {
00149                                 $this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id','function,wiz,import_function,export_function',$this->MCONF['name']));
00150                         }
00151 
00152                         $this->content.=$this->doc->spacer(10);
00153                 } else {
00154                                 // If no access or if ID == zero
00155 
00156                         $this->doc = t3lib_div::makeInstance('mediumDoc');
00157                         $this->doc->backPath = $BACK_PATH;
00158 
00159                         $this->content.=$this->doc->startPage($LANG->getLL('title'));
00160                         $this->content.=$this->doc->header($LANG->getLL('title'));
00161                         $this->content.=$this->doc->section('','<br />'.$LANG->getLL('clickAPage_content'),0,1);
00162                         $this->content.=$this->doc->spacer(5);
00163                         $this->content.=$this->doc->spacer(10);
00164                 }
00165         }
00166 
00172         function printContent() {
00173 
00174                 $this->content.=$this->doc->endPage();
00175                 echo $this->content;
00176         }
00177 }
00178 
00179 // Include extension?
00180 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/web/func/index.php'])    {
00181         include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/web/func/index.php']);
00182 }
00183 
00184 
00185 
00186 
00187 
00188 
00189 
00190 
00191 
00192 
00193 
00194 
00195 // Make instance:
00196 $SOBE = t3lib_div::makeInstance('SC_mod_web_func_index');
00197 $SOBE->init();
00198 
00199 // Include files?
00200 foreach($SOBE->include_once as $INC_FILE)       include_once($INC_FILE);
00201 $SOBE->checkExtObj();   // Checking for first level external objects
00202 
00203 // Repeat Include files! - if any files has been added by second-level extensions
00204 foreach($SOBE->include_once as $INC_FILE)       include_once($INC_FILE);
00205 $SOBE->checkSubExtObj();        // Checking second level external objects
00206 
00207 $SOBE->main();
00208 $SOBE->printContent();
00209 ?>


Généré par Les experts TYPO3 avec  doxygen 1.4.6