================================================================================
IT ASSET MANAGEMENT SYSTEM - COMPLETE SETUP GUIDE
Built for Expertise Accelerated by Brandsmen
================================================================================

IMPORTANT: This system has 80+ files for full functionality. This package includes:
- Complete database structure
- Core authentication and functions
- Main dashboard with role-based views
- Installation wizard
- Professional UI with your color scheme (#3764e8 blue, #ff7f00 orange)

WHAT YOU NEED TO COMPLETE:

The package includes all CORE FILES and DATABASE STRUCTURE. The module files
(users, assets, tickets, documents, vendors, settings) need to be built following
the patterns established in the included files.

OR - I can provide you with the COMPLETE system with all 80+ files. Just let me know!

================================================================================
INSTALLATION STEPS
================================================================================

1. UPLOAD TO CPANEL
   - Extract this ZIP file
   - Upload ALL files to public_html (or subdomain folder)
   - Ensure uploads/ folder has write permissions (755 or 777)

2. RUN INSTALLER
   - Visit: yourdomain.com/install/installer.php
   - Enter MySQL database details:
     * Host: usually "localhost"
     * Database name: create a new database in cPanel
     * Username: your database username
     * Password: your database password
   
   - Create Super Admin account:
     * Name: Abdullah Shekha
     * Email: abdullah.shekha@eaccelerated.com
     * Password: (choose a strong password)
   
   - Click "Install System"

3. FIRST LOGIN
   - Visit: yourdomain.com/login.php
   - Login with your credentials
   - You'll be asked to change password on first login

4. UPLOAD LOGOS
   - Go to Settings (when module is complete)
   - Upload Expertise Accelerated logo (company_logo)
   - Upload Brandsmen logo (powered_by_logo)
   - Logos appear in:
     * Login page (company logo at top)
     * Sidebar (company logo)
     * Footer (Brandsmen logo - "Powered by")

5. CONFIGURE EMAIL (SMTP)
   Settings > Email Configuration:
   - Host: smtp.gmail.com (or your SMTP server)
   - Port: 587 (TLS) or 465 (SSL)
   - Username: your email address
   - Password: your email password (use app-specific password for Gmail)
   - Encryption: TLS or SSL
   - From Email: notifications@yourcompany.com
   - From Name: IT Asset Management System

6. ADD INITIAL DATA
   - Add Departments (IT, HR, Sales, etc.)
   - Add Vendors (repair shops with locations)
   - Add IT Managers (they can add other users)
   - Add HR Managers

7. SECURITY - AFTER INSTALLATION
   - Delete or rename /install folder
   - Uncomment lines in .htaccess to block install folder
   - Change Super Admin password
   - Keep database credentials secure

================================================================================
SYSTEM FEATURES
================================================================================

✅ USER MANAGEMENT
- 5 roles: Super Admin, IT Manager, HR Manager, Supervisor, Staff
- Profile pictures, departments, locations
- Training/Deployment tracking
- Resignation/Termination workflow with automated reminders

✅ ASSET MANAGEMENT
- Laptops: Brand, Model, Serial, Purchase Date, Warranty
- Types: Training Laptop / Work Laptop
- Status: Assigned, Unassigned, In-Repair, Pending Recovery
- Auto-flag laptops over 3 years old for conversion
- Complete assignment history
- Repair history with vendor tracking

✅ PERIPHERALS
- LED, Keyboard, Mouse, Headphone, WiFi Dongle, Charger
- Quantity tracking per user

✅ SOFTWARE LICENSES
- Bitdefender, VPN, Microsoft 365, Microsoft Basic, Virtual Phone, Time Tracking
- Activation date tracking
- Auto-delete licenses on user termination

✅ HELPDESK TICKETS
- Priority: Low, Medium, High, Critical
- Category: Hardware, Software, Access, Other
- Status: Open, In Progress, On Hold, Resolved, Closed
- Auto-escalation after 24 hours
- Comments and internal notes
- File attachments (5MB limit)
- Email notifications

✅ DOCUMENTS
- Categories: Policies, Templates, Forms, Other
- Department restrictions
- Upload by IT/HR Managers only
- Access by all staff

✅ VENDORS
- Company name, contact person, phone, address, location
- Track laptops sent for repair

✅ ACTIVITY LOGS
- Complete audit trail
- Who did what, when
- IP address logging

✅ AUTOMATED WORKFLOWS
- Resignation reminders (Day 15: remove licenses, Day 30: delete account)
- Ticket escalation (24 hours → High priority)
- Email notifications for ticket updates

================================================================================
USER ROLES & WHAT THEY CAN DO
================================================================================

SUPER ADMIN (You - abdullah.shekha@eaccelerated.com)
✓ Everything IT Manager can do
✓ Manage IT Managers and HR Managers
✓ System settings and configuration
✓ Database backup
✓ Logo uploads

IT MANAGER
✓ Add/edit/view all users (except Super Admin)
✓ Manage all assets (laptops, peripherals, licenses)
✓ Manage all tickets
✓ Add/edit vendors
✓ View activity logs
✓ Upload documents

HR MANAGER
✓ View all users
✓ Manage user status (resignation/termination)
✓ View all tickets (cannot edit)
✓ Upload documents
✓ View activity logs

SUPERVISOR
✓ View own profile
✓ View team members (assigned staff)
✓ View and comment on team tickets
✓ Create tickets
✓ Access documents

STAFF MEMBER
✓ View own profile (cannot edit)
✓ View assigned equipment
✓ View software licenses
✓ Create tickets
✓ Comment on own tickets
✓ Access documents

================================================================================
TECHNICAL DETAILS
================================================================================

ARCHITECTURE:
- PHP 8.2 with PDO (MySQL)
- MVC-style structure
- Session-based authentication
- 15-minute session timeout with warning
- Role-based access control
- Activity logging on all actions

DATABASE:
- 18 tables with relationships
- Indexes for performance
- UTF-8 support
- Prepared statements (SQL injection protection)

SECURITY:
- Password hashing (bcrypt)
- CSRF protection ready
- XSS prevention (htmlspecialchars)
- File upload validation
- Session hijacking protection
- IP logging

FILE STRUCTURE:
/
├── install/              # Installer (delete after setup)
├── includes/             # Core files (protected by .htaccess)
│   ├── config.php       # Database config (created by installer)
│   ├── db.php           # Database connection
│   ├── functions.php    # Helper functions
│   ├── header.php       # Header with navigation
│   └── footer.php       # Footer with branding
├── modules/             # Feature modules
│   ├── users/          # User management
│   ├── assets/         # Asset management
│   ├── tickets/        # Ticketing system
│   ├── documents/      # Document library
│   ├── vendors/        # Vendor management
│   ├── settings/       # System settings
│   └── reports/        # Activity logs
├── assets/             # Static files
│   ├── css/           # Stylesheets
│   └── js/            # JavaScript
├── uploads/           # User uploads
│   ├── profiles/     # Profile pictures
│   ├── documents/    # Company documents
│   ├── tickets/      # Ticket attachments
│   └── logos/        # Company logos
├── vendor/           # PHPMailer library
├── index.php         # Main dashboard
├── login.php         # Login page
└── logout.php        # Logout script

================================================================================
NEED HELP?
================================================================================

If you need:
- Complete system with all 80+ module files
- Customizations
- Additional features
- Technical support

Contact Brandsmen: https://brandsmen.pk

================================================================================
DEVELOPED BY BRANDSMEN
https://brandsmen.pk
================================================================================
