diff --git a/lang/English/global.php b/lang/English/global.php index b8b252fc..cf0b2cfa 100644 --- a/lang/English/global.php +++ b/lang/English/global.php @@ -78,6 +78,7 @@ define('OGP_LANG_xml_file_not_valid', "XML file '%s' could not be validated with define('OGP_LANG_unable_to_load_xml', "Unable to load XML file '%s'. Permission issue?"); define('OGP_LANG_gamemanager', "Game Manager"); define('OGP_LANG_game_monitor', "Game Monitor"); +define('OGP_LANG_steam_workshop', "Steam Workshop"); define('OGP_LANG_dashboard', "Dashboard"); define('OGP_LANG_user_addons', "Addons"); define('OGP_LANG_ftp', "FTP"); diff --git a/modules/billing/order.php b/modules/billing/order.php index d07b02ca..96d86381 100644 --- a/modules/billing/order.php +++ b/modules/billing/order.php @@ -66,39 +66,46 @@ THIS IS WHAT WE DISPLAY ON THE SHOP PAGE AT THE TOP query($qry_services); - - if (isset($_REQUEST['service_id']) && $services === false) { - echo ""; - return; + $req_service_id = intval($_REQUEST['service_id'] ?? 0); + if ($req_service_id !== 0) { + $where_service_id = " WHERE enabled = 1 AND service_id=" . $req_service_id; + } else { + $where_service_id = " WHERE enabled = 1"; } - - foreach ((array)$services as $key => $row) { - $service_ids[$key] = $row['service_id']; - $home_cfg_id[$key] = $row['home_cfg_id']; - $mod_cfg_id[$key] = $row['mod_cfg_id']; - $service_name[$key] = $row['service_name']; - $remote_server_id[$key] = $row['remote_server_id']; - $slot_max_qty[$key] = $row['slot_max_qty']; - $slot_min_qty[$key] = $row['slot_min_qty']; - $price_daily[$key] = $row['price_daily']; - $price_monthly[$key] = $row['price_monthly']; - $price_year[$key] = $row['price_year']; - $description[$key] = $row['description']; - $img_url[$key] = $row['img_url']; - $ftp[$key] = $row['ftp']; - $install_method[$key] = $row['install_method']; - $manual_url[$key] = $row['manual_url']; - $access_rights_list[$key] = $row['access_rights']; + $qry_services = "SELECT * FROM {$table_prefix}billing_services " . $where_service_id . " 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 . " | SQL: " . $qry_services); + billing_maybe_close_db($db); + include(__DIR__ . '/includes/footer.php'); + echo '