Mercurial > epgrec.yaz
annotate customReservation.php @ 157:00b5ed67d792
mod: xmlrpcをテスト的に追加(まだ途中)
author | Sushi-k <epgrec@park.mda.or.jp> |
---|---|
date | Tue, 30 Mar 2010 19:00:39 +0900 |
parents | 481e789605e3 |
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 . "/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, // 牙 | |
142
481e789605e3
mod: EPGの更新と同時に予約情報を更新するように変更、ログビューアの追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
39
diff
changeset
|
63 $mode, // 牙祉≪若 |
481e789605e3
mod: EPGの更新と同時に予約情報を更新するように変更、ログビューアの追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
39
diff
changeset
|
64 1 // 若c |
1 | 65 ); |
66 } | |
67 catch( Exception $e ) { | |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
68 exit( "Error:".$e->getMessage() ); |
1 | 69 } |
23
f3bf1be1a51b
Change: using ajax in custom reservation method
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
1
diff
changeset
|
70 exit( "".$program_id ); |
1 | 71 ?> |