How phu9608-byte/comp1841-cw works
This is a PHP coursework forum with user accounts, module-organized posts, and private email-like messaging. Users enter through the home page, authenticate where required, browse or create posts, and access module, profile, and messaging features; administrators also manage users and content. The sampled code confirms post creation/editing, authentication lookup, database helpers, and the shared layout. Other capabilities are represented from the file tree; their internal wiring is not assumed where source was not sampled.
Main entry points: addpost.php Create post · DatabaseConnection.php PDO connection · editpost.php Edit post · index.php Home entry
Components 24
Web entry and auth
- Home entry
index.php - Session check
admin/auth/check.php - Login validation
admin/auth/validate.php - Login page
admin/auth/login.php
Forum content
- Post browsing
admin/post.php - Create post
admin/addpost.php - Edit post
admin/editpost.php
Accounts and modules
- Module browsing
admin/module.php - Module management
admin/addmodule.php - User profiles
admin/user.php - User administration
admin/manage_user.php - Registration
admin/register.php - Profile editing
admin/edituser.php
Private messaging
- Messaging hub
admin/chat.php - Send message
admin/sent_email.php - Inbox
admin/receive_email.php
Persistence and views
- Post list view
Display/postlist.html.php - Post form
Display/addpost.html.php - Inbox view
Display/receive_email.html.php - Database operations
Database/DatabaseFunction.php - PDO connection
Database/DatabaseConnection.php - MySQL database
- Shared layout
Display/layout.html.php
Other components
- Visitor
Connections 21
- Visitor → Home entry: opens
- Home entry → Session check: checks session
- Home entry → PDO connection: loads PDO
- Home entry → Shared layout: renders through
- Login page → Login validation: submits credentials
- Login validation → PDO connection: loads PDO
- Login validation → Database operations: looks up user
- Create post → Session check: requires access
- Create post → PDO connection: loads PDO
- Create post → Database operations: inserts post
- Create post → Post form: renders form
- Create post → Shared layout: renders through
- Edit post → Session check: requires access
- Edit post → PDO connection: loads PDO
- Edit post → Database operations: reads and updates
- Edit post → Shared layout: renders through
- Post browsing → Post list view: renders listing
- Inbox → Inbox view: renders inbox
- Shared layout → MySQL database: counts inbox
- PDO connection → MySQL database: connects
- Database operations → MySQL database: queries and mutates