OSDN Git Service

mod: キーワード予約のログの位置を変えた
[epgrec/epgrec.git] / reservationTable.php
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{
7         $rvs = DBRecord::createRecords(RESERVE_TBL, "WHERE complete='0' ORDER BY starttime ASC" );
8         
9         $reservations = array();
10         foreach( $rvs as $r ) {
11                 $cat = new DBRecord(CATEGORY_TBL, "id", $r->category_id );
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 ?>