Mercurial > epgrec.yaz
annotate reservationTable.php @ 103:368a68c9d579
added fail safe hack
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 08 Mar 2010 01:25:16 +0900 |
parents | 8965ef108821 |
children |
rev | line source |
---|---|
1 | 1 <?php |
2 include_once('config.php'); | |
3 include_once( INSTALL_PATH . '/DBRecord.class.php' ); | |
4 include_once( INSTALL_PATH . '/Smarty/Smarty.class.php' ); | |
5 | |
6 try{ | |
39
8965ef108821
change: modify all scripts for web base setting.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
7 $rvs = DBRecord::createRecords(RESERVE_TBL, "WHERE complete='0' ORDER BY starttime ASC" ); |
1 | 8 |
9 $reservations = array(); | |
10 foreach( $rvs as $r ) { | |
39
8965ef108821
change: modify all scripts for web base setting.
Sushi-k <epgrec@park.mda.or.jp>
parents:
1
diff
changeset
|
11 $cat = new DBRecord(CATEGORY_TBL, "id", $r->category_id ); |
1 | 12 $arr = array(); |
13 $arr['id'] = $r->id; | |
14 $arr['type'] = $r->type; | |
15 $arr['channel'] = $r->channel; | |
16 $arr['starttime'] = $r->starttime; | |
17 $arr['endtime'] = $r->endtime; | |
18 $arr['mode'] = $RECORD_MODE[$r->mode]['name']; | |
19 $arr['title'] = $r->title; | |
20 $arr['description'] = $r->description; | |
21 $arr['cat'] = $cat->name_en; | |
22 $arr['autorec'] = $r->autorec; | |
23 | |
24 array_push( $reservations, $arr ); | |
25 } | |
26 | |
27 $smarty = new Smarty(); | |
28 $smarty->assign("sitetitle","録画予約一覧"); | |
29 $smarty->assign( "reservations", $reservations ); | |
30 $smarty->display("reservationTable.html"); | |
31 } | |
32 catch( exception $e ) { | |
33 exit( $e->getMessage() ); | |
34 } | |
35 ?> |