diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/changeReservation.php	Sat Jul 25 21:29:32 2009 +0900
@@ -0,0 +1,27 @@
+<?php
+include_once('config.php');
+include_once(INSTALL_PATH."/DBRecord.class.php");
+
+if( !isset( $_POST['reserve_id'] ) ) {
+	exit("Error: IDが指定されていません" );
+}
+$reserve_id = $_POST['reserve_id'];
+
+try {
+	$rec = new DBRecord(TBL_PREFIX.RESERVE_TBL, "id", $reserve_id );
+	
+	if( isset( $_POST['title'] ) ) {
+		$rec->title = trim( $_POST['title'] );
+	}
+	
+	if( isset( $_POST['description'] ) ) {
+		$rec->description = trim( $_POST['description'] );
+	}
+}
+catch( Exception $e ) {
+	exit("Error: ". $e->getMessage());
+}
+
+exit("complete");y
+
+?>
\ No newline at end of file