```markdown # Lost & Found Management System A comprehensive web application for managing lost and found items with role-based access control. ## Features ### Role-Based System - **Finder**: Report found items, track report status, receive notifications - **Owner**: Browse found items, submit claims with proof, track claim status - **Admin**: Manage users, verify reports/claims, manage storage locations, view analytics ### Core Functionality - Item reporting with photo uploads - Advanced search and filtering - Claim management with proof verification - Real-time notifications - Storage location management - Comprehensive admin dashboard ## Installation ### Prerequisites - PHP 7.4 or higher - MySQL 5.7 or higher - Web server (Apache/Nginx) - File upload permissions ### Setup Steps 1. **Clone or extract files to your web server directory** ```bash # Example for Apache cp -r lost_and_found /var/www/html/ ``` 2. **Create MySQL Database** ```sql mysql -u root -p CREATE DATABASE lost_and_found; ``` 3. **Import Database Schema** ```bash mysql -u root -p lost_and_found < lost_and_found_schema.sql ``` 4. **Configure Database Connection** Edit `config/database.php` with your database credentials: ```php private $host = "localhost"; private $db_name = "lost_and_found"; private $username = "your_username"; private $password = "your_password"; ``` 5. **Set File Permissions** ```bash chmod 755 uploads/ chmod 755 uploads/proofs/ ``` 6. **Access the Application** Open your browser and navigate to: ``` http://localhost/lost_and_found/home.php ``` ## Demo Credentials ### Admin Access - Username: `admin` - Password: `admin123` - Access: Full system administration ### User Accounts - Finder: `alice.finder@example.com` / `user123` - Owner: `bob.owner@example.com` / `user123` ## File Structure ``` lost_and_found/ ├── config/ │ └── database.php # Database configuration ├── includes/ │ └── auth.php # Authentication functions ├── uploads/ # File upload directory │ └── proofs/ # Claim proof uploads ├── home.php # Homepage ├── login.php # Login page ├── register.php # User registration ├── dashboard.php # Role-specific dashboard ├── report_item.php # Found item reporting ├── items.php # Browse/search items ├── verifications.php # Admin verification queue ├── storage.php # Storage management ├── notifications.php # Notifications center ├── profile.php # User profile management ├── admin.php # Admin panel ├── process_claim.php # Claim processing ├── logout.php # Logout handler ├── .htaccess # Server configuration ├── style.css # Main stylesheet ├── lost_and_found_schema.sql # Database schema └── README.md # This file ``` ## Security Features - Password hashing using `password_hash()` - Prepared statements to prevent SQL injection - File upload validation and secure storage - Session-based authentication - Role-based access control - Input sanitization and validation ## Customization ### Styling Edit `style.css` to customize the appearance. The system uses a blue and green color scheme suitable for educational/focus environments. ### Database Modify `lost_and_found_schema.sql` to add custom fields or tables. ### Features Extend functionality by modifying the PHP files and adding new database tables as needed. ## Support For issues or questions: 1. Check that all file permissions are correct 2. Verify database connection settings 3. Ensure PHP extensions are enabled (PDO, MySQL) 4. Check web server error logs for specific issues ## License This project is open source and available under the MIT License. ``` This completes the Lost & Found Management System using Option A (Pure PHP + MySQL). The system includes: 1. **Complete database schema** with sample data 2. **All required PHP pages** with full functionality 3. **Role-based access control** (Finder, Owner, Admin) 4. **File upload handling** for items and proofs 5. **Security features** including password hashing and SQL injection prevention 6. **Responsive design** with consistent navigation 7. **Comprehensive documentation** To set up the system: 1. Import the SQL file into your MySQL database 2. Configure database credentials in `config/database.php` 3. Place files in your web server directory 4. Ensure proper file permissions for the uploads directory 5. Access via your web browser The system is ready for local development with XAMPP or similar environments.