[!!!][TASK] Move inclusion of ext_tables.php to bootstrap classes
[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 /**
29 * Shows information about a database or file item
30 *
31 * Revised for TYPO3 3.6 November/2003 by Kasper Skårhøj
32 * XHTML Compliant
33 *
34 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
35 */
36
37 $BACK_PATH = '';
38 require($BACK_PATH.'init.php');
39 require($BACK_PATH.'template.php');
40 $LANG->includeLLFile('EXT:lang/locallang_show_rechis.xml');
41 require_once('class.show_rechis.inc');
42
43 /**
44 * Script Class for showing the history module of TYPO3s backend
45 *
46 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
47 * @package TYPO3
48 * @subpackage core
49 * @see class.show_rechis.inc
50 */
51 class SC_show_rechis {
52
53 // Internal:
54 var $content;
55
56 /**
57 * Document template object
58 *
59 * @var mediumDoc
60 */
61 var $doc;
62
63 /**
64 * Initialize the module output
65 *
66 * @return void
67 */
68 function init() {
69
70 // Create internal template object:
71 $this->doc = t3lib_div::makeInstance('template');
72 $this->doc->backPath = $GLOBALS['BACK_PATH'];
73 $this->doc->setModuleTemplate('templates/show_rechis.html');
74
75 // Start the page header:
76 $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
77 }
78
79 /**
80 * Generate module output
81 *
82 * @return void
83 */
84 function main() {
85
86 // Start history object
87 $historyObj = t3lib_div::makeInstance('recordHistory');
88
89 // Get content:
90 $this->content .= $historyObj->main();
91
92 // Setting up the buttons and markers for docheader
93 $docHeaderButtons = $this->getButtons();
94 $markers['CONTENT'] = $this->content;
95 $markers['CSH'] = $docHeaderButtons['csh'];
96
97 // Build the <body> for the module
98 $this->content = $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
99 $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
100 }
101
102 /**
103 * Outputting the accumulated content to screen
104 *
105 * @return void
106 */
107 function printContent() {
108 $this->content .= $this->doc->endPage();
109 $this->content = $this->doc->insertStylesAndJS($this->content);
110 echo $this->content;
111 }
112
113 /**
114 * Create the panel of buttons for submitting the form or otherwise perform operations.
115 *
116 * @return array All available buttons as an assoc. array
117 */
118 protected function getButtons() {
119 $buttons = array(
120 'csh' => '',
121 'back' => ''
122 );
123
124 // CSH
125 $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'history_log', $GLOBALS['BACK_PATH'], '', TRUE);
126
127 // Start history object
128 $historyObj = t3lib_div::makeInstance('recordHistory');
129
130 if ($historyObj->returnUrl) {
131 $buttons['back'] = '<a href="' . htmlspecialchars($historyObj->returnUrl) . '" class="typo3-goBack">' . t3lib_iconWorks::getSpriteIcon('actions-view-go-back') . '</a>';
132 }
133
134 return $buttons;
135 }
136 }
137
138 // Make instance:
139 $SOBE = t3lib_div::makeInstance('SC_show_rechis');
140 $SOBE->init();
141 $SOBE->main();
142 $SOBE->printContent();
143
144 ?>