This project is a gallery of spatial photos built using PHP with an object-oriented MVC methodology. The backend is powered by MongoDB, and the application leverages libraries for advanced photo processing.
- Supported Formats: PNG, JPG
- Size Limit: Maximum file size is 1 MB.
- Validation:
- File format and size checks with error messages for invalid inputs.
- Storage:
- Uploaded images are stored in the
imagessubdirectory under the application'sDocumentRootdirectory (ensure proper permissions for this directory).
- Uploaded images are stored in the
- Watermarking:
- A text watermark is applied to the original image. The watermark content is specified via a form field.
- Thumbnail Generation:
- A 200x125-pixel thumbnail is created for each uploaded image.
- PHP GD Library:
- All image processing uses the PHP GD library.
- Displays a paginated gallery of thumbnails.
- Clicking on a thumbnail shows the corresponding watermarked image in full size.
- Implements PHP directives (
include,include_once,require,require_once) for modularity.
- Metadata Storage:
- Each uploaded photo is associated with a title and author. These details are stored in the MongoDB database.
- Gallery Display:
- Titles and authors are displayed alongside photo thumbnails.
- Registration:
- Users can register with a form containing:
- Email address, login, password, and password confirmation.
- Passwords are securely hashed before storage in MongoDB.
- Users can register with a form containing:
- Login:
- Users log in using their credentials.
- Login status is managed via sessions.
- Logout:
- Logged-in users can log out via an option in the UI.
- Users can:
- Select photos in the gallery using checkboxes.
- Save selected photos in their session for future visits.
- View and manage saved photos on a dedicated subpage, with options to remove photos from the saved set.
-
Private Photos:
- Logged-in users can choose to make photos "public" or "private".
- Private photos:
- Only visible to the user who uploaded them.
- Public photos:
- Visible to all users.
-
Automatic Author Attribution
- The "author" field is pre-filled with the logged-in user's login.
- Implements an interactive search engine using AJAX.
- Features:
-
A text field allows users to search for photos by title.
-
As the user types, AJAX requests retrieve matching thumbnails asynchronously.
-
Matching results are dynamically displayed without reloading the page.
-





