================================================================================
VERSION 2.2 MANUAL INSTALLATION CHECKLIST
================================================================================

Print this checklist and check off each step as you complete it.

================================================================================
STEP 1: BACKUP (CRITICAL!)
================================================================================

□ Backup database:
  mysqldump -u username -p investor_db > backup_v2.2.sql

□ Backup files:
  Copy entire investor-database folder

================================================================================
STEP 2: RUN SQL DATABASE UPDATE
================================================================================

□ Create file: database/add_authentication.sql

□ Import SQL file via phpMyAdmin:
  - Select investor_db database
  - Click "Import" tab
  - Choose add_authentication.sql
  - Click "Go"

□ Verify tables created:
  - users (should have 2 default users)
  - user_sessions
  - activity_log
  - login_attempts

□ Verify existing tables modified:
  - clients (has created_by, updated_by columns)
  - contact_records (has created_by column)
  - staff (has created_by, updated_by columns)
  - introducers (has created_by, updated_by columns)

================================================================================
STEP 3: CREATE NEW PHP FILES (9 files)
================================================================================

Core Authentication Files:
□ includes/auth.php (authentication handler)
□ login.php (login page)
□ logout.php (logout script)
□ access_denied.php (access denied page)

User Management Files:
□ forms/user_management.php (admin user management)
□ forms/change_password.php (password change form)
□ forms/profile.php (user profile page)
□ forms/activity_log.php (activity log viewer)

Database File:
□ database/add_authentication.sql (already created in Step 2)

================================================================================
STEP 4: MODIFY EXISTING FILE (1 file)
================================================================================

□ Edit: includes/header.php

  Changes needed:
  1. Add at top (after config.php):
     require_once 'auth.php';

  2. Add user authentication check

  3. Add user profile menu in navigation

  4. Update navigation with User Management link (Admin only)

================================================================================
STEP 5: TEST THE INSTALLATION
================================================================================

□ Visit your site URL

□ You should be redirected to login.php

□ Login with default admin credentials:
  Username: admin
  Password: Admin@123

□ Verify you see the dashboard

□ Click your name in top right corner

□ Verify dropdown shows:
  - My Profile
  - Change Password
  - Activity Log (Admin only)
  - Logout

□ Click "Management" in navigation

□ Verify you see "Users" link

□ Click Users to test user management page loads

================================================================================
STEP 6: CHANGE DEFAULT PASSWORDS (CRITICAL!)
================================================================================

□ Click your name → Change Password

□ Change admin password from Admin@123 to strong password

□ Record new admin password in secure location:
  New Admin Password: ___________________________________

□ Login as manager (logout first):
  Username: manager
  Password: Manager@123

□ Change manager password to strong password

□ Record new manager password:
  New Manager Password: ___________________________________

================================================================================
STEP 7: CREATE YOUR USERS
================================================================================

□ Login as admin

□ Go to Management → Users

□ Click "Add New User"

□ Create users for your team members:

  User 1:
  Username: _________________ Role: _______________ ✓ Created

  User 2:
  Username: _________________ Role: _______________ ✓ Created

  User 3:
  Username: _________________ Role: _______________ ✓ Created

  User 4:
  Username: _________________ Role: _______________ ✓ Created

□ Give each user their temporary password

□ Instruct them to change password on first login

================================================================================
STEP 8: VERIFY ALL FEATURES
================================================================================

□ Test login with different users

□ Test different permission levels:
  - Admin: Can access everything
  - Manager: Can manage data but not users
  - User: Basic access
  - Viewer: Read-only

□ Test logout

□ Test "Remember me" checkbox

□ Verify activity log records actions

□ Test change password

□ Test user profile editing

================================================================================
STEP 9: SECURITY CHECKLIST
================================================================================

□ All default passwords changed

□ All team members created as users

□ Each user has appropriate role

□ Test connection file (test_connection.php) deleted or restricted

□ HTTPS enabled (if production)

□ Database password is strong

□ File permissions correct (644 for files, 755 for folders)

================================================================================
STEP 10: FINAL VERIFICATION
================================================================================

□ All pages require login

□ Cannot access any page without authentication

□ Logout works correctly

□ Activity log is recording actions

□ User management accessible to admins only

□ Password changes work

□ User profiles work

□ All existing features still work (clients, contacts, staff, introducers)

================================================================================
DEFAULT CREDENTIALS (CHANGE IMMEDIATELY!)
================================================================================

Admin Account:
Username: admin
Password: Admin@123
Role: Admin (full access)

Manager Account:
Username: manager
Password: Manager@123
Role: Manager (limited access)

⚠️ CRITICAL: Change these passwords immediately after first login!

================================================================================
FILE CHECKLIST SUMMARY
================================================================================

NEW FILES TO CREATE (9):
✓ database/add_authentication.sql
✓ includes/auth.php
✓ login.php
✓ logout.php
✓ access_denied.php
✓ forms/user_management.php
✓ forms/change_password.php
✓ forms/profile.php
✓ forms/activity_log.php

EXISTING FILES TO MODIFY (1):
✓ includes/header.php

DATABASE CHANGES:
✓ 4 new tables (users, user_sessions, activity_log, login_attempts)
✓ 4 modified tables (clients, contact_records, staff, introducers)

================================================================================
TROUBLESHOOTING
================================================================================

Problem: SQL import fails
Solution: Check you're using investor_db database, check for errors

Problem: Can't login
Solution: Verify database imported correctly, check username/password

Problem: Redirected to login on every page
Solution: Check sessions enabled, cookies enabled in browser

Problem: Access denied to all pages
Solution: Verify user role in database, logout and login again

Problem: User management doesn't show
Solution: Only Admin role can access, verify your role

================================================================================
SUPPORT
================================================================================

For complete file code:
- See: MANUAL_INSTALL_v2.2_COMPLETE.md

For detailed documentation:
- See: INSTALL_v2.2_SECURITY.txt
- See: CHANGES_v2.2_SUMMARY.md

For help:
- Check documentation files
- Review PHP error logs
- Contact system administrator

================================================================================
INSTALLATION COMPLETE!
================================================================================

Your Oasis Investor Database System now has:
✓ Secure login/logout
✓ Multi-user support
✓ Role-based access control
✓ Activity logging
✓ Password encryption
✓ User management
✓ Session security

Status: Production Ready with Full Security

Next Steps:
1. Train your team on login process
2. Review activity logs regularly
3. Backup database regularly
4. Monitor failed login attempts
5. Update passwords every 90 days

================================================================================
Version: 2.2 - Security & Authentication Edition
Installation Date: ___________________
Installed By: ___________________
================================================================================
