Mercurial > epgrec.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
75:11f63ae04a96 | 87:36ac7c416bd7 |
---|---|
47 $programs = array(); | 47 $programs = array(); |
48 if( $type == "BS" ) $channel_map = $BS_CHANNEL_MAP; | 48 if( $type == "BS" ) $channel_map = $BS_CHANNEL_MAP; |
49 else if( $type == "GR" ) $channel_map = $GR_CHANNEL_MAP; | 49 else if( $type == "GR" ) $channel_map = $GR_CHANNEL_MAP; |
50 else if( $type == "CS" ) $channel_map = $CS_CHANNEL_MAP; | 50 else if( $type == "CS" ) $channel_map = $CS_CHANNEL_MAP; |
51 $st = 0; | 51 $st = 0; |
52 $prec = new DBRecord(PROGRAM_TBL); | 52 $prec = null; |
53 try { | |
54 $prec = new DBRecord(PROGRAM_TBL); | |
55 } | |
56 catch( Exception $e ) { | |
57 exit('プログラムテーブルが存在しないようです。インストールをやり直してください.'); | |
58 } | |
53 foreach( $channel_map as $channel_disc => $channel ) { | 59 foreach( $channel_map as $channel_disc => $channel ) { |
54 $prev_end = $top_time; | 60 $prev_end = $top_time; |
55 try { | 61 try { |
56 $crec = new DBRecord( CHANNEL_TBL, "channel_disc", $channel_disc ); | 62 $crec = new DBRecord( CHANNEL_TBL, "channel_disc", $channel_disc ); |
57 $programs[$st]["station_name"] = $crec->name; | 63 $programs[$st]["station_name"] = $crec->name; |
64 $programs[$st]["channel_disc"] = $crec->channel_disc; | |
58 | 65 |
59 $reca = $prec->fetch_array( "channel_disc", $channel_disc, | 66 $reca = $prec->fetch_array( "channel_disc", $channel_disc, |
60 "endtime > '".toDatetime($top_time)."' ". | 67 "endtime > '".toDatetime($top_time)."' ". |
61 "AND starttime < '". toDatetime($last_time)."' ". | 68 "AND starttime < '". toDatetime($last_time)."' ". |
62 "ORDER BY starttime ASC " | 69 "ORDER BY starttime ASC " |
102 $programs[$st]['list'][$num]['rec'] = DBRecord::countRecords(RESERVE_TBL, "WHERE complete = '0' AND program_id = '".$prg['id']."'" ); | 109 $programs[$st]['list'][$num]['rec'] = DBRecord::countRecords(RESERVE_TBL, "WHERE complete = '0' AND program_id = '".$prg['id']."'" ); |
103 $num++; | 110 $num++; |
104 } | 111 } |
105 } | 112 } |
106 catch( exception $e ) { | 113 catch( exception $e ) { |
107 exit( $e->getMessage() ); | 114 // exit( $e->getMessage() ); |
115 // 何もしない | |
108 } | 116 } |
109 // 空きを埋める | 117 // 空きを埋める |
110 if( ($last_time - $prev_end) > 0 ) { | 118 if( ($last_time - $prev_end) > 0 ) { |
111 $height = ($last_time - $prev_end) * $settings->height_per_hour / 3600; | 119 $height = ($last_time - $prev_end) * $settings->height_per_hour / 3600; |
112 $height = $height; | 120 $height = $height; |