README
-- My first dynamic website with PHP. It is a full fledge photo submission site that is used for Yearbook management.
PUBLIC/MODERATOR VIEW Handling Files:
-
index.php:
-
Main page for Public/Moderator View
-
Handles functions for Power Buttons (resetJSON, deleteUID, deleteAllEntries)
-
Set up the main page - when Public/Moderator view first load up
-
Load images from galleryinfo.json and display them
-
Doesn't handle Form Submission (approval.php does it)
-
-
myscript.js:
- Utilise fetch from multiple php files (sortjson.php, readjson.php)
- When users click on the Filter/Sorting button, the function is handle here (load new images, update buttons)
- Handles the Search function
- Handles the lightbox function
- Handles the Edit function
--> Basically all functioning in Public/Moderator views are processed in this file
-
galleryinfo.json:
- storing all images information of Approved images
-
readjson.php:
- read info from galleryinfo.json
- use as a filter for access type: all, public, private
- return json file of filered data entry
-
sortjson.php:
- read info from galleryinfo.json
- use as a sorting on: UID, first name, last name
- return json file of sorted data entry
-
downloadall.php and HZIP.php:
- Zip all images and Download them
-
footer.inc:
- is a form
- contains all the Power Buttons (resetJSON, deleteUID, deleteAllEntries)
-
header.inc:
- contains script for HTML head
-
style.css:
- contains styling CSS for all pages (Public/Moderator/Awaiting Approval)
AWAITING APPROVAL VIEWS Handling Files:
-
approval.php:
- Main page for Awaiting Approval View
- Set up the main page
- Error check Form Submission then direct user back to Public Gallery page
- Process form (updateJSON, assignUID, create images and thumbnails, etc)
- Approved images are updated to galleryinfo.json
- Load non-approved images from allinfo.json and display them
-
approvescript.js:
- Utilise fetch from multiple php files (sortapprove.php, readapprove.php)
- When users click on the Filter/Sorting button, the function is handle here (load new images, update buttons)
- Handles the Search function
- Handles the lightbox function
- Handles the Approve function (calling updatejson.php)
-
updatejson.php:
- Handles delete, approval, approveAll images
- Update allinfo.json
- Automatically direct back to Awaiting Approval View
-
readapprove.php:
- read info from allinfo.json
- use as a filter for access type: all, public, private
- return json file of filered, not-yet-approved data entry
-
sortapprove.php:
- read info from allinfo.json
- use as a sorting on: UID, first name, last name
- return json file of sorted, not-yet-approved data entry
-
allinfo.json:
- storing ALL info (including approved AND non-approved images)
-
approveheader.inc:
- contains script for HTML head
-
form.inc:
- A form for user to upload images
- Data processed in approval.php
-
indentifier.txt:
- Keep track of all UID
-
editJSON.php:
- saves the new json data to galleryinfo.json and allinfo.json
- delets a photo and the associated json
- links back to index.php
-
updateInfo.php: -reads in allinfo.json -stores it as an array
Temporary Link to website: http://142.31.53.220/~juma/web1/index.php