Fixed bug #15580: Add calls to logDeprecatedFunction() for more deprecated functions...
[Packages/TYPO3.CMS.git] / typo3 / sysext / tstemplate / ts / index.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2010 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->startPage('Template Tools');
222 $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
223 $this->content .= $this->doc->endPage();
224 $this->content = $this->doc->insertStylesAndJS($this->content);
225 }
226
227 function printContent() {
228 echo $this->content;
229 }
230
231 /**
232 * Create the panel of buttons for submitting the form or otherwise perform operations.
233 *
234 * @return array all available buttons as an assoc. array
235 */
236 protected function getButtons() {
237
238 $buttons = array(
239 'back' => '',
240 'close' => '',
241 'new' => '',
242 'save' => '',
243 'save_close' => '',
244 'view' => '',
245 'record_list' => '',
246 'shortcut' => '',
247 );
248
249 if ($this->id && $this->access) {
250 // View page
251 $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) . '">' .
252 t3lib_iconWorks::getSpriteIcon('actions-document-view') .
253 '</a>';
254
255 // If access to Web>List for user, then link to that module.
256 $buttons['record_list'] = t3lib_extMgm::createListViewLink(
257 $this->pageinfo['uid'],
258 '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')),
259 $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', TRUE)
260 );
261
262 if ($this->extClassConf['name'] == 'tx_tstemplateinfo') {
263 // NEW button
264 $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) . '" />';
265
266 if (!empty($this->e) && !t3lib_div::_POST('abort') && !t3lib_div::_POST('saveclose')) {
267 // no NEW-button while edit
268 $buttons['new'] = '';
269
270 // SAVE button
271 $buttons['save'] = t3lib_iconWorks::getSpriteIcon('actions-document-save',
272 array(
273 'html' => '<input type="image" class="c-inputButton" name="submit" src="clear.gif" ' .
274 'title="'. $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', TRUE) .'" ' .
275 'value="'. $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', TRUE) .'" ' .
276 '/>'
277 ));
278
279 // SAVE AND CLOSE button
280 $buttons['save_close'] = t3lib_iconWorks::getSpriteIcon('actions-document-save-close',
281 array(
282 'html' => '<input type="image" class="c-inputButton" name="saveclose" src="clear.gif" '.
283 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc', TRUE) . '" ' .
284 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc', TRUE) . '" ' .
285 '/>'
286 ));
287
288 // CLOSE button
289 $buttons['close'] = t3lib_iconWorks::getSpriteIcon('actions-document-close',
290 array(
291 'html' => '<input type="image" class="c-inputButton" name="abort" src="clear.gif" ' .
292 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', TRUE) . '" ' .
293 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', TRUE) . '" ' .
294 '/>'
295 ));
296
297 }
298 } elseif($this->extClassConf['name'] == 'tx_tstemplateceditor' && count($this->MOD_MENU['constant_editor_cat'])) {
299 // SAVE button
300 $buttons['save'] = t3lib_iconWorks::getSpriteIcon('actions-document-save',
301 array('html' => '<input type="image" class="c-inputButton" name="submit" src="clear.gif" '.
302 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', TRUE) . '" ' .
303 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', TRUE) . '" ' .
304 '/>'));
305 } elseif($this->extClassConf['name'] == 'tx_tstemplateobjbrowser') {
306 if(!empty($this->sObj)) {
307 // BACK
308 $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) . '">' .
309 t3lib_iconWorks::getSpriteIcon('actions-view-go-back') .
310 '</a>';
311 }
312 }
313
314 // Shortcut
315 if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
316 $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']);
317 }
318 } else {
319 // Shortcut
320 if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
321 $buttons['shortcut'] = $this->doc->makeShortcutIcon('id', '', $this->MCONF['name']);
322 }
323 }
324
325 return $buttons;
326 }
327
328 // ***************************
329 // OTHER FUNCTIONS:
330 // ***************************
331
332 /**
333 * Counts the records in the system cache_* tables and returns these values.
334 *
335 * @param boolean $humanReadable: Returns human readable string instead of an array
336 * @return mixed The number of records in cache_* tables as array or string
337 * @deprecated since TYPO3 4.2.0, will be removed in TYPO3 4.6
338 */
339 function getCountCacheTables($humanReadable) {
340 t3lib_div::logDeprecatedFunction();
341
342 $out = array();
343
344 $out['cache_pages'] = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('id', 'cache_pages');
345 $out['cache_pagesection'] = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('id', 'cache_pagesection');
346 $out['cache_hash'] = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('id', 'cache_hash');
347
348 if ($humanReadable) {
349 $newOut = array();
350 foreach ($out as $k => $v) {
351 $newOut[] = $k . ":" . $v;
352 }
353 $out = implode(', ', $newOut);
354 }
355 return $out;
356 }
357
358 function linkWrapTemplateTitle($title, $onlyKey = '') {
359 if ($onlyKey) {
360 $title = '<a href="index.php?id=' . htmlspecialchars($GLOBALS['SOBE']->id . '&e[' . $onlyKey . ']=1&SET[function]=tx_tstemplateinfo') . '">' . htmlspecialchars($title) . '</a>';
361 } else {
362 $title = '<a href="index.php?id=' . htmlspecialchars($GLOBALS['SOBE']->id . '&e[constants]=1&e[config]=1&SET[function]=tx_tstemplateinfo') . '">' . htmlspecialchars($title) . '</a>';
363 }
364 return $title;
365 }
366
367 function noTemplate($newStandardTemplate = 0) {
368
369 $tmpl = t3lib_div::makeInstance('t3lib_tsparser_ext'); // Defined global here!
370 /* @var $tmpl t3lib_tsparser_ext */
371 $tmpl->tt_track = false; // Do not log time-performance information
372 $tmpl->init();
373
374 // No template
375 $theOutput .= $this->doc->spacer(10);
376
377 $flashMessage = t3lib_div::makeInstance(
378 't3lib_FlashMessage',
379 $GLOBALS['LANG']->getLL('noTemplateDescription') . '<br />' . $GLOBALS['LANG']->getLL('createTemplateToEditConfiguration'),
380 $GLOBALS['LANG']->getLL('noTemplate'),
381 t3lib_FlashMessage::INFO
382 );
383 $theOutput .= $flashMessage->render();
384
385
386 // New standard?
387 if ($newStandardTemplate) {
388 if (t3lib_extMgm::isLoaded('statictemplates')) { // check wether statictemplates are supported
389 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('title,uid', 'static_template', '', '', 'title');
390 $opt = '';
391 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
392 if (substr(trim($row['title']), 0, 8) == 'template') {
393 $opt .= '<option value="' . $row['uid'] . '">' . htmlspecialchars($row['title']) . '</option>';
394 }
395 }
396 $selector = '<select name="createStandard"><option></option>' . $opt . '</select><br />';
397 $staticsText = ', optionally based on one of the standard templates';
398 } else {
399 $selector = '<input type="hidden" name="createStandard" value="" />';
400 $staticsText = '';
401 }
402
403 // Extension?
404 $theOutput .= $this->doc->spacer(10);
405 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('newWebsite') . $staticsText, $GLOBALS['LANG']->getLL('newWebsiteDescription') . '<br /><br />' .
406 $selector .
407 '<input type="Submit" name="newWebsite" value="' . $GLOBALS['LANG']->getLL('newWebsiteAction') . '" />', 0, 1);
408 }
409 // Extension?
410 $theOutput .= $this->doc->spacer(10);
411 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('extTemplate'), $GLOBALS['LANG']->getLL('extTemplateDescription') . '<br /><br />' .
412 '<input type="submit" name="createExtension" value="' . $GLOBALS['LANG']->getLL('extTemplateAction') . '" />', 0, 1);
413
414 // Go to first appearing...
415 $first = $tmpl->ext_prevPageWithTemplate($this->id, $this->perms_clause);
416 if ($first) {
417 $theOutput .= $this->doc->spacer(10);
418 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('goToClosest'),
419 sprintf($GLOBALS['LANG']->getLL('goToClosestDescription') . '<br /><br />%s<strong>' . $GLOBALS['LANG']->getLL('goToClosestAction') . '</strong>%s', htmlspecialchars($first['title']), $first['uid'],
420 '<a href="index.php?id=' . $first['uid'] . '">', '</a>'), 0, 1);
421 }
422 return $theOutput;
423 }
424
425 function templateMenu() {
426 $tmpl = t3lib_div::makeInstance('t3lib_tsparser_ext'); // Defined global here!
427 /* @var $tmpl t3lib_tsparser_ext */
428 $tmpl->tt_track = false; // Do not log time-performance information
429 $tmpl->init();
430 $all = $tmpl->ext_getAllTemplates($this->id, $this->perms_clause);
431 $menu = '';
432
433 if (count($all) > 1) {
434 $this->MOD_MENU['templatesOnPage'] = array();
435 foreach ($all as $d) {
436 $this->MOD_MENU['templatesOnPage'][$d['uid']] = $d['title'];
437 }
438 }
439
440 $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);
441 $menu = t3lib_BEfunc::getFuncMenu($this->id, 'SET[templatesOnPage]', $this->MOD_SETTINGS['templatesOnPage'], $this->MOD_MENU['templatesOnPage']);
442
443 return $menu;
444 }
445
446 function createTemplate($id, $actTemplateId = 0) {
447 if (t3lib_div::_GP('createExtension')) {
448 $tce = t3lib_div::makeInstance('t3lib_TCEmain');
449 /* @var $tce t3lib_TCEmain */
450 $tce->stripslashes_values = 0;
451 $recData = array();
452 $recData['sys_template']['NEW'] = array(
453 'pid' => $actTemplateId ? -1 * $actTemplateId : $id,
454 'title' => "+ext",
455 );
456
457 $tce->start($recData, array());
458 $tce->process_datamap();
459 return $tce->substNEWwithIDs['NEW'];
460 } elseif (t3lib_div::_GP('newWebsite')) {
461 $tce = t3lib_div::makeInstance('t3lib_TCEmain');
462 /* @var $tce t3lib_TCEmain */
463 $tce->stripslashes_values = 0;
464 $recData = array();
465
466 if (intval(t3lib_div::_GP('createStandard'))) {
467 $staticT = intval(t3lib_div::_GP('createStandard'));
468 $recData['sys_template']['NEW'] = array(
469 'pid' => $id,
470 'title' => $GLOBALS['LANG']->getLL('titleNewSiteStandard'),
471 'sorting' => 0,
472 'root' => 1,
473 'clear' => 3,
474 'include_static' => $staticT . ',57', // 57 is cSet
475 );
476 } else {
477 $recData['sys_template']['NEW'] = array(
478 'pid' => $id,
479 'title' => $GLOBALS['LANG']->getLL('titleNewSite'),
480 'sorting' => 0,
481 'root' => 1,
482 'clear' => 3,
483 'config' => '
484 # Default PAGE object:
485 page = PAGE
486 page.10 = TEXT
487 page.10.value = HELLO WORLD!
488 ',
489 );
490 }
491 $tce->start($recData, array());
492 $tce->process_datamap();
493 $tce->clear_cacheCmd('all');
494 }
495 }
496
497 // ********************************************
498 // RENDER LIST of pages with templates, BEGIN
499 // ********************************************
500 function setInPageArray(&$pArray, $rlArr, $row) {
501 ksort($rlArr);
502 reset($rlArr);
503 if (!$rlArr[0]['uid']) {
504 array_shift($rlArr);
505 }
506
507 $cEl = current($rlArr);
508 $pArray[$cEl['uid']] = htmlspecialchars($cEl['title']);
509 array_shift($rlArr);
510 if (count($rlArr)) {
511 if (!isset($pArray[$cEl['uid'] . '.'])) {
512 $pArray[$cEl['uid'] . '.'] = array();
513 }
514 $this->setInPageArray($pArray[$cEl['uid'] . '.'], $rlArr, $row);
515 } else {
516 $pArray[$cEl['uid'] . '_'] = $row;
517 }
518 }
519
520 function renderList($pArray, $lines = array(), $c = 0) {
521 if (is_array($pArray)) {
522 reset($pArray);
523 static $i;
524 foreach ($pArray as $k => $v) {
525 if (t3lib_div::testInt($k)) {
526 if (isset($pArray[$k . "_"])) {
527 $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
528 <td nowrap><img src="clear.gif" width="1" height="1" hspace=' . ($c * 10) . ' align="top">' .
529 '<a href="' . t3lib_div::linkThisScript(array('id' => $k)) . '">' .
530 t3lib_iconWorks::getSpriteIconForRecord('pages', t3lib_BEfunc::getRecordWSOL('pages', $k), array("title"=>'ID: ' . $k )) .
531 t3lib_div::fixed_lgd_cs($pArray[$k], 30) . '</a></td>
532 <td align="center">' . $pArray[$k . '_']['count'] . '</td>
533 <td align="center" class="bgColor5">' . ($pArray[$k . '_']['root_max_val'] > 0 ? t3lib_iconWorks::getSpriteIcon('status-status-checked') : "&nbsp;") .
534 '</td>
535 <td align="center">' . ($pArray[$k . '_']['root_min_val'] == 0 ? t3lib_iconWorks::getSpriteIcon('status-status-checked') : "&nbsp;") .
536 '</td>
537 </tr>';
538 } else {
539 $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
540 <td nowrap ><img src="clear.gif" width="1" height="1" hspace=' . ($c * 10) . ' align=top>' .
541 t3lib_iconWorks::getSpriteIconForRecord('pages', t3lib_BEfunc::getRecordWSOL('pages', $k)) .
542 t3lib_div::fixed_lgd_cs($pArray[$k], 30) . '</td>
543 <td align="center"></td>
544 <td align="center" class="bgColor5"></td>
545 <td align="center"></td>
546 </tr>';
547 }
548 $lines = $this->renderList($pArray[$k . '.'], $lines, $c + 1);
549 }
550 }
551 }
552 return $lines;
553 }
554 }
555
556
557 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/tstemplate/ts/index.php']) {
558 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/tstemplate/ts/index.php']);
559 }
560
561
562
563 // Make instance:
564 $SOBE = t3lib_div::makeInstance('SC_mod_web_ts_index');
565 /* @var $SOBE SC_mod_web_ts_index */
566 $SOBE->init();
567
568 // Include files?
569 foreach($SOBE->include_once as $INC_FILE) {
570 include_once($INC_FILE);
571 }
572 $SOBE->checkExtObj(); // Checking for first level external objects
573
574 $SOBE->clearCache();
575 $SOBE->main();
576 $SOBE->printContent();
577
578 ?>