[TASK] Remove SVN auto properties $Id$
[Packages/TYPO3.CMS.git] / typo3 / show_rechis.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
18 *
19 *
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27 /**
28 * Shows information about a database or file item
29 *
30 * Revised for TYPO3 3.6 November/2003 by Kasper Skårhøj
31 * XHTML Compliant
32 *
33 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
34 */
35 /**
36 * [CLASS/FUNCTION INDEX of SCRIPT]
37 *
38 *
39 *
40 * 76: class SC_show_rechis
41 * 87: function init()
42 * 105: function main()
43 * 131: function printContent()
44 *
45 * TOTAL FUNCTIONS: 3
46 * (This index is automatically created/updated by the extension "extdeveval")
47 *
48 */
49
50
51 $BACK_PATH='';
52 require ($BACK_PATH.'init.php');
53 require ($BACK_PATH.'template.php');
54 $LANG->includeLLFile('EXT:lang/locallang_show_rechis.xml');
55 require_once ('class.show_rechis.inc');
56
57
58
59
60
61
62
63
64
65 /**
66 * Script Class for showing the history module of TYPO3s backend
67 *
68 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
69 * @package TYPO3
70 * @subpackage core
71 * @see class.show_rechis.inc
72 */
73 class SC_show_rechis {
74
75 // Internal:
76 var $content;
77
78 /**
79 * Document template object
80 *
81 * @var mediumDoc
82 */
83 var $doc;
84
85 /**
86 * Initialize the module output
87 *
88 * @return void
89 */
90 function init() {
91 global $LANG;
92
93 // Create internal template object:
94 $this->doc = t3lib_div::makeInstance('template');
95 $this->doc->backPath = $GLOBALS['BACK_PATH'];
96 $this->doc->setModuleTemplate('templates/show_rechis.html');
97
98 // Start the page header:
99 $this->content.=$this->doc->header($LANG->getLL('title'));
100 $this->content.=$this->doc->spacer(5);
101 }
102
103 /**
104 * Generate module output
105 *
106 * @return void
107 */
108 function main() {
109 global $LANG;
110
111 // Start history object
112 $historyObj = t3lib_div::makeInstance('recordHistory');
113
114 // Get content:
115 $this->content .= $historyObj->main();
116
117 // Setting up the buttons and markers for docheader
118 $docHeaderButtons = $this->getButtons();
119 $markers['CONTENT'] = $this->content;
120 $markers['CSH'] = $docHeaderButtons['csh'];
121
122 // Build the <body> for the module
123 $this->content = $this->doc->startPage($LANG->getLL('title'));
124 $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
125 }
126
127 /**
128 * Outputting the accumulated content to screen
129 *
130 * @return void
131 */
132 function printContent() {
133 $this->content.=$this->doc->spacer(8);
134 $this->content.= $this->doc->endPage();
135 $this->content = $this->doc->insertStylesAndJS($this->content);
136 echo $this->content;
137 }
138
139 /**
140 * Create the panel of buttons for submitting the form or otherwise perform operations.
141 *
142 * @return array all available buttons as an assoc. array
143 */
144 protected function getButtons() {
145 $buttons = array(
146 'csh' => '',
147 'back' => ''
148 );
149
150 // CSH
151 $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'history_log', $GLOBALS['BACK_PATH'], '', TRUE);
152
153 // Start history object
154 $historyObj = t3lib_div::makeInstance('recordHistory');
155
156 if ($historyObj->returnUrl) {
157 $buttons['back']= '<a href="' . htmlspecialchars($historyObj->returnUrl) . '" class="typo3-goBack">' . t3lib_iconWorks::getSpriteIcon('actions-view-go-back') . '</a>';
158 }
159
160 return $buttons;
161 }
162 }
163
164
165 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/show_rechis.php'])) {
166 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/show_rechis.php']);
167 }
168
169
170
171 // Make instance:
172 $SOBE = t3lib_div::makeInstance('SC_show_rechis');
173 $SOBE->init();
174 $SOBE->main();
175 $SOBE->printContent();
176
177 ?>