-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
149 lines (133 loc) · 5.05 KB
/
index.php
File metadata and controls
149 lines (133 loc) · 5.05 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?php
// $user = 'Admin';
// $pass = 'Con+rol';
// // Generate bcrypt hash
// $hash = password_hash($pass, PASSWORD_BCRYPT);
//
// echo "<h3>Generated .htpasswd Line:</h3>";
// echo "<pre>$user:$hash</pre>";
/**
* ARK: Survival Evolved Web Manager
* Dashboard / Main Page
*/
define('ARK_MANAGER', true);
require_once 'config.php';
require_once 'includes/functions.php';
// Check permission
if (!hasPermission('view_dashboard')) {
die('Access denied');
}
$pageTitle = 'Dashboard';
include 'includes/header.php';
?>
<div class="dashboard">
<div class="welcome-section">
<h1>🦖 ARK Server Manager</h1>
<p>Welcome to the ARK: Survival Evolved Web Management Panel</p>
</div>
<div class="stats-grid">
<?php foreach ($SERVERS as $key => $server): ?>
<?php $serverRunning = isServerRunning($key); ?>
<div class="stat-card <?php echo $serverRunning ? 'online' : 'offline'; ?>">
<div class="stat-header">
<h3><?php echo htmlspecialchars($server['map']); ?></h3>
<span class="status-badge">
<?php echo $serverRunning ? '🟢 Online' : '🔴 Offline'; ?>
</span>
</div>
<div class="stat-body">
<p><strong>Server:</strong> <?php echo htmlspecialchars($server['name']); ?></p>
<p><strong>Port:</strong> <?php echo $server['port']; ?></p>
<p><strong>RCON Port:</strong> <?php echo $server['rcon_port']; ?></p>
<p><strong>Save Directory:</strong> <?php echo htmlspecialchars($server['save_dir']); ?></p>
</div>
<div class="stat-footer">
<a href="server-control/?server=<?php echo $key; ?>" class="btn btn-primary">
Manage Server
</a>
</div>
</div>
<?php endforeach; ?>
</div>
<div class="quick-actions">
<h2>Quick Actions</h2>
<div class="action-grid">
<?php if (hasPermission('view_ini_editor')): ?>
<a href="ini-editor/" class="action-card">
<span class="icon">📝</span>
<h3>Edit INI Files</h3>
<p>Modify server configuration files</p>
</a>
<?php endif; ?>
<?php if (hasPermission('view_rcon')): ?>
<a href="rcon/" class="action-card">
<span class="icon">💻</span>
<h3>RCON Console</h3>
<p>Execute remote console commands</p>
</a>
<?php endif; ?>
<?php if (hasPermission('view_character_transfer')): ?>
<a href="character-transfer/" class="action-card">
<span class="icon">🔄</span>
<h3>Transfer Characters</h3>
<p>Move players between servers</p>
</a>
<?php endif; ?>
<?php if (hasPermission('view_file_browser')): ?>
<a href="file-browser/" class="action-card">
<span class="icon">📁</span>
<h3>File Browser</h3>
<p>Browse and edit server files</p>
</a>
<?php endif; ?>
<?php if (hasPermission('view_scripts')): ?>
<a href="scripts/" class="action-card">
<span class="icon">⚙️</span>
<h3>Run Scripts</h3>
<p>Execute batch files and scripts</p>
</a>
<?php endif; ?>
<?php if (hasPermission('view_logs')): ?>
<a href="logs/" class="action-card">
<span class="icon">📋</span>
<h3>View Logs</h3>
<p>Real-time server log viewer</p>
</a>
<?php endif; ?>
<?php if (hasPermission('view_system_monitor')): ?>
<a href="monitor/" class="action-card">
<span class="icon">📊</span>
<h3>System Monitor</h3>
<p>CPU, RAM, Network usage</p>
</a>
<?php endif; ?>
</div>
</div>
<div class="system-info">
<h2>System Information</h2>
<?php if (hasPermission('view_manager_settings')): ?>
<div style="text-align: right; margin-bottom: 1rem;">
<a href="settings/" class="btn btn-primary">⚙️ Edit Manager Settings</a>
</div>
<?php endif; ?>
<div class="info-grid">
<div class="info-card">
<h4>ARK Root Directory</h4>
<p><?php echo ARK_ROOT; ?></p>
</div>
<div class="info-card">
<h4>Config Directory</h4>
<p><?php echo ARK_CONFIG_DIR; ?></p>
</div>
<div class="info-card">
<h4>Cluster Directory</h4>
<p><?php echo CLUSTER_DIR; ?></p>
</div>
<div class="info-card">
<h4>PHP Version</h4>
<p><?php echo phpversion(); ?></p>
</div>
</div>
</div>
</div>
<?php include 'includes/footer.php'; ?>