diff index.php @ 87:36ac7c416bd7

merged with upstream
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 01 Mar 2010 20:51:36 +0900
parents cb7da56c4198
children cb04c9ca1cb0
line wrap: on
line diff
--- a/index.php	Sun Feb 14 17:01:02 2010 +0900
+++ b/index.php	Mon Mar 01 20:51:36 2010 +0900
@@ -49,12 +49,19 @@
  else if( $type == "GR" ) $channel_map = $GR_CHANNEL_MAP;
  else if( $type == "CS" ) $channel_map = $CS_CHANNEL_MAP;
  $st = 0;
- $prec = new DBRecord(PROGRAM_TBL);
+ $prec = null;
+ try {
+ 	$prec = new DBRecord(PROGRAM_TBL);
+ }
+ catch( Exception $e ) {
+	exit('プログラムテーブルが存在しないようです。インストールをやり直してください.');
+ }
  foreach( $channel_map as $channel_disc => $channel ) {
 	$prev_end = $top_time;
  	try {
 		$crec = new DBRecord( CHANNEL_TBL, "channel_disc", $channel_disc );
 		$programs[$st]["station_name"]  = $crec->name;
+		$programs[$st]["channel_disc"]  = $crec->channel_disc;
 		
 		$reca = $prec->fetch_array( "channel_disc", $channel_disc,
 		                                  "endtime > '".toDatetime($top_time)."' ".
@@ -104,7 +111,8 @@
 		}
 	}
 	 catch( exception $e ) {
-		exit( $e->getMessage() );
+//		exit( $e->getMessage() );
+//		何もしない
  	}
  	// 空きを埋める
 	if( ($last_time - $prev_end) > 0 ) {
@@ -221,4 +229,4 @@
  
  
  $smarty->display("index.html");
-?>
\ No newline at end of file
+?>