|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 1999-2011 Kasper Skårhøj (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 ***************************************************************/ 00027 /** 00028 * Shows information about a database or file item 00029 * 00030 * $Id: show_rechis.php 10121 2011-01-18 20:15:30Z ohader $ 00031 * Revised for TYPO3 3.6 November/2003 by Kasper Skårhøj 00032 * XHTML Compliant 00033 * 00034 * @author Kasper Skårhøj <kasperYYYY@typo3.com> 00035 */ 00036 /** 00037 * [CLASS/FUNCTION INDEX of SCRIPT] 00038 * 00039 * 00040 * 00041 * 76: class SC_show_rechis 00042 * 87: function init() 00043 * 105: function main() 00044 * 131: function printContent() 00045 * 00046 * TOTAL FUNCTIONS: 3 00047 * (This index is automatically created/updated by the extension "extdeveval") 00048 * 00049 */ 00050 00051 00052 $BACK_PATH=''; 00053 require ($BACK_PATH.'init.php'); 00054 require ($BACK_PATH.'template.php'); 00055 $LANG->includeLLFile('EXT:lang/locallang_show_rechis.xml'); 00056 require_once ('class.show_rechis.inc'); 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 /** 00067 * Script Class for showing the history module of TYPO3s backend 00068 * 00069 * @author Kasper Skårhøj <kasperYYYY@typo3.com> 00070 * @package TYPO3 00071 * @subpackage core 00072 * @see class.show_rechis.inc 00073 */ 00074 class SC_show_rechis { 00075 00076 // Internal: 00077 var $content; 00078 00079 /** 00080 * Document template object 00081 * 00082 * @var mediumDoc 00083 */ 00084 var $doc; 00085 00086 /** 00087 * Initialize the module output 00088 * 00089 * @return void 00090 */ 00091 function init() { 00092 global $LANG; 00093 00094 // Create internal template object: 00095 $this->doc = t3lib_div::makeInstance('template'); 00096 $this->doc->backPath = $GLOBALS['BACK_PATH']; 00097 $this->doc->setModuleTemplate('templates/show_rechis.html'); 00098 00099 // Start the page header: 00100 $this->content.=$this->doc->header($LANG->getLL('title')); 00101 $this->content.=$this->doc->spacer(5); 00102 } 00103 00104 /** 00105 * Generate module output 00106 * 00107 * @return void 00108 */ 00109 function main() { 00110 global $LANG; 00111 00112 // Start history object 00113 $historyObj = t3lib_div::makeInstance('recordHistory'); 00114 00115 // Get content: 00116 $this->content .= $historyObj->main(); 00117 00118 // Setting up the buttons and markers for docheader 00119 $docHeaderButtons = $this->getButtons(); 00120 $markers['CONTENT'] = $this->content; 00121 $markers['CSH'] = $docHeaderButtons['csh']; 00122 00123 // Build the <body> for the module 00124 $this->content = $this->doc->startPage($LANG->getLL('title')); 00125 $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); 00126 } 00127 00128 /** 00129 * Outputting the accumulated content to screen 00130 * 00131 * @return void 00132 */ 00133 function printContent() { 00134 $this->content.=$this->doc->spacer(8); 00135 $this->content.= $this->doc->endPage(); 00136 $this->content = $this->doc->insertStylesAndJS($this->content); 00137 echo $this->content; 00138 } 00139 00140 /** 00141 * Create the panel of buttons for submitting the form or otherwise perform operations. 00142 * 00143 * @return array all available buttons as an assoc. array 00144 */ 00145 protected function getButtons() { 00146 $buttons = array( 00147 'csh' => '', 00148 'back' => '' 00149 ); 00150 00151 // CSH 00152 $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'history_log', $GLOBALS['BACK_PATH'], '', TRUE); 00153 00154 // Start history object 00155 $historyObj = t3lib_div::makeInstance('recordHistory'); 00156 00157 if ($historyObj->returnUrl) { 00158 $buttons['back']= '<a href="' . htmlspecialchars($historyObj->returnUrl) . '" class="typo3-goBack">' . t3lib_iconWorks::getSpriteIcon('actions-view-go-back') . '</a>'; 00159 } 00160 00161 return $buttons; 00162 } 00163 } 00164 00165 00166 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/show_rechis.php'])) { 00167 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/show_rechis.php']); 00168 } 00169 00170 00171 00172 // Make instance: 00173 $SOBE = t3lib_div::makeInstance('SC_show_rechis'); 00174 $SOBE->init(); 00175 $SOBE->main(); 00176 $SOBE->printContent(); 00177 00178 ?>
1.8.0