Mercurial > epgrec.yaz
view cancelReservation.php @ 162:c6c6bd734f18
fix: ¥ß¥¹½¤Àµ
author | epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp> |
---|---|
date | Sun, 04 Apr 2010 18:14:47 +0900 |
parents | 84220382fea8 |
children |
line wrap: on
line source
<?php include_once('config.php'); include_once( INSTALL_PATH . '/DBRecord.class.php' ); include_once( INSTALL_PATH . '/Reservation.class.php' ); include_once( INSTALL_PATH . '/reclib.php' ); include_once( INSTALL_PATH . '/Settings.class.php' ); $program_id = 0; $reserve_id = 0; $settings = Settings::factory(); $rec = null; $path = ""; if( isset($_GET['program_id'])) { $program_id = $_GET['program_id']; } else if(isset($_GET['reserve_id'])) { $reserve_id = $_GET['reserve_id']; try { $rec = new DBRecord( RESERVE_TBL, "id" , $reserve_id ); $program_id = $rec->program_id; if( isset( $_GET['delete_file'] ) ) { if( $_GET['delete_file'] == 1 ) { $path = INSTALL_PATH."/".$settings->spool."/".$rec->path; } } } catch( Exception $e ) { // 無視 } } // 手動å–り消ã—ã®ã¨ãã«ã¯ã€ãã®ç•ªçµ„を自動録画対象ã‹ã‚‰å¤–ã™ if( $program_id ) { try { $rec = new DBRecord(PROGRAM_TBL, "id", $program_id ); $rec->autorec = 0; } catch( Exception $e ) { // 無視 } } // 予約å–り消ã—実行 try { Reservation::cancel( $reserve_id, $program_id ); if( isset( $_GET['delete_file'] ) ) { if( $_GET['delete_file'] == 1 ) { // ファイルを削除 if( file_exists( $path) ) { @unlink($path); @unlink($path.".jpg"); } } } } catch( Exception $e ) { exit( "Error" . $e->getMessage() ); } exit(); ?>