Mercurial > epgrec.yaz
annotate cancelReservation.php @ 171:c729a68415eb
fix: preg_splitのポカミスを修正
author | Sushi-k <epgrec@park.mda.or.jp> |
---|---|
date | Mon, 26 Apr 2010 14:54:35 +0900 |
parents | c6c6bd734f18 |
children |
rev | line source |
---|---|
1 | 1 <?php |
2 include_once('config.php'); | |
3 include_once( INSTALL_PATH . '/DBRecord.class.php' ); | |
4 include_once( INSTALL_PATH . '/Reservation.class.php' ); | |
5 include_once( INSTALL_PATH . '/reclib.php' ); | |
37
e5f9aa34d06f
change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
6 include_once( INSTALL_PATH . '/Settings.class.php' ); |
1 | 7 |
8 $program_id = 0; | |
9 $reserve_id = 0; | |
37
e5f9aa34d06f
change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
10 $settings = Settings::factory(); |
161
84220382fea8
mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
143
diff
changeset
|
11 $rec = null; |
84220382fea8
mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
143
diff
changeset
|
12 $path = ""; |
1 | 13 |
14 if( isset($_GET['program_id'])) { | |
15 $program_id = $_GET['program_id']; | |
16 } | |
17 else if(isset($_GET['reserve_id'])) { | |
18 $reserve_id = $_GET['reserve_id']; | |
19 try { | |
37
e5f9aa34d06f
change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
20 $rec = new DBRecord( RESERVE_TBL, "id" , $reserve_id ); |
1 | 21 $program_id = $rec->program_id; |
162
c6c6bd734f18
fix: ミス修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
161
diff
changeset
|
22 |
c6c6bd734f18
fix: ミス修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
161
diff
changeset
|
23 if( isset( $_GET['delete_file'] ) ) { |
c6c6bd734f18
fix: ミス修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
161
diff
changeset
|
24 if( $_GET['delete_file'] == 1 ) { |
c6c6bd734f18
fix: ミス修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
161
diff
changeset
|
25 $path = INSTALL_PATH."/".$settings->spool."/".$rec->path; |
c6c6bd734f18
fix: ミス修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
161
diff
changeset
|
26 } |
c6c6bd734f18
fix: ミス修正
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
161
diff
changeset
|
27 } |
1 | 28 } |
29 catch( Exception $e ) { | |
30 // ∴ | |
31 } | |
32 } | |
33 | |
34 // 羔腟牙糸乗院紊 | |
35 if( $program_id ) { | |
36 try { | |
37
e5f9aa34d06f
change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents:
14
diff
changeset
|
37 $rec = new DBRecord(PROGRAM_TBL, "id", $program_id ); |
1 | 38 $rec->autorec = 0; |
39 } | |
40 catch( Exception $e ) { | |
41 // ∴ | |
42 } | |
43 } | |
161
84220382fea8
mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
143
diff
changeset
|
44 |
84220382fea8
mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
143
diff
changeset
|
45 |
1 | 46 |
47 // 篋膣羔絎茵 | |
48 try { | |
49 Reservation::cancel( $reserve_id, $program_id ); | |
161
84220382fea8
mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
143
diff
changeset
|
50 if( isset( $_GET['delete_file'] ) ) { |
84220382fea8
mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
143
diff
changeset
|
51 if( $_GET['delete_file'] == 1 ) { |
84220382fea8
mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
143
diff
changeset
|
52 // <ゃ |
84220382fea8
mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
143
diff
changeset
|
53 if( file_exists( $path) ) { |
84220382fea8
mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
143
diff
changeset
|
54 @unlink($path); |
84220382fea8
mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
143
diff
changeset
|
55 @unlink($path.".jpg"); |
84220382fea8
mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
143
diff
changeset
|
56 } |
84220382fea8
mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
143
diff
changeset
|
57 } |
84220382fea8
mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
143
diff
changeset
|
58 } |
1 | 59 } |
60 catch( Exception $e ) { | |
61 exit( "Error" . $e->getMessage() ); | |
62 } | |
63 exit(); | |
64 ?> |