diff reservationTable.php @ 1:f5a9f0eb4858

deleted: LICENSE.ja
author Sushi-k <epgrec@park.mda.or.jp>
date Wed, 08 Jul 2009 11:44:50 +0900
parents
children 8965ef108821
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reservationTable.php	Wed Jul 08 11:44:50 2009 +0900
@@ -0,0 +1,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(TBL_PREFIX.RESERVE_TBL, "WHERE complete='0' ORDER BY starttime ASC" );
+	
+	$reservations = array();
+	foreach( $rvs as $r ) {
+		$cat = new DBRecord(TBL_PREFIX.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() );
+}
+?>
\ No newline at end of file