Mercurial > epgrec.yaz
annotate getepg.old.php @ 115:7a64d5e3baee
mod: キーワード検索を整理
author | yoneda <epgrec@park.mda.or.jp> |
---|---|
date | Sat, 13 Mar 2010 23:00:51 +0900 |
parents | 3bed74eca373 |
children | 2646140c5ba7 |
rev | line source |
---|---|
84
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
1 #!/usr/bin/php |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
2 <?php |
111
3bed74eca373
change: EPG取得並列化が可能かどうかを判定するように変更
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
95
diff
changeset
|
3 $script_path = dirname( __FILE__ ); |
3bed74eca373
change: EPG取得並列化が可能かどうかを判定するように変更
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
95
diff
changeset
|
4 chdir( $script_path ); |
3bed74eca373
change: EPG取得並列化が可能かどうかを判定するように変更
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
95
diff
changeset
|
5 include_once( $script_path . '/config.php'); |
84
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
6 include_once( INSTALL_PATH . '/DBRecord.class.php' ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
7 include_once( INSTALL_PATH . '/Reservation.class.php' ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
8 include_once( INSTALL_PATH . '/Keyword.class.php' ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
9 include_once( INSTALL_PATH . '/Settings.class.php' ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
10 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
11 $settings = Settings::factory(); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
12 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
13 if( file_exists( $settings->temp_data ) ) @unlink( $settings->temp_data ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
14 if( file_exists( $settings->temp_xml ) ) @unlink( $settings->temp_xml ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
15 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
16 // BS |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
17 if( $settings->bs_tuners != 0 ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
18 // 牙脂茲с |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
19 $num = DBRecord::countRecords( RESERVE_TBL, "WHERE complete = '0' AND (type = 'BS' OR type = 'CS') AND endtime > now() AND starttime < addtime( now(), '00:03:05')" ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
20 if( $num == 0 ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
21 $cmdline = "CHANNEL=211 DURATION=180 TYPE=BS TUNER=0 MODE=0 OUTPUT=".$settings->temp_data." ".DO_RECORD . " >/dev/null 2>&1"; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
22 exec( $cmdline ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
23 $cmdline = $settings->epgdump." /BS ".$settings->temp_data." ".$settings->temp_xml; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
24 exec( $cmdline ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
25 storeProgram( "BS", $settings->temp_xml ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
26 if( file_exists( $settings->temp_data ) ) @unlink( $settings->temp_data ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
27 if( file_exists( $settings->temp_xml ) ) @unlink( $settings->temp_xml ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
28 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
29 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
30 // CS |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
31 if ($settings->cs_rec_flg != 0) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
32 $num = DBRecord::countRecords( RESERVE_TBL, "WHERE complete = '0' AND (type = 'BS' OR type = 'CS') AND endtime > now() AND starttime < addtime( now(), '00:03:05')" ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
33 if( $num == 0 ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
34 $cmdline = "CHANNEL=CS8 DURATION=120 TYPE=CS TUNER=0 MODE=0 OUTPUT=".$settings->temp_data." ".DO_RECORD . " >/dev/null 2>&1"; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
35 exec( $cmdline ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
36 $cmdline = $settings->epgdump." /CS ".$settings->temp_data." ".$settings->temp_xml; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
37 exec( $cmdline ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
38 storeProgram( "CS", $settings->temp_xml ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
39 if( file_exists( $settings->temp_data ) ) @unlink( $settings->temp_data ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
40 if( file_exists( $settings->temp_xml ) ) @unlink( $settings->temp_xml ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
41 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
42 $num = DBRecord::countRecords( RESERVE_TBL, "WHERE complete = '0' AND (type = 'BS' OR type = 'CS') AND endtime > now() AND starttime < addtime( now(), '00:03:05')" ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
43 if( $num == 0 ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
44 $cmdline = "CHANNEL=CS24 DURATION=120 TYPE=CS TUNER=0 MODE=0 OUTPUT=".$settings->temp_data." ".DO_RECORD . " >/dev/null 2>&1"; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
45 exec( $cmdline ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
46 $cmdline = $settings->epgdump." /CS ".$settings->temp_data." ".$settings->temp_xml; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
47 exec( $cmdline ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
48 storeProgram( "CS", $settings->temp_xml ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
49 if( file_exists( $settings->temp_data ) ) @unlink( $settings->temp_data ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
50 if( file_exists( $settings->temp_xml ) ) @unlink( $settings->temp_xml ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
51 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
52 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
53 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
54 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
55 // 遺羈≪ |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
56 if( $settings->gr_tuners != 0 ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
57 foreach( $GR_CHANNEL_MAP as $key=>$value ){ |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
58 // 牙脂茲с |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
59 $num = DBRecord::countRecords( RESERVE_TBL, "WHERE complete = '0' AND type = 'GR' AND endtime > now() AND starttime < addtime( now(), '00:01:10')" ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
60 if( $num == 0 ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
61 $cmdline = "CHANNEL=".$value." DURATION=60 TYPE=GR TUNER=0 MODE=0 OUTPUT=".$settings->temp_data." ".DO_RECORD . " >/dev/null 2>&1"; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
62 exec( $cmdline ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
63 $cmdline = $settings->epgdump." ".$key." ".$settings->temp_data." ".$settings->temp_xml; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
64 exec( $cmdline ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
65 storeProgram( "GR", $settings->temp_xml ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
66 if( file_exists( $settings->temp_data ) ) @unlink( $settings->temp_data ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
67 if( file_exists( $settings->temp_xml ) ) @unlink( $settings->temp_xml ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
68 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
69 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
70 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
71 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
72 // 筝荀違 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
73 // 8ヤ札筝違羔 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
74 $arr = array(); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
75 $arr = DBRecord::createRecords( PROGRAM_TBL, "WHERE endtime < subdate( now(), 8 )" ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
76 foreach( $arr as $val ) $val->delete(); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
77 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
78 // 8ヤ札筝若帥井 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
79 $arr = array(); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
80 $arr = DBRecord::createRecords( PROGRAM_TBL, "WHERE starttime > adddate( now(), 8 )" ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
81 foreach( $arr as $val ) $val->delete(); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
82 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
83 // 若若牙私膣 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
84 $arr = array(); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
85 $arr = Keyword::createKeywords(); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
86 foreach( $arr as $val ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
87 try { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
88 $val->reservation(); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
89 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
90 catch( Exception $e ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
91 // ∴ |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
92 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
93 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
94 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
95 exit(); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
96 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
97 function storeProgram( $type, $xmlfile ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
98 global $BS_CHANNEL_MAP, $GR_CHANNEL_MAP, $CS_CHANNEL_MAP; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
99 // c潟<ゃ羣 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
100 $map = array(); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
101 if( $type == "BS" ) $map = $BS_CHANNEL_MAP; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
102 else if( $type == "GR") $map = $GR_CHANNEL_MAP; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
103 else if( $type == "CS") $map = $CS_CHANNEL_MAP; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
104 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
105 // XML parse |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
106 $xml = @simplexml_load_file( $xmlfile ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
107 if( $xml === false ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
108 return; // XML茯水篏 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
109 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
110 // channel遵 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
111 foreach( $xml->channel as $ch ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
112 $disc = $ch['id']; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
113 try { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
114 // c潟若帥「 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
115 $num = DBRecord::countRecords( CHANNEL_TBL , "WHERE channel_disc = '" . $disc ."'" ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
116 if( $num == 0 ) { |
93
80cc05b420af
fix: $*_CHANNEL_MAPに存在しないチャンネルの番組を取得する際のエラーを修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
84
diff
changeset
|
117 // channel disc蕋違 |
95
d9b9d1d903a1
fix: さらに修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
94
diff
changeset
|
118 if( array_key_exists( "$disc", $map ) ) { |
93
80cc05b420af
fix: $*_CHANNEL_MAPに存在しないチャンネルの番組を取得する際のエラーを修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
84
diff
changeset
|
119 // c潟若帥域鋎 |
80cc05b420af
fix: $*_CHANNEL_MAPに存在しないチャンネルの番組を取得する際のエラーを修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
84
diff
changeset
|
120 $rec = new DBRecord( CHANNEL_TBL ); |
80cc05b420af
fix: $*_CHANNEL_MAPに存在しないチャンネルの番組を取得する際のエラーを修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
84
diff
changeset
|
121 $rec->type = $type; |
80cc05b420af
fix: $*_CHANNEL_MAPに存在しないチャンネルの番組を取得する際のエラーを修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
84
diff
changeset
|
122 $rec->channel = $map["$disc"]; |
80cc05b420af
fix: $*_CHANNEL_MAPに存在しないチャンネルの番組を取得する際のエラーを修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
84
diff
changeset
|
123 $rec->channel_disc = $disc; |
80cc05b420af
fix: $*_CHANNEL_MAPに存在しないチャンネルの番組を取得する際のエラーを修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
84
diff
changeset
|
124 $rec->name = $ch->{'display-name'}; |
80cc05b420af
fix: $*_CHANNEL_MAPに存在しないチャンネルの番組を取得する際のエラーを修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
84
diff
changeset
|
125 } |
84
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
126 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
127 else { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
128 // 絖翫c潟贋違 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
129 $rec = new DBRecord(CHANNEL_TBL, "channel_disc", $disc ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
130 $rec->name = $ch->{'display-name'}; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
131 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
132 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
133 catch( Exception $e ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
134 // ∴ |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
135 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
136 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
137 // channel 腟篋 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
138 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
139 // programme 緇 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
140 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
141 foreach( $xml->programme as $program ) { |
93
80cc05b420af
fix: $*_CHANNEL_MAPに存在しないチャンネルの番組を取得する際のエラーを修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
84
diff
changeset
|
142 $channel_disc = $program['channel']; |
94
12ed8ad837fc
fix: さらに修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
93
diff
changeset
|
143 if( ! array_key_exists( "$channel_disc", $map ) ) continue; |
93
80cc05b420af
fix: $*_CHANNEL_MAPに存在しないチャンネルの番組を取得する際のエラーを修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
84
diff
changeset
|
144 |
84
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
145 $channel = $map["$channel_disc"]; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
146 $starttime = str_replace(" +0900", '', $program['start'] ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
147 $endtime = str_replace( " +0900", '', $program['stop'] ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
148 $title = $program->title; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
149 $desc = $program->desc; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
150 $cat_ja = ""; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
151 $cat_en = ""; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
152 foreach( $program->category as $cat ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
153 if( $cat['lang'] == "ja_JP" ) $cat_ja = $cat; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
154 if( $cat['lang'] == "en" ) $cat_en = $cat; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
155 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
156 $program_disc = md5( $channel_disc . $starttime . $endtime ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
157 // printf( "%s %s %s %s %s %s %s \n", $program_disc, $channel, $starttime, $endtime, $title, $desc, $cat_ja ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
158 try { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
159 // 眼 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
160 $category_disc = md5( $cat_ja . $cat_en ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
161 $num = DBRecord::countRecords(CATEGORY_TBL, "WHERE category_disc = '".$category_disc."'" ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
162 $cat_rec = null; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
163 if( $num == 0 ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
164 // 域眼菴遵 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
165 $cat_rec = new DBRecord( CATEGORY_TBL ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
166 $cat_rec->name_jp = $cat_ja; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
167 $cat_rec->name_en = $cat_en; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
168 $cat_rec->category_disc = $category_disc; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
169 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
170 else |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
171 $cat_rec = new DBRecord(CATEGORY_TBL, "category_disc" , $category_disc ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
172 // |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
173 $channel_rec = new DBRecord(CHANNEL_TBL, "channel_disc", $channel_disc ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
174 $num = DBRecord::countRecords(PROGRAM_TBL, "WHERE program_disc = '".$program_disc."'" ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
175 if( $num == 0 ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
176 // 域腟 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
177 // 茲с 絽腟 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
178 $options = "WHERE channel_disc = '".$channel_disc."' ". |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
179 "AND starttime < '". $endtime ."' AND endtime > '".$starttime."'"; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
180 $battings = DBRecord::countRecords(PROGRAM_TBL, $options ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
181 if( $battings > 0 ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
182 // 茲榊鐚丈紊 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
183 $records = DBRecord::createRecords(PROGRAM_TBL, $options ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
184 foreach( $records as $rec ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
185 // 牙私膣腟丈紊眼cゃ |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
186 try { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
187 $reserve = new DBRecord(RESERVE_TBL, "program_id", $rec->id ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
188 if( $reserve->autorec ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
189 Reservation::cancel( $reserve->id ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
190 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
191 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
192 catch( Exception $e ) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
193 //∴ |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
194 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
195 // 腟 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
196 $rec->delete(); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
197 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
198 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
199 // // |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
200 $rec = new DBRecord( PROGRAM_TBL ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
201 $rec->channel_disc = $channel_disc; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
202 $rec->channel_id = $channel_rec->id; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
203 $rec->type = $type; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
204 $rec->channel = $channel_rec->channel; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
205 $rec->title = $title; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
206 $rec->description = $desc; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
207 $rec->category_id = $cat_rec->id; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
208 $rec->starttime = $starttime; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
209 $rec->endtime = $endtime; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
210 $rec->program_disc = $program_disc; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
211 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
212 else { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
213 // 腟絎号贋 |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
214 $rec = new DBRecord( PROGRAM_TBL, "program_disc", $program_disc ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
215 $rec->title = $title; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
216 $rec->description = $desc; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
217 $rec->category_id = $cat_rec->id; |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
218 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
219 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
220 catch(Exception $e) { |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
221 exit( $e->getMessage() ); |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
222 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
223 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
224 } |
3ec5ca5e56ca
add: EPG取得並列化版を暫定的に標準に
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
225 ?> |