Updated copyright notices to show "2004"
[Packages/TYPO3.CMS.git] / typo3 / alt_intro.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2004 Kasper Skaarhoj (kasper@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 * 'About modules' script - the default start-up module.
29 * Will display the list of main- and sub-modules available to the user.
30 * Each module will be show with description and a link to the module.
31 *
32 * $Id$
33 * Revised for TYPO3 3.6 2/2003 by Kasper Skaarhoj
34 * XHTML compliant
35 *
36 * @author Kasper Skaarhoj <kasper@typo3.com>
37 */
38 /**
39 * [CLASS/FUNCTION INDEX of SCRIPT]
40 *
41 *
42 *
43 * 75: class SC_alt_intro
44 * 84: function init()
45 * 97: function main()
46 * 166: function printContent()
47 *
48 * TOTAL FUNCTIONS: 3
49 * (This index is automatically created/updated by the extension "extdeveval")
50 *
51 */
52
53
54 require ('init.php');
55 require ('template.php');
56 require_once (PATH_t3lib.'class.t3lib_loadmodules.php');
57 require_once (PATH_t3lib.'class.t3lib_basicfilefunc.php');
58 require_once ('class.alt_menu_functions.inc');
59 include ('sysext/lang/locallang_alt_intro.php');
60
61
62
63
64
65
66
67
68 /**
69 * Script Class for the introduction screen, alias "About > Modules" which shows the description of each available module for the user.
70 *
71 * @author Kasper Skaarhoj <kasper@typo3.com>
72 * @package TYPO3
73 * @subpackage core
74 */
75 class SC_alt_intro {
76 var $loadModules;
77 var $content;
78
79 /**
80 * Initialization of script class
81 *
82 * @return void
83 */
84 function init() {
85 global $TBE_MODULES;
86
87 // Loads the available backend modules so we can create the description overview.
88 $this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
89 $this->loadModules->load($TBE_MODULES);
90 }
91
92 /**
93 * Main content - displaying the module descriptions
94 *
95 * @return void
96 */
97 function main() {
98 global $BE_USER,$LANG,$TYPO3_CONF_VARS;
99 global $TBE_TEMPLATE,$TYPO_VERSION;
100
101 $alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
102
103 $TBE_TEMPLATE->docType='xhtml_trans';
104 $TBE_TEMPLATE->divClass=$TBE_TEMPLATE->bodyTagId;
105 $this->content.=$TBE_TEMPLATE->startPage('About modules');
106
107
108 // COPYRIGHT NOTICE:
109 $loginCopyrightWarrantyProvider = strip_tags(trim($TYPO3_CONF_VARS['SYS']['loginCopyrightWarrantyProvider']));
110 $loginCopyrightWarrantyURL = strip_tags(trim($TYPO3_CONF_VARS['SYS']['loginCopyrightWarrantyURL']));
111
112 if (strlen($loginCopyrightWarrantyProvider)>=2 && strlen($loginCopyrightWarrantyURL)>=10) {
113 $warrantyNote='Warranty is supplied by '.htmlspecialchars($loginCopyrightWarrantyProvider).'; <a href="'.htmlspecialchars($loginCopyrightWarrantyURL).'" target="_blank">click for details.</a>';
114 } else {
115 $warrantyNote='TYPO3 comes with ABSOLUTELY NO WARRANTY; <a href="http://typo3.com/1316.0.html" target="_blank">click for details.</a>';
116 }
117 $cNotice='<a href="http://typo3.com/" target="_blank"><img src="gfx/loginlogo_transp.gif" width="75" vspace="2" height="19" alt="TYPO3 logo" align="left" />TYPO3 CMS ver. '.htmlspecialchars($GLOBALS['TYPO_VERSION']).'</a>. Copyright &copy; 1998-2003 Kasper Sk&aring;rh&oslash;j. Extensions are copyright of their respective owners. Go to <a href="http://typo3.com/" target="_blank">http://typo3.com/</a> for details.
118 '.strip_tags($warrantyNote,'<a>').' This is free software, and you are welcome to redistribute it under certain conditions; <a href="http://typo3.com/1316.0.html" target="_blank">click for details</a>. Obstructing the appearance of this notice is prohibited by law.';
119
120
121
122
123 $this->content.= sprintf('
124 <h1>%s<br />%s</h1>
125
126 <p>%s</p>
127 <p>&nbsp;</p>
128 <p>%s</p>',
129 'TYPO3 '.$TYPO_VERSION,
130 $LANG->getLL('introtext'),
131 $cNotice,
132 $LANG->getLL('introtext2')
133 );
134
135
136
137
138 // Printing the description of the modules available
139 $this->content.=$alt_menuObj->topMenu($this->loadModules->modules,0,'',1);
140 $this->content.='<br />';
141
142 // end text: 'Features may vary depending on your website and permissions'
143 $this->content.='<p class="c-features"><em>('.$LANG->getLL('endText').')</em></p>';
144 $this->content.='<hr />';
145
146 // Logged in user, eg: 'You're logged in as user: admin (Kasper Skaarhoj, kasper@typo3.com)'
147 $this->content.='<p class="c-user">'.
148 htmlspecialchars($LANG->getLL('userInfo')).
149 sprintf(' <strong>%s</strong> (%s)',
150 $BE_USER->user['username'],
151 (implode(', ',array($BE_USER->user['realName'],$BE_USER->user['email'])))
152 ).
153 '</p>
154 <br />
155 <br />';
156
157 // End page
158 $this->content.= $TBE_TEMPLATE->endPage();
159 }
160
161 /**
162 * Outputting the accumulated content to screen
163 *
164 * @return void
165 */
166 function printContent() {
167 echo $this->content;
168 }
169 }
170
171 // Include extension?
172 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_intro.php']) {
173 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_intro.php']);
174 }
175
176
177
178
179
180
181
182
183
184
185
186
187 // Make instance:
188 $SOBE = t3lib_div::makeInstance('SC_alt_intro');
189 $SOBE->init();
190 $SOBE->main();
191 $SOBE->printContent();
192 ?>