-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
54 lines (44 loc) · 1.17 KB
/
index.php
File metadata and controls
54 lines (44 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* Server Control Panel - Main Entry Point
*
* A comprehensive web-based control panel for Linux VPS management
*
* Features:
* - Dashboard with system overview
* - Web-based terminal
* - System monitoring (CPU, RAM, Disk)
* - File manager
* - Website/virtual host management
* - Service control (Apache, Nginx, MySQL, PHP)
* - Database management
* - Log viewer
*/
// Define access constant
define('PANEL_ACCESS', true);
// Load configuration
require_once 'config.php';
// Load authentication
require_once 'auth.php';
// Load shared functions
require_once 'includes/functions.php';
// Require authentication
requireAuth();
// Get current module
$module = getCurrentModule();
// Validate module
$validModules = ['dashboard', 'terminal', 'monitor', 'files', 'websites', 'services', 'database', 'logs'];
if (!in_array($module, $validModules)) {
$module = 'dashboard';
}
// Load header
require_once 'includes/header.php';
// Load module
$modulePath = "modules/{$module}.php";
if (file_exists($modulePath)) {
require_once $modulePath;
} else {
echo '<div class="alert alert-error">Module not found</div>';
}
// Load footer
require_once 'includes/footer.php';