comparison recomplete.php @ 142:481e789605e3

mod: EPGの更新と同時に予約情報を更新するように変更、ログビューアの追加
author epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
date Sun, 21 Mar 2010 16:42:58 +0900
parents 3bed74eca373
children 5b192e94f49d
comparison
equal deleted inserted replaced
136:6754b6aa50cf 142:481e789605e3
3 $script_path = dirname( __FILE__ ); 3 $script_path = dirname( __FILE__ );
4 chdir( $script_path ); 4 chdir( $script_path );
5 include_once( $script_path . '/config.php'); 5 include_once( $script_path . '/config.php');
6 include_once( INSTALL_PATH . "/DBRecord.class.php" ); 6 include_once( INSTALL_PATH . "/DBRecord.class.php" );
7 include_once( INSTALL_PATH . "/Settings.class.php" ); 7 include_once( INSTALL_PATH . "/Settings.class.php" );
8 include_once( INSTALL_PATH . "/recLog.inc.php" );
8 9
9 $settings = Settings::factory(); 10 $settings = Settings::factory();
10 11
11 $reserve_id = $argv[1]; 12 $reserve_id = $argv[1];
12 13
13 try{ 14 try{
14 $rrec = new DBRecord( RESERVE_TBL, "id" , $reserve_id ); 15 $rrec = new DBRecord( RESERVE_TBL, "id" , $reserve_id );
16 $rrec->complete = '1';
15 17
16 if( file_exists( INSTALL_PATH .$settings->spool . "/". $rrec->path ) ) { 18 if( file_exists( INSTALL_PATH .$settings->spool . "/". $rrec->path ) ) {
17 // 篋膣絎篋 19 // 篋膣絎篋
18 $rrec->complete = '1'; 20 reclog( "recomplete:: 篋膣ID". $rrec->id .":".$rrec->type.$rrec->channel.$rrec->title."牙祉絎篋" );
21
19 if( $settings->mediatomb_update == 1 ) { 22 if( $settings->mediatomb_update == 1 ) {
20 // <c緇c鴻腆阪c純 23 // <c緇c鴻腆阪c純
21 @exec("sync"); 24 @exec("sync");
22 sleep(15); 25 sleep(15);
23 $dbh = mysql_connect( $settings->db_host, $settings->db_user, $settings->db_pass ); 26 $dbh = mysql_connect( $settings->db_host, $settings->db_user, $settings->db_pass );
34 } 37 }
35 } 38 }
36 } 39 }
37 else { 40 else {
38 // 篋膣紊掩 41 // 篋膣紊掩
42 reclog( "recomplete:: 篋膣ID". $rrec->id .":".$rrec->type.$rrec->channel.$rrec->title."牙祉紊掩罔≧", E_ERROR );
39 $rrec->delete(); 43 $rrec->delete();
40 } 44 }
41 } 45 }
42 catch( exception $e ) { 46 catch( exception $e ) {
47 reclog( "recomplete:: 篋膣若≪祉鴻紊掩罔≧", E_ERROR );
48 reclog( "recomplete:: ".$e->getMessage()."" , E_ERROR );
43 exit( $e->getMessage() ); 49 exit( $e->getMessage() );
44 } 50 }
45 51
46 ?> 52 ?>