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' );
|
|
6
|
|
7 $program_id = 0;
|
|
8 $reserve_id = 0;
|
|
9
|
|
10 if( isset($_GET['program_id'])) {
|
|
11 $program_id = $_GET['program_id'];
|
|
12 }
|
|
13 else if(isset($_GET['reserve_id'])) {
|
|
14 $reserve_id = $_GET['reserve_id'];
|
|
15 try {
|
|
16 $rec = new DBRecord( TBL_PREFIX.RESERVE_TBL, "id" , $reserve_id );
|
|
17 $program_id = $rec->program_id;
|
|
18 }
|
|
19 catch( Exception $e ) {
|
|
20 // 無視
|
|
21 }
|
|
22 }
|
|
23
|
|
24 // 手動取り消しのときには、その番組を自動録画対象から外す
|
|
25 if( $program_id ) {
|
|
26 try {
|
|
27 $rec = new DBRecord(TBL_PREFIX.PROGRAM_TBL, "id", $program_id );
|
|
28 $rec->autorec = 0;
|
|
29 }
|
|
30 catch( Exception $e ) {
|
|
31 // 無視
|
|
32 }
|
|
33 }
|
|
34
|
|
35 // 予約取り消し実行
|
|
36 try {
|
|
37 Reservation::cancel( $reserve_id, $program_id );
|
|
38 }
|
|
39 catch( Exception $e ) {
|
|
40 exit( "Error" . $e->getMessage() );
|
|
41 }
|
|
42 exit();
|
|
43 ?> |