Mercurial > epgrec.yaz
annotate customReservation.php @ 136:6754b6aa50cf
mod: ログ機能のためにconfig.phpを変更
author | epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp> |
---|---|
date | Sun, 21 Mar 2010 00:00:58 +0900 |
parents | 8965ef108821 |
children | 481e789605e3 |
rev | line source |
---|---|
1 | 1 <?php |
2 include_once('config.php'); | |
3 include_once( INSTALL_PATH . "/DBRecord.class.php" ); | |
4 include_once( INSTALL_PATH . "/reclib.php" ); | |
5 include_once( INSTALL_PATH . "/Reservation.class.php" ); | |
37
e5f9aa34d06f
change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents:
23
diff
changeset
|
6 include_once( INSTALL_PATH . "/Settings.class.php" ); |
e5f9aa34d06f
change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents:
23
diff
changeset
|
7 |
e5f9aa34d06f
change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents:
23
diff
changeset
|
8 $settings = Settings::factory(); |
e5f9aa34d06f
change: modify all script for web base setting
yoneda <epgrec@park.mda.or.jp>
parents:
23
diff
changeset
|
9 |
1 | 10 $program_id = 0; |
11 if( isset( $_POST['program_id'] ) ) $program_id = $_POST['program_id']; | |
12 | |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
13 |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
14 if(!( |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
15 isset($_POST['shour']) && |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
16 isset($_POST['smin']) && |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
17 isset($_POST['smonth']) && |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
18 isset($_POST['sday']) && |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
19 isset($_POST['syear']) && |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
20 isset($_POST['ehour']) && |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
21 isset($_POST['emin']) && |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
22 isset($_POST['emonth']) && |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
23 isset($_POST['eday']) && |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
24 isset($_POST['eyear']) && |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
25 isset($_POST['channel_id']) && |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
26 isset($_POST['title']) && |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
27 isset($_POST['description']) && |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
28 isset($_POST['category_id']) && |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
29 isset($_POST['record_mode'])) |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
30 ) { |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
31 exit("Error:篋膣綽荀ゃ祉障"); |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
32 } |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
33 |
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
34 |
1 | 35 $start_time = @mktime( $_POST['shour'], $_POST['smin'], 0, $_POST['smonth'], $_POST['sday'], $_POST['syear'] ); |
36 if( ($start_time < 0) || ($start_time === false) ) { | |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
37 exit("Error:紮筝罩cс" ); |
1 | 38 } |
39 | |
40 $end_time = @mktime( $_POST['ehour'], $_POST['emin'], 0, $_POST['emonth'], $_POST['eday'], $_POST['eyear'] ); | |
41 if( ($end_time < 0) || ($end_time === false) ) { | |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
42 exit("Error:腟篋筝罩cс" ); |
1 | 43 } |
44 | |
45 $channel_id = $_POST['channel_id']; | |
46 $title = $_POST['title']; | |
47 $description = $_POST['description']; | |
48 $category_id = $_POST['category_id']; | |
49 $mode = $_POST['record_mode']; | |
50 | |
51 | |
52 $rval = 0; | |
53 try{ | |
54 $rval = Reservation::custom( | |
55 toDatetime($start_time), | |
56 toDatetime($end_time), | |
57 $channel_id, | |
58 $title, | |
59 $description, | |
60 $category_id, | |
61 $program_id, | |
62 0, // 牙 | |
63 $mode // 牙祉≪若 | |
64 ); | |
65 } | |
66 catch( Exception $e ) { | |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
67 exit( "Error:".$e->getMessage() ); |
1 | 68 } |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
69 exit( "".$program_id ); |
1 | 70 ?> |