00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00040 if (!is_object($this)) {
00041 die ('No cObj object present. This script must be included as a PHP_SCRIPT cObject in TypoScript!');
00042 }
00043
00044
00045 $pid = intval($conf['pid_templateArchive']);
00046 $content = '';
00047
00048 $specialComment='';
00049 if ($pid) {
00050
00051
00052 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_template', 'pid='.intval($pid).' AND NOT deleted AND NOT hidden AND NOT starttime AND NOT endtime', '', 'sorting');
00053 while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
00054 if (!$firstUID) $firstUID = $row['uid'];
00055 $key = $row['uid'];
00056 $val = $row['title'];
00057 $content.= '<a target="testTemplate" href="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.'index.php?id='.$GLOBALS['TSFE']->id.'&based_on_uid='.$key).'">'.$val.'</a><br />';
00058 $specialComment.= '[globalVar= based_on_uid='.$key.']'.chr(10);
00059 }
00060
00061 $page_res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'pid='.intval($pid).' AND NOT deleted AND NOT hidden AND NOT starttime AND NOT endtime AND NOT fe_group', '', 'sorting');
00062 while($page_row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($page_res)) {
00063
00064 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_template', 'pid='.intval($page_row['uid']).' AND NOT deleted AND NOT hidden AND NOT starttime AND NOT endtime', '', 'sorting');
00065 while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
00066 if (!$firstUID) $firstUID = $row['uid'];
00067 $key = $row['uid'];
00068 $val = $page_row['title'].' / '.$row['title'];
00069 $content.= '<a target="testTemplate" href="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.'index.php?id='.$GLOBALS['TSFE']->id.'&based_on_uid='.$key).'">'.$val.'</a><br />';
00070 $specialComment.= '[globalVar= based_on_uid='.$key.']'.chr(10);
00071 }
00072 }
00073 }
00074
00075 $content.='
00076 <!--
00077
00078 NOTE:
00079 When updating the template archive, these TypoScript conditions should replace the current conditions found in the DUMMY PAGE test template:
00080
00081
00082 '.$specialComment.'
00083
00084 -->
00085 ';
00086
00087 ?>