include '../inc/db.inc.php';
$adminPage = true;
include '../inc/album.inc.php';
ini_set("memory_limit","100M");
$id = 2;
echo "
";
// If the user has submitted a file for uploading.
if(isset($_FILES['photo']) && is_uploaded_file($_FILES['photo']['tmp_name']))
{
$photoFileName = $id.".".$_FILES['photo']['name'];
$photoFileName = str_replace(" ","_",$photoFileName);
# Add the photo to the MySQL database
if(move_uploaded_file($_FILES['photo']['tmp_name'], ABSOLUTE_PATH."old/".$photoFileName))
{
chmod(ABSOLUTE_PATH."old/".$photoFileName, 0755);
if(make_thumbnail($photoFileName,"old/"))
{
if(resizeImage($photoFileName,"old/",1024,768))
{
add_event_photo($photoFileName, $_POST['title'], $_POST['description'],2);
# Move the photo from the temp directory to
# the images directory.
echo "The photo was successfully uploaded.
Error Processing Image. Us Type
Error Processing Image. Us Type
There was an error uploading the photo.
";
}
}
// display the form on every page instance
echo $addPhotoForm;
include '../inc/footer.php';
?>