diff --git a/views/admin/audit.php b/views/admin/audit.php new file mode 100755 index 0000000..306ed17 --- /dev/null +++ b/views/admin/audit.php @@ -0,0 +1,90 @@ + + +
Comprehensive activity tracking and security monitoring
+| Time | +User | +Action | +Entity | +Details | +IP Address | +
|---|---|---|---|---|---|
| = htmlspecialchars($log['created_at'] ?? '') ?> | += htmlspecialchars($log['actor_name'] ?? $log['username'] ?? 'System') ?> | ++ + = htmlspecialchars(str_replace('_', ' ', $log['action'] ?? '')) ?> + + | += htmlspecialchars(($log['entity_type'] ?? '') . ' #' . ($log['entity_id'] ?? '')) ?> | +
+
+ = htmlspecialchars($log['details']) ?>+ + - + + |
+ = htmlspecialchars($log['ip_address'] ?? '') ?> |
+
Configure security parameters and view status
+= htmlspecialchars($config['encryption']['master_key_file'] ?? '/etc/servermanager/master.key') ?>
+ Manage administrator accounts
+| ID | +Username | +Role | +Status | +Last Login | +Created | +Actions | +|
|---|---|---|---|---|---|---|---|
| = $user['id'] ?> | += htmlspecialchars($user['username']) ?> | += htmlspecialchars($user['email']) ?> | ++ + = htmlspecialchars(ucfirst(str_replace('_', ' ', $user['role']))) ?> + + | ++ + = $user['is_active'] ? 'Active' : 'Inactive' ?> + + | += $user['last_login_at'] ?? 'Never' ?> | += date('Y-m-d', strtotime($user['created_at'] ?? '')) ?> | ++ + + | +
Linux Server Management Platform
+Manage your account settings
+Server overview and system status
+No servers configured yet.
+ Add Server +| Name | +IP | +Status | +CPU | +RAM | +Actions | +
|---|---|---|---|---|---|
| + + = htmlspecialchars($server['name']) ?> + + | += htmlspecialchars($server['ip_address']) ?>:= $server['ssh_port'] ?> |
+ + + = ucfirst($server['current_status'] ?? 'unknown') ?> + + | += $server['cpu_usage'] ?? '-' ?>% | += $server['ram_usage'] ?? '-' ?>% | ++ + + + + + + | +
No recent activity.
++ + The page you are looking for could not be found. + + You do not have permission to access this resource. + + Please log in to access this page. + + An unexpected error occurred. The administrators have been notified. + +
+Register a new Linux server
+= htmlspecialchars($server['name']) ?> · = count($databases) ?> databases · = $totalSize ?> MB
+Neither MySQL nor MariaDB is installed on this server.
+Install with: sudo apt install mysql-server or sudo apt install mariadb-server
Click a database in the left panel.
Manage your Linux servers
+No servers found.
+ Add Your First Server +| Name | +IP Address | +Group | +Status | +CPU | +RAM | +Disk | +Actions | +
|---|---|---|---|---|---|---|---|
| + + = htmlspecialchars($server['name']) ?> + + + Inactive + + | += htmlspecialchars($server['ip_address']) ?>:= $server['ssh_port'] ?> |
+ = htmlspecialchars($server['group_name'] ?? '-') ?> | ++ + = ucfirst($server['current_status'] ?? 'unknown') ?> + + | +
+
+
+ = $server['cpu_usage'] ?? '-' ?>%
+
+ |
+
+
+
+ = $server['ram_usage'] ?? '-' ?>%
+
+ |
+
+
+
+ = $server['disk_usage'] ?? '-' ?>%
+
+ |
+ + + | +
No log data available.
+= htmlspecialchars($line) ?>
+ This server does not have Nginx installed or it is not in the PATH.
+Install it with: sudo apt install nginx or sudo yum install nginx
= htmlspecialchars($nginx['version']) ?>
+ = htmlspecialchars($site) ?>
+
+
+
+
+ = htmlspecialchars($site) ?>
+
+
+
+
+ = htmlspecialchars($nginx['config'] ?? '# No configuration found') ?>
+ = htmlspecialchars($nginx['config_test']) ?>
+ + = htmlspecialchars($server['name']) ?> + · = count($processList) ?> processes +
+No process data available.
+| PID | +User | +CPU % | +MEM % | +RSS | +STAT | +Time | +Command | +Actions | +
|---|---|---|---|---|---|---|---|---|
| = $p['pid'] ?> | += htmlspecialchars($p['user']) ?> | ++ + = number_format($p['cpu'], 1) ?>% + + | += number_format($p['mem'], 1) ?>% | += format_bytes($p['rss'] * 1024) ?> | += htmlspecialchars($p['stat']) ?> |
+ = htmlspecialchars($p['time']) ?> | +
+ = htmlspecialchars(mb_substr($p['command'], 0, 60)) ?>= mb_strlen($p['command']) > 60 ? '...' : '' ?>
+ |
+ + + | +
Are you sure you want to terminate process ?
++ = htmlspecialchars($server['ip_address'] ?? '') ?>:= $server['ssh_port'] ?? 22 ?> + · + + = ucfirst($server['current_status'] ?? 'unknown') ?> + +
+= nl2br(htmlspecialchars($server['description'])) ?>
+= htmlspecialchars($server['ip_address'] ?? '') ?>Certbot is required to manage Let's Encrypt SSL certificates on this server.
+Would you like to install it?
+No SSL certificates found.
+ += htmlspecialchars($domain) ?>= $domain !== end($cert['domains']) ? ', ' : '' ?>
+
+ = htmlspecialchars($cert['path']) ?>= htmlspecialchars($cert['key_type']) ?>= htmlspecialchars($systemInfo['hostname'] ?? 'Unknown') ?>= htmlspecialchars($systemInfo['kernel'] ?? 'Unknown') ?>= htmlspecialchars($cpuModel ?: 'Unknown') ?>Memory information not available
+ +Disk information not available
+ ++ = htmlspecialchars($server['name']) ?> — = htmlspecialchars($server['ip_address']) ?>:= $server['ssh_port'] ?> +
++ ____ __ __ + / ___| ___ _ ____ _____ _ __ | \/ | __ _ _ __ __ _ __ _ ___ _ __ + \___ \ / _ \ '__\ \ / / _ \ '__| | |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '__| + ___) | __/ | \ V / __/ | | | | | (_| | | | | (_| | (_| | __/ | + |____/ \___|_| \_/ \___|_| |_| |_|\__,_|_| |_|\__,_|\__, |\___|_| + |___/ ++
Connected to = htmlspecialchars($server['name']) ?>
+Type commands below to execute them on the remote server.
+No command history.
+| Time | +Command | +Status | +User | +
|---|---|---|---|
| = date('H:i:s', strtotime($entry['executed_at'] ?? '')) ?> | += htmlspecialchars($entry['command']) ?> |
+ + + = ($entry['exit_status'] ?? 1) == 0 ? 'OK' : 'ERR' ?> + + | += htmlspecialchars($entry['username'] ?? 'System') ?> | +