*** empty log message ***
[Packages/TYPO3.CMS.git] / typo3 / view_help.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 * Document for viewing the online help texts, also known as TCA_DESCR.
29 * See Inside TYPO3 for details.
30 *
31 * $Id$
32 * Revised for TYPO3 3.7 5/2004 by Kasper Skaarhoj
33 * XHTML-trans compliant
34 *
35 * @author Kasper Skaarhoj <kasper@typo3.com>
36 */
37 /**
38 * [CLASS/FUNCTION INDEX of SCRIPT]
39 *
40 *
41 *
42 * 87: class SC_view_help
43 * 110: function init()
44 * 130: function main()
45 * 158: function printContent()
46 *
47 * SECTION: Rendering main modes
48 * 181: function render_TOC()
49 * 280: function render_TOC_el($table, $tocCat, &$outputSections, &$tocArray, &$CSHkeys)
50 * 311: function render_TOC_makeTocList($tocArray)
51 * 346: function render_Table($table)
52 * 391: function render_Single($table,$field)
53 *
54 * SECTION: Rendering CSH items
55 * 433: function make_seeAlso($value,$anchorTable='')
56 * 471: function printImage($image,$descr)
57 * 493: function headerLine($str,$type=0)
58 * 514: function prepareContent($str)
59 * 529: function printItem($table,$field,$anchors=0)
60 * 565: function getTableFieldNames($table,$field)
61 *
62 * TOTAL FUNCTIONS: 14
63 * (This index is automatically created/updated by the extension "extdeveval")
64 *
65 */
66
67 require('init.php');
68 require('template.php');
69 $LANG->includeLLFile('EXT:lang/locallang_view_help.xml');
70 require_once(PATH_t3lib.'class.t3lib_loadmodules.php');
71
72
73
74
75
76
77
78
79
80 /**
81 * Script Class for rendering the Context Sensitive Help documents, either the single display in the small pop-up window or the full-table view in the larger window.
82 *
83 * @author Kasper Skaarhoj <kasper@typo3.com>
84 * @package TYPO3
85 * @subpackage core
86 */
87 class SC_view_help {
88 var $allowedHTML = '<strong><em><b><i>';
89
90 // For these vars, see init()
91 var $limitAccess; // If set access to fields and tables is checked. Should be done for true database tables.
92 var $table; // The "table" key
93 var $field; // The "field" key
94
95 // Internal, static: GPvar:
96 var $tfID; // Table/FIeld id.
97 var $back; // Back (previous tfID)
98 var $renderALL; // If set, then in TOC mode the FULL manual will be printed as well!
99
100 // Internal, dynamic:
101 var $content; // Content accumulation.
102
103
104
105 /**
106 * Initialize the class for various input etc.
107 *
108 * @return void
109 */
110 function init() {
111 global $LANG, $TCA;
112
113 // Setting GPvars:
114 $this->tfID = t3lib_div::_GP('tfID');
115 $this->back = t3lib_div::_GP('back');
116 $this->renderALL = t3lib_div::_GP('renderALL');
117
118 // Set internal table/field to the parts of "tfID" incoming var.
119 list($this->table,$this->field) = explode('.',$this->tfID);
120
121 // limitAccess is checked if the $this->table really IS a table.
122 $this->limitAccess = isset($TCA[$this->table]) ? TRUE : FALSE;
123 }
124
125 /**
126 * Main function, rendering the display
127 *
128 * @return void
129 */
130 function main() {
131 global $BE_USER,$LANG,$TCA_DESCR,$TCA,$TBE_TEMPLATE;
132
133 // Start HTML output accumulation:
134 $TBE_TEMPLATE->docType = 'xhtml_trans';
135 $TBE_TEMPLATE->divClass = 'typo3-view-help';
136 $this->content.= $TBE_TEMPLATE->startPage($LANG->getLL('title'));
137
138 if ($this->field=='*') { // If ALL fields is supposed to be shown:
139 $this->content.= $this->render_Table($this->table);
140 } elseif ($this->tfID) { // ... otherwise show only single field:
141 $this->content.= $this->render_Single($this->table,$this->field);
142 } else { // Render Table Of Contents if nothing else:
143 $this->content.= $this->render_TOC();
144 }
145
146 // Print close-button:
147 # $this->content.='<br /><form action=""><input type="submit" value="'.htmlspecialchars($LANG->getLL('close')).'" onclick="self.close(); return false;" /></form><br/>';
148
149 // End page:
150 $this->content.= '<br/>';
151 $this->content.= $TBE_TEMPLATE->endPage();
152 }
153
154 /**
155 * Outputting the accumulated content to screen
156 *
157 * @return void
158 */
159 function printContent() {
160 echo $this->content;
161 }
162
163
164
165
166
167
168
169
170
171 /************************************
172 *
173 * Rendering main modes
174 *
175 ************************************/
176
177 /**
178 * Creates Table Of Contents and possibly "Full Manual" mode if selected.
179 *
180 * @return string HTML content
181 */
182 function render_TOC() {
183 global $TCA_DESCR,$TCA,$LANG,$BE_USER,$TBE_MODULES;
184
185 // Initialize:
186 $CSHkeys = array_flip(array_keys($TCA_DESCR));
187 $TCAkeys = array_keys($TCA);
188
189 $outputSections = array();
190 $tocArray = array();
191
192
193 // TYPO3 Core Features:
194 $LANG->loadSingleTableDescription('xMOD_csh_corebe');
195 $this->render_TOC_el('xMOD_csh_corebe', 'core', $outputSections, $tocArray, $CSHkeys);
196
197 // Backend Modules:
198 $loadModules = t3lib_div::makeInstance('t3lib_loadModules');
199 $loadModules->load($TBE_MODULES);
200 foreach($loadModules->modules as $mainMod => $info) {
201 $cshKey = '_MOD_'.$mainMod;
202 if ($CSHkeys[$cshKey]) {
203 $LANG->loadSingleTableDescription($cshKey);
204 $this->render_TOC_el($cshKey, 'modules', $outputSections, $tocArray, $CSHkeys);
205 }
206
207 if (is_array($info['sub'])) {
208 foreach($info['sub'] as $subMod => $subInfo) {
209 $cshKey = '_MOD_'.$mainMod.'_'.$subMod;
210 if ($CSHkeys[$cshKey]) {
211 $LANG->loadSingleTableDescription($cshKey);
212 $this->render_TOC_el($cshKey, 'modules', $outputSections, $tocArray, $CSHkeys);
213 }
214 }
215 }
216 }
217
218 // Database Tables:
219 foreach($TCAkeys as $table) {
220 // Load descriptions for table $table
221 $LANG->loadSingleTableDescription($table);
222 if (is_array($TCA_DESCR[$table]['columns']) && $BE_USER->check('tables_select',$table)) {
223 $this->render_TOC_el($table, 'tables', $outputSections, $tocArray, $CSHkeys);
224 }
225 }
226
227 // Extensions
228 foreach($CSHkeys as $cshKey => $value) {
229 if (t3lib_div::isFirstPartOfStr($cshKey, 'xEXT_') && !isset($TCA[$cshKey])) {
230 $LANG->loadSingleTableDescription($cshKey);
231 $this->render_TOC_el($cshKey, 'extensions', $outputSections, $tocArray, $CSHkeys);
232 }
233 }
234
235 // Other:
236 foreach($CSHkeys as $cshKey => $value) {
237 if (!t3lib_div::isFirstPartOfStr($cshKey, '_MOD_') && !isset($TCA[$cshKey])) {
238 $LANG->loadSingleTableDescription($cshKey);
239 $this->render_TOC_el($cshKey, 'other', $outputSections, $tocArray, $CSHkeys);
240 }
241 }
242
243
244 // COMPILE output:
245 $output = '';
246 $output.= '
247
248 <h1>'.$LANG->getLL('manual_title',1).'</h1>
249 <p>'.t3lib_BEfunc::TYPO3_copyRightNotice().'</p>';
250
251 $output.= '
252
253 <h1>'.$LANG->getLL('introduction',1).'</h1>
254 <p>'.$LANG->getLL('description',1).'</p>';
255
256 $output.= '
257
258 <h1>'.$LANG->getLL('TOC',1).'</h1>'.
259 $this->render_TOC_makeTocList($tocArray);
260
261 if (!$this->renderALL) {
262 $output.= '
263 <br/>
264 <p class="c-nav"><a href="view_help.php?renderALL=1">'.$LANG->getLL('full_manual',1).'</a></p>';
265 }
266
267 if ($this->renderALL) {
268 $output.= '
269
270 <h1>'.$LANG->getLL('full_manual_chapters',1).'</h1>'.
271 implode('
272
273
274 <!-- NEW SECTION: -->
275 ',$outputSections);
276 }
277
278 return $output;
279 }
280
281 /**
282 * Creates a TOC list element and renders corresponding HELP content if "renderALL" mode is set.
283 *
284 * @param string CSH key / Table name
285 * @param string TOC category keyword: "core", "modules", "tables", "other"
286 * @param array Array for accumulation of rendered HELP Content (in "renderALL" mode). Passed by reference!
287 * @param array TOC array; Here TOC index elements are created. Passed by reference!
288 * @param array CSH keys array. Every item rendered will be unset in this array so finally we can see what CSH keys are not processed yet. Passed by reference!
289 * @return void
290 */
291 function render_TOC_el($table, $tocCat, &$outputSections, &$tocArray, &$CSHkeys) {
292 global $LANG;
293
294 if ($this->renderALL) { // Render full manual right here!
295 $outputSections[$table] = $this->render_Table($table);
296
297 if ($outputSections[$table]) {
298 $outputSections[$table] = '
299
300 <!-- New CSHkey/Table: '.$table.' -->
301 <p class="c-nav"><a name="ANCHOR_'.$table.'" href="#">'.$LANG->getLL('to_top',1).'</a></p>
302 <h2>'.$this->getTableFieldLabel($table).'</h2>
303
304 '.$outputSections[$table];
305 $tocArray[$tocCat][$table] = '<a href="#ANCHOR_'.$table.'">'.$this->getTableFieldLabel($table).'</a>';
306 } else {
307 unset($outputSections[$table]);
308 }
309 } else { // Only TOC:
310 $tocArray[$tocCat][$table] = '<p><a href="view_help.php?tfID='.rawurlencode($table.'.*').'">'.$this->getTableFieldLabel($table).'</a></p>';
311 }
312
313 // Unset CSH key:
314 unset($CSHkeys[$table]);
315 }
316
317 /**
318 * Renders the TOC index as a HTML bullet list from TOC array
319 *
320 * @param array ToC Array.
321 * @return string HTML bullet list for index.
322 */
323 function render_TOC_makeTocList($tocArray) {
324 global $LANG;
325
326 // The Various manual sections:
327 $keys = explode(',', 'core,modules,tables,extensions,other');
328
329 // Create TOC bullet list:
330 $output = '';
331 foreach($keys as $tocKey) {
332 if (is_array($tocArray[$tocKey])) {
333 $output.='
334 <li>'.$LANG->getLL('TOC_'.$tocKey,1).'
335 <ul>
336 <li>'.implode('</li>
337 <li>',$tocArray[$tocKey]).'</li>
338 </ul>
339 </li>';
340 }
341 }
342
343 // Compile TOC:
344 $output = '
345
346 <!-- TOC: -->
347 <div class="c-toc">
348 <ul>
349 '.$output.'
350 </ul>
351 </div>';
352
353 return $output;
354 }
355
356 /**
357 * Render CSH for a full cshKey/table
358 *
359 * @param string CSH key / table name
360 * @return string HTML output
361 */
362 function render_Table($table) {
363 global $BE_USER,$TCA_DESCR,$TCA,$LANG;
364
365 $output = '';
366
367 // Load table TCA
368 t3lib_div::loadTCA($table);
369
370 // Load descriptions for table $table
371 $LANG->loadSingleTableDescription($table);
372
373 if (is_array($TCA_DESCR[$table]['columns']) && (!$this->limitAccess || $BE_USER->check('tables_select',$table))) {
374 // Initialize variables:
375 $parts = array();
376 $parts[0] = ''; // Reserved for header of table
377
378 // Traverse table columns as listed in TCA_DESCR
379 reset($TCA_DESCR[$table]['columns']);
380 while(list($field) = each($TCA_DESCR[$table]['columns'])) {
381
382 $fieldValue = isset($TCA[$table]) && strcmp($field,'') ? $TCA[$table]['columns'][$field] : array();
383
384 if (is_array($fieldValue) && (!$this->limitAccess || !$fieldValue['exclude'] || $BE_USER->check('non_exclude_fields',$table.':'.$field))) {
385 if (!$field) {
386 $parts[0] = $this->printItem($table,'',1); // Header
387 } else {
388 $parts[] = $this->printItem($table,$field,1); // Field
389 }
390 }
391 }
392
393 if (!strcmp($parts,'')) unset($parts[0]);
394 $output.= implode('<br />',$parts);
395 }
396
397 // TOC link:
398 if (!$this->renderALL) {
399 $tocLink = '<p class="c-nav"><a href="view_help.php">'.$LANG->getLL('goToToc',1).'</a></p>';
400
401 $output =
402 $tocLink.'
403 <br/>'.
404 $output.'
405 <br />'.
406 $tocLink;
407 }
408
409 return $output;
410 }
411
412 /**
413 * Renders CSH for a single field.
414 *
415 * @param string CSH key / table name
416 * @param string Sub key / field name
417 * @return string HTML output
418 */
419 function render_Single($table,$field) {
420 global $LANG, $TCA;
421
422 $output = '';
423
424 // Load descriptions for table $table
425 $LANG->loadSingleTableDescription($table);
426
427 // Render single item:
428 $output.= $this->printItem($table,$field);
429
430 // Link to Full table description and TOC:
431 $getLLKey = $this->limitAccess ? 'fullDescription' : 'fullDescription_module';
432 $output.= '<br />
433 <p class="c-nav"><a href="view_help.php?tfID='.rawurlencode($table.'.*').'">'.$LANG->getLL($getLLKey,1).'</a></p>
434 <p class="c-nav"><a href="view_help.php">'.$LANG->getLL('goToToc',1).'</a></p>';
435
436 return $output;
437 }
438
439
440
441
442
443
444
445
446
447
448
449 /************************************
450 *
451 * Rendering CSH items
452 *
453 ************************************/
454
455 /**
456 * Make seeAlso links from $value
457 *
458 * @param string See-also input codes
459 * @param string If $anchorTable is set to a tablename, then references to this table will be made as anchors, not URLs.
460 * @return string See-also links HTML
461 */
462 function make_seeAlso($value,$anchorTable='') {
463 global $TCA,$BE_USER,$TCA_DESCR;
464
465 // Split references by comma, vert.line or linebreak
466 $items = split(',|'.chr(10),$value);
467 $lines = array();
468
469 foreach($items as $val) {
470 $val = trim($val);
471 if ($val) {
472 $iP = explode(':',$val);
473 $iPUrl = t3lib_div::trimExplode('|',$val);
474 // URL reference:
475 if (substr($iPUrl[1],0,4)=='http') {
476 $lines[] = '<a href="'.htmlspecialchars($iPUrl[1]).'" target="_blank"><em>'.htmlspecialchars($iPUrl[0]).'</em></a>';
477 } elseif (substr($iPUrl[1],0,5)=='FILE:') {
478 $fileName = t3lib_div::getFileAbsFileName(substr($iPUrl[1],5),1,1);
479 if ($fileName && @is_file($fileName)) {
480 $fileName = '../'.substr($fileName,strlen(PATH_site));
481 $lines[] = '<a href="'.htmlspecialchars($fileName).'" target="_blank"><em>'.htmlspecialchars($iPUrl[0]).'</em></a>';
482 }
483 } else {
484 // "table" reference
485 t3lib_div::loadTCA($iP[0]);
486
487 if (!isset($TCA[$iP[0]]) || ((!$iP[1] || is_array($TCA[$iP[0]]['columns'][$iP[1]])) && (!$this->limitAccess || ($BE_USER->check('tables_select',$iP[0]) && (!$iP[1] || !$TCA[$iP[0]]['columns'][$iP[1]]['exclude'] || $BE_USER->check('non_exclude_fields',$iP[0].':'.$iP[1])))))) { // Checking read access:
488
489 // Load table descriptions:
490 #$LANG->loadSingleTableDescription($iP[0]);
491 if (isset($TCA_DESCR[$iP[0]])) {
492 // Make see-also link:
493 $href = ($this->renderALL || ($anchorTable && $iP[0]==$anchorTable) ? '#'.implode('.',$iP) : 'view_help.php?tfID='.rawurlencode(implode('.',$iP)).'&back='.$this->tfID);
494 $label = $this->getTableFieldLabel($iP[0],$iP[1],' / ');
495 $lines[] = '<a href="'.htmlspecialchars($href).'">'.htmlspecialchars($label).'</a>';
496 }
497 }
498 }
499 }
500 }
501 return implode('<br />',$lines);
502 }
503
504 /**
505 * Will return an image tag with description in italics.
506 *
507 * @param string Image file reference (list of)
508 * @param string Description string (divided for each image by line break)
509 * @return string Image HTML codes
510 */
511 function printImage($images,$descr) {
512 $code = '';
513 // Splitting:
514 $imgArray = t3lib_div::trimExplode(',', $images, 1);
515 if (count($imgArray)) {
516 $descrArray = explode(chr(10),$descr,count($imgArray));
517 #debug($descrArray);
518 foreach($imgArray as $k => $image) {
519 $descr = $descrArray[$k];
520
521 $absImagePath = t3lib_div::getFileAbsFileName($image,1,1);
522 if ($absImagePath && @is_file($absImagePath)) {
523 $imgFile = substr($absImagePath,strlen(PATH_site));
524 $imgInfo = @getimagesize($absImagePath);
525 if (is_array($imgInfo)) {
526 $imgFile = '../'.$imgFile;
527 $code.= '<br /><img src="'.$imgFile.'" '.$imgInfo[3].' class="c-inlineimg" alt="" /><br />
528 ';
529 $code.= '<p><em>'.$GLOBALS['LANG']->hscAndCharConv($descr,0).'</em></p>
530 ';
531 } else $code.= '<div style="background-color: red; border: 1px solid black; color: white;">NOT AN IMAGE: '.$imgFile.'</div>';
532 } else $code.= '<div style="background-color: red; border: 1px solid black; color: white;">IMAGE FILE NOT FOUND: '.$image.'</div>';
533 }
534 }
535
536 return $code;
537 }
538
539 /**
540 * Returns header HTML content
541 *
542 * @param string Header text
543 * @param string Header type (1, 0)
544 * @return string The HTML for the header.
545 */
546 function headerLine($str,$type=0) {
547 switch($type) {
548 case 1:
549 $str='<h3>'.htmlspecialchars($str).'</h3>
550 ';
551 break;
552 case 0:
553 $str='<h4 class="uppercase">'.htmlspecialchars($str).'</h4>
554 ';
555 break;
556 }
557
558 return $str;
559 }
560
561 /**
562 * Returns prepared content
563 *
564 * @param string Content to format.
565 * @return string Formatted content.
566 */
567 function prepareContent($str) {
568 $str = $GLOBALS['LANG']->hscAndCharConv($str,0);
569 return '<p>'.nl2br(trim(strip_tags($str,$this->allowedHTML))).'</p>
570 ';
571 }
572
573 /**
574 * Prints a single $table/$field information piece
575 * If $anchors is set, then seeAlso references to the same table will be page-anchors, not links.
576 *
577 * @param string Table name
578 * @param string Field name
579 * @param boolean If anchors is to be shown.
580 * @return string HTML content
581 */
582 function printItem($table,$field,$anchors=0) {
583 global $TCA_DESCR, $LANG, $TCA, $BE_USER;
584
585 // Load full table definition in $TCA
586 t3lib_div::loadTCA($table);
587
588 if ($table && (!$field || is_array($TCA_DESCR[$table]['columns'][$field]))) {
589 // Make seeAlso references.
590 $seeAlsoRes = $this->make_seeAlso($TCA_DESCR[$table]['columns'][$field]['seeAlso'],$anchors?$table:'');
591
592 // Making item:
593 $out= '<a name="'.$table.'.'.$field.'"></a>
594 '.
595 $this->headerLine($this->getTableFieldLabel($table,$field),1).
596 $this->prepareContent($TCA_DESCR[$table]['columns'][$field]['description']).
597 ($TCA_DESCR[$table]['columns'][$field]['details'] ? $this->headerLine($LANG->getLL('details').':').$this->prepareContent($TCA_DESCR[$table]['columns'][$field]['details']) : '').
598 ($TCA_DESCR[$table]['columns'][$field]['syntax'] ? $this->headerLine($LANG->getLL('syntax').':').$this->prepareContent($TCA_DESCR[$table]['columns'][$field]['syntax']) : '').
599 ($TCA_DESCR[$table]['columns'][$field]['image'] ? $this->printImage($TCA_DESCR[$table]['columns'][$field]['image'],$TCA_DESCR[$table]['columns'][$field]['image_descr']) : '').
600 ($TCA_DESCR[$table]['columns'][$field]['seeAlso'] && $seeAlsoRes ? $this->headerLine($LANG->getLL('seeAlso').':').'<p>'.$seeAlsoRes.'</p>' : '').
601 ($this->back ? '<br /><p><a href="'.htmlspecialchars('view_help.php?tfID='.rawurlencode($this->back)).'" class="typo3-goBack">'.htmlspecialchars($LANG->getLL('goBack')).'</a></p>' : '').
602 '<br />';
603 }
604 return $out;
605 }
606
607 /**
608 * Returns labels for $table and $field.
609 * If $table is "_MOD_" prefixed, the part after "_MOD_" is returned (non-tables, fx. modules)
610 *
611 * @param string Table name
612 * @param string Field name
613 * @return array Table and field labels in a numeric array
614 */
615 function getTableFieldNames($table,$field) {
616 global $TCA, $TCA_DESCR, $LANG;
617
618 $LANG->loadSingleTableDescription($table);
619
620 $tableName = is_array($TCA_DESCR[$table]['columns']['']) && $TCA_DESCR[$table]['columns']['']['alttitle'] ?
621 $TCA_DESCR[$table]['columns']['']['alttitle'] :
622 (isset($TCA[$table]) ? $TCA[$table]['ctrl']['title'] : ereg_replace('^_MOD_','',$table));
623 $fieldName = is_array($TCA_DESCR[$table]['columns'][$field]) && $TCA_DESCR[$table]['columns'][$field]['alttitle'] ?
624 $TCA_DESCR[$table]['columns'][$field]['alttitle'] :
625 (isset($TCA[$table])&&isset($TCA[$table]['columns'][$field]) ? $TCA[$table]['columns'][$field]['label'] : $field);
626 return array($tableName,$fieldName);
627 }
628
629 /**
630 * Returns composite label for table/field
631 *
632 * @param string Table name
633 * @param string Field name
634 * @param string Token to merge the two strings with.
635 * @return array Table and field labels in a numeric array
636 * @see getTableFieldNames()
637 */
638 function getTableFieldLabel($table,$field='',$mergeToken=': ') {
639 global $LANG;
640
641 // Get table / field parts:
642 list($tableName,$fieldName) = $this->getTableFieldNames($table,$field);
643
644 // Create label:
645 $labelStr = $LANG->sL($tableName).
646 ($field ? $mergeToken.ereg_replace(':$','', trim($LANG->sL($fieldName))):'');
647
648 return $labelStr;
649 }
650 }
651
652
653 // Include extension?
654 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/view_help.php']) {
655 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/view_help.php']);
656 }
657
658
659
660
661
662
663 // Make instance:
664 $SOBE = t3lib_div::makeInstance('SC_view_help');
665 $SOBE->init();
666 $SOBE->main();
667 $SOBE->printContent();
668 ?>