Great Neck South Class of 1972: $event[title]: Add Photo"; include '../inc/header.php'; if(!($id && $event)) { echo "

No such event

"; } echo "

Old Photos

"; $addPhotoForm = "

Choose File:

Caption:

Description:

Please click the \"Add Photo\" button only once. It may take a few minutes to upload your photo.

"; // 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 "

Photo

The photo was successfully uploaded.

Return to the main page."; } else { echo "

Error Processing Image. Us Type

"; } } else { echo "

Error Processing Image. Us Type

"; } } else { echo "

There was an error uploading the photo.

"; } } // display the form on every page instance echo $addPhotoForm; include '../inc/footer.php'; ?>