I have the below code but I get this error all the time, well it was fine for a while then it just stopped and now i get this error all the time (how can i fix it?????)
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.
-
Please try the following:
Click the Refresh button, or try again later.
Open the Web site home page, and then look for links to the information you want.
If you believe you should be able to view this directory or page, please contact the Web site administrator by using the e-mail address or phone number listed on the Web site home page.
10053 - Connection aborted
Internet Security and Acceleration Server
-
Technical Information (for support personnel)
Background:
The server you are attempting to access has aborted the connection with the gateway.
Addimg.php
<FORM ENCTYPE="multipart/form-data" ACTION="addimgck.php" METHOD=POST>
Upload this file: <INPUT NAME="userfile" TYPE="file">
<select size="1" name="trip_id">
<option value="1">Thailand / Malaysia 04</option>
</select>
<p>
<INPUT TYPE="submit" VALUE="Send File">
<p>Date Taken:
<select size="1" name="D1" style="font-family: Verdana; font-size: 8pt">
<option value="01" >1</option>
<option value="02">2</option>
<option value="03">3</option>
<option value="04">4</option>
**
</select>
<select size="1" name="D2" style="font-family: Verdana; font-size: 8pt">
<option value="01">Jan</option>
<option value="02">Feb</option>
**
</select>
<select size="1" name="D3" style="font-size: 8pt; font-family: Verdana">
<option value="2004">2004</option>
<option value="2005" selected="selected">2005</option>
<option value="2006">2006</option>
</select>
<br>Taken By:
<input type="text" name="taken" size="30" value="Bevan">
<br>Short Detail:
<input type="text" name="shdetail" size="30">
<br>Details:
<textarea rows="5" name="detail" cols="30"></textarea>
<br>Location:
<input type="text" name="location" size="30">
<br>Private?:
<input type="checkbox" name="private" value="1">
<p>
<INPUT TYPE="submit" VALUE="Send File">
</FORM>
addimgck.php
<?php
mysql_connect (localhost, **, **);
mysql_select_db (**);
$result2 = mysql_query ("SELECT * from trips order by id desc limit 1");
$row2 = mysql_fetch_array($result2);
$name = $row2[id] + 1;
$type = ".jpg";
$add="../album/$name$type";
if(move_uploaded_file ($userfile, $add)){
echo "Successfully uploaded the mage";
chmod("$add",0777);
}else{echo "Failed to upload file Contact Site admin to fix the problem";
exit;}
///////// Start the thumbnail generation//////////////
$tsrc="../album/thumbs/$name$type"; // Path where thumb nail image will be stored
if (!($userfile_type =="image/pjpeg" OR $userfile_type=="image/gif")){echo "Your uploaded file must be of JPG or GIF. Other file types are not allowed<BR>";
exit;}
/////////////////////////////////////////////// Starting of GIF thumb nail creation///////////
if (@$userfile_type=="image/gif")
{
$im=ImageCreateFromGIF($add);
$width=ImageSx($im); // Original picture width is stored
$height=ImageSy($im); // Original picture height is stored
if ($hight == '2592' && $width == '1944') {
$n_width = 75;
$n_height = 100;
} elseif ($height == '1600' && $width == '1200') {
$n_width = 75;
$n_height = 100;
} elseif ($height == '1024' && $width == '768') {
$n_width = 75;
$n_height = 100;
} elseif ($height == '640' && $width == '480') {
$n_width = 75;
$n_height = 100;
} elseif ($width == '2592' && $height == '1944') {
$n_width = 100;
$n_height = 75;
} elseif ($width == '1600' && $height == '1200') {
$n_width = 100;
$n_height = 75;
} elseif ($width == '1024' && $height == '768') {
$n_width = 100;
$n_height = 75;
} elseif ($width == '640' && $height == '480') {
$n_width = 100;
$n_height = 75;
} else {
$n_width = 100;
$n_height = 100;
}
$newimage=imagecreatetruecolor($n_width,$n_height);
imageCopyResized($newimage,$im,0,0,0,0,$n_width,$n_height,$width,$height);
if (function_exists("imagegif")) {
Header("Content-type: image/gif");
ImageGIF($newimage,$tsrc);
}
elseif (function_exists("imagejpeg")) {
Header("Content-type: image/jpeg");
ImageJPEG($newimage,$tsrc);
}
chmod("$tsrc",0777);
}
if($userfile_type=="image/pjpeg"){
$im=ImageCreateFromJPEG($add);
$width=ImageSx($im); // Original picture width is stored
$height=ImageSy($im); // Original picture height is stored
if ($hight == '2592' && $width == '1944') {
$n_width = 75;
$n_height = 100;
} elseif ($height == '1600' && $width == '1200') {
$n_width = 75;
$n_height = 100;
} elseif ($height == '1024' && $width == '768') {
$n_width = 75;
$n_height = 100;
} elseif ($height == '640' && $width == '480') {
$n_width = 75;
$n_height = 100;
} elseif ($width == '2592' && $height == '1944') {
$n_width = 100;
$n_height = 75;
} elseif ($width == '1600' && $height == '1200') {
$n_width = 100;
$n_height = 75;
} elseif ($width == '1024' && $height == '768') {
$n_width = 100;
$n_height = 75;
} elseif ($width == '640' && $height == '480') {
$n_width = 100;
$n_height = 75;
} else {
$n_width = 100;
$n_height = 100;
}
$newimage=imagecreatetruecolor($n_width,$n_height);
imageCopyResized($newimage,$im,0,0,0,0,$n_width,$n_height,$width,$height);
ImageJpeg($newimage,$tsrc);
chmod("$tsrc",0777);
}
$vsrc="../album/mid/$name$type"; // Path where thumb nail image will be stored
if (!($userfile_type =="image/pjpeg" OR $userfile_type=="image/gif")){echo "Your uploaded file must be of JPG or GIF. Other file types are not allowed<BR>";
exit;}
if (@$userfile_type=="image/gif")
{
$imm=ImageCreateFromGIF($add);
$width2=ImageSx($imm); // Original picture width is stored
$height2=ImageSy($imm); // Original picture height is stored
if ($width2 == '2592' && $height2 == '1944') {
$n_width2 = 600;
$n_height2 = 450;
} elseif ($width2 == '1600' && $height2 == '1200') {
$n_width2 = 600;
$n_height2 = 450;
} elseif ($width2 == '1024' && $height2 == '768') {
$n_width2 = 600;
$n_height2 = 450;
} elseif ($width2 == '640' && $height2 == '480') {
$n_width2 = 600;
$n_height2 = 450;
} elseif ($height2 == '1600' && $width2 == '1200') {
$n_width2 = 450;
$n_height2 = 600;
} elseif ($height2 == '1024' && $width2 == '768') {
$n_width2 = 450;
$n_height2 = 600;
} elseif ($height2 == '640' && $width2 == '480') {
$n_width2 = 450;
$n_height2 = 600;
} else {
$n_width2 = 500;
$n_height2 = 500;
}
$newimage2=imagecreatetruecolor($n_width2,$n_height2);
imageCopyResized($newimage2,$im,0,0,0,0,$n_width2,$n_height2,$width2,$height2);
if (function_exists("imagegif")) {
Header("Content-type: image/gif");
ImageGIF($newimage2,$vsrc);
}
elseif (function_exists("imagejpeg")) {
Header("Content-type: image/jpeg");
ImageJPEG($newimage2,$vsrc);
}
chmod("$tsrc",0777);
}
if($userfile_type=="image/pjpeg"){
$imm=ImageCreateFromJPEG($add);
$width2=ImageSx($imm); // Original picture width is stored
$height2=ImageSy($imm); // Original picture height is stored
if ($width2 == '2592' && $height2 == '1944') {
$n_width2 = 600;
$n_height2 = 450;
} elseif ($width2 == '1600' && $height2 == '1200') {
$n_width2 = 600;
$n_height2 = 450;
} elseif ($width2 == '1024' && $height2 == '768') {
$n_width2 = 600;
$n_height2 = 450;
} elseif ($width2 == '640' && $height2 == '480') {
$n_width2 = 600;
$n_height2 = 450;
} elseif ($height2 == '1600' && $width2 == '1200') {
$n_width2 = 450;
$n_height2 = 600;
} elseif ($height2 == '1024' && $width2 == '768') {
$n_width2 = 450;
$n_height2 = 600;
} elseif ($height2 == '640' && $width2 == '480') {
$n_width2 = 450;
$n_height2 = 600;
} else {
$n_width2 = 100;
$n_height2 = 100;
}
$newimage2=imagecreatetruecolor($n_width2,$n_height2);
imageCopyResized($newimage2,$imm,0,0,0,0,$n_width2,$n_height2,$width2,$height2);
ImageJpeg($newimage2,$vsrc);
chmod("$tsrc",0777);
}
mysql_connect (localhost, **, **);
mysql_select_db (**);
$filename = $name . $type;
echo $filename;
$date = "$D3-$D2-$D1";
$result = mysql_query ("INSERT INTO trips (`id`,`taken`,`thumb`,`main`,`mid`,`detail`,`shdetail`,`trip_id`,`location`,`private`,`date`) Values('','$taken','$filename','$filename','$filename','$detail','$shdetail','$trip_id','$location','$private','$date')") or die("INSERT error: ".mysql_error());
?>
</body>
<font size="2" face="verdana"><a href="addimg.php">Add Another</a>
</html>