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)) die ('Error: No parent object present.');
00041
00042
00043
00044
00045
00046 $day = $conf['day'];
00047 $name = $conf['name'];
00048 $menuItemsArray = array();
00049
00050 if ($day==-1) $day=date('w');
00051 if ($day==date('w')) {
00052 $son=mktime(0,0,0,date('m'),date('d'),date('Y'));
00053 } else {
00054 for ($i=1;;$i++) {
00055 $son=mktime(0,0,0,date('m'),date('d')-$i,date('Y'));
00056 if ($day==date('w',$son)) break;
00057 if ($i>100) break;
00058 }
00059 }
00060
00061 $date = date('Y-m-d', $son);
00062 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'title LIKE "'.$GLOBALS['TYPO3_DB']->quoteStr($name.$date, 'pages').'"');
00063 $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
00064
00065 $value=$row['uid'];
00066
00067 if ($value=='') {
00068 $value=$GLOBALS['TSFE']->page['uid'];
00069 }
00070 $items=t3lib_div::intExplode(',',$value);
00071 while(list(,$id)=each($items)) {
00072 $res = $GLOBALS['TSFE']->cObj->exec_getQuery('pages',Array('pidInList'=>$id,'orderBy'=>$altSortField));
00073 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
00074 $menuItemsArray[]=$row;
00075 }
00076 }
00077
00078 ?>