Cleanup: Updated copyright comments
[Packages/TYPO3.CMS.git] / typo3 / sysext / about / mod / index.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 * Module: About
29 * This document shows some standard-information for TYPO3 CMS: About-text, version number and so on.
30 *
31 * $Id$
32 * Revised for TYPO3 3.6 November/2003 by Kasper Skårhøj
33 * XHTML compliant
34 *
35 * @todo This module could use a major overhaul in general.
36 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
37 */
38 /**
39 * [CLASS/FUNCTION INDEX of SCRIPT]
40 *
41 *
42 *
43 * 73: class SC_mod_help_about_index
44 * 91: function main()
45 * 125: function printContent()
46 *
47 * TOTAL FUNCTIONS: 2
48 * (This index is automatically created/updated by the extension "extdeveval")
49 *
50 */
51
52 unset($MCONF);
53 require ('conf.php');
54 require ($BACK_PATH.'init.php');
55 require ($BACK_PATH.'template.php');
56 $LANG->includeLLFile('EXT:lang/locallang_mod_help_about.xml');
57 $BE_USER->modAccess($MCONF,1);
58
59
60
61
62
63
64
65
66 /**
67 * Script Class for the Help > About module
68 *
69 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
70 * @package TYPO3
71 * @subpackage core
72 */
73 class SC_mod_help_about_index {
74
75 // Internal, dynamic:
76 var $MCONF=array();
77 var $MOD_MENU=array();
78 var $MOD_SETTINGS=array();
79 var $content;
80
81
82
83
84 /**
85 * Main function, producing the module output.
86 * In this case, the module output is a very simple screen telling the version of TYPO3 and that's basically it...
87 * The content is set in the internal variable $this->content
88 *
89 * @return void
90 */
91 function main() {
92 global $TBE_TEMPLATE,$LANG,$BACK_PATH;
93
94 $this->MCONF = $GLOBALS['MCONF'];
95
96 // **************************
97 // Main
98 // **************************
99 #$TBE_TEMPLATE->bgColor = '#cccccc';
100 $TBE_TEMPLATE->backPath = $GLOBALS['BACK_PATH'];
101
102 $minorText = sprintf($LANG->getLL('minor'), 'TYPO3 Ver. '.htmlspecialchars(TYPO3_version).', Copyright &copy; '.htmlspecialchars(TYPO3_copyright_year), 'Kasper Sk&aring;rh&oslash;j');
103
104 $content='
105 <div id="typo3-mod-help-about-index-php-outer">
106 <img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/typo3logo.gif', 'width="123" height="34"') . ' alt="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:typo3_logo', true) . '" />
107 <div class="typo3-mod-help-about-index-php-inner">
108 <h2>' . $LANG->getLL('welcome', TRUE) . '</h2>
109 <p>'.$minorText.'</p>
110 </div>
111
112 <div class="typo3-mod-help-about-index-php-inner">
113 <h2>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:community_credits', true).'</h2>
114 <p>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:information_detail').'</p>
115 </div>
116
117 <div class="typo3-mod-help-about-index-php-inner">
118 <h2>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:coredevs', true) . '</h2>
119 <p>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:coredevs_detail') . '</p>
120 </div>
121
122 <div class="typo3-mod-help-about-index-php-inner">
123 <h2>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension_authors', true).'</h2>
124 <p>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension_list_info', true).'</p>
125 <br />'.$this->getExtensionAuthors().'
126 </div>
127 </div>
128 ';
129
130 // Renders the module page
131 $this->content = $TBE_TEMPLATE->render(
132 'About',
133 $content
134 );
135 }
136
137 /**
138 * Outputting the accumulated content to screen
139 *
140 * @return void
141 */
142 function printContent() {
143 echo $this->content;
144 }
145
146 /**
147 * gets the author names from the installed extensions
148 *
149 * @return string list of extensions authors and their e-mail
150 */
151 function getExtensionAuthors() {
152 $content = '<table border="0" cellspacing="2" cellpadding="1"><tr><th>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension', true).'</th><th>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension_author', true).'</th></tr>';
153
154 $loadedExtensions = $GLOBALS['TYPO3_LOADED_EXT'];
155 foreach ($loadedExtensions as $extensionKey => $extension) {
156 if (is_array($extension) && $extension['type'] != 'S') {
157 $emconfPath = PATH_site.$extension['siteRelPath'].'ext_emconf.php';
158 include($emconfPath);
159
160 $emconf = $EM_CONF['']; // ext key is not set when loading the ext_emconf.php directly
161
162 $content.= '<tr><td>'.$emconf['title'].' ('.$extensionKey.')</td>'.
163 '<td><a href="mailto:'.$emconf['author_email'].'?subject='.rawurlencode('Thanks for your '.$emconf['title'].' extension').'">'.$emconf['author'].'</a></td></tr>';
164 }
165 }
166
167 $content.= '</table>';
168
169 return $content;
170 }
171 }
172
173 // Include extension?
174 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/mod/help/about/index.php'])) {
175 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/mod/help/about/index.php']);
176 }
177
178
179
180
181
182
183
184
185
186
187
188
189 // Make instance:
190 $SOBE = t3lib_div::makeInstance('SC_mod_help_about_index');
191 $SOBE->main();
192 $SOBE->printContent();
193 ?>