", $_POST['description']); $service = intval($_POST['service_id']); $stmt = $db->prepare("UPDATE {$table_prefix}billing_services SET description = ? WHERE service_id = ?"); if ($stmt) { $stmt->bind_param("si", $new_description, $service); $stmt->execute(); $stmt->close(); } } function order_price_is_free($value): bool { return ((int) round(((float)$value) * 100)) === 0; } function order_detect_service_os(string $cfgFile, string $gameKey): string { $haystack = strtolower(trim($cfgFile !== '' ? $cfgFile : $gameKey)); if ($haystack === '') { return 'any'; } if (preg_match('/(?:^|[_\\-])(win|windows)(?:[_\\-]|$)/i', $haystack)) { return 'windows'; } if (preg_match('/(?:^|[_\\-])linux(?:[_\\-]|$)/i', $haystack)) { return 'linux'; } return 'any'; } function order_variant_label(string $serviceOs): string { if ($serviceOs === 'windows') { return 'Windows'; } if ($serviceOs === 'linux') { return 'Linux'; } return ''; } // --- Fetch the requested service with config_homes join for canonical game info --- $req_service_id = intval($_REQUEST['service_id'] ?? 0); if ($req_service_id !== 0) { $where_service_id = " WHERE bs.enabled = 1 AND bs.service_id=" . $req_service_id; } else { $where_service_id = " WHERE bs.enabled = 1"; } $qry_services = "SELECT bs.*, ch.game_name AS cfg_game_name, ch.game_key AS cfg_game_key, ch.home_cfg_file AS cfg_file FROM {$table_prefix}billing_services bs LEFT JOIN {$table_prefix}config_homes ch ON ch.home_cfg_id = bs.home_cfg_id {$where_service_id} ORDER BY bs.service_name"; $services_result = $db->query($qry_services); if ($services_result === false) { // Fallback: query without join if config_homes doesn't exist in this context $where_service_id_simple = str_replace('bs.', '', $where_service_id); $qry_services = "SELECT *, NULL AS cfg_game_name, NULL AS cfg_game_key, NULL AS cfg_file FROM {$table_prefix}billing_services {$where_service_id_simple} ORDER BY service_name"; $services_result = $db->query($qry_services); } if ($services_result === false) { echo "

Unable to load service information. Please try again or contact support.

"; error_log("billing order.php: query failed - " . $db->error); billing_maybe_close_db($db); include(__DIR__ . '/includes/footer.php'); echo ''; exit; } $serviceRows = []; while ($row = $services_result->fetch_assoc()) { $serviceRows[] = $row; } $services_result->free(); if ($req_service_id !== 0 && empty($serviceRows)) { error_log("billing order.php: service_id={$req_service_id} not found or not enabled"); echo "

The requested service could not be found or is no longer available.

"; echo "

Back to server list

"; billing_maybe_close_db($db); include(__DIR__ . '/includes/footer.php'); echo ''; exit; } // Check whether remote_servers has a server_os column (added by db_version 6 migration). // We gracefully degrade: if the column is absent, all servers are treated as compatible. $hasServerOsColumn = false; $osColCheck = $db->query("SHOW COLUMNS FROM {$table_prefix}remote_servers LIKE 'server_os'"); if ($osColCheck && $osColCheck->num_rows > 0) { $hasServerOsColumn = true; $osColCheck->free(); } $order_error_message = isset($_GET['error_message']) ? trim((string)$_GET['error_message']) : ''; ?>
<?php echo htmlspecialchars($displayName, ENT_QUOTES, 'UTF-8'); ?>
" . htmlspecialchars((string)($row['description'] ?? ''), ENT_QUOTES, 'UTF-8') . "

"; echo "
" . "" . "" . "
"; } else { $descEditable = 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
Location query($rsQuery); if ($rsResult) { $firstServer = true; while ($rs = $rsResult->fetch_assoc()) { $rsID = (int)$rs['remote_server_id']; $rsNAME = htmlspecialchars((string)$rs['remote_server_name'], ENT_QUOTES, 'UTF-8'); $rsOsRaw = strtolower((string)($rs['server_os'] ?? 'any')); $rsOs = str_starts_with($rsOsRaw, 'win') ? 'windows' : (str_starts_with($rsOsRaw, 'lin') ? 'linux' : ($rsOsRaw === '' ? 'any' : $rsOsRaw)); $checked = $firstServer ? ' checked' : ''; if ($svcGameOs !== 'any' && $rsOs !== 'any' && $rsOs !== $svcGameOs) { continue; } $available_server = true; $firstServer = false; $safeOs = htmlspecialchars($rsOs, ENT_QUOTES, 'UTF-8'); echo "
\n" . " \n" . " \n" . "
\n"; } $rsResult->free(); } } ?>
Configure
Player Slots
Months

Player Slots:
Price: $ USD