|
|
PropertyPlus Admin > Edit/Manage PropertyPhotograph not deleted, as none was uploaded. ";} else{ unlink($PhotoLink);} // Delete the corresponding photo print "The Property has been deleted from the system. "; } ###### Edit the Establishment ########### if (isset($_POST["op"]) && ($_POST["op"]=="editestablishment")) { mysql_connect($server, $DBusername, $DBpassword) or die ("$DatabaseError - 42"); mysql_select_db($database); $result = mysql_query("SELECT * from $property_table where id = '".$_POST['id']."' LIMIT 1") or die ("$DatabaseError - 94"); if (mysql_num_rows($result)) { while ($qry = mysql_fetch_array($result)) { $PropertyType = $qry['PropertyType']; // Property Type Selection $PropertyBedrooms = $qry['PropertyBedrooms']; // Property Bedroom Seleftion $PropertyStatus = $qry['PropertyStatus']; // Property Status Seleftion ?>You have selected to edit the following property The Property Photogragh has not been updated "; } else { do_upload(); $PropertyImageURL = "".$_FILES['userfile']['name'].""; } mysql_connect($server, $DBusername, $DBpassword) or die ("$DatabaseError - 42"); mysql_select_db($database); mysql_query("UPDATE $property_table SET PropertyRef ='$_POST[PropertyRef]', PropertyType = '$_POST[PropertyType]', PropertyPrice = '$_POST[PropertyPrice]', PropertyBedrooms = '$_POST[PropertyBedrooms]', PropertyAddress = '$_POST[PropertyAddress]', PropertyLocation = '$_POST[PropertyLocation]', PropertyDescription = '$_POST[PropertyDescription]', PropertyDescriptionLong = '$_POST[PropertyDescriptionLong]', PropertyStatus = '$_POST[PropertyStatus]', PropertyImageURL = '$PropertyImageURL', DateAdded = '$_POST[DateAdded]' WHERE id = '$_POST[id]'"); print "Property details for '".$_POST['PropertyRef']."' have been updated "; print ""; } ?> |