Updated years from 2004 to 2005 + all function indexes. NO actual code changes done!
[Packages/TYPO3.CMS.git] / typo3 / index.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2005 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 * Login-screen of TYPO3.
29 *
30 * $Id$
31 * Revised for TYPO3 3.6 December/2003 by Kasper Skaarhoj
32 * XHTML compliant
33 *
34 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
35 */
36 /**
37 * [CLASS/FUNCTION INDEX of SCRIPT]
38 *
39 *
40 *
41 * 87: class SC_index
42 * 119: function init()
43 * 150: function main()
44 * 243: function printContent()
45 *
46 * SECTION: Various functions
47 * 267: function makeLoginForm()
48 * 312: function makeLogoutForm()
49 * 354: function wrapLoginForm($content)
50 * 414: function checkRedirect()
51 * 459: function makeInterfaceSelectorBox()
52 * 513: function makeCopyrightNotice()
53 * 546: function makeLoginBoxImage()
54 * 586: function makeLoginNews()
55 *
56 * TOTAL FUNCTIONS: 11
57 * (This index is automatically created/updated by the extension "extdeveval")
58 *
59 */
60
61
62 define('TYPO3_PROCEED_IF_NO_USER', 1);
63 require ('init.php');
64 require ('template.php');
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80 /**
81 * Script Class for rendering the login form
82 *
83 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
84 * @package TYPO3
85 * @subpackage core
86 */
87 class SC_index {
88
89 // Internal, GPvars:
90 var $redirect_url; // GPvar: redirect_url; The URL to redirect to after login.
91 var $GPinterface; // GPvar: Defines which interface to load (from interface selector)
92 var $u; // GPvar: preset username
93 var $p; // GPvar: preset password
94 var $L; // GPvar: If "L" is "OUT", then any logged in used is logged out. If redirect_url is given, we redirect to it
95 var $loginRefresh; // Login-refresh boolean; The backend will call this script with this value set when the login is close to being expired and the form needs to be redrawn.
96 var $commandLI; // Value of forms submit button for login.
97
98 // Internal, static:
99 var $redirectToURL; // Set to the redirect URL of the form (may be redirect_url or "alt_main.php")
100 var $L_vars; // Set to the labels used for the login screen.
101
102 // Internal, dynamic:
103 var $content; // Content accumulation
104
105 var $interfaceSelector; // A selector box for selecting value for "interface" may be rendered into this variable
106 var $interfaceSelector_jump; // A selector box for selecting value for "interface" may be rendered into this variable - this will have an onchange action which will redirect the user to the selected interface right away
107 var $interfaceSelector_hidden; // A hidden field, if the interface is not set.
108
109
110
111
112
113
114 /**
115 * Initialize the login box. Will also react on a &L=OUT flag and exit.
116 *
117 * @return void
118 */
119 function init() {
120 global $BE_USER,$TYPO3_CONF_VARS;
121
122 // GPvars:
123 $this->redirect_url = t3lib_div::_GP('redirect_url');
124 $this->GPinterface = t3lib_div::_GP('interface');
125 $this->u = t3lib_div::_GP('u'); // preset username
126 $this->p = t3lib_div::_GP('p'); // preset password
127 $this->L = t3lib_div::_GP('L'); // If "L" is "OUT", then any logged in used is logged out. If redirect_url is given, we redirect to it
128 $this->loginRefresh = t3lib_div::_GP('loginRefresh'); // Login
129 $this->commandLI = t3lib_div::_GP('commandLI'); // Value of "Login" button. If set, the login button was pressed.
130
131 // Getting login labels:
132 $this->L_vars = explode('|',$TYPO3_CONF_VARS['BE']['loginLabels']);
133
134 // Setting the redirect URL to "alt_main.php" if no alternative input is given:
135 $this->redirectToURL = $this->redirect_url ? $this->redirect_url : 'alt_main.php';
136
137 // Logout?
138 if ($this->L=='OUT' && is_object($BE_USER)) {
139 $BE_USER->logoff();
140 if ($this->redirect_url) header('Location: '.t3lib_div::locationHeaderUrl($this->redirect_url));
141 exit;
142 }
143 }
144
145 /**
146 * Main function - creating the login/logout form
147 *
148 * @return void
149 */
150 function main() {
151 global $TBE_TEMPLATE, $TYPO3_CONF_VARS, $BE_USER;
152
153 // Initialize template object:
154 $TBE_TEMPLATE->docType='xhtml_trans';
155
156 // Set JavaScript for creating a MD5 hash of the password:
157 $TBE_TEMPLATE->JScode.='
158 <script type="text/javascript" src="md5.js"></script>
159 '.$TBE_TEMPLATE->wrapScriptTags('
160 function doChallengeResponse() { //
161 password = document.loginform.p_field.value;
162 if (password) {
163 password = MD5(password); // this makes it superchallenged!!
164 str = document.loginform.username.value+":"+password+":"+document.loginform.challenge.value;
165 document.loginform.userident.value = MD5(str);
166 document.loginform.p_field.value = "";
167 return true;
168 }
169 }
170 ');
171
172
173 // Checking, if we should make a redirect.
174 // Might set JavaScript in the header to close window.
175 $this->checkRedirect();
176
177 // Initialize interface selectors:
178 $this->makeInterfaceSelectorBox();
179
180 // Replace an optional marker in the "Administration Login" label
181 $this->L_vars[6] = str_replace("###SITENAME###",$TYPO3_CONF_VARS['SYS']['sitename'],$this->L_vars[6]);
182
183 // Creating form based on whether there is a login or not:
184 if (!$BE_USER->user['uid']) {
185 $TBE_TEMPLATE->form = '
186 <form action="index.php" method="post" name="loginform" onsubmit="doChallengeResponse();">
187 <input type="hidden" name="login_status" value="login" />
188 ';
189 $loginForm = $this->makeLoginForm();
190 } else {
191 $TBE_TEMPLATE->form = '
192 <form action="index.php" method="post" name="loginform">
193 <input type="hidden" name="login_status" value="logout" />
194 ';
195 $loginForm = $this->makeLogoutForm();
196 }
197
198
199 // Starting page:
200 $this->content.=$TBE_TEMPLATE->startPage('TYPO3 Login: '.$TYPO3_CONF_VARS['SYS']['sitename']);
201
202 // Add login form:
203 $this->content.=$this->wrapLoginForm($loginForm);
204
205 // Ending form:
206 $this->content.= '
207 <input type="hidden" name="userident" value="" />
208 <input type="hidden" name="challenge" value="'.($challenge = md5(uniqid('').getmypid())).'" />
209 <input type="hidden" name="redirect_url" value="'.htmlspecialchars($this->redirectToURL).'" />
210 <input type="hidden" name="loginRefresh" value="'.htmlspecialchars($this->loginRefresh).'" />
211 '.$this->interfaceSelector_hidden.'
212 ';
213
214 // Save challenge value in session data (thanks to Bernhard Kraft for providing code):
215 session_start();
216 $_SESSION['login_challenge'] = $challenge;
217
218 // This moves focus to the right input field:
219 $this->content.=$TBE_TEMPLATE->wrapScriptTags('
220
221 // If the login screen is shown in the login_frameset window for re-login, then try to get the username of the current/former login from opening windows main frame:
222 if (parent.opener && parent.opener.TS && parent.opener.TS.username && document.loginform && document.loginform.username) {
223 document.loginform.username.value = parent.opener.TS.username;
224 }
225
226 // If for some reason there already is a username in the username for field, move focus to the password field:
227 if (document.loginform.username && document.loginform.username.value == "") {
228 document.loginform.username.focus();
229 } else if (document.loginform.p_field && document.loginform.p_field.type!="hidden") {
230 document.loginform.p_field.focus();
231 }
232 ');
233
234 // End page:
235 $this->content.=$TBE_TEMPLATE->endPage();
236 }
237
238 /**
239 * Outputting the accumulated content to screen
240 *
241 * @return void
242 */
243 function printContent() {
244
245 echo $this->content;
246 }
247
248
249
250
251
252
253
254
255 /*****************************
256 *
257 * Various functions
258 *
259 ******************************/
260
261 /**
262 * Creates the login form
263 * This is drawn when NO login exists.
264 *
265 * @return string HTML output
266 */
267 function makeLoginForm() {
268
269 $content.='
270
271 <!--
272 Login form:
273 -->
274 <table cellspacing="0" cellpadding="0" border="0" id="logintable">
275 <tr>
276 <td colspan="2"><h2>'.htmlspecialchars($this->L_vars[6]).'</h2></td>
277 </tr>'.($this->commandLI ? '
278 <tr class="c-wrong">
279 <td colspan="2"><p class="c-wrong">'.htmlspecialchars($this->L_vars[9]).'</p></td>
280 </tr>' : '').'
281 <tr class="c-username">
282 <td><p class="c-username">'.htmlspecialchars($this->L_vars[0]).':</p></td>
283 <td><input type="text" name="username" value="'.htmlspecialchars($this->u).'" class="c-username" /></td>
284 </tr>
285 <tr class="c-password">
286 <td><p class="c-password">'.htmlspecialchars($this->L_vars[1]).':</p></td>
287 <td><input type="password" name="p_field" value="'.htmlspecialchars($this->p).'" class="c-password" /></td>
288 </tr>'.($this->interfaceSelector && !$this->loginRefresh ? '
289 <tr class="c-interfaceselector">
290 <td><p class="c-interfaceselector">'.htmlspecialchars($this->L_vars[2]).':</p></td>
291 <td>'.$this->interfaceSelector.'</td>
292 </tr>' : '' ).'
293 <tr class="c-submit">
294 <td></td>
295 <td><input type="submit" name="commandLI" value="'.htmlspecialchars($this->L_vars[3]).'" class="c-submit" /></td>
296 </tr>
297 <tr class="c-info">
298 <td colspan="2"><p class="c-info">'.htmlspecialchars($this->L_vars[7]).'</p></td>
299 </tr>
300 </table>';
301
302 // Return content:
303 return $content;
304 }
305
306 /**
307 * Creates the logout form
308 * This is drawn if a user login already exists.
309 *
310 * @return string HTML output
311 */
312 function makeLogoutForm() {
313 global $BE_USER;
314
315
316 $content.='
317
318 <!--
319 Login form:
320 -->
321 <table cellspacing="0" cellpadding="0" border="0" id="logintable">
322 <tr>
323 <td></td>
324 <td><h2>'.htmlspecialchars($this->L_vars[6]).'</h2></td>
325 </tr>
326 <tr class="c-username">
327 <td><p class="c-username">'.htmlspecialchars($this->L_vars[0]).':</p></td>
328 <td><p class="c-username-current">'.htmlspecialchars($BE_USER->user['username']).'</p></td>
329 </tr>'.($this->interfaceSelector_jump ? '
330 <tr class="c-interfaceselector">
331 <td><p class="c-interfaceselector">'.htmlspecialchars($this->L_vars[2]).':</p></td>
332 <td>'.$this->interfaceSelector_jump.'</td>
333 </tr>' : '' ).'
334 <tr class="c-submit">
335 <td><input type="hidden" name="p_field" value="" /></td>
336 <td><input type="submit" name="commandLO" value="'.htmlspecialchars($this->L_vars[4]).'" class="c-submit" /></td>
337 </tr>
338 <tr class="c-info">
339 <td></td>
340 <td><p class="c-info">'.htmlspecialchars($this->L_vars[7]).'</p></td>
341 </tr>
342 </table>';
343
344 // Return content:
345 return $content;
346 }
347
348 /**
349 * Wrapping the login form table in another set of tables etc:
350 *
351 * @param string HTML content for the login form
352 * @return string The HTML for the page.
353 */
354 function wrapLoginForm($content) {
355
356 // Logo:
357 $logo = $GLOBALS['TBE_STYLES']['logo_login'] ?
358 '<img src="'.htmlspecialchars($GLOBALS['BACK_PATH'].$GLOBALS['TBE_STYLES']['logo_login']).'" alt="" />' :
359 '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/typo3logo.gif','width="333" height="43"').' alt="" />';
360
361 // Login box image:
362 $loginboxImage = $this->makeLoginBoxImage();
363
364 // Compile the page content:
365 $content='
366
367 <!--
368 Wrapper table for the login form:
369 -->
370 <table cellspacing="0" cellpadding="0" border="0" id="wrapper">
371 <tr>
372 <td class="c-wrappercell" align="center">
373
374 <!--
375 Login form image:
376 -->
377 <div id="loginimage">
378 '.$logo.'
379 </div>
380
381 <!--
382 Login form wrapper:
383 -->
384 <table cellspacing="0" cellpadding="0" border="0" id="loginwrapper">
385 <tr>
386 <td>'.$loginboxImage.'</td>
387 <td>
388 '.$content.'
389 </td>
390 </tr>
391 </table>
392
393 <!--
394 Copy right notice:
395 -->
396 <div id="copyrightnotice">
397 '.$this->makeCopyrightNotice().'
398 </div>
399
400 '.$this->makeLoginNews().'
401 </td>
402 </tr>
403 </table>';
404
405 // Return content:
406 return $content;
407 }
408
409 /**
410 * Checking, if we should perform some sort of redirection OR closing of windows.
411 *
412 * @return void
413 */
414 function checkRedirect() {
415 global $BE_USER,$TBE_TEMPLATE;
416
417 // Do redirect:
418 // If a user is logged in AND a) if either the login is just done (commandLI) or b) a loginRefresh is done or c) the interface-selector is NOT enabled (If it is on the other hand, it should not just load an interface, because people has to choose then...)
419 if ($BE_USER->user['uid'] && ($this->commandLI || $this->loginRefresh || !$this->interfaceSelector)) {
420
421 // If no cookie has been set previously we tell people that this is a problem. This assumes that a cookie-setting script (like this one) has been hit at least once prior to this instance.
422 if (!$_COOKIE[$BE_USER->name]) {
423 t3lib_BEfunc::typo3PrintError ('Login-error',"Yeah, that's a classic. No cookies, no TYPO3.<br /><br />Please accept cookies from TYPO3 - otherwise you'll not be able to use the system.",0);
424 exit;
425 }
426
427 // Based on specific setting of interface we set the redirect script:
428 switch ($this->GPinterface) {
429 case 'backend':
430 $this->redirectToURL = 'alt_main.php';
431 break;
432 case 'frontend':
433 $this->redirectToURL = '../';
434 break;
435 }
436
437 // If there is a redirect URL AND if loginRefresh is not set...
438 if (!$this->loginRefresh) {
439 header('Location: '.t3lib_div::locationHeaderUrl($this->redirectToURL));
440 exit;
441 } else {
442 $TBE_TEMPLATE->JScode.=$TBE_TEMPLATE->wrapScriptTags('
443 if (parent.opener && parent.opener.busy) {
444 parent.opener.busy.loginRefreshed();
445 parent.close();
446 }
447 ');
448 }
449 } elseif(!$BE_USER->user['uid'] && $this->commandLI) {
450 sleep(5);
451 }
452 }
453
454 /**
455 * Making interface selector:
456 *
457 * @return void
458 */
459 function makeInterfaceSelectorBox() {
460 global $TYPO3_CONF_VARS;
461
462 // Reset variables:
463 $this->interfaceSelector = '';
464 $this->interfaceSelector_hidden='';
465 $this->interfaceSelector_jump = '';
466 #debug($this->redirect_url);
467 // If interfaces are defined AND no input redirect URL in GET vars:
468 if ($TYPO3_CONF_VARS['BE']['interfaces'] && !$this->redirect_url) {
469 $parts = t3lib_div::trimExplode(',',$TYPO3_CONF_VARS['BE']['interfaces']);
470 if (count($parts)>1) { // Only if more than one interface is defined will we show the selector:
471
472 // Initialize:
473 $tempLabels=explode(',',$this->L_vars[5]);
474 $labels=array();
475 $labels['backend']=$tempLabels[0];
476 $labels['frontend']=$tempLabels[1];
477
478 $jumpScript=array();
479 $jumpScript['backend']='alt_main.php';
480 $jumpScript['frontend']='../';
481
482 // Traverse the interface keys:
483 foreach($parts as $valueStr) {
484 $this->interfaceSelector.='
485 <option value="'.htmlspecialchars($valueStr).'">'.htmlspecialchars($labels[$valueStr]).'</option>';
486 $this->interfaceSelector_jump.='
487 <option value="'.htmlspecialchars($jumpScript[$valueStr]).'">'.htmlspecialchars($labels[$valueStr]).'</option>';
488 }
489 $this->interfaceSelector='
490 <select name="interface" class="c-interfaceselector">'.$this->interfaceSelector.'
491 </select>';
492 $this->interfaceSelector_jump='
493 <select name="interface" class="c-interfaceselector" onchange="document.location=this.options[this.selectedIndex].value;">'.$this->interfaceSelector_jump.'
494 </select>';
495
496 } else { // If there is only ONE interface value set:
497
498 $this->interfaceSelector_hidden='<input type="hidden" name="interface" value="'.trim($TYPO3_CONF_VARS['BE']['interfaces']).'" />';
499 }
500 }
501 }
502
503 /**
504 * COPYRIGHT notice
505 *
506 * Warning:
507 * DO NOT prevent this notice from being shown in ANY WAY.
508 * According to the GPL license an interactive application must show such a notice on start-up ('If the program is interactive, make it output a short notice... ' - see GPL.txt)
509 * Therefore preventing this notice from being properly shown is a violation of the license, regardless of whether you remove it or use a stylesheet to obstruct the display.
510 *
511 * @return string Text/Image (HTML) for copyright notice.
512 */
513 function makeCopyrightNotice() {
514
515 // Get values from TYPO3_CONF_VARS:
516 $loginCopyrightWarrantyProvider = strip_tags(trim($GLOBALS['TYPO3_CONF_VARS']['SYS']['loginCopyrightWarrantyProvider']));
517 $loginCopyrightWarrantyURL = strip_tags(trim($GLOBALS['TYPO3_CONF_VARS']['SYS']['loginCopyrightWarrantyURL']));
518
519 // Make warranty note:
520 if (strlen($loginCopyrightWarrantyProvider)>=2 && strlen($loginCopyrightWarrantyURL)>=10) {
521 $warrantyNote='Warranty is supplied by '.htmlspecialchars($loginCopyrightWarrantyProvider).'; <a href="'.htmlspecialchars($loginCopyrightWarrantyURL).'" target="_blank">click for details.</a>';
522 } else {
523 $warrantyNote='TYPO3 comes with ABSOLUTELY NO WARRANTY; <a href="http://typo3.com/1316.0.html" target="_blank">click for details.</a>';
524 }
525
526 // Compile full copyright notice:
527 $copyrightNotice = '<a href="http://typo3.com/" target="_blank">'.
528 '<img src="gfx/loginlogo_transp.gif" width="75" height="19" alt="TYPO3 logo" align="left" />'.
529 'TYPO3 CMS'.($GLOBALS['TYPO3_CONF_VARS']['SYS']['loginCopyrightShowVersion']?' ver. '.htmlspecialchars($GLOBALS['TYPO_VERSION']):'').
530 '</a>. '.
531 'Copyright &copy; 1998-2005 Kasper Sk&#229;rh&#248;j. Extensions are copyright of their respective owners. '.
532 'Go to <a href="http://typo3.com/" target="_blank">http://typo3.com/</a> for details. '.
533 $warrantyNote.' '.
534 '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>. '.
535 'Obstructing the appearance of this notice is prohibited by law.';
536
537 // Return notice:
538 return $copyrightNotice;
539 }
540
541 /**
542 * Returns the login box image, whether the default or an image from the rotation folder.
543 *
544 * @return string HTML image tag.
545 */
546 function makeLoginBoxImage() {
547 $loginboxImage = '';
548 if ($GLOBALS['TBE_STYLES']['loginBoxImage_rotationFolder']) { // Look for rotation image folder:
549 $absPath = t3lib_div::resolveBackPath(PATH_typo3.$GLOBALS['TBE_STYLES']['loginBoxImage_rotationFolder']);
550
551 // Get rotation folder:
552 $dir = t3lib_div::getFileAbsFileName($absPath);
553 if ($dir && @is_dir($dir)) {
554
555 // Get files for rotation into array:
556 $files = t3lib_div::getFilesInDir($dir,'png,jpg,gif');
557
558 // Pick random file:
559 srand((float) microtime() * 10000000);
560 $randImg = array_rand($files, 1);
561
562 // Get size of random file:
563 $imgSize = @getimagesize($dir.$files[$randImg]);
564
565 // Create image tag:
566 if (is_array($imgSize)) {
567 $loginboxImage = '<img src="'.htmlspecialchars($GLOBALS['TBE_STYLES']['loginBoxImage_rotationFolder'].$files[$randImg]).'" '.$imgSize[3].' id="loginbox-image" alt="" />';
568 }
569 }
570 } else { // If no rotation folder configured, print default image:
571 $loginImage = 'loginbox_image_dev.png';
572 $imagecopy = $loginImage=='loginbox_image_dev.png' ? 'You are running the CVS version of TYPO3 '.$GLOBALS['TYPO_VERSION'] : 'Photo: &copy; 2004-2005 Kasper Sk&#229;rh&#248;j'; // Directly outputted in image attributes...
573 $loginboxImage = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/'.$loginImage,'width="200" height="133"').' id="loginbox-image" alt="'.$imagecopy.'" title="'.$imagecopy.'" />';
574 }
575
576 // Return image tag:
577 return $loginboxImage;
578 }
579
580 /**
581 * Make login news - renders the HTML content for a list of news shown under the login form. News data is added through $TYPO3_CONF_VARS
582 *
583 * @return string HTML content
584 * @credits Idea by Jan-Hendrik Heuing
585 */
586 function makeLoginNews() {
587
588 // Reset output variable:
589 $newsContent= '';
590
591 // Traverse news array IF there are records in it:
592 if (is_array($GLOBALS['TYPO3_CONF_VARS']['BE']['loginNews']) && count($GLOBALS['TYPO3_CONF_VARS']['BE']['loginNews'])) {
593 foreach($GLOBALS['TYPO3_CONF_VARS']['BE']['loginNews'] as $newsItem) {
594 $newsContent.='
595 <tr>
596 <td class="c-date">'.htmlspecialchars($newsItem['date']).'</td>
597 <td class="c-header">'.htmlspecialchars($newsItem['header']).'</td>
598 </tr>
599 <tr>
600 <td></td>
601 <td class="c-content">'.trim($newsItem['content']).'</td>
602 </tr>
603 <tr class="c-spacer">
604 <td colspan="2"></td>
605 </tr>
606 ';
607 }
608
609 // Wrap in a table:
610 $newsContent= '
611
612 <!--
613 Login screen news:
614 -->
615 <div id="loginNews">
616 <h2>'.htmlspecialchars($this->L_vars[8]).'</h2>
617 <table border="0" cellpadding="0" cellspacing="0">
618 '.$newsContent.'
619 </table>
620 </div>
621 ';
622 }
623
624 // Return content:
625 return $newsContent;
626 }
627 }
628
629 // Include extension?
630 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/index.php']) {
631 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/index.php']);
632 }
633
634
635
636
637
638
639
640
641
642
643 // Make instance:
644 $SOBE = t3lib_div::makeInstance('SC_index');
645 $SOBE->init();
646 $SOBE->main();
647 $SOBE->printContent();
648 ?>