Admin Panel Documentation
Comprehensive guide for the Blinkbox MFPS Admin Panel
Overview
The Blinkbox Admin Panel is a powerful web-based management system designed for Multiplayer FPS (MFPS) games built with Unity. It provides a centralized dashboard to manage players, clans, events, support tickets, and game assets.
- User Management: View, edit, ban, and manage player stats.
- Clan System: Manage clan details, members, and settings.
- Event Manager: Create and track in-game events.
- Ticket System: Handle player support requests directly.
- Anti-Cheat: Monitor suspicious activities and logs.
- Unity Integration: Seamlessly export game data (Camos, Emblems, Cards) from Unity to the web panel.
Installation Process
1. Web Server Requirements
- PHP 7.4 or higher
- MySQL 5.7+ or MariaDB 10+
- Apache or Nginx web server
- Write permissions for the
.envfile andsections/External Datadirectory.
2. Setup Steps
- Upload Files: Upload the contents of the
Webfolder to your web server's public directory (e.g.,public_html/admin). - Database: Ensure you have a MySQL database created for your game.
- Run Installer: Navigate to
http://your-domain.com/admin/installer.phpin your browser. - Follow Wizard:
- The installer will check for required permissions.
- Enter your database credentials (Host, User, Password, Database Name).
- The installer will create the necessary tables (
bl_admin_settings,bl_admin_data,bl_admin_logs). - It will generate the
.envfile automatically.
- Finalize: Delete
installer.phpfor security purposes after successful installation.
Configuration
Configuration is primarily handled via the .env file located in the root directory. This file is automatically generated by the installer but can be manually edited.
Environment Variables (.env)
HOST_PATH=http://your-domain.com/admin
SECRET_KEY=your_generated_secret_key
DB_HOST=localhost
DB_NAME=mfps_game_db
DB_USER=db_user
DB_PASSWORD=db_password
# hCaptcha Configuration (Optional)
HCAPTCHA_SITE_KEY=your_site_key
HCAPTCHA_SECRET_KEY=your_secret_key
.env file is not accessible via the web browser. The provided .htaccess file should handle this, but verify your server configuration.
Unity Integration
The admin panel comes with a custom Unity Editor tool to sync game data with the web panel. This is located at Assets/Addons/BlinkBox/AdminPanel/Code/Editor/AdminDataEditor.cs.
Using the Admin Data Editor
- In Unity, go to the top menu: BlinkBox > Admin Data Editor.
- The window will open, showing references to your game data:
- Emblems Database:
bl_EmblemsDataBase - Shop Data:
bl_ShopData - Customizer Data:
bl_CustomizerData
- Emblems Database:
- Features:
- Preview: View Emblems, Calling Cards, and Camos directly in the editor.
- Export Single: Click "Export" next to an item to save its data/image.
- Export All: Click "Export All Data" to generate a complete package of your game assets.
- Uploading Data:
- After exporting, take the generated files/folders (usually in
External Data). - Upload them to the
sections/External Datadirectory on your web server.
- After exporting, take the generated files/folders (usually in
Web Interface Guide
Dashboard
The landing page after login. Provides a quick snapshot of your game's status, including recent user registrations, active players, and system health.
User Management
Navigate to the Users section to:
- Search for players by Name or ID.
- View detailed profiles including stats (Kills, Deaths, Score).
- Actions: Ban/Unban users, edit currency (Coins), change account status.
Addons System
The panel is modular. Enabled addons appear in the sidebar:
- Voucher: Generate and manage redeemable codes for in-game rewards.
- Server Mail: Send global or targeted messages to players' in-game inboxes.
- Event Manager: Schedule double XP weekends or special events.
- News: Post updates that appear in the game's news feed.
- AntiCheat: Review automated bans and suspicious behavior logs.
Section Reference
Detailed documentation for each admin panel section file, including available functions and usage.
1. Dashboard
File: sections/dashboard_content.php
The main landing page displaying system overview.
- Functionality: Displays total users, active clans, recent tickets, and addon status.
- Key Logic: Checks
bl_admin_settingsfor enabled addons (News, Events, Vouchers, etc.) to toggle dashboard widgets.
2. User Management
Files: users_content.php, user_profile_content.php
- User List (users_content.php):
- Lists all registered users with pagination.
- Search: Filters users by name or ID.
- Key Function:
columnExists($conn, $table, $column)- Verifies database schema before querying.
- User Profile (user_profile_content.php):
- Displays detailed stats (Kills, Deaths, Score, Playtime).
- Editing: Allows modification of user currency (Coins) and account status (Ban/Unban).
- Data Fetching: Retrieves `bl_game_users` data joined with stats.
3. Clan System
Files: clans_content.php, clans_profile_content.php
- Clan List (clans_content.php): Lists all created clans.
- Clan Profile (clans_profile_content.php):
- View clan members, leader, and score.
- Security: Uses prepared statements
$stmt = $conn->prepare("SELECT * FROM bl_game_clans WHERE id = ?")to prevent SQL injection.
4. News System
Files: news_content.php, news_create_content.php, news_edit_content.php
- Management: Create, Edit, and Delete news articles.
- Image Handling: Uploads images to
../images/news/. - Validation: Checks if
bl_game_newstable exists usingtableExists($conn, 'bl_game_news').
5. Event System
Files: event_manager_content.php, event_create_content.php, event_leaderboard_content.php
- Manager: Lists active and past events. Handles deletion via POST request.
- Creation: Form to set Event Name, Type (XP/Currency), Duration, and Multiplier.
- Leaderboard: Displays player rankings for specific events.
6. Server Mail
File: sections/servermail_content.php
- Functionality: Send in-game mail to specific users or all players.
- Editor: Integrates Quill Editor for rich text composition.
- AJAX: Submits mail asynchronously to prevent page reloads.
7. Support Tickets
File: sections/tickets_content.php
- Workflow: Lists open tickets from
bl_game_tickets. - Reply System: Admins can reply directly; status updates to 'Replied'.
- User Context: Uses
getUserProfileData()to show the ticket creator's avatar and calling card.
8. Data & Importer
Files: importer_content.php, Data_Loader.php, Data_LoaderV2.php
- Importer: Handles ZIP uploads for bulk asset updates. Extracts to
External Data/. - Data Loader:
- Visualizes Emblems and Calling Cards stored in
bl_admin_data. - Grid Layout: JavaScript dynamically renders items into responsive grids.
- Visualizes Emblems and Calling Cards stored in
9. Settings & Diagnostics
Files: settings_content.php, diagnose_content.php
- Settings: Configure Navbar, Maintenance Mode, and enable/disable Addons.
- Diagnostics:
- Checks Database Connection (PDO/MySQLi).
- Verifies
.envfile existence and content. - Lists PHP version and server details.
10. Anti-Cheat
Files: anticheat_content.php, anticheat_info_content.php
- Reports: Lists automated cheat detection reports.
- Details: Shows evidence logs and user metadata associated with the violation.
11. Vouchers
File: sections/voucher_content.php
- Management: Create redeemable codes for Coins or Items.
- Integration: Fetches available products from Unity Export data.
API Endpoints
The panel provides RESTful API endpoints for external tools or the game client to fetch data.
Fetch Users
GET /API/fetch_users.php
Retrieves a list of users or specific user data. Useful for leaderboards or external stats viewers.
Internal Server
GET /API/internal_server.php
Used for internal communication between the game server and the web panel.
Troubleshooting
Common Issues
- Database Connection Failed: Check
.envcredentials. Ensure the database user has permissions. - 404 on API Routes: Verify
.htaccessis present andmod_rewriteis enabled on Apache. - Permission Denied: Ensure
sections/External Datahas755or777permissions (depending on server config). - Login Loop: Check if session storage is working on your PHP server. Verify browser cookies are enabled.
Support
For additional support, please contact the Blinkbox development team or refer to the project repository.