Cleanup: Updated copyright notices
[Packages/TYPO3.CMS.git] / typo3 / sysext / about / mod / index.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2009 Kasper Skaarhoj (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: index.php 3977 2008-08-14 21:40:50Z benni $
32 * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
33 * XHTML compliant
34 *
35 * @todo This module could use a major overhaul in general.
36 * @author Kasper Skaarhoj <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 Skaarhoj <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 $this->content.= $TBE_TEMPLATE->startPage('About');
102
103 $minorText = sprintf($LANG->getLL('minor'), 'TYPO3 Ver. '.htmlspecialchars(TYPO3_version).', Copyright &copy; '.htmlspecialchars(TYPO3_copyright_year), 'Kasper Sk&aring;rh&oslash;j');
104
105 $content='
106 <div id="typo3-mod-help-about-index-php-outer">
107 <img src="'.$BACK_PATH.'gfx/typo3logo.gif" width="123" height="34" vspace="10" alt="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:typo3_logo', true).'" />
108 <div class="typo3-mod-help-about-index-php-inner">
109 <h2>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:information', true).'</h2>
110 <h3>'.$LANG->getLL('welcome',1).'</h3>
111 <p>'.$minorText.'</p>
112 </div>
113
114 <div class="typo3-mod-help-about-index-php-inner">
115 <h2>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:community_credits', true).'</h2>
116 <p>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:information_detail').'</p>
117 </div>
118
119 <div class="typo3-mod-help-about-index-php-inner">
120 <h2>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension_authors', true).'</h2>
121 <p>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_help_about.xml:extension_list_info', true).'</p>
122 <br />'.$this->getExtensionAuthors().'
123 </div>
124 </div>
125 ';
126 $this->content.= $content;
127 $this->content.= $TBE_TEMPLATE->endPage();
128 }
129
130 /**
131 * Outputting the accumulated content to screen
132 *
133 * @return void
134 */
135 function printContent() {
136 echo $this->content;
137 }
138
139 /**
140 * gets the author names from the installed extensions
141 *
142 * @return string list of extensions authors and their e-mail
143 */
144 function getExtensionAuthors() {
145 $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>';
146
147 $loadedExtensions = $GLOBALS['TYPO3_LOADED_EXT'];
148 foreach ($loadedExtensions as $extensionKey => $extension) {
149 if (is_array($extension) && $extension['type'] != 'S') {
150 $emconfPath = PATH_site.$extension['siteRelPath'].'ext_emconf.php';
151 include($emconfPath);
152
153 $emconf = $EM_CONF['']; // ext key is not set when loading the ext_emconf.php directly
154
155 $content.= '<tr><td>'.$emconf['title'].' ('.$extensionKey.')</td>'.
156 '<td><a href="mailto:'.$emconf['author_email'].'?subject='.rawurlencode('Thanks for your '.$emconf['title'].' extension').'">'.$emconf['author'].'</a></td></tr>';
157 }
158 }
159
160 $content.= '</table>';
161
162 return $content;
163 }
164 }
165
166 // Include extension?
167 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/help/about/index.php']) {
168 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/help/about/index.php']);
169 }
170
171
172
173
174
175
176
177
178
179
180
181
182 // Make instance:
183 $SOBE = t3lib_div::makeInstance('SC_mod_help_about_index');
184 $SOBE->main();
185 $SOBE->printContent();
186 ?>