forked from stz2012/epgrec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reservationTable.php
35 lines (31 loc) · 987 Bytes
/
reservationTable.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
include_once('config.php');
include_once( INSTALL_PATH . '/DBRecord.class.php' );
include_once( INSTALL_PATH . '/Smarty/Smarty.class.php' );
try{
$rvs = DBRecord::createRecords(RESERVE_TBL, "WHERE complete='0' ORDER BY starttime ASC" );
$reservations = array();
foreach( $rvs as $r ) {
$cat = new DBRecord(CATEGORY_TBL, "id", $r->category_id );
$arr = array();
$arr['id'] = $r->id;
$arr['type'] = $r->type;
$arr['channel'] = $r->channel;
$arr['starttime'] = $r->starttime;
$arr['endtime'] = $r->endtime;
$arr['mode'] = $RECORD_MODE[$r->mode]['name'];
$arr['title'] = $r->title;
$arr['description'] = $r->description;
$arr['cat'] = $cat->name_en;
$arr['autorec'] = $r->autorec;
array_push( $reservations, $arr );
}
$smarty = new Smarty();
$smarty->assign("sitetitle","録画予約一覧");
$smarty->assign( "reservations", $reservations );
$smarty->display("reservationTable.html");
}
catch( exception $e ) {
exit( $e->getMessage() );
}
?>