Added $Id$ keywords, cleaned up comment tags
[Packages/TYPO3.CMS.git] / typo3 / alt_intro.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2003 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 *
30 * Will display the list of main- and sub-modules available to the user.
31 * Each module will be show with description and a link to the module.
32 *
33 * @author Kasper Skaarhoj <kasper@typo3.com>
34 * @package TYPO3
35 * @subpackage core
36 *
37 * Revised for TYPO3 3.6 2/2003 by Kasper Skaarhoj
38 * XHTML compliant
39 */
40
41
42 require ('init.php');
43 require ('template.php');
44 require_once (PATH_t3lib.'class.t3lib_loadmodules.php');
45 require_once (PATH_t3lib.'class.t3lib_basicfilefunc.php');
46 require_once ('class.alt_menu_functions.inc');
47 include ('sysext/lang/locallang_alt_intro.php');
48
49
50 // ***************************
51 // Script Class
52 // ***************************
53 class SC_alt_intro {
54 var $loadModules;
55 var $content;
56
57 /**
58 * Initialization
59 */
60 function init() {
61 global $TBE_MODULES;
62
63 // Loads the available backend modules so we can create the description overview.
64 $this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
65 $this->loadModules->load($TBE_MODULES);
66 }
67
68 /**
69 * Main content - displaying the module descriptions
70 */
71 function main() {
72 global $BE_USER,$LANG,$TYPO3_CONF_VARS;
73 global $TBE_TEMPLATE,$TYPO_VERSION;
74
75 $alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
76
77 $TBE_TEMPLATE->docType='xhtml_trans';
78 $TBE_TEMPLATE->inDocStyles.='
79 DIV.typo3-def{width:600px;}
80 ';
81 $this->content.=$TBE_TEMPLATE->startPage('About modules');
82
83
84 // COPYRIGHT NOTICE:
85 $loginCopyrightWarrantyProvider = strip_tags(trim($TYPO3_CONF_VARS['SYS']['loginCopyrightWarrantyProvider']));
86 $loginCopyrightWarrantyURL = strip_tags(trim($TYPO3_CONF_VARS['SYS']['loginCopyrightWarrantyURL']));
87
88 if (strlen($loginCopyrightWarrantyProvider)>=2 && strlen($loginCopyrightWarrantyURL)>=10) {
89 $warrantyNote='Warranty is supplied by '.htmlspecialchars($loginCopyrightWarrantyProvider).'; <a href="'.htmlspecialchars($loginCopyrightWarrantyURL).'" target="_blank">click for details.</a>';
90 } else {
91 $warrantyNote='TYPO3 comes with ABSOLUTELY NO WARRANTY; <a href="http://typo3.com/1316.0.html" target="_blank">click for details.</a>';
92 }
93 $cNotice='<a href="http://typo3.com/" target="_blank"><img src="gfx/loginlogo_transp.gif" width="75" vspace="2" height="19" alt="TYPO3 logo" border="0" 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.
94 '.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.';
95
96
97
98
99 $this->content.= sprintf('
100 <h1>%s<br />%s</h1>
101
102 <p>%s</p>
103 <p>&nbsp;</p>
104 <p>%s</p>',
105 'TYPO3 '.$TYPO_VERSION,
106 $LANG->getLL('introtext'),
107 $cNotice,
108 $LANG->getLL('introtext2')
109 );
110
111
112
113
114 // Printing the description of the modules available
115 $this->content.=$alt_menuObj->topMenu($this->loadModules->modules,0,'',1);
116 $this->content.='<br />';
117
118 // end text: 'Features may vary depending on your website and permissions'
119 $this->content.='<p><em>('.$LANG->getLL('endText').')</em></p>';
120 $this->content.='<hr />';
121
122 // Logged in user, eg: 'You're logged in as user: admin (Kasper Skaarhoj, kasper@typo3.com)'
123 $this->content.='<p>'.
124 htmlspecialchars($LANG->getLL('userInfo')).
125 sprintf(' <strong>%s</strong> (%s)',
126 $BE_USER->user['username'],
127 (implode(', ',array($BE_USER->user['realName'],$BE_USER->user['email'])))
128 ).
129 '</p>';
130
131 // End page
132 $this->content.= $TBE_TEMPLATE->endPage();
133 }
134
135 /**
136 * Prints output
137 */
138 function printContent() {
139 echo $this->content;
140 }
141 }
142
143 // Include extension?
144 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_intro.php']) {
145 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_intro.php']);
146 }
147
148
149
150
151
152
153
154
155
156
157
158
159 // Make instance:
160 $SOBE = t3lib_div::makeInstance('SC_alt_intro');
161 $SOBE->init();
162 $SOBE->main();
163 $SOBE->printContent();
164
165 ?>