$message])); } define("CONFIG", 1); require_once 'functions.php'; $config_file = __DIR__ . '/config.php'; if (!file_exists($config_file)) { die("Configuration file not found: $config_file"); } $servers = require_once $config_file; $server_name = $_GET['server'] ?? ''; $action = $_GET['action'] ?? ''; $username = $_GET['username'] ?? ''; if (!isset($servers[$server_name])) { die("Invalid server name"); } $server = $servers[$server_name]; $clients = getOpenVPNStatus($server); $banned_clients = getBannedClients($server); $accounts = getAccountList($server); // Генерируем HTML для этого сервера ob_start(); ?>
| Client | Real IP | Virtual IP | Traffic | Connected | Cipher | Status | Actions |
|---|---|---|---|---|---|---|---|
| = htmlspecialchars($client['name']) ?> | = htmlspecialchars($client['real_ip']) ?> | = htmlspecialchars($client['virtual_ip']) ?> | ↓= $client['bytes_received'] ?> ↑= $client['bytes_sent'] ?> | = htmlspecialchars($client['connected_since']) ?> | = htmlspecialchars($client['cipher']) ?> | = $client['banned'] ? 'BANNED' : 'Active' ?> |
No active connections
| Account | Assigned IP | Status | Actions |
|---|---|---|---|
| = htmlspecialchars($account['username']) ?> | = htmlspecialchars($account['ip'] ?? 'N/A') ?> | = $status_text ?> | Certificate revoked |