2fe3ed1bbfe9f44de64f50682810035a37cd551a
[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 tr.t3-row-header { background-color: #A2AAB8; }
138 TABLE#ts-analyzer tr td {padding: 0 2px;}
139 TABLE#ts-analyzer tr.t3-row-header td { padding: 2px 4px; font-weight:bold; color: #fff; }
140 .tsob-menu label, .tsob-menu-row2 label, .tsob-conditions label {padding: 0 5px; vertical-align: text-top;}
141 .tsob-menu-row2 {margin-top: 10px;}
142 .tsob-conditions {padding: 1px 2px;}
143 .tsob-search-submit {margin-left: 3px; margin-right: 3px;}
144 .tst-analyzer-options { margin:5px 0; }
145 .tst-analyzer-options label {padding-left:5px; vertical-align:text-top; }
146 .bgColor0 {background-color:#fff; color: #000; }
147 ';
148
149
150 // Setting up the context sensitive menu:
151 $this->doc->getContextMenuCode();
152
153 // Build the modulle content
154 $this->content = $this->doc->header($GLOBALS['LANG']->getLL('moduleTitle'));
155 $this->extObjContent();
156 $this->content .= $this->doc->spacer(10);
157
158 // Setting up the buttons and markers for docheader
159 $docHeaderButtons = $this->getButtons();
160 // $markers['CSH'] = $docHeaderButtons['csh'];
161 $markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
162 $markers['CONTENT'] = $this->content;
163 } else {
164 // If no access or if ID == zero
165
166 $this->doc->inDocStylesArray[] = '
167 TABLE#ts-overview tr.t3-row-header { background-color: #A2AAB8; }
168 TABLE#ts-overview tr td {padding: 2px;}
169 TABLE#ts-overview tr.t3-row-header td { padding: 2px 4px; font-weight:bold; color: #fff; }
170 ';
171 // Template pages:
172 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
173 'pages.uid, count(*) AS count, max(sys_template.root) AS root_max_val, min(sys_template.root) AS root_min_val',
174 'pages,sys_template',
175 'pages.uid=sys_template.pid'.
176 t3lib_BEfunc::deleteClause('pages').
177 t3lib_BEfunc::versioningPlaceholderClause('pages').
178 t3lib_BEfunc::deleteClause('sys_template').
179 t3lib_BEfunc::versioningPlaceholderClause('sys_template'),
180 'pages.uid'
181 );
182 $templateArray = array();
183 $pArray = array();
184
185 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
186 $this->setInPageArray(
187 $pArray,
188 t3lib_BEfunc::BEgetRootLine($row['uid'], 'AND 1=1'),
189 $row
190 );
191 }
192
193 $lines = array();
194 $lines[] = '<tr class="t3-row-header">
195 <td nowrap>' . $GLOBALS['LANG']->getLL('pageName') . '</td>
196 <td nowrap>' . $GLOBALS['LANG']->getLL('templates') . '</td>
197 <td nowrap>' . $GLOBALS['LANG']->getLL('isRoot') . '</td>
198 <td nowrap>' . $GLOBALS['LANG']->getLL('isExt') . '</td>
199 </tr>';
200 $lines = array_merge($lines, $this->renderList($pArray));
201
202 $table = '<table border="0" cellpadding="0" cellspacing="1" id="ts-overview">' . implode('', $lines) . '</table>';
203 $this->content = $this->doc->section($GLOBALS['LANG']->getLL('moduleTitle'), '
204 <br />
205 ' . $GLOBALS['LANG']->getLL('overview') . '
206 <br /><br />' . $table);
207
208 // ********************************************
209 // RENDER LIST of pages with templates, END
210 // ********************************************
211
212 $this->content .= $this->doc->spacer(10);
213
214 // Setting up the buttons and markers for docheader
215 $docHeaderButtons = $this->getButtons();
216 // $markers['CSH'] = $docHeaderButtons['csh'];
217 $markers['CONTENT'] = $this->content;
218 }
219
220 // Build the <body> for the module
221 $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
222 // Renders the module page
223 $this->content = $this->doc->render(
224 'Template Tools',
225 $this->content
226 );
227 }
228
229 function printContent() {
230 echo $this->content;
231 }
232
233 /**
234 * Create the panel of buttons for submitting the form or otherwise perform operations.
235 *
236 * @return array all available buttons as an assoc. array
237 */
238 protected function getButtons() {
239
240 $buttons = array(
241 'back' => '',
242 'close' => '',
243 'new' => '',
244 'save' => '',
245 'save_close' => '',
246 'view' => '',
247 'record_list' => '',
248 'shortcut' => '',
249 );
250
251 if ($this->id && $this->access) {
252 // View page
253 $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) . '">' .
254 t3lib_iconWorks::getSpriteIcon('actions-document-view') .
255 '</a>';
256
257 // If access to Web>List for user, then link to that module.
258 $buttons['record_list'] = t3lib_BEfunc::getListViewLink(
259 array(
260 'id' => $this->pageinfo['uid'],
261 'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI'),
262 ),
263 $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList')
264 );
265
266 if ($this->extClassConf['name'] == 'tx_tstemplateinfo') {
267 // NEW button
268 $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) . '" />';
269
270 if (!empty($this->e) && !t3lib_div::_POST('abort') && !t3lib_div::_POST('saveclose')) {
271 // no NEW-button while edit
272 $buttons['new'] = '';
273
274 // SAVE button
275 $buttons['save'] = t3lib_iconWorks::getSpriteIcon('actions-document-save',
276 array(
277 'html' => '<input type="image" class="c-inputButton" name="submit" src="clear.gif" ' .
278 'title="'. $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', TRUE) .'" ' .
279 'value="'. $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', TRUE) .'" ' .
280 '/>'
281 ));
282
283 // SAVE AND CLOSE button
284 $buttons['save_close'] = t3lib_iconWorks::getSpriteIcon('actions-document-save-close',
285 array(
286 'html' => '<input type="image" class="c-inputButton" name="saveclose" src="clear.gif" '.
287 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc', TRUE) . '" ' .
288 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc', TRUE) . '" ' .
289 '/>'
290 ));
291
292 // CLOSE button
293 $buttons['close'] = t3lib_iconWorks::getSpriteIcon('actions-document-close',
294 array(
295 'html' => '<input type="image" class="c-inputButton" name="abort" src="clear.gif" ' .
296 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', TRUE) . '" ' .
297 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', TRUE) . '" ' .
298 '/>'
299 ));
300
301 }
302 } elseif($this->extClassConf['name'] == 'tx_tstemplateceditor' && count($this->MOD_MENU['constant_editor_cat'])) {
303 // SAVE button
304 $buttons['save'] = t3lib_iconWorks::getSpriteIcon('actions-document-save',
305 array('html' => '<input type="image" class="c-inputButton" name="submit" src="clear.gif" '.
306 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', TRUE) . '" ' .
307 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', TRUE) . '" ' .
308 '/>'));
309 } elseif($this->extClassConf['name'] == 'tx_tstemplateobjbrowser') {
310 if(!empty($this->sObj)) {
311 // BACK
312 $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) . '">' .
313 t3lib_iconWorks::getSpriteIcon('actions-view-go-back') .
314 '</a>';
315 }
316 }
317
318 // Shortcut
319 if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
320 $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']);
321 }
322 } else {
323 // Shortcut
324 if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
325 $buttons['shortcut'] = $this->doc->makeShortcutIcon('id', '', $this->MCONF['name']);
326 }
327 }
328
329 return $buttons;
330 }
331
332 // ***************************
333 // OTHER FUNCTIONS:
334 // ***************************
335
336 function linkWrapTemplateTitle($title, $onlyKey = '') {
337 if ($onlyKey) {
338 $title = '<a href="index.php?id=' . htmlspecialchars($GLOBALS['SOBE']->id . '&e[' . $onlyKey . ']=1&SET[function]=tx_tstemplateinfo') . '">' . htmlspecialchars($title) . '</a>';
339 } else {
340 $title = '<a href="index.php?id=' . htmlspecialchars($GLOBALS['SOBE']->id . '&e[constants]=1&e[config]=1&SET[function]=tx_tstemplateinfo') . '">' . htmlspecialchars($title) . '</a>';
341 }
342 return $title;
343 }
344
345 function noTemplate($newStandardTemplate = 0) {
346
347 $tmpl = t3lib_div::makeInstance('t3lib_tsparser_ext'); // Defined global here!
348 /* @var $tmpl t3lib_tsparser_ext */
349 $tmpl->tt_track = FALSE; // Do not log time-performance information
350 $tmpl->init();
351
352 // No template
353 $theOutput .= $this->doc->spacer(10);
354
355 $flashMessage = t3lib_div::makeInstance(
356 't3lib_FlashMessage',
357 $GLOBALS['LANG']->getLL('noTemplateDescription') . '<br />' . $GLOBALS['LANG']->getLL('createTemplateToEditConfiguration'),
358 $GLOBALS['LANG']->getLL('noTemplate'),
359 t3lib_FlashMessage::INFO
360 );
361 $theOutput .= $flashMessage->render();
362
363
364 // New standard?
365 if ($newStandardTemplate) {
366 if (t3lib_extMgm::isLoaded('statictemplates')) { // check wether statictemplates are supported
367 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('title,uid', 'static_template', '', '', 'title');
368 $opt = '';
369 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
370 if (substr(trim($row['title']), 0, 8) == 'template') {
371 $opt .= '<option value="' . $row['uid'] . '">' . htmlspecialchars($row['title']) . '</option>';
372 }
373 }
374 $selector = '<select name="createStandard"><option></option>' . $opt . '</select><br />';
375 $staticsText = ', optionally based on one of the standard templates';
376 } else {
377 $selector = '<input type="hidden" name="createStandard" value="" />';
378 $staticsText = '';
379 }
380
381 // Extension?
382 $theOutput .= $this->doc->spacer(10);
383 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('newWebsite') . $staticsText, $GLOBALS['LANG']->getLL('newWebsiteDescription') . '<br /><br />' .
384 $selector .
385 '<input type="Submit" name="newWebsite" value="' . $GLOBALS['LANG']->getLL('newWebsiteAction') . '" />', 0, 1);
386 }
387 // Extension?
388 $theOutput .= $this->doc->spacer(10);
389 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('extTemplate'), $GLOBALS['LANG']->getLL('extTemplateDescription') . '<br /><br />' .
390 '<input type="submit" name="createExtension" value="' . $GLOBALS['LANG']->getLL('extTemplateAction') . '" />', 0, 1);
391
392 // Go to first appearing...
393 $first = $tmpl->ext_prevPageWithTemplate($this->id, $this->perms_clause);
394 if ($first) {
395 $theOutput .= $this->doc->spacer(10);
396 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('goToClosest'),
397 sprintf($GLOBALS['LANG']->getLL('goToClosestDescription') . '<br /><br />%s<strong>' . $GLOBALS['LANG']->getLL('goToClosestAction') . '</strong>%s', htmlspecialchars($first['title']), $first['uid'],
398 '<a href="index.php?id=' . $first['uid'] . '">', '</a>'), 0, 1);
399 }
400 return $theOutput;
401 }
402
403 function templateMenu() {
404 $tmpl = t3lib_div::makeInstance('t3lib_tsparser_ext'); // Defined global here!
405 /* @var $tmpl t3lib_tsparser_ext */
406 $tmpl->tt_track = FALSE; // Do not log time-performance information
407 $tmpl->init();
408 $all = $tmpl->ext_getAllTemplates($this->id, $this->perms_clause);
409 $menu = '';
410
411 if (count($all) > 1) {
412 $this->MOD_MENU['templatesOnPage'] = array();
413 foreach ($all as $d) {
414 $this->MOD_MENU['templatesOnPage'][$d['uid']] = $d['title'];
415 }
416 }
417
418 $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);
419 $menu = t3lib_BEfunc::getFuncMenu($this->id, 'SET[templatesOnPage]', $this->MOD_SETTINGS['templatesOnPage'], $this->MOD_MENU['templatesOnPage']);
420
421 return $menu;
422 }
423
424 function createTemplate($id, $actTemplateId = 0) {
425 if (t3lib_div::_GP('createExtension')) {
426 $tce = t3lib_div::makeInstance('t3lib_TCEmain');
427 /* @var $tce t3lib_TCEmain */
428 $tce->stripslashes_values = 0;
429 $recData = array();
430 $recData['sys_template']['NEW'] = array(
431 'pid' => $actTemplateId ? -1 * $actTemplateId : $id,
432 'title' => "+ext",
433 );
434
435 $tce->start($recData, array());
436 $tce->process_datamap();
437 return $tce->substNEWwithIDs['NEW'];
438 } elseif (t3lib_div::_GP('newWebsite')) {
439 $tce = t3lib_div::makeInstance('t3lib_TCEmain');
440 /* @var $tce t3lib_TCEmain */
441 $tce->stripslashes_values = 0;
442 $recData = array();
443
444 if (intval(t3lib_div::_GP('createStandard'))) {
445 $staticT = intval(t3lib_div::_GP('createStandard'));
446 $recData['sys_template']['NEW'] = array(
447 'pid' => $id,
448 'title' => $GLOBALS['LANG']->getLL('titleNewSiteStandard'),
449 'sorting' => 0,
450 'root' => 1,
451 'clear' => 3,
452 'include_static' => $staticT . ',57', // 57 is cSet
453 );
454 } else {
455 $recData['sys_template']['NEW'] = array(
456 'pid' => $id,
457 'title' => $GLOBALS['LANG']->getLL('titleNewSite'),
458 'sorting' => 0,
459 'root' => 1,
460 'clear' => 3,
461 'config' => '
462 # Default PAGE object:
463 page = PAGE
464 page.10 = TEXT
465 page.10.value = HELLO WORLD!
466 ',
467 );
468 }
469 $tce->start($recData, array());
470 $tce->process_datamap();
471 $tce->clear_cacheCmd('all');
472 }
473 }
474
475 // ********************************************
476 // RENDER LIST of pages with templates, BEGIN
477 // ********************************************
478 function setInPageArray(&$pArray, $rlArr, $row) {
479 ksort($rlArr);
480 reset($rlArr);
481 if (!$rlArr[0]['uid']) {
482 array_shift($rlArr);
483 }
484
485 $cEl = current($rlArr);
486 $pArray[$cEl['uid']] = htmlspecialchars($cEl['title']);
487 array_shift($rlArr);
488 if (count($rlArr)) {
489 if (!isset($pArray[$cEl['uid'] . '.'])) {
490 $pArray[$cEl['uid'] . '.'] = array();
491 }
492 $this->setInPageArray($pArray[$cEl['uid'] . '.'], $rlArr, $row);
493 } else {
494 $pArray[$cEl['uid'] . '_'] = $row;
495 }
496 }
497
498 function renderList($pArray, $lines = array(), $c = 0) {
499 if (is_array($pArray)) {
500 reset($pArray);
501 static $i;
502 foreach ($pArray as $k => $v) {
503 if (t3lib_utility_Math::canBeInterpretedAsInteger($k)) {
504 if (isset($pArray[$k . "_"])) {
505 $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
506 <td nowrap><img src="clear.gif" width="1" height="1" hspace=' . ($c * 10) . ' align="top">' .
507 '<a href="' . t3lib_div::linkThisScript(array('id' => $k)) . '">' .
508 t3lib_iconWorks::getSpriteIconForRecord('pages', t3lib_BEfunc::getRecordWSOL('pages', $k), array("title"=>'ID: ' . $k )) .
509 t3lib_div::fixed_lgd_cs($pArray[$k], 30) . '</a></td>
510 <td align="center">' . $pArray[$k . '_']['count'] . '</td>
511 <td align="center" class="bgColor5">' . ($pArray[$k . '_']['root_max_val'] > 0 ? t3lib_iconWorks::getSpriteIcon('status-status-checked') : "&nbsp;") .
512 '</td>
513 <td align="center">' . ($pArray[$k . '_']['root_min_val'] == 0 ? t3lib_iconWorks::getSpriteIcon('status-status-checked') : "&nbsp;") .
514 '</td>
515 </tr>';
516 } else {
517 $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
518 <td nowrap ><img src="clear.gif" width="1" height="1" hspace=' . ($c * 10) . ' align=top>' .
519 t3lib_iconWorks::getSpriteIconForRecord('pages', t3lib_BEfunc::getRecordWSOL('pages', $k)) .
520 t3lib_div::fixed_lgd_cs($pArray[$k], 30) . '</td>
521 <td align="center"></td>
522 <td align="center" class="bgColor5"></td>
523 <td align="center"></td>
524 </tr>';
525 }
526 $lines = $this->renderList($pArray[$k . '.'], $lines, $c + 1);
527 }
528 }
529 }
530 return $lines;
531 }
532 }
533
534
535 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/tstemplate/ts/index.php'])) {
536 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/tstemplate/ts/index.php']);
537 }
538
539
540
541 // Make instance:
542 $SOBE = t3lib_div::makeInstance('SC_mod_web_ts_index');
543 /* @var $SOBE SC_mod_web_ts_index */
544 $SOBE->init();
545
546 // Include files?
547 foreach($SOBE->include_once as $INC_FILE) {
548 include_once($INC_FILE);
549 }
550 $SOBE->checkExtObj(); // Checking for first level external objects
551
552 $SOBE->clearCache();
553 $SOBE->main();
554 $SOBE->printContent();
555
556 ?>