Message List
select('amenities','*',NULL,"id = $tblid",NULL,NULL);
$result = $db->getResult();
extract($result[0]);
$_SESSION['mnsbprogupdate'] = rand(11111111,99999999);
?>
0)
{
$error_document1 = $_FILES["image"]["error"];
}
else
{
if($_FILES['file']['image'] > 150000)
{
print "Error : The image you tried to upload is too large , its need to be Max. 500Kb please try again !";
}
else
{
$image_size = getimagesize($_FILES['file']['tmp_name']);
if($image_size[0] > 9400 or $image_size[1] > 9300)
{
print "Error : The image you tried to upload is too large , its need to be Max. 400 X 300 Px. please try again !";
}
else
{
unlink($folder.$deleteddbimagename);
$temp = explode(".", $_FILES["file"]["name"]);
$filename=current($temp);
$ext = end($temp);
$newname= "TL".time().".$ext";
move_uploaded_file($_FILES["file"]["tmp_name"] , "$folder".$newname);
$updval = array('title' => $title,'description' => $description ,'photo' => $newname);
$db->update('amenities',$updval,"id = '$tblid'");
print "Success : Product Successfully Updated !";
}
}
}
}
else
{
$updval = array('title' => $title,'description' => $description);
$db->update('amenities',$updval,"id = '$tblid'");
print "Success : Product Successfully Updated !";
}
}
if(isset($_POST[$_SESSION['mnsbprogdelete']]))
{
extract($_POST);
$db->delete('amenities',"id = '$tblid'");
print "Success : amenities Successfully Deleted !
";
}
$_SESSION['mnsbprogdelete'] = rand(11111111,99999999);
$db->selectRowCnt('amenities','*',NULL,$query_txt,NULL);
$totalrows = $db->numRows();
if($totalrows > 0)
{
?>