Mercurial > epgrec.yaz
comparison cancelReservation.php @ 37:e5f9aa34d06f
change: modify all script for web base setting
author | yoneda <epgrec@park.mda.or.jp> |
---|---|
date | Tue, 28 Jul 2009 00:00:04 +0900 |
parents | bbbc4f1ecf1d |
children | 42f6eb738567 |
comparison
equal
deleted
inserted
replaced
36:c2522d1df005 | 37:e5f9aa34d06f |
---|---|
1 <?php | 1 <?php |
2 include_once('config.php'); | 2 include_once('config.php'); |
3 include_once( INSTALL_PATH . '/DBRecord.class.php' ); | 3 include_once( INSTALL_PATH . '/DBRecord.class.php' ); |
4 include_once( INSTALL_PATH . '/Reservation.class.php' ); | 4 include_once( INSTALL_PATH . '/Reservation.class.php' ); |
5 include_once( INSTALL_PATH . '/reclib.php' ); | 5 include_once( INSTALL_PATH . '/reclib.php' ); |
6 include_once( INSTALL_PATH . '/Settings.class.php' ); | |
6 | 7 |
7 $program_id = 0; | 8 $program_id = 0; |
8 $reserve_id = 0; | 9 $reserve_id = 0; |
10 $settings = Settings::factory(); | |
9 | 11 |
10 if( isset($_GET['program_id'])) { | 12 if( isset($_GET['program_id'])) { |
11 $program_id = $_GET['program_id']; | 13 $program_id = $_GET['program_id']; |
12 } | 14 } |
13 else if(isset($_GET['reserve_id'])) { | 15 else if(isset($_GET['reserve_id'])) { |
14 $reserve_id = $_GET['reserve_id']; | 16 $reserve_id = $_GET['reserve_id']; |
15 try { | 17 try { |
16 $rec = new DBRecord( TBL_PREFIX.RESERVE_TBL, "id" , $reserve_id ); | 18 $rec = new DBRecord( RESERVE_TBL, "id" , $reserve_id ); |
17 $program_id = $rec->program_id; | 19 $program_id = $rec->program_id; |
18 | 20 |
19 if( isset( $_GET['delete_file'] ) ) { | 21 if( isset( $_GET['delete_file'] ) ) { |
20 if( $_GET['delete_file'] == 1 ) { | 22 if( $_GET['delete_file'] == 1 ) { |
21 // ファイルを削除 | 23 // ファイルを削除 |
22 if( file_exists( INSTALL_PATH."/".SPOOL."/".$rec->path ) ) { | 24 if( file_exists( INSTALL_PATH."/".$settings->spool."/".$rec->path ) ) { |
23 @unlink(INSTALL_PATH."/".SPOOL."/".$rec->path); | 25 @unlink(INSTALL_PATH."/".$settings->spool."/".$rec->path); |
24 } | 26 } |
25 } | 27 } |
26 } | 28 } |
27 } | 29 } |
28 catch( Exception $e ) { | 30 catch( Exception $e ) { |
33 | 35 |
34 | 36 |
35 // 手動取り消しのときには、その番組を自動録画対象から外す | 37 // 手動取り消しのときには、その番組を自動録画対象から外す |
36 if( $program_id ) { | 38 if( $program_id ) { |
37 try { | 39 try { |
38 $rec = new DBRecord(TBL_PREFIX.PROGRAM_TBL, "id", $program_id ); | 40 $rec = new DBRecord(PROGRAM_TBL, "id", $program_id ); |
39 $rec->autorec = 0; | 41 $rec->autorec = 0; |
40 } | 42 } |
41 catch( Exception $e ) { | 43 catch( Exception $e ) { |
42 // 無視 | 44 // 無視 |
43 } | 45 } |