Mercurial > epgrec.yaz
annotate changeReservation.php @ 25:03107333d942
add: editable reserve program's title & description
author | yoneda <epgrec@park.mda.or.jp> |
---|---|
date | Sat, 25 Jul 2009 21:29:32 +0900 |
parents | |
children | 82c1375ddb4a |
rev | line source |
---|---|
25
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
1 <?php |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
2 include_once('config.php'); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
3 include_once(INSTALL_PATH."/DBRecord.class.php"); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
4 |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
5 if( !isset( $_POST['reserve_id'] ) ) { |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
6 exit("Error: IDが指定されていません" ); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
7 } |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
8 $reserve_id = $_POST['reserve_id']; |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
9 |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
10 try { |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
11 $rec = new DBRecord(TBL_PREFIX.RESERVE_TBL, "id", $reserve_id ); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
12 |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
13 if( isset( $_POST['title'] ) ) { |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
14 $rec->title = trim( $_POST['title'] ); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
15 } |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
16 |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
17 if( isset( $_POST['description'] ) ) { |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
18 $rec->description = trim( $_POST['description'] ); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
19 } |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
20 } |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
21 catch( Exception $e ) { |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
22 exit("Error: ". $e->getMessage()); |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
23 } |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
24 |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
25 exit("complete");y |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
26 |
03107333d942
add: editable reserve program's title & description
yoneda <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
27 ?> |