Sindbad~EG File Manager
# Member Codes System Setup Guide
## Quick Setup Instructions
### 1. Run Database Migrations
Visit these URLs in your browser to set up the new tables:
1. **Create Tables**: `http://localhost/copmadinaarea/database/run_events_migration.php`
2. **Add Sidebar Modules**: `http://localhost/copmadinaarea/database/add_new_modules.php`
### 2. New Features Available
#### Events Management
- **URL**: `http://localhost/copmadinaarea/modules/events/index.php`
- **Features**: Create, edit, delete events with location-based access control
- **Default Events**: Attendance, Program, Service, Rally, Evangelism, etc.
#### Member Codes Management
- **URL**: `http://localhost/copmadinaarea/modules/membership/codes.php`
- **Tab 1**: Member Codes - Generate tracking codes for church members
- **Tab 2**: User Special Codes - Generate codes for system users
- **Features**: QR codes, barcodes, usage tracking, expiration dates
#### Member Codes Cards
- **URL**: `http://localhost/copmadinaarea/modules/membership/cards.php`
- **Tab 1**: Traditional Membership Cards
- **Tab 2**: Member Codes Card - Printable cards with QR/barcode
- **Features**: Professional printing layout, member photo integration
### 3. Auto-Generation
- **New members** automatically get tracking codes when created
- **Default event**: Links to "Attendance" event if available
- **Includes**: Tracking code, barcode, QR code generation
### 4. Database Tables Created
- `events`: Event management with location hierarchy
- `memberuser_codes`: Tracking codes for members and users
### 5. API Endpoints
- `api/get-locations.php`: Dynamic location loading
- `api/get-member-codes.php`: Fetch member codes for card display
## System Features
### Access Control
- **Assembly Level**: See own assembly events/codes
- **District Level**: See district and assembly events/codes
- **Area Level**: See area, district, and assembly events/codes
- **Superuser**: See all events/codes
### Code Generation
- **Unique tracking codes**: MEM/USR + Year + 6-digit random
- **Barcode**: SVG-based Code 128 style
- **QR Code**: SVG-based matrix codes
- **Usage tracking**: Monitor usage vs max limits
- **Expiration**: Optional expiry dates
### Professional Cards
- **Print-ready**: Standard card dimensions (3.375" x 2.125")
- **Member info**: Photo, name, membership ID
- **Multiple codes**: Display all active codes per member
- **Print function**: Dedicated print styling
The system is now fully operational and ready for use!
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists