Mercurial > epgrec.yaz
view recomplete.php @ 125:ef3df87f3c7d
mod: チャンネルスキップの大まかな実装終了
author | Sushi-k <epgrec@park.mda.or.jp> |
---|---|
date | Wed, 17 Mar 2010 18:12:01 +0900 |
parents | 3bed74eca373 |
children | 481e789605e3 |
line wrap: on
line source
#!/usr/bin/php <?php $script_path = dirname( __FILE__ ); chdir( $script_path ); include_once( $script_path . '/config.php'); include_once( INSTALL_PATH . "/DBRecord.class.php" ); include_once( INSTALL_PATH . "/Settings.class.php" ); $settings = Settings::factory(); $reserve_id = $argv[1]; try{ $rrec = new DBRecord( RESERVE_TBL, "id" , $reserve_id ); if( file_exists( INSTALL_PATH .$settings->spool . "/". $rrec->path ) ) { // 篋膣絎篋 $rrec->complete = '1'; if( $settings->mediatomb_update == 1 ) { // <c緇c鴻腆阪c純 @exec("sync"); sleep(15); $dbh = mysql_connect( $settings->db_host, $settings->db_user, $settings->db_pass ); if( $dbh !== false ) { $sqlstr = "use ".$settings->db_name; @mysql_query( $sqlstr ); // ャ $sqlstr = "set NAME utf8"; @mysql_query( $sqlstr ); $sqlstr = "update mt_cds_object set metadata='dc:description=".mysql_real_escape_string($rrec->description)."&epgrec:id=".$reserve_id."' where dc_title='".$rrec->path."'"; @mysql_query( $sqlstr ); $sqlstr = "update mt_cds_object set dc_title='".mysql_real_escape_string($rrec->title)."(".date("Y/m/d").")' where dc_title='".$rrec->path."'"; @mysql_query( $sqlstr ); } } } else { // 篋膣紊掩 $rrec->delete(); } } catch( exception $e ) { exit( $e->getMessage() ); } ?>