", $_POST['description']); $service = intval($_POST['service_id']); $stmt = $db->prepare("UPDATE {$table_prefix}billing_services SET description = ? WHERE service_id = ?"); $stmt->bind_param("si", $new_description, $service); $stmt->execute(); $stmt->close(); } // Fetch services, joining config_homes to get canonical game_name and game_key for OS detection. // LEFT JOIN so services without a linked config_homes entry still appear. $service_id = isset($_REQUEST['service_id']) ? intval($_REQUEST['service_id']) : 0; if ($service_id !== 0) { $where_clause = "WHERE bs.enabled = 1 AND bs.service_id = {$service_id} AND bs.remote_server_id != '' AND bs.remote_server_id IS NOT NULL"; } else { $where_clause = "WHERE bs.enabled = 1 AND bs.remote_server_id != '' AND bs.remote_server_id IS NOT NULL"; } $qry_services = "SELECT bs.*, ch.game_name AS cfg_game_name, ch.game_key AS cfg_game_key FROM {$table_prefix}billing_services bs LEFT JOIN {$table_prefix}config_homes ch ON ch.home_cfg_id = bs.home_cfg_id {$where_clause} ORDER BY bs.service_name"; $result_services = $db->query($qry_services); if (!$result_services) { // config_homes join may not exist on all installs; fall back to services-only query $where_clause_fallback = str_replace('bs.', '', $where_clause); $qry_services_fallback = "SELECT *, NULL AS cfg_game_name, NULL AS cfg_game_key FROM {$table_prefix}billing_services {$where_clause_fallback} ORDER BY service_name"; $result_services = $db->query($qry_services_fallback); } if (!$result_services) { echo ""; billing_maybe_close_db($db); return; } // Fetch all service rows and deduplicate by canonical game name so that // arma3_linux64 and arma3_win64 (both named "Arma 3") appear only once. // When a specific service_id is requested we skip deduplication. $serviceRows = []; $seenCanonical = []; while ($row = $result_services->fetch_assoc()) { if ($service_id !== 0) { // Single-service detail view: always include without deduplication $serviceRows[] = $row; continue; } // Derive canonical display name: prefer config_homes game_name (consistent across OS // variants), fall back to service_name. $canonicalName = !empty($row['cfg_game_name']) ? $row['cfg_game_name'] : $row['service_name']; if (isset($seenCanonical[$canonicalName])) { // Already have this game — skip the duplicate OS variant continue; } $seenCanonical[$canonicalName] = true; $serviceRows[] = $row; } $result_services->free(); // Include top bar and menu include(__DIR__ . '/includes/top.php'); include(__DIR__ . '/includes/menu.php'); ?>



Order Now

" . htmlspecialchars((string)($row['description'] ?? ''), ENT_QUOTES, 'UTF-8') . "

"; echo "
"; } else { $desc = htmlspecialchars(str_replace("
", "\r\n", (string)($row['description'] ?? '')), ENT_QUOTES, 'UTF-8'); echo "

"; } } else { echo "

" . htmlspecialchars((string)($row['description'] ?? ''), ENT_QUOTES, 'UTF-8') . "

"; } ?>
Game Server Name