[BUGFIX] Unify table layouts
[Packages/TYPO3.CMS.git] / typo3 / sysext / tstemplate / ts / index.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 * Module: TypoScript Tools
29 *
30 *
31 * $TYPO3_CONF_VARS["MODS"]["web_ts"]["onlineResourceDir"] = Directory of default resources. Eg. "fileadmin/res/" or so.
32 *
33 *
34 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
35 */
36
37
38
39 unset($MCONF);
40 require('conf.php');
41 require($BACK_PATH . 'init.php');
42 require($BACK_PATH . 'template.php');
43 $GLOBALS['LANG']->includeLLFile('EXT:tstemplate/ts/locallang.xml');
44
45 $BE_USER->modAccess($MCONF, TRUE);
46
47
48 // ***************************
49 // Script Classes
50 // ***************************
51 class SC_mod_web_ts_index extends t3lib_SCbase {
52 var $perms_clause;
53 var $e;
54 var $sObj;
55 var $edit;
56 var $textExtensions = 'html,htm,txt,css,tmpl,inc,js';
57
58 var $modMenu_type = '';
59 var $modMenu_dontValidateList = '';
60 var $modMenu_setDefaultList = '';
61
62 function init() {
63
64 parent::init();
65
66 $this->id = intval(t3lib_div::_GP('id'));
67 $this->e = t3lib_div::_GP('e');
68 $this->sObj = t3lib_div::_GP('sObj');
69 $this->edit = t3lib_div::_GP('edit');
70
71 $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
72
73 if (t3lib_div::_GP('clear_all_cache')) {
74 $this->include_once[] = PATH_t3lib . 'class.t3lib_tcemain.php';
75 }
76 }
77
78 function clearCache() {
79 if (t3lib_div::_GP('clear_all_cache')) {
80 $tce = t3lib_div::makeInstance('t3lib_TCEmain');
81 /* @var $tce t3lib_TCEmain */
82 $tce->stripslashes_values = 0;
83 $tce->start(array(), array());
84 $tce->clear_cacheCmd('all');
85 }
86 }
87
88 function main() {
89
90 // Template markers
91 $markers = array(
92 'CSH' => '',
93 'FUNC_MENU' => '',
94 'CONTENT' => ''
95 );
96
97 // Access check...
98 // The page will show only if there is a valid page and if this page may be viewed by the user
99 $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
100 $this->access = is_array($this->pageinfo) ? 1 : 0;
101
102 $this->doc = t3lib_div::makeInstance('template');
103 $this->doc->backPath = $GLOBALS['BACK_PATH'];
104 $this->doc->setModuleTemplate('templates/tstemplate.html');
105
106 if ($this->id && $this->access) {
107 $this->doc->form = '<form action="index.php?id=' . $this->id . '" method="post" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '" name="editForm">';
108
109
110 // JavaScript
111 $this->doc->JScode = '
112 <script language="javascript" type="text/javascript">
113 script_ended = 0;
114 function jumpToUrl(URL) {
115 window.location.href = URL;
116 }
117 function uFormUrl(aname) {
118 document.forms[0].action = "index.php?id=' . $this->id . '#"+aname;
119 }
120 function brPoint(lnumber,t) {
121 window.location.href = "index.php?id=' . $this->id . '&SET[function]=tx_tstemplateobjbrowser&SET[ts_browser_type]="+(t?"setup":"const")+"&breakPointLN="+lnumber;
122 return false;
123 }
124 </script>
125 ';
126
127 $this->doc->postCode = '
128 <script language="javascript" type="text/javascript">
129 script_ended = 1;
130 if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . ';
131 </script>
132 ';
133
134 $this->doc->inDocStylesArray[] = '
135 TABLE#typo3-objectBrowser A { text-decoration: none; }
136 TABLE#typo3-objectBrowser .comment { color: maroon; font-weight: bold; }
137 TABLE#ts-analyzer { border: 1px solid #a2aab8; }
138 TABLE#ts-analyzer tr.t3-row-header { background-color: #A2AAB8; }
139 TABLE#ts-analyzer tr td {padding: 0 4px;}
140 TABLE#ts-analyzer tr.t3-row-header td { padding: 2px 4px; font-weight:bold; color: #fff; }
141 .tsob-menu label, .tsob-menu-row2 label, .tsob-conditions label {padding: 0 5px; vertical-align: text-top;}
142 .tsob-menu-row2 {margin-top: 10px;}
143 .tsob-conditions {padding: 1px 2px;}
144 .tsob-search-submit {margin-left: 3px; margin-right: 3px;}
145 .tst-analyzer-options { margin:5px 0; }
146 .tst-analyzer-options label {padding-left:5px; vertical-align:text-top; }
147 .bgColor0 {background-color:#fff; color: #000; }
148 ';
149
150
151 // Setting up the context sensitive menu:
152 $this->doc->getContextMenuCode();
153
154 // Build the modulle content
155 $this->content = $this->doc->header($GLOBALS['LANG']->getLL('moduleTitle'));
156 $this->extObjContent();
157 $this->content .= $this->doc->spacer(10);
158
159 // Setting up the buttons and markers for docheader
160 $docHeaderButtons = $this->getButtons();
161 // $markers['CSH'] = $docHeaderButtons['csh'];
162 $markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
163 $markers['CONTENT'] = $this->content;
164 } else {
165 // If no access or if ID == zero
166
167 $this->doc->inDocStylesArray[] = '
168 TABLE#ts-overview tr.t3-row-header { background-color: #A2AAB8; }
169 TABLE#ts-overview tr td {padding: 2px;}
170 TABLE#ts-overview tr.t3-row-header td { padding: 2px 4px; font-weight:bold; color: #fff; }
171 ';
172 // Template pages:
173 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
174 'pages.uid, count(*) AS count, max(sys_template.root) AS root_max_val, min(sys_template.root) AS root_min_val',
175 'pages,sys_template',
176 'pages.uid=sys_template.pid'.
177 t3lib_BEfunc::deleteClause('pages').
178 t3lib_BEfunc::versioningPlaceholderClause('pages').
179 t3lib_BEfunc::deleteClause('sys_template').
180 t3lib_BEfunc::versioningPlaceholderClause('sys_template'),
181 'pages.uid'
182 );
183 $templateArray = array();
184 $pArray = array();
185
186 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
187 $this->setInPageArray(
188 $pArray,
189 t3lib_BEfunc::BEgetRootLine($row['uid'], 'AND 1=1'),
190 $row
191 );
192 }
193
194 $lines = array();
195 $lines[] = '<tr class="t3-row-header">
196 <td nowrap>' . $GLOBALS['LANG']->getLL('pageName') . '</td>
197 <td nowrap>' . $GLOBALS['LANG']->getLL('templates') . '</td>
198 <td nowrap>' . $GLOBALS['LANG']->getLL('isRoot') . '</td>
199 <td nowrap>' . $GLOBALS['LANG']->getLL('isExt') . '</td>
200 </tr>';
201 $lines = array_merge($lines, $this->renderList($pArray));
202
203 $table = '<table border="0" cellpadding="0" cellspacing="1" id="ts-overview">' . implode('', $lines) . '</table>';
204 $this->content = $this->doc->section($GLOBALS['LANG']->getLL('moduleTitle'), '
205 <br />
206 ' . $GLOBALS['LANG']->getLL('overview') . '
207 <br /><br />' . $table);
208
209 // ********************************************
210 // RENDER LIST of pages with templates, END
211 // ********************************************
212
213 $this->content .= $this->doc->spacer(10);
214
215 // Setting up the buttons and markers for docheader
216 $docHeaderButtons = $this->getButtons();
217 // $markers['CSH'] = $docHeaderButtons['csh'];
218 $markers['CONTENT'] = $this->content;
219 }
220
221 // Build the <body> for the module
222 $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
223 // Renders the module page
224 $this->content = $this->doc->render(
225 'Template Tools',
226 $this->content
227 );
228 }
229
230 function printContent() {
231 echo $this->content;
232 }
233
234 /**
235 * Create the panel of buttons for submitting the form or otherwise perform operations.
236 *
237 * @return array all available buttons as an assoc. array
238 */
239 protected function getButtons() {
240
241 $buttons = array(
242 'back' => '',
243 'close' => '',
244 'new' => '',
245 'save' => '',
246 'save_close' => '',
247 'view' => '',
248 'record_list' => '',
249 'shortcut' => '',
250 );
251
252 if ($this->id && $this->access) {
253 // View page
254 $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', TRUE) . '">' .
255 t3lib_iconWorks::getSpriteIcon('actions-document-view') .
256 '</a>';
257
258 // If access to Web>List for user, then link to that module.
259 $buttons['record_list'] = t3lib_BEfunc::getListViewLink(
260 array(
261 'id' => $this->pageinfo['uid'],
262 'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI'),
263 ),
264 $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList')
265 );
266
267 if ($this->extClassConf['name'] == 'tx_tstemplateinfo') {
268 // NEW button
269 $buttons['new'] = '<input type="image" class="c-inputButton" name="createExtension" value="New"' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/new_el.gif', '') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:db_new.php.pagetitle', TRUE) . '" />';
270
271 if (!empty($this->e) && !t3lib_div::_POST('abort') && !t3lib_div::_POST('saveclose')) {
272 // no NEW-button while edit
273 $buttons['new'] = '';
274
275 // SAVE button
276 $buttons['save'] = t3lib_iconWorks::getSpriteIcon('actions-document-save',
277 array(
278 'html' => '<input type="image" class="c-inputButton" name="submit" src="clear.gif" ' .
279 'title="'. $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', TRUE) .'" ' .
280 'value="'. $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', TRUE) .'" ' .
281 '/>'
282 ));
283
284 // SAVE AND CLOSE button
285 $buttons['save_close'] = t3lib_iconWorks::getSpriteIcon('actions-document-save-close',
286 array(
287 'html' => '<input type="image" class="c-inputButton" name="saveclose" src="clear.gif" '.
288 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc', TRUE) . '" ' .
289 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc', TRUE) . '" ' .
290 '/>'
291 ));
292
293 // CLOSE button
294 $buttons['close'] = t3lib_iconWorks::getSpriteIcon('actions-document-close',
295 array(
296 'html' => '<input type="image" class="c-inputButton" name="abort" src="clear.gif" ' .
297 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', TRUE) . '" ' .
298 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', TRUE) . '" ' .
299 '/>'
300 ));
301
302 }
303 } elseif($this->extClassConf['name'] == 'tx_tstemplateceditor' && count($this->MOD_MENU['constant_editor_cat'])) {
304 // SAVE button
305 $buttons['save'] = t3lib_iconWorks::getSpriteIcon('actions-document-save',
306 array('html' => '<input type="image" class="c-inputButton" name="submit" src="clear.gif" '.
307 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', TRUE) . '" ' .
308 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', TRUE) . '" ' .
309 '/>'));
310 } elseif($this->extClassConf['name'] == 'tx_tstemplateobjbrowser') {
311 if(!empty($this->sObj)) {
312 // BACK
313 $buttons['back'] = '<a href="index.php?id=' . $this->id . '" class="typo3-goBack" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.goBack', TRUE) . '">' .
314 t3lib_iconWorks::getSpriteIcon('actions-view-go-back') .
315 '</a>';
316 }
317 }
318
319 // Shortcut
320 if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
321 $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
322 }
323 } else {
324 // Shortcut
325 if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
326 $buttons['shortcut'] = $this->doc->makeShortcutIcon('id', '', $this->MCONF['name']);
327 }
328 }
329
330 return $buttons;
331 }
332
333 // ***************************
334 // OTHER FUNCTIONS:
335 // ***************************
336
337 function linkWrapTemplateTitle($title, $onlyKey = '') {
338 if ($onlyKey) {
339 $title = '<a href="index.php?id=' . htmlspecialchars($GLOBALS['SOBE']->id . '&e[' . $onlyKey . ']=1&SET[function]=tx_tstemplateinfo') . '">' . htmlspecialchars($title) . '</a>';
340 } else {
341 $title = '<a href="index.php?id=' . htmlspecialchars($GLOBALS['SOBE']->id . '&e[constants]=1&e[config]=1&SET[function]=tx_tstemplateinfo') . '">' . htmlspecialchars($title) . '</a>';
342 }
343 return $title;
344 }
345
346 function noTemplate($newStandardTemplate = 0) {
347
348 $tmpl = t3lib_div::makeInstance('t3lib_tsparser_ext'); // Defined global here!
349 /* @var $tmpl t3lib_tsparser_ext */
350 $tmpl->tt_track = FALSE; // Do not log time-performance information
351 $tmpl->init();
352
353 // No template
354 $theOutput .= $this->doc->spacer(10);
355
356 $flashMessage = t3lib_div::makeInstance(
357 't3lib_FlashMessage',
358 $GLOBALS['LANG']->getLL('noTemplateDescription') . '<br />' . $GLOBALS['LANG']->getLL('createTemplateToEditConfiguration'),
359 $GLOBALS['LANG']->getLL('noTemplate'),
360 t3lib_FlashMessage::INFO
361 );
362 $theOutput .= $flashMessage->render();
363
364
365 // New standard?
366 if ($newStandardTemplate) {
367 if (t3lib_extMgm::isLoaded('statictemplates')) { // check wether statictemplates are supported
368 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('title,uid', 'static_template', '', '', 'title');
369 $opt = '';
370 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
371 if (substr(trim($row['title']), 0, 8) == 'template') {
372 $opt .= '<option value="' . $row['uid'] . '">' . htmlspecialchars($row['title']) . '</option>';
373 }
374 }
375 $selector = '<select name="createStandard"><option></option>' . $opt . '</select><br />';
376 $staticsText = ', optionally based on one of the standard templates';
377 } else {
378 $selector = '<input type="hidden" name="createStandard" value="" />';
379 $staticsText = '';
380 }
381
382 // Extension?
383 $theOutput .= $this->doc->spacer(10);
384 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('newWebsite') . $staticsText, $GLOBALS['LANG']->getLL('newWebsiteDescription') . '<br /><br />' .
385 $selector .
386 '<input type="Submit" name="newWebsite" value="' . $GLOBALS['LANG']->getLL('newWebsiteAction') . '" />', 0, 1);
387 }
388 // Extension?
389 $theOutput .= $this->doc->spacer(10);
390 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('extTemplate'), $GLOBALS['LANG']->getLL('extTemplateDescription') . '<br /><br />' .
391 '<input type="submit" name="createExtension" value="' . $GLOBALS['LANG']->getLL('extTemplateAction') . '" />', 0, 1);
392
393 // Go to first appearing...
394 $first = $tmpl->ext_prevPageWithTemplate($this->id, $this->perms_clause);
395 if ($first) {
396 $theOutput .= $this->doc->spacer(10);
397 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('goToClosest'),
398 sprintf($GLOBALS['LANG']->getLL('goToClosestDescription') . '<br /><br />%s<strong>' . $GLOBALS['LANG']->getLL('goToClosestAction') . '</strong>%s', htmlspecialchars($first['title']), $first['uid'],
399 '<a href="index.php?id=' . $first['uid'] . '">', '</a>'), 0, 1);
400 }
401 return $theOutput;
402 }
403
404 function templateMenu() {
405 $tmpl = t3lib_div::makeInstance('t3lib_tsparser_ext'); // Defined global here!
406 /* @var $tmpl t3lib_tsparser_ext */
407 $tmpl->tt_track = FALSE; // Do not log time-performance information
408 $tmpl->init();
409 $all = $tmpl->ext_getAllTemplates($this->id, $this->perms_clause);
410 $menu = '';
411
412 if (count($all) > 1) {
413 $this->MOD_MENU['templatesOnPage'] = array();
414 foreach ($all as $d) {
415 $this->MOD_MENU['templatesOnPage'][$d['uid']] = $d['title'];
416 }
417 }
418
419 $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
420 $menu = t3lib_BEfunc::getFuncMenu($this->id, 'SET[templatesOnPage]', $this->MOD_SETTINGS['templatesOnPage'], $this->MOD_MENU['templatesOnPage']);
421
422 return $menu;
423 }
424
425 function createTemplate($id, $actTemplateId = 0) {
426 if (t3lib_div::_GP('createExtension')) {
427 $tce = t3lib_div::makeInstance('t3lib_TCEmain');
428 /* @var $tce t3lib_TCEmain */
429 $tce->stripslashes_values = 0;
430 $recData = array();
431 $recData['sys_template']['NEW'] = array(
432 'pid' => $actTemplateId ? -1 * $actTemplateId : $id,
433 'title' => "+ext",
434 );
435
436 $tce->start($recData, array());
437 $tce->process_datamap();
438 return $tce->substNEWwithIDs['NEW'];
439 } elseif (t3lib_div::_GP('newWebsite')) {
440 $tce = t3lib_div::makeInstance('t3lib_TCEmain');
441 /* @var $tce t3lib_TCEmain */
442 $tce->stripslashes_values = 0;
443 $recData = array();
444
445 if (intval(t3lib_div::_GP('createStandard'))) {
446 $staticT = intval(t3lib_div::_GP('createStandard'));
447 $recData['sys_template']['NEW'] = array(
448 'pid' => $id,
449 'title' => $GLOBALS['LANG']->getLL('titleNewSiteStandard'),
450 'sorting' => 0,
451 'root' => 1,
452 'clear' => 3,
453 'include_static' => $staticT . ',57', // 57 is cSet
454 );
455 } else {
456 $recData['sys_template']['NEW'] = array(
457 'pid' => $id,
458 'title' => $GLOBALS['LANG']->getLL('titleNewSite'),
459 'sorting' => 0,
460 'root' => 1,
461 'clear' => 3,
462 'config' => '
463 # Default PAGE object:
464 page = PAGE
465 page.10 = TEXT
466 page.10.value = HELLO WORLD!
467 ',
468 );
469 }
470 $tce->start($recData, array());
471 $tce->process_datamap();
472 $tce->clear_cacheCmd('all');
473 }
474 }
475
476 // ********************************************
477 // RENDER LIST of pages with templates, BEGIN
478 // ********************************************
479 function setInPageArray(&$pArray, $rlArr, $row) {
480 ksort($rlArr);
481 reset($rlArr);
482 if (!$rlArr[0]['uid']) {
483 array_shift($rlArr);
484 }
485
486 $cEl = current($rlArr);
487 $pArray[$cEl['uid']] = htmlspecialchars($cEl['title']);
488 array_shift($rlArr);
489 if (count($rlArr)) {
490 if (!isset($pArray[$cEl['uid'] . '.'])) {
491 $pArray[$cEl['uid'] . '.'] = array();
492 }
493 $this->setInPageArray($pArray[$cEl['uid'] . '.'], $rlArr, $row);
494 } else {
495 $pArray[$cEl['uid'] . '_'] = $row;
496 }
497 }
498
499 function renderList($pArray, $lines = array(), $c = 0) {
500 if (is_array($pArray)) {
501 reset($pArray);
502 static $i;
503 foreach ($pArray as $k => $v) {
504 if (t3lib_utility_Math::canBeInterpretedAsInteger($k)) {
505 if (isset($pArray[$k . "_"])) {
506 $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
507 <td nowrap><img src="clear.gif" width="1" height="1" hspace=' . ($c * 10) . ' align="top">' .
508 '<a href="' . t3lib_div::linkThisScript(array('id' => $k)) . '">' .
509 t3lib_iconWorks::getSpriteIconForRecord('pages', t3lib_BEfunc::getRecordWSOL('pages', $k), array("title"=>'ID: ' . $k )) .
510 t3lib_div::fixed_lgd_cs($pArray[$k], 30) . '</a></td>
511 <td align="center">' . $pArray[$k . '_']['count'] . '</td>
512 <td align="center" class="bgColor5">' . ($pArray[$k . '_']['root_max_val'] > 0 ? t3lib_iconWorks::getSpriteIcon('status-status-checked') : "&nbsp;") .
513 '</td>
514 <td align="center">' . ($pArray[$k . '_']['root_min_val'] == 0 ? t3lib_iconWorks::getSpriteIcon('status-status-checked') : "&nbsp;") .
515 '</td>
516 </tr>';
517 } else {
518 $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
519 <td nowrap ><img src="clear.gif" width="1" height="1" hspace=' . ($c * 10) . ' align=top>' .
520 t3lib_iconWorks::getSpriteIconForRecord('pages', t3lib_BEfunc::getRecordWSOL('pages', $k)) .
521 t3lib_div::fixed_lgd_cs($pArray[$k], 30) . '</td>
522 <td align="center"></td>
523 <td align="center" class="bgColor5"></td>
524 <td align="center"></td>
525 </tr>';
526 }
527 $lines = $this->renderList($pArray[$k . '.'], $lines, $c + 1);
528 }
529 }
530 }
531 return $lines;
532 }
533 }
534
535
536 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/tstemplate/ts/index.php'])) {
537 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/tstemplate/ts/index.php']);
538 }
539
540
541
542 // Make instance:
543 $SOBE = t3lib_div::makeInstance('SC_mod_web_ts_index');
544 /* @var $SOBE SC_mod_web_ts_index */
545 $SOBE->init();
546
547 // Include files?
548 foreach($SOBE->include_once as $INC_FILE) {
549 include_once($INC_FILE);
550 }
551 $SOBE->checkExtObj(); // Checking for first level external objects
552
553 $SOBE->clearCache();
554 $SOBE->main();
555 $SOBE->printContent();
556
557 ?>