Food Pilferage Management Page
Overview
The Food Pilferage Management System serves as the administrative hub for tracking incidents related to food pilferage. It provides key metrics and visual representations of incident data, enabling administrators to monitor and manage the system effectively.
Features
Sidebar Navigation
- Admin Menu: The sidebar includes links to various sections:
- Statistics Dashboard: Displays key metrics and charts (current page).
- Reports: Access detailed reports.
- View Incidents: List and manage all incidents.
- Items: Add and manage items in the database.
- Use Items: Record item usage.
- Contact Us: Contact system support.
- Add Employee: Add new employee records to the system.
- Logout Button: A red button at the bottom of the sidebar to securely log out.
Dashboard Content
Metrics Overview
- Total Incidents: Displays the total number of reported incidents.
- Resolved Incidents: Shows the count of incidents marked as resolved.
- Pending Incidents: Indicates the number of unresolved incidents.
Pie Chart
Visual representation of Incident Status Distribution, dividing incidents into "Resolved" and "Pending" categories.
Additional Charts (Planned/Expandable)
- Incident trends by category, time, or other variables.
Footer
Includes a copyright message and system branding.
Implementation Details
Backend
- Session Management:
- Ensures only logged-in users can access the dashboard.
- Redirects unauthorized users to the login page.
- Database Integration:
- Uses MySQL queries to fetch metrics (total incidents, resolved, and pending).
- Joins tables to gather item-specific incident data for visualization.
Frontend
- HTML/CSS:
- Responsive design using a combination of Bootstrap and custom CSS.
- Sidebar remains fixed for easy navigation.
- Charts:
- Powered by Chart.js for rendering dynamic pie charts.
- Data for charts is fetched from the database and rendered via PHP.
Workflow
Login
- The admin logs into the system via the loginpage.php.
- Upon successful login, the session is validated, and the admin is redirected to the Statistics Dashboard.
Navigation
Admin navigates through different sections using the sidebar menu.
Logout
Admin clicks the Logout button to securely log out, destroying the session and redirecting to the login page.
Data Flow
- Incident Metrics:
Queries in db_connect.php are used to fetch counts of incidents based on their status (Resolved, Pending, etc.).
- Charts:
Pie charts dynamically pull data and labels from the database using PHP and encode them into JSON for Chart.js.
Contact
If you need any assistance or have questions, don't hesitate to reach out to us:
- Email: Legokenyap.ulgasan@gmail.com
- Phone: 09277085596