[!!!][TASK] Move inclusion of ext_tables.php to bootstrap classes
[Packages/TYPO3.CMS.git] / typo3 / show_item.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2011 Kasper Skårhøj (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 * Shows information about a database or file item
29 *
30 * Revised for TYPO3 3.7 May/2004 by Kasper Skårhøj
31 *
32 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
33 */
34
35
36 $GLOBALS['BACK_PATH'] = '';
37 require_once('init.php');
38 require_once('template.php');
39
40 /**
41 * Extension of transfer data class
42 *
43 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
44 * @package TYPO3
45 * @subpackage core
46 */
47 class transferData extends t3lib_transferData {
48
49 var $formname = 'loadform';
50 var $loading = 1;
51
52 // Extra for show_item.php:
53 var $theRecord = Array();
54
55 /**
56 * Register item function.
57 *
58 * @param string $table Table name
59 * @param integer $id Record uid
60 * @param string $field Field name
61 * @param string $content Content string.
62 * @return void
63 */
64 function regItem($table, $id, $field, $content) {
65 t3lib_div::loadTCA($table);
66 $config = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
67 switch($config['type']) {
68 case 'input':
69 if (isset($config['checkbox']) && $content == $config['checkbox']) {
70 $content = '';
71 break;
72 }
73 if (t3lib_div::inList($config['eval'], 'date')) {
74 $content = Date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $content);
75 }
76 break;
77 case 'group':
78 break;
79 case 'select':
80 break;
81 }
82 $this->theRecord[$field]=$content;
83 }
84 }
85
86 /**
87 * Script Class for showing information about an item.
88 *
89 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
90 * @package TYPO3
91 * @subpackage core
92 */
93 class SC_show_item {
94
95 // GET vars:
96 // Record table (or filename)
97 var $table;
98 // Record uid (or '' when filename)
99 var $uid;
100
101 // Internal, static:
102 // Page select clause
103 var $perms_clause;
104 // If TRUE, access to element is granted
105 var $access;
106 // Which type of element: "file" or "db"
107 var $type;
108 // Document Template Object
109 var $doc;
110
111 // Internal, dynamic:
112 // Content Accumulation
113 var $content;
114 // For type "db": Set to page record of the parent page of the item set (if type="db")
115 var $pageinfo;
116 // For type "db": The database record row.
117 var $row;
118
119 /**
120 * The fileObject if present
121 *
122 * @var t3lib_file_AbstractFile
123 */
124 protected $fileObject;
125
126 /**
127 * The folder obejct if present
128 *
129 * @var t3lib_file_Folder
130 */
131 protected $folderObject;
132
133 /**
134 * Initialization of the class
135 * Will determine if table/uid GET vars are database record or a file and if the user has access to view information about the item.
136 *
137 * @return void
138 */
139 function init() {
140 // Setting input variables.
141 $this->table = t3lib_div::_GET('table');
142 $this->uid = t3lib_div::_GET('uid');
143
144 // Initialize:
145 $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
146 // Set to TRUE if there is access to the record / file.
147 $this->access = FALSE;
148 // Sets the type, "db" or "file". If blank, nothing can be shown.
149 $this->type = '';
150
151 // Checking if the $table value is really a table and if the user has access to it.
152 if (isset($GLOBALS['TCA'][$this->table])) {
153 t3lib_div::loadTCA($this->table);
154 $this->type = 'db';
155 $this->uid = intval($this->uid);
156
157 // Check permissions and uid value:
158 if ($this->uid && $GLOBALS['BE_USER']->check('tables_select', $this->table)) {
159 if ((string)$this->table == 'pages') {
160 $this->pageinfo = t3lib_BEfunc::readPageAccess($this->uid, $this->perms_clause);
161 $this->access = is_array($this->pageinfo) ? 1 : 0;
162 $this->row = $this->pageinfo;
163 } else {
164 $this->row = t3lib_BEfunc::getRecordWSOL($this->table, $this->uid);
165 if ($this->row) {
166 $this->pageinfo = t3lib_BEfunc::readPageAccess($this->row['pid'], $this->perms_clause);
167 $this->access = is_array($this->pageinfo) ? 1 : 0;
168 }
169 }
170
171 $treatData = t3lib_div::makeInstance('t3lib_transferData');
172 $treatData->renderRecord($this->table, $this->uid, 0, $this->row);
173 $cRow = $treatData->theRecord;
174 }
175 } elseif ($this->table == '_FILE' || $this->table == '_FOLDER' || $this->table == 'sys_file') {
176 $fileOrFolderObject = t3lib_file_Factory::getInstance()->retrieveFileOrFolderObject($this->uid);
177
178 if ($fileOrFolderObject instanceof t3lib_file_Folder) {
179 $this->folderObject = $fileOrFolderObject;
180 $this->access = $this->folderObject->checkActionPermission('read');
181 $this->type = 'folder';
182 } else {
183 $this->fileObject = $fileOrFolderObject;
184 $this->access = $this->fileObject->checkActionPermission('read');
185 $this->type = 'file';
186 $this->table = 'sys_file';
187 t3lib_div::loadTCA($this->table);
188 try {
189 $this->row = t3lib_BEfunc::getRecordWSOL($this->table, $this->fileObject->getUid());
190 } catch (Exception $e) {
191 $this->row = array();
192 }
193
194
195 }
196 }
197
198 // Initialize document template object:
199 $this->doc = t3lib_div::makeInstance('template');
200 $this->doc->backPath = $GLOBALS['BACK_PATH'];
201
202 // Starting the page by creating page header stuff:
203 $this->content .= $this->doc->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.viewItem'));
204 $this->content .= '<h3 class="t3-row-header">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.viewItem') . '</h3>';
205 $this->content .= $this->doc->spacer(5);
206 }
207
208 /**
209 * Main function. Will generate the information to display for the item set internally.
210 *
211 * @return void
212 */
213 function main() {
214
215 if ($this->access) {
216 $returnLink = t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'));
217 $returnLinkTag = $returnLink ? '<a href="' . $returnLink . '" class="typo3-goBack">' : '<a href="#" onclick="window.close();">';
218 // render type by user func
219 $typeRendered = FALSE;
220 if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/show_item.php']['typeRendering'])) {
221 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/show_item.php']['typeRendering'] as $classRef) {
222 $typeRenderObj = t3lib_div::getUserObj($classRef);
223 if (is_object($typeRenderObj) && method_exists($typeRenderObj, 'isValid') && method_exists($typeRenderObj, 'render')) {
224 if ($typeRenderObj->isValid($this->type, $this)) {
225 $this->content .= $typeRenderObj->render($this->type, $this);
226 $typeRendered = TRUE;
227 break;
228 }
229 }
230 }
231 }
232
233 // If type was not rendered use default rendering functions
234 if (!$typeRendered) {
235 // Branch out based on type:
236 switch ($this->type) {
237 case 'db':
238 $this->renderDBInfo();
239 break;
240 case 'file':
241 $this->renderFileInfo($returnLinkTag);
242 break;
243 case 'folder':
244 // @todo: implement a info about a folder
245 break;
246 }
247 }
248
249 // If return Url is set, output link to go back:
250 if (t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'))) {
251 $this->content = $this->doc->section('', $returnLinkTag.'<strong>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.goBack', 1).'</strong></a><br /><br />').$this->content;
252
253 $this->content .= $this->doc->section('', '<br />'.$returnLinkTag.'<strong>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.goBack', 1).'</strong></a>');
254 }
255 }
256 }
257
258 /**
259 * Main function. Will generate the information to display for the item set internally.
260 *
261 * @return void
262 */
263 function renderDBInfo() {
264
265 // Print header, path etc:
266 $code = $this->doc->getHeader($this->table, $this->row, $this->pageinfo['_thePath'], 1).'<br />';
267 $this->content.= $this->doc->section('', $code);
268
269 // Initialize variables:
270 $tableRows = array();
271 $i = 0;
272
273 // Traverse the list of fields to display for the record:
274 $fieldList = t3lib_div::trimExplode(',', $GLOBALS['TCA'][$this->table]['interface']['showRecordFieldList'], 1);
275 foreach ($fieldList as $name) {
276 $name = trim($name);
277 if ($GLOBALS['TCA'][$this->table]['columns'][$name]) {
278 if (!$GLOBALS['TCA'][$this->table]['columns'][$name]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields', $this->table . ':' . $name)) {
279 $i++;
280 $tableRows[] = '
281 <tr>
282 <td class="t3-col-header">' . $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel($this->table, $name), 1) . '</td>
283 <td>' . htmlspecialchars(t3lib_BEfunc::getProcessedValue($this->table, $name, $this->row[$name], 0, 0, FALSE, $this->row['uid'])) . '</td>
284 </tr>';
285 }
286 }
287 }
288
289 // Create table from the information:
290 $tableCode = '
291 <table border="0" cellpadding="0" cellspacing="0" id="typo3-showitem" class="t3-table-info">
292 '.implode('', $tableRows).'
293 </table>';
294 $this->content .= $this->doc->section('', $tableCode);
295
296 // Add path and table information in the bottom:
297 $code = '';
298 $code .= $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -48) . '<br />';
299 $code .= $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.table') . ': ' . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$this->table]['ctrl']['title']) . ' (' . $this->table . ') - UID: ' . $this->uid . '<br />';
300 $this->content .= $this->doc->section('', $code);
301
302 // References:
303 $this->content .= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesToThisItem'), $this->makeRef($this->table, $this->row['uid']));
304
305 // References:
306 $this->content .= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesFromThisItem'), $this->makeRefFrom($this->table, $this->row['uid']));
307 }
308
309 /**
310 * Main function. Will generate the information to display for the item set internally.
311 *
312 * @param string $returnLinkTag <a> tag closing/returning.
313 * @return void
314 */
315 function renderFileInfo($returnLinkTag) {
316 $fileExtension = $this->fileObject->getExtension();
317 // Setting header:
318 $code = '<div class="fileInfoContainer">'
319 . t3lib_iconWorks::getSpriteIconForFile($fileExtension) . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.file', TRUE) . ':</strong> ' . $this->fileObject->getName()
320 . '&nbsp;&nbsp;'
321 . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.filesize') . ':</strong> '
322 . t3lib_div::formatSize($this->fileObject->getSize())
323 . '</div>
324 ';
325 $this->content .= $this->doc->section('', $code);
326 $this->content .= $this->doc->divider(2);
327
328 // If the file was an image...
329 // @todo: add this check in the domain model in some kind of way, or in the processing folder
330 if (t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileExtension)) {
331 // @todo: find a way to make getimagesize part of the t3lib_file object
332 $imgInfo = @getimagesize($this->fileObject->getForLocalProcessing(FALSE));
333
334 $thumbUrl = $this->fileObject->process(
335 t3lib_file_ProcessedFile::CONTEXT_IMAGEPREVIEW,
336 array('width' => '150m', 'height' => '150m')
337 )->getPublicUrl(TRUE);
338 $code = '<div class="fileInfoContainer fileDimensions">'
339 . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.dimensions')
340 . ':</strong> ' . $imgInfo[0] . 'x' . $imgInfo[1] . ' '
341 . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.pixels') . '</div>';
342 $code .= '<br />
343 <div align="center">' . $returnLinkTag . '<img src="' . $thumbUrl . '" alt="' . htmlspecialchars(trim($this->fileObject->getName())) . '" title="' . htmlspecialchars(trim($this->fileObject->getName())) . '" /></a></div>';
344 $this->content .= $this->doc->section('', $code);
345 } elseif ($fileExtension == 'ttf') {
346 $thumbUrl = $this->fileObject->process(
347 t3lib_file_ProcessedFile::CONTEXT_IMAGEPREVIEW,
348 array('width' => '530m', 'height' => '600m')
349 )->getPublicUrl(TRUE);
350 $thumb = '<br />
351 <div align="center">' . $returnLinkTag . '<img src="' . $thumbUrl . '" border="0" title="' . htmlspecialchars(trim($this->fileObject->getName())) . '" alt="" /></a></div>';
352 $this->content .= $this->doc->section('', $thumb);
353 }
354
355 // Initialize variables:
356 $tableRows = array();
357 $i = 0;
358
359 // Traverse the list of fields to display for the record:
360 $fieldList = t3lib_div::trimExplode(',', $GLOBALS['TCA'][$this->table]['interface']['showRecordFieldList'], TRUE);
361 foreach ($fieldList as $name) {
362 $name = trim($name);
363 if ($GLOBALS['TCA'][$this->table]['columns'][$name]) {
364 if (!$GLOBALS['TCA'][$this->table]['columns'][$name]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields', $this->table . ':' . $name)) {
365 $i++;
366 $tableRows[] = '
367 <tr>
368 <td class="t3-col-header">' . $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel($this->table, $name), 1) . '</td>
369 <td>' . htmlspecialchars(t3lib_BEfunc::getProcessedValue($this->table, $name, $this->row[$name], 0, 0, FALSE, $this->row['uid'])) . '</td>
370 </tr>';
371 }
372 }
373 }
374
375 // Create table from the information:
376 $tableCode = '
377 <table border="0" cellpadding="0" cellspacing="0" id="typo3-showitem" class="t3-table-info">
378 ' . implode('', $tableRows) . '
379 </table>';
380 $this->content .= $this->doc->section('', $tableCode);
381
382
383 if ($this->fileObject->isIndexed()) {
384 // References:
385 $this->content .= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesToThisItem'), $this->makeRef('_FILE', $this->fileObject));
386 }
387 }
388
389 /**
390 * End page and print content
391 *
392 * @return void
393 */
394 function printContent() {
395 $this->content.= $this->doc->endPage();
396 $this->content = $this->doc->insertStylesAndJS($this->content);
397 echo $this->content;
398 }
399
400 /**
401 * Get table field name
402 *
403 * @param string $tableName Table name
404 * @param string $fieldName Field name
405 * @return string Field name
406 */
407 public function getFieldName($tableName, $fieldName) {
408 t3lib_div::loadTCA($tableName);
409 if ($GLOBALS['TCA'][$tableName]['columns'][$fieldName]['label'] !== NULL) {
410 $field = $GLOBALS['LANG']->sL($GLOBALS['TCA'][$tableName]['columns'][$fieldName]['label']);
411 if (trim($field) === '') {
412 $field = $fieldName;
413 }
414 } else {
415 $field = $fieldName;
416 }
417 return $field;
418 }
419
420 /**
421 * Make reference display
422 *
423 * @param string $table Table name
424 * @param string $ref Filename or uid
425 * @return string HTML
426 */
427 function makeRef($table, $ref) {
428
429 if ($table === '_FILE') {
430 // Look up the path:
431 $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
432 '*',
433 'sys_file_reference',
434 'uid_local=' . $ref->getUid()
435 );
436 } else {
437 // Look up the path:
438 $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
439 '*',
440 'sys_refindex',
441 'ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_refindex') . ' AND ref_uid=' . intval($ref) .
442 ' AND deleted=0'
443 );
444 }
445 // Compile information for title tag:
446 $infoData = array();
447 if (count($rows)) {
448 $infoData[] = '<tr class="t3-row-header">' .
449 '<td>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.table') . '</td>' .
450 '<td>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.title') . '</td>' .
451 '<td>[uid]</td>' .
452 '<td>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.field') . '</td>' .
453 '<td>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.flexpointer') . '</td>' .
454 '<td>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.softrefKey') . '</td>' .
455 '<td>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.sorting') . '</td>' .
456 '</tr>';
457 }
458 foreach ($rows as $row) {
459 if($table === '_FILE') {
460 $row = $this->mapFileReferenceOnRefIndex($row);
461 }
462 $record = t3lib_BEfunc::getRecord($row['tablename'], $row['recuid']);
463 $infoData[] = '<tr class="bgColor4">' .
464 '<td>' . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$row['tablename']]['ctrl']['title'], TRUE) . '</td>' .
465 '<td>' . t3lib_BEfunc::getRecordTitle($row['tablename'], $record, TRUE) . '</td>' .
466 '<td><span title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:page') . ': ' .
467 htmlspecialchars(t3lib_BEfunc::getRecordTitle('pages', t3lib_BEfunc::getRecord('pages', $record['pid']))) .
468 ' (uid=' . $record['pid'] . ')">' . $record['uid'] . '</span></td>' .
469 '<td>' . htmlspecialchars($this->getFieldName($row['tablename'], $row['field'])) . '</td>' .
470 '<td>' . htmlspecialchars($row['flexpointer']) . '</td>' .
471 '<td>' . htmlspecialchars($row['softref_key']) . '</td>' .
472 '<td>' . htmlspecialchars($row['sorting']) . '</td>' .
473 '</tr>';
474 }
475
476 return count($infoData)
477 ? '<table border="0" cellpadding="0" cellspacing="0" class="typo3-dblist">' . implode('', $infoData) . '</table>'
478 : '';
479 }
480
481 /**
482 * Maps results from the fal file reference table on the
483 * structure of the normal reference index table.
484 *
485 * @param array $fileReference
486 * @return array
487 */
488 protected function mapFileReferenceOnRefIndex(array $fileReference) {
489 return array(
490 'recuid' => $fileReference['uid_foreign'],
491 'tablename' => $fileReference['tablenames'],
492 'field' => $fileReference['fieldname'],
493 'flexpointer' => '',
494 'softref_key' => '',
495 'sorting' => $fileReference['sorting_foreign']
496 );
497 }
498
499 /**
500 * Make reference display (what this elements points to)
501 *
502 * @param string $table Table name
503 * @param string $ref Filename or uid
504 * @return string HTML
505 */
506 function makeRefFrom($table, $ref) {
507
508 // Look up the path:
509 $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
510 '*',
511 'sys_refindex',
512 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_refindex') .
513 ' AND recuid=' . intval($ref)
514 );
515
516 // Compile information for title tag:
517 $infoData = array();
518 if (count($rows)) {
519 $infoData[] = '<tr class="t3-row-header">' .
520 '<td>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.field') . '</td>' .
521 '<td>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.flexpointer') . '</td>' .
522 '<td>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.softrefKey') . '</td>' .
523 '<td>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.sorting') . '</td>' .
524 '<td>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.refTable') . '</td>' .
525 '<td>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.refUid') . '</td>' .
526 '<td>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.refString') . '</td>' .
527 '</tr>';
528 }
529 foreach ($rows as $row) {
530 $infoData[] = '<tr class="bgColor4">' .
531 '<td>' . htmlspecialchars($this->getFieldName($table, $row['field'])) . '</td>' .
532 '<td>' . htmlspecialchars($row['flexpointer']) . '</td>' .
533 '<td>' . htmlspecialchars($row['softref_key']) . '</td>' .
534 '<td>' . htmlspecialchars($row['sorting']) . '</td>' .
535 '<td>' . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$row['ref_table']]['ctrl']['title'], TRUE) . '</td>' .
536 '<td>' . htmlspecialchars($row['ref_uid']) . '</td>' .
537 '<td>' . htmlspecialchars($row['ref_string']) . '</td>' .
538 '</tr>';
539 }
540
541 return count($infoData)
542 ? '<table border="0" cellpadding="0" cellspacing="0" class="typo3-dblist">' . implode('', $infoData) . '</table>'
543 : '';
544 }
545 }
546
547 // Make instance:
548 $SOBE = t3lib_div::makeInstance('SC_show_item');
549 $SOBE->init();
550 $SOBE->main();
551 $SOBE->printContent();
552
553 ?>