0)
{
$error_document1 = $_FILES["image"]["error"];
}
else
{
if($_FILES['image']['size'] > 60000000)
{
print "Error : The image you tried to upload is too large , its need to be Max. 150Kb please try again !";
}
else
{
$image_size = getimagesize($_FILES['image']['tmp_name']);
if($image_size[0] > 600 or $image_size[1] > 300)
{
print "Error : The image you tried to upload is too large , its need to be Max. 1650 X 650 Px. please try again !";
}
else
{
$temp = explode(".", $_FILES["image"]["name"]);
$filename=current($temp);
$ext = end($temp);
$newname= "d1".time().".$ext";
move_uploaded_file($_FILES["image"]["tmp_name"] , "$folder".$newname);
mysql_query("UPDATE home_image set top_left = '$newname'");
}
}
}
}
if(file_exists($_FILES['image_r']['tmp_name']))
{
$temp = explode(".", $_FILES["image_r"]["name"]);
$extension = end($temp);
if ($_FILES["image_r"]["error"] > 0)
{
$error_document1 = $_FILES["image_r"]["error"];
}
else
{
if($_FILES['image_r']['size'] > 60000000)
{
print "Error : The image you tried to upload is too large , its need to be Max. 150Kb please try again !";
}
else
{
$image_size = getimagesize($_FILES['image_r']['tmp_name']);
if($image_size[0] > 600 or $image_size[1] > 300)
{
print "Error : The image you tried to upload is too large , its need to be Max. 1650 X 650 Px. please try again !";
}
else
{
$temp = explode(".", $_FILES["image_r"]["name"]);
$filename=current($temp);
$ext = end($temp);
$top_right = "d2".time().".$ext";
move_uploaded_file($_FILES["image_r"]["tmp_name"] , "$folder".$top_right);
mysql_query("UPDATE home_image set top_right = '$top_right'");
}
}
}
}
if(file_exists($_FILES['online_image']['tmp_name']))
{
$temp = explode(".", $_FILES["online_image"]["name"]);
$extension = end($temp);
if ($_FILES["online_image"]["error"] > 0)
{
$error_document1 = $_FILES["online_image"]["error"];
}
else
{
if($_FILES['online_image']['size'] > 60000000)
{
print "Error : The image you tried to upload is too large , its need to be Max. 150Kb please try again !";
}
else
{
$image_size = getimagesize($_FILES['online_image']['tmp_name']);
if($image_size[0] > 600 or $image_size[1] > 300)
{
print "Error : The image you tried to upload is too large , its need to be Max. 1650 X 650 Px. please try again !";
}
else
{
$temp = explode(".", $_FILES["online_image"]["name"]);
$filename=current($temp);
$ext = end($temp);
$bottom_left = "d3".time().".$ext";
move_uploaded_file($_FILES["online_image"]["tmp_name"] , "$folder".$bottom_left);
mysql_query("UPDATE home_image set bottom_left = '$bottom_left' ");
}
}
}
}
if(file_exists($_FILES['online_image_r']['tmp_name']))
{
$temp = explode(".", $_FILES["online_image_r"]["name"]);
$extension = end($temp);
if ($_FILES["online_image_r"]["error"] > 0)
{
$error_document1 = $_FILES["online_image_r"]["error"];
}
else
{
if($_FILES['online_image_r']['size'] > 60000000)
{
print "Error : The image you tried to upload is too large , its need to be Max. 150Kb please try again !";
}
else
{
$image_size = getimagesize($_FILES['online_image_r']['tmp_name']);
if($image_size[0] > 600 or $image_size[1] > 300)
{
print "Error : The image you tried to upload is too large , its need to be Max. 1650 X 650 Px. please try again !";
}
else
{
$temp = explode(".", $_FILES["online_image_r"]["name"]);
$filename=current($temp);
$ext = end($temp);
$bottom_right = "d4".time().".$ext";
move_uploaded_file($_FILES["online_image_r"]["tmp_name"] , "$folder".$bottom_right);
mysql_query("UPDATE home_image set bottom_right = '$bottom_right' ");
}
}
}
}
print "Image Successfully Updated !";
}
$_SESSION['mnsbprogsave'] = "SRK".rand(1111111,9999999);
?>