<?
$aErrors = "";
if (!empty ($thefile_name))
{
if (($thefile_type == "image/gif") ||
($thefile_type == "image/jpg") ||
($thefile_type == "image/jpeg") ||
($thefile_type == "image/pjpeg") ||
($thefile_type == "image/png"))
{
if (($thefile_size < 1000 ))
{
$aCurBasePath = dirname ($PATH_TRANSLATED);
$aNewName = $aCurBasePath + "/upfile/" + $thefile_name;
copy ($thefile, $aNewName);
}
else
{
$aErrors = "The file was too big";
}
}
else
{
$aErrors = "UnKnoWn File Format";
}
}
else
{
$aErrors = "No File Selected";
}
?>
<html>
<head>Displaying Uploaded Image</head>
<body>
<?
if ($aErrors != "")
{
print ("<b>There were Errors:</b> $aErrors<br>");
}
else
{
print ("The picture you uploaded:<br><br>");
print ("<img src=\"upfile/$thefile_name\" border=\"0\">");
}
?>
</body>
</html>