diff cancelReservation.php @ 14:bbbc4f1ecf1d

added: remove video with real file.
author Sushi-k <epgrec@park.mda.or.jp>
date Tue, 14 Jul 2009 20:11:42 +0900
parents f5a9f0eb4858
children e5f9aa34d06f
line wrap: on
line diff
--- a/cancelReservation.php	Tue Jul 14 00:19:55 2009 +0900
+++ b/cancelReservation.php	Tue Jul 14 20:11:42 2009 +0900
@@ -15,12 +15,23 @@
 	try {
 		$rec = new DBRecord( TBL_PREFIX.RESERVE_TBL, "id" , $reserve_id );
 		$program_id = $rec->program_id;
+		
+		if( isset( $_GET['delete_file'] ) ) {
+			if( $_GET['delete_file'] == 1 ) {
+				// ファイルを削除
+				if( file_exists( INSTALL_PATH."/".SPOOL."/".$rec->path ) ) {
+					@unlink(INSTALL_PATH."/".SPOOL."/".$rec->path);
+				}
+			}
+		}
 	}
 	catch( Exception $e ) {
 		// 無視
 	}
 }
 
+
+
 // 手動取り消しのときには、その番組を自動録画対象から外す
 if( $program_id ) {
 	try {