Viewing file: EditRoom.php (3.74 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
";
echo " กรุณาทำการ Login ก่อน ";
echo "";
exit();
}
else {
/** Configuration */
require_once( "../configuration.php" );
require_once( $_Config_absolute_path . "/includes/framework.php" );
require_once( "../includes/Function.php" );
require_once( "../includes/FunctionDB.php" );
/** Create Database Object */
$dbObj = new DBConn;
/** Config Table for This Page */
$myTable = "room_tb";
$myTableFK = "code";
//$BuildD_Yr = $_POST['mYear']."-".$_POST['mMonth']."-".$_POST['mDate'];
$Path = "../Man_pic";
//### Upload Image File
if( $_FILES['Img1']['name'] != "" ) {
$Img1 = $_FILES['Img1']['name'];
@copy( $_FILES['Img1']['tmp_name'] , $Path."/".$Img1 );
@unlink( $_FILES['Img1']['tmp_name'] );
$strSQL = " UPDATE $myTable SET Room_name='$Room_name' , BuildD_No='$BuildD_No', roomtyId='$roomtyId' , Room_code='$Room_code' , Size='$Size' , Area='$Area' , Eletric_meter='$Eletric_meter' , Img1='$Img1' WHERE code ='$code' ";
}
else {
$strSQL = " UPDATE $myTable SET Room_name='$Room_name' , BuildD_No='$BuildD_No', roomtyId='$roomtyId' , Room_code='$Room_code' , Size='$Size' , Area='$Area' , Eletric_meter='$Eletric_meter' WHERE code ='$code' ";
}
$result = $dbObj->runQuery($strSQL);
$dbObj->freeresult($result);
} # else
?>
=$_Config_sitename;?>
freeresult($result1);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?> bool(false)
|