Phase 5: Final validation and remaining reference updates

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-09-08 16:08:38 +00:00
parent 0ea24764e3
commit 815f2b0b0c
64 changed files with 144 additions and 144 deletions

View file

@ -510,7 +510,7 @@ function api_user_games()
}
}
else
$game_path = "/home/".$remote_server['ogp_user']."/User_Files/"; // Default
$game_path = "/home/".$remote_server['gsp_user']."/User_Files/"; // Default
$game_path = clean_path($game_path); // Clean it
@ -611,7 +611,7 @@ function api_user_games()
}
}
else
$game_path = "/home/".$game_home['ogp_user']."/User_Files/"; // Default
$game_path = "/home/".$game_home['gsp_user']."/User_Files/"; // Default
$game_path = clean_path($game_path); // Clean it
@ -641,7 +641,7 @@ function api_user_games()
$db->changeFtpStatus('enabled', $clone_home_id);
}
$user_group = get_user_uid_gid_from_passwd(explode("\n", $remote->sudo_exec('cat /etc/passwd')), $game_home['ogp_user']);
$user_group = get_user_uid_gid_from_passwd(explode("\n", $remote->sudo_exec('cat /etc/passwd')), $game_home['gsp_user']);
$status = "200";
$message = array("clone_home_id" => $clone_home_id, "cloning_status" => $remote->clone_home($game_home['home_path'], $game_path, $user_group));

View file

@ -40,7 +40,7 @@ $settings = $db->getSettings();
gspLang();
require_once("includes/view.php");
$view = new OGPView();
$view = new GSPView();
$view->setCharset(get_lang('lang_charset'));
$view->setTimeZone($settings['time_zone']);
if(isset($_GET['type']) && $_GET['type'] == 'cleared')

View file

@ -134,7 +134,7 @@ abstract class GSPDatabase {
abstract public function getCurrentHomeConfigMods($clear_all);
abstract public function updateOGPGameModsWithNewIDs($oldModStructure);
abstract public function updateGSPGameModsWithNewIDs($oldModStructure);
abstract public function clearGameCfgs($clear_all);

View file

@ -938,7 +938,7 @@ class GSPDatabaseMySQL extends GSPDatabase
return false;
}
public function updateOGPGameModsWithNewIDs($oldModStructure){
public function updateGSPGameModsWithNewIDs($oldModStructure){
$currentStructure = $this->getCurrentHomeConfigMods(false);
if(isset($oldModStructure) && is_array($oldModStructure) && isset($currentStructure) && is_array($currentStructure)){
@ -1217,7 +1217,7 @@ class GSPDatabaseMySQL extends GSPDatabase
return false;
$rhost_name = trim($rhost_name);
$query = sprintf("INSERT INTO `%sremote_servers` (`agent_ip`,remote_server_name,ogp_user,agent_port,ftp_ip,ftp_port,`encryption_key`,timeout,use_nat,display_public_ip)
$query = sprintf("INSERT INTO `%sremote_servers` (`agent_ip`,remote_server_name,gsp_user,agent_port,ftp_ip,ftp_port,`encryption_key`,timeout,use_nat,display_public_ip)
VALUES('%s','%s','%s','%d','%s','%s','%s','%s','%s','%s');",
$this->table_prefix,
$this->realEscapeSingle($rhost_ip),
@ -1379,7 +1379,7 @@ class GSPDatabaseMySQL extends GSPDatabase
$query = sprintf("UPDATE %sremote_servers SET agent_ip='%s',
agent_port='%s', encryption_key='%s',
remote_server_name='%s',
ogp_user='%s',
gsp_user='%s',
ftp_ip='%s',
ftp_port='%s',
timeout='%s',

View file

@ -626,7 +626,7 @@ function getClientIPAddress(){
return $_SERVER['REMOTE_ADDR'];
}
function getOGPSiteURL(){
function getGSPSiteURL(){
$url = '';
$scheme = ( isset($_SERVER['HTTPS']) and get_true_boolean($_SERVER['HTTPS']) ) ? "https://" : "http://";
$url .= $scheme;

View file

@ -411,8 +411,8 @@ function runPostUpdateOperations(){
}
function getGSPGitHubURL($gitHubUsername, $repo){
$OGPGitHub = "https://github.com/OpenGamePanel/";
$gitHubURL = $OGPGitHub;
$GSPGitHub = "https://github.com/Gameservers-World/";
$gitHubURL = $GSPGitHub;
if(isset($gitHubUsername) && !empty($gitHubUsername)){
$gitHubURL = "https://github.com/" . $gitHubUsername . "/";
}
@ -423,12 +423,12 @@ function getGSPGitHubURL($gitHubUsername, $repo){
return $gitHubURL;
}
return $OGPGitHub;
return $GSPGitHub;
}
function getGSPGitHubURLUnstrict($gitHubUsername){
$OGPGitHub = "https://github.com/OpenGamePanel/";
$gitHubURL = $OGPGitHub;
$GSPGitHub = "https://github.com/Gameservers-World/";
$gitHubURL = $GSPGitHub;
if(isset($gitHubUsername) && !empty($gitHubUsername)){
$gitHubURL = "https://github.com/" . $gitHubUsername . "/";
}
@ -440,7 +440,7 @@ function getGSPGitHubURLUnstrict($gitHubUsername){
return $gitHubURL;
}
return $OGPGitHub;
return $GSPGitHub;
}
function getGitHubOrganization($gitHubURL){
@ -456,7 +456,7 @@ function getGitHubOrganization($gitHubURL){
return $gitHubOrg;
}
function getOGPLangConstantsJSON(){
function getGSPLangConstantsJSON(){
global $GSPLangPre;
$finalConsts = array();

View file

@ -5,7 +5,7 @@
define("DEFAULT_REFRESH_TIME","2");
class OGPView {
class GSPView {
private $meta;
private $title;
@ -80,7 +80,7 @@ class OGPView {
$this->title = $title == "" ? $this->title : $this->title . " [$title]";
// Dump defined constants to json (for language javascript)
$jsonStrConsts = getOGPLangConstantsJSON();
$jsonStrConsts = getGSPLangConstantsJSON();
if($jsonStrConsts !== false){
$this->header_code .= '<script type="text/javascript">var langConsts = ' . $jsonStrConsts . ';' . "\n" . 'var langConstPrefix = "' . $GSPLangPre . '";</script>' . "\n";
}

View file

@ -57,7 +57,7 @@ $settings = $db->getSettings();
gspLang();
require_once("includes/view.php");
$view = new OGPView();
$view = new GSPView();
$view->setCharset( get_lang('lang_charset') );
if(isset($_GET['type']) && $_GET['type'] == 'cleared')
{

View file

@ -30,9 +30,9 @@ function change_access_rights(id_type, assign_id)
{
return true;
}
check_access_rights += "<tr><td align='right'><label for='" + value + "'>" + langConsts['OGP_LANG_' + value] + ":</label></td>" +
check_access_rights += "<tr><td align='right'><label for='" + value + "'>" + langConsts['GSP_LANG_' + value] + ":</label></td>" +
"<td align='left'><input class='ar_flag' id='" + value + "' type='checkbox' name='" + value + "' value='" + index + "' checked='checked' /></td></tr>" +
"<tr><td colspan='2' class='info'>" + langConsts['OGP_LANG_' + value + '_info'] + "</td></tr>";
"<tr><td colspan='2' class='info'>" + langConsts['GSP_LANG_' + value + '_info'] + "</td></tr>";
});
check_access_rights += '</table>';

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*
@ -52,7 +52,7 @@ function exec_gsp_module()
// request ogp user to create a home path.
$r_server = $db->getRemoteServer($remote_server_id);
$ogp_user = $r_server['ogp_user'];
$gsp_user = $r_server['gsp_user'];
// request the user name and the game name to generate a game home name.
$home_name = $_POST['home_name'];

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*
@ -52,7 +52,7 @@ function exec_gsp_module()
// request ogp user to create a home path.
$r_server = $db->getRemoteServer($remote_server_id);
$ogp_user = $r_server['ogp_user'];
$gsp_user = $r_server['gsp_user'];
// request the user name and the game name to generate a game home name.
$home_name = $_POST['home_name'];

View file

@ -41,7 +41,7 @@ function assignOrdersToCart($user_id,$tax_amount,$currency,$coupon_id){
return $db->resultInsertId( 'billing_carts', $fields );
}
function exec_ogp_module()
function exec_gsp_module()
{
error_reporting(E_ALL);
@ -84,7 +84,7 @@ function exec_ogp_module()
if ($coupon_count > 0) {
$coupon_count--;
$db->resultquery("UPDATE ogp_billing_coupons SET count = $coupon_count WHERE code = '$_POST[coupon_code]'");
$db->resultquery("UPDATE gsp_billing_coupons SET count = $coupon_count WHERE code = '$_POST[coupon_code]'");
}
}
}
@ -369,7 +369,7 @@ function exec_ogp_module()
//see if user is a new customer,
//check number of orders they have had or if user is an admin (to be able to create server)
$isAdmin = $db->isAdmin( $_SESSION['user_id'] );
$result = $db->resultQuery("SELECT * FROM ogp_billing_orders WHERE user_id=".$user_id);
$result = $db->resultQuery("SELECT * FROM gsp_billing_orders WHERE user_id=".$user_id);
$server_price = number_format( $order['price'], 2 );
if(isset($settings['display_free'])) {
$display_free = $settings['display_free'];

View file

@ -81,8 +81,8 @@ function exec_gsp_module()
$settings = $db->getSettings();
$subject = "Gameserver Renewel at " . $settings['panel_name'];
$email = $db->resultQuery(" SELECT DISTINCT users_email
FROM ogp_users, ogp_billing_orders
WHERE ogp_users.user_id = $user_id")[0]["users_email"];
FROM gsp_users, gsp_billing_orders
WHERE gsp_users.user_id = $user_id")[0]["users_email"];
$message = "Your server, " . $home_name ." ID #". $home_id . " at " . $settings['panel_name'] . " has just been renewed.<br>
Thank You for your continued support.<br>
@ -246,8 +246,8 @@ function exec_gsp_module()
$settings = $db->getSettings();
$subject = "New Gameserver installed at " . $settings['panel_name'];
$email = $db->resultQuery(" SELECT DISTINCT users_email
FROM ogp_users, ogp_billing_orders
WHERE ogp_users.user_id = $user_id")[0]["users_email"];
FROM gsp_users, gsp_billing_orders
WHERE gsp_users.user_id = $user_id")[0]["users_email"];
$message = "Your server, " . $home_name ." ID #". $home_id . " at " . $settings['panel_name'] . " has just been created.<br>
Thank You for your continued support.<br>
@ -286,7 +286,7 @@ function exec_gsp_module()
}
// Set expiration date in ogp database
// Set expiration date in gsp database
//status is -3 -2 -1 0 and 1
// deleted, suspended, invoiced, inactive, active
//finish_date the server will be suspended

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*
@ -23,7 +23,7 @@
*/
chdir(realpath(dirname(__FILE__))); /* Change to the current file path */
chdir("../.."); /* Base path to ogp web files */
chdir("../.."); /* Base path to gsp web files */
// Report all PHP errors
error_reporting(E_ALL);
// Path definitions

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -36,7 +36,7 @@ if(!empty($cart_id))
}
$coupon_discount = 0;
$result = $db->resultQuery( "SELECT discount FROM ogp_billing_coupons WHERE id=".$db->realEscapeSingle($cartDB['coupon_id']));
$result = $db->resultQuery( "SELECT discount FROM gsp_billing_coupons WHERE id=".$db->realEscapeSingle($cartDB['coupon_id']));
foreach ($result as $couponDB){
$coupon_discount=$couponDB['discount'];
}

View file

@ -1,5 +1,5 @@
<?php
function exec_ogp_module()
function exec_gsp_module()
{
global $db;
@ -128,7 +128,7 @@ function exec_ogp_module()
</tr>
<tr>
<?php
$result3 = $db->resultQuery("SELECT DISTINCT remote_server_id, remote_server_name, agent_ip, ogp_user FROM GSP_DB_PREFIXremote_servers");
$result3 = $db->resultQuery("SELECT DISTINCT remote_server_id, remote_server_name, agent_ip, gsp_user FROM GSP_DB_PREFIXremote_servers");
?>
<td><?php print_lang('remote_server');?></td>
<td>

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*
@ -23,7 +23,7 @@
*/
chdir(realpath(dirname(__FILE__))); /* Change to the current file path */
chdir("../.."); /* Base path to ogp web files */
chdir("../.."); /* Base path to gsp web files */
// Report all PHP errors
error_reporting(E_ALL);
// Path definitions

View file

@ -2,7 +2,7 @@
require_once("includes/lib_remote.php");
require_once("modules/config_games/server_config_parser.php");
function exec_ogp_module()
function exec_gsp_module()
{
global $db,$view,$settings;
$user_id = $_SESSION['user_id'];
@ -81,8 +81,8 @@ function exec_ogp_module()
$settings = $db->getSettings();
$subject = "Gameserver Renewel at " . $settings['panel_name'];
$email = $db->resultQuery(" SELECT DISTINCT users_email
FROM ogp_users, ogp_billing_orders
WHERE ogp_users.user_id = $user_id")[0]["users_email"];
FROM gsp_users, gsp_billing_orders
WHERE gsp_users.user_id = $user_id")[0]["users_email"];
$message = "Your server, " . $home_name ." ID #". $home_id . " at " . $settings['panel_name'] . " has just been renewed.<br>
Thank You for your continued support.<br>
@ -246,8 +246,8 @@ function exec_ogp_module()
$settings = $db->getSettings();
$subject = "New Gameserver installed at " . $settings['panel_name'];
$email = $db->resultQuery(" SELECT DISTINCT users_email
FROM ogp_users, ogp_billing_orders
WHERE ogp_users.user_id = $user_id")[0]["users_email"];
FROM gsp_users, gsp_billing_orders
WHERE gsp_users.user_id = $user_id")[0]["users_email"];
$message = "Your server, " . $home_name ." ID #". $home_id . " at " . $settings['panel_name'] . " has just been created.<br>
Thank You for your continued support.<br>
@ -286,7 +286,7 @@ function exec_ogp_module()
}
// Set expiration date in ogp database
// Set expiration date in gsp database
//status is -3 -2 -1 0 and 1
// deleted, suspended, invoiced, inactive, active
//finish_date the server will be suspended

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*
@ -23,7 +23,7 @@
*/
chdir(realpath(dirname(__FILE__))); /* Change to the current file path */
chdir("../.."); /* Base path to ogp web files */
chdir("../.."); /* Base path to gsp web files */
// Report all PHP errors
error_reporting(E_ALL);
// Path definitions

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -1,5 +1,5 @@
<?php
function exec_ogp_module()
function exec_gsp_module()
{
error_reporting(E_ALL);

View file

@ -36,7 +36,7 @@ if(!empty($cart_id))
}
$coupon_discount = 0;
$result = $db->resultQuery( "SELECT discount FROM ogp_billing_coupons WHERE id=".$db->realEscapeSingle($cartDB['coupon_id']));
$result = $db->resultQuery( "SELECT discount FROM gsp_billing_coupons WHERE id=".$db->realEscapeSingle($cartDB['coupon_id']));
foreach ($result as $couponDB){
$coupon_discount=$couponDB['discount'];
}

View file

@ -128,7 +128,7 @@ function exec_gsp_module()
</tr>
<tr>
<?php
$result3 = $db->resultQuery("SELECT DISTINCT remote_server_id, remote_server_name, agent_ip, ogp_user FROM GSP_DB_PREFIXremote_servers");
$result3 = $db->resultQuery("SELECT DISTINCT remote_server_id, remote_server_name, agent_ip, gsp_user FROM GSP_DB_PREFIXremote_servers");
?>
<td><?php print_lang('remote_server');?></td>
<td>

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*
@ -22,7 +22,7 @@
*
*/
function exec_ogp_module()
function exec_gsp_module()
{
global $db, $view;

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*
@ -23,7 +23,7 @@
*/
chdir(realpath(dirname(__FILE__))); /* Change to the current file path */
chdir("../.."); /* Base path to ogp web files */
chdir("../.."); /* Base path to gsp web files */
// Report all PHP errors
error_reporting(E_ALL);
// Path definitions

View file

@ -52,8 +52,8 @@ function join_base($base, $path){
}
/* which column holds space-separated locations */
$locationCol = col_exists($db, 'ogp_billing_services', 'remote_server_id') ? 'remote_server_id' :
(col_exists($db, 'ogp_billing_services', 'remote_server') ? 'remote_server' : 'remote_server_id');
$locationCol = col_exists($db, 'gsp_billing_services', 'remote_server_id') ? 'remote_server_id' :
(col_exists($db, 'gsp_billing_services', 'remote_server') ? 'remote_server' : 'remote_server_id');
$flash = [];
@ -61,11 +61,11 @@ $flash = [];
if (isset($_POST['update_remote_servers'])) {
$enabledIds = array_map('intval', $_POST['rs'] ?? []);
$enabledSet = array_flip($enabledIds);
$allIds = fetch_all_assoc($db, "SELECT remote_server_id FROM ogp_remote_servers");
$allIds = fetch_all_assoc($db, "SELECT remote_server_id FROM gsp_remote_servers");
foreach ($allIds as $row) {
$id = (int)$row['remote_server_id'];
$e = isset($enabledSet[$id]) ? 1 : 0;
$db->query("UPDATE ogp_remote_servers SET enabled={$e} WHERE remote_server_id={$id}");
$db->query("UPDATE gsp_remote_servers SET enabled={$e} WHERE remote_server_id={$id}");
}
$flash[] = "Server locations updated.";
}
@ -93,7 +93,7 @@ function update_service_row(mysqli $db, string $locationCol, int $sid, array $sv
$locList = implode(' ', $selected);
$locListEsc = esc_mysqli($db, $locList);
$sql = "UPDATE ogp_billing_services
$sql = "UPDATE gsp_billing_services
SET service_name='{$name}',
`{$locationCol}`='{$locListEsc}',
slot_min_qty={$minSlots},
@ -125,13 +125,13 @@ if (isset($_POST['bulk_update']) && !empty($_POST['service']) && is_array($_POST
/* C) Remove a service (separate small form) */
if (isset($_POST['remove_service'], $_POST['service_id_remove'])) {
$sid = (int)$_POST['service_id_remove'];
$db->query("DELETE FROM ogp_billing_services WHERE service_id={$sid}");
$db->query("DELETE FROM gsp_billing_services WHERE service_id={$sid}");
$flash[] = "Service #{$sid} removed.";
}
/* fetch data for UI */
$remoteServers = fetch_all_assoc($db, "SELECT remote_server_id, remote_server_name, enabled FROM ogp_remote_servers ORDER BY remote_server_name");
$services = fetch_all_assoc($db, "SELECT service_id, service_name, `{$locationCol}` AS locs, slot_min_qty, slot_max_qty, price_monthly, img_url, enabled FROM ogp_billing_services ORDER BY service_name");
$remoteServers = fetch_all_assoc($db, "SELECT remote_server_id, remote_server_name, enabled FROM gsp_remote_servers ORDER BY remote_server_name");
$services = fetch_all_assoc($db, "SELECT service_id, service_name, `{$locationCol}` AS locs, slot_min_qty, slot_max_qty, price_monthly, img_url, enabled FROM gsp_billing_services ORDER BY service_name");
?>
<?php if ($flash): ?>

View file

@ -21,21 +21,21 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['delete_single'])) {
$order_id = intval($_POST['delete_single']);
if ($order_id > 0) {
// First, check if the status is 'renew'
$stmt = $db->prepare("SELECT status FROM ogp_billing_orders WHERE order_id = ? AND user_id = ?");
$stmt = $db->prepare("SELECT status FROM gsp_billing_orders WHERE order_id = ? AND user_id = ?");
$stmt->bind_param("ii", $order_id, $user_id);
$stmt->execute();
$stmt->bind_result($status);
if ($stmt->fetch() && strtolower($status) === 'renew') {
$stmt->close();
// Set status to 'expired' if currently 'renew'
$update = $db->prepare("UPDATE ogp_billing_orders SET status = 'expired' WHERE order_id = ? AND user_id = ?");
$update = $db->prepare("UPDATE gsp_billing_orders SET status = 'expired' WHERE order_id = ? AND user_id = ?");
$update->bind_param("ii", $order_id, $user_id);
$update->execute();
$update->close();
} else {
$stmt->close();
// Otherwise, delete the order
$delete = $db->prepare("DELETE FROM ogp_billing_orders WHERE order_id = ? AND user_id = ?");
$delete = $db->prepare("DELETE FROM gsp_billing_orders WHERE order_id = ? AND user_id = ?");
$delete->bind_param("ii", $order_id, $user_id);
$delete->execute();
$delete->close();
@ -44,7 +44,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['delete_single'])) {
}
if ($db){
$carts = $db->query("SELECT * FROM ogp_billing_orders AS cart
$carts = $db->query("SELECT * FROM gsp_billing_orders AS cart
WHERE (status = 'in-cart' OR status = 'renew') AND user_id = " . $user_id . " ORDER BY order_id ASC");

View file

@ -19,7 +19,7 @@ if (!$db) {
//returning true/false
//$isAdmin = isAdmin(186);
function isAdmin($userID){
$adminField = $db->query("SELECT 'users_role' FROM ogp_users WHERE userID = $userID");
$adminField = $db->query("SELECT 'users_role' FROM gsp_users WHERE userID = $userID");
if($adminField == "admin"){
$adminStatus = true;
}else{

View file

@ -8,7 +8,7 @@ When the user clicks the "Add to Cart" button, the next page to load is "add_to_
All the configuration info is passed to the add_to_cart.php in hidden fields
In our website, we are setting "post" pages with a "Tag". The first tag in our post should be the service ID from the services table
There are other methods that might be better to get the info. But all we need is the "service_ID" in the "ogp_billing_services" table
There are other methods that might be better to get the info. But all we need is the "service_ID" in the "gsp_billing_services" table
This method means we can use one code block in every game page and fill in the data dynamically.
*/
include "website_db.php";
@ -37,7 +37,7 @@ THIS IS WHAT WE DISPLAY ON THE SHOP PAGE AT THE TOP
<?php
// Shop Form
if(intval($_REQUEST['service_id']) !==0) $where_service_id = " WHERE enabled = 1 and service_id=".intval($_REQUEST['service_id']); else $where_service_id = " where enabled = 1";
$qry_services = "SELECT * FROM ogp_billing_services ".$where_service_id ." ORDER BY service_name";
$qry_services = "SELECT * FROM gsp_billing_services ".$where_service_id ." ORDER BY service_name";
$services = $db->query($qry_services);
if (isset($_REQUEST['service_id']) && $services === false) {
@ -173,7 +173,7 @@ if ($row['price_monthly'] == 0.0) {
//loop through each of the assigned servers and see if its disabled
foreach($rsiArray as $rsi)
{
$query = "SELECT * FROM ogp_remote_servers WHERE remote_server_id = ".$rsi;
$query = "SELECT * FROM gsp_remote_servers WHERE remote_server_id = ".$rsi;
$result = $db->query($query);
foreach($result as $rs)
{

View file

@ -11,7 +11,7 @@ include "website_db.php";
if (isset($_POST['save']) && !empty($_POST['description'])) {
$new_description = str_replace("\\r\\n", "<br>", $_POST['description']);
$service = intval($_POST['service_id']);
$stmt = $db->prepare("UPDATE ogp_billing_services SET description = ? WHERE service_id = ?");
$stmt = $db->prepare("UPDATE gsp_billing_services SET description = ? WHERE service_id = ?");
$stmt->bind_param("si", $new_description, $service);
$stmt->execute();
$stmt->close();
@ -20,7 +20,7 @@ if (isset($_POST['save']) && !empty($_POST['description'])) {
// Fetch services
$service_id = isset($_REQUEST['service_id']) ? intval($_REQUEST['service_id']) : 0;
$where_service_id = $service_id !== 0 ? "WHERE enabled = 1 AND service_id = $service_id" : "WHERE enabled = 1";
$qry_services = "SELECT * FROM ogp_billing_services $where_service_id ORDER BY service_name";
$qry_services = "SELECT * FROM gsp_billing_services $where_service_id ORDER BY service_name";
$services = $db->query($qry_services);
if (!$services) {

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -67,7 +67,7 @@ function exec_gsp_module() {
// Update and remove invalid old game mod ids
if($clear_old){
$db->updateOGPGameModsWithNewIDs($oldStructure);
$db->updateGSPGameModsWithNewIDs($oldStructure);
}
print_success(get_lang('configs_updated_ok'));

View file

@ -12,7 +12,7 @@ function exec_gsp_module()
$homes = $db->getIpPorts();
if(!$homes)
{
print_failure(get_lang('cron_admin_no_ogp_servers_to_display'));
print_failure(get_lang('cron_admin_no_gsp_servers_to_display'));
return 0;
}
@ -44,7 +44,7 @@ function exec_gsp_module()
if(isset($_POST['homeid_ip_port']) and isset($server_homes[$_POST['homeid_ip_port']]))
{
$panelURL = getOGPSiteURL();
$panelURL = getGSPSiteURL();
if($panelURL === false)
{
print_failure('Failed to retrieve panel URL.');

View file

@ -203,7 +203,7 @@ function updateCronJobsToNewApi()
{
require_once 'includes/lib_remote.php';
$panelURL = getOGPSiteURL();
$panelURL = getGSPSiteURL();
if($panelURL === false)
return false;

View file

@ -45,7 +45,7 @@ function exec_gsp_module()
if ( isset( $_POST['homeid_ip_port'] ) and isset($server_homes[$_POST['homeid_ip_port']]) )
{
$panelURL = getOGPSiteURL();
$panelURL = getGSPSiteURL();
if($panelURL === false)
{
print_failure('Failed to retrieve panel URL.');

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -51,7 +51,7 @@ function installUpdate($info, $base_dir, $current_blacklist = array())
$not_overwritten_files = "";
$new_files = "";
$temp_dir = $tmp . DIRECTORY_SEPARATOR . "OGP_Extras";
$temp_dir = $tmp . DIRECTORY_SEPARATOR . "GSP_Extras";
if( !file_exists($temp_dir) )
mkdir($temp_dir, 0775);
@ -207,7 +207,7 @@ function deeperPathFirst($a, $b)
return ($al > $bl) ? -1 : +1;
}
function exec_ogp_module()
function exec_gsp_module()
{
global $db, $settings;
@ -374,7 +374,7 @@ function exec_ogp_module()
foreach($repos_info_array as $key => $repository)
{
if(preg_match('/^(OGP-Website|OGP-Agent-Linux|OGP-Agent-Windows)$/',$repository['name']))
if(preg_match('/^(GSP-Website|OGP-Agent-Linux|OGP-Agent-Windows)$/',$repository['name']))
continue;
$REMOTE_REPO_FILE = $gitHubURL . $repository['name'] . '/commits/master.atom';

View file

@ -78,7 +78,7 @@ if (preg_match("/u/",$server_home['access_rights']))
}
/*
$module_buttons[] = "<a class='monitorbutton getAPILinks' hassteam='" . ($hasSteamAutoUpdate ? 'true' : 'false') . "' hasrcon='" . ($server_xml->control_protocol || ($server_xml->lgsl_query_name and $server_xml->lgsl_query_name == "7dtd") || ($server_xml->gameq_query_name and $server_xml->gameq_query_name == "minecraft") ? 'true' : 'false') . "' copyfail='" . get_lang("auto_update_copy_me_fail") . "' copysuccess='" . get_lang("auto_update_copy_me_success") . "' autoupdatetext='" . get_lang("auto_update_title_popup") . "' copyme='" . get_lang("auto_update_copy_me") . "' token='".$db->getApiToken($_SESSION['user_id'])."' ip='".$server_home['ip']."' port='".$server_home['port']."' modkey='".$server_home['mod_key']."' panelurl='" . getOGPSiteURL() . "'>
$module_buttons[] = "<a class='monitorbutton getAPILinks' hassteam='" . ($hasSteamAutoUpdate ? 'true' : 'false') . "' hasrcon='" . ($server_xml->control_protocol || ($server_xml->lgsl_query_name and $server_xml->lgsl_query_name == "7dtd") || ($server_xml->gameq_query_name and $server_xml->gameq_query_name == "minecraft") ? 'true' : 'false') . "' copyfail='" . get_lang("auto_update_copy_me_fail") . "' copysuccess='" . get_lang("auto_update_copy_me_success") . "' autoupdatetext='" . get_lang("auto_update_title_popup") . "' copyme='" . get_lang("auto_update_copy_me") . "' token='".$db->getApiToken($_SESSION['user_id'])."' ip='".$server_home['ip']."' port='".$server_home['port']."' modkey='".$server_home['mod_key']."' panelurl='" . getGSPSiteURL() . "'>
<img src='" . check_theme_image("images/auto_update.png") . "' title='". get_lang("show_api_actions") . "'>
<span>". get_lang("show_api_actions") . "</span>
</a>";

View file

@ -127,7 +127,7 @@ function get_sync_name($server_xml)
return $sync_name;
}
function exec_ogp_module() {
function exec_gsp_module() {
global $db, $settings, $loggedInUserInfo;
echo "<h2 class='gameMonitor " . ($db->isAdmin( $_SESSION['user_id'] ) ? "isAdminUser" : "") . "'>". get_lang("game_monitor") ."</h2>";
$refresh = new refreshed();
@ -322,7 +322,7 @@ echo "<table id='servermonitor' class='tablesorter' data-sortlist='[[0,0],[3,1]]
//default is it never expires
$expiration_dates = "This Server Will NEVER Expire";
//get all orders thare are active or invoiced
$query = "SELECT * FROM ogp_billing_orders WHERE home_id = " . $server_home['home_id'] . " AND status >= -2" ;
$query = "SELECT * FROM gsp_billing_orders WHERE home_id = " . $server_home['home_id'] . " AND status >= -2" ;
$results = $db->resultQuery($query);
if(!is_null($results[0]['status']))
{
@ -513,7 +513,7 @@ echo "<table id='servermonitor' class='tablesorter' data-sortlist='[[0,0],[3,1]]
$address = "<span style='color:darkred;font-weight:bold;'>Agent Offline</span>";
}
$user = $db->getUserById($server_home['user_id_main']);
$query = "SELECT * FROM ogp_billing_orders WHERE home_id = " . $server_home['home_id'] . " AND status > 0" ;
$query = "SELECT * FROM gsp_billing_orders WHERE home_id = " . $server_home['home_id'] . " AND status > 0" ;
//DISABLE SHOWING EXPIRATION DATES
//$expiration_dates = "";

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -5,7 +5,7 @@
require_once(MODULES."/litefm/functions.php");
require_once(MODULES."/litefm/litefm.php");
function exec_ogp_module()
function exec_gsp_module()
{
$home_id = $_REQUEST['home_id'];

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -95,7 +95,7 @@ function exec_gsp_module() {
$_REQUEST['remote_host'],
$_REQUEST['remote_host_port'],
$_REQUEST['remote_host_name'],
$_REQUEST['ogp_user'],
$_REQUEST['gsp_user'],
$_REQUEST['remote_host_ftp_ip'],
$_REQUEST['remote_host_ftp_port'],
$_REQUEST['remote_encryption_key'],
@ -117,7 +117,7 @@ function exec_gsp_module() {
$ft->add_field('string','remote_host',$remote_server['agent_ip']);
$ft->add_field('string','remote_host_port',$remote_server['agent_port']);
$ft->add_field('string','remote_host_name',$remote_server['remote_server_name']);
$ft->add_field('string','ogp_user',$remote_server['ogp_user']);
$ft->add_field('string','gsp_user',$remote_server['gsp_user']);
$ft->add_field('string','remote_host_ftp_ip',$ftp_ip);
$ft->add_field('string','remote_host_ftp_port',$remote_server['ftp_port']);
$ft->add_field('string','remote_encryption_key',$remote_server['encryption_key']);

View file

@ -25,7 +25,7 @@ $install_queries[0] = array(
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."remote_servers` (
`remote_server_id` int(11) NOT NULL auto_increment,
`remote_server_name` varchar(100) NOT NULL,
`ogp_user` varchar(100) NOT NULL,
`gsp_user` varchar(100) NOT NULL,
`agent_ip` varchar(255) NOT NULL,
`agent_port` int(11) NOT NULL,
`ftp_port` int(11) NOT NULL,

View file

@ -91,7 +91,7 @@ function exec_gsp_module() {
$ftp_ip = empty( $server_row['ftp_ip'] ) ? $server_row['agent_ip'] : $server_row['ftp_ip'];
$data = "<tr class='expand-child' >
<td>$booble</td><td>
<b>". get_lang("ogp_user") .":</b> ".$server_row['ogp_user']."<br />
<b>". get_lang("gsp_user") .":</b> ".$server_row['gsp_user']."<br />
<b>". get_lang("agent_ip_port") .":</b> ".$server_row['agent_ip'].":".$server_row['agent_port']."<br />
<b>". get_lang("remote_host_ftp_ip") .":</b> ".$ftp_ip."<br />
<b>". get_lang("remote_host_ftp_port") .":</b> ".$server_row['ftp_port']."<br />

View file

@ -10,7 +10,7 @@ echo '<link rel="stylesheet" type="text/css" href="css/xbbcode/xbbcode.css">'."\
'<script type="text/javascript" src="js/xbbcode/xbbcode.js"></script>'."\n".
'<script type="text/javascript" src="js/modules/steam_workshop.js"></script>';
function exec_ogp_module()
function exec_gsp_module()
{
Global $db,$view,$settings;

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -1,8 +1,8 @@
<?php
/*
*
* OGP - Open Game Panel
* Copyright (C) 2008 - 2017 The OGP Development Team
* GSP - GameServer Panel
* Copyright (C) 2008 - 2017 The GSP Development Team
*
* http://www.gameserver-panel.org/
*

View file

@ -8,7 +8,7 @@
function exec_gsp_module()
{
global $db, $settings;
define('REPONAME', 'OGP-Website');
define('REPONAME', 'GSP-Website');
if ($_SESSION['users_group'] != "admin")
{

View file

@ -18,7 +18,7 @@ function rmdir_recurse($path) {
function exec_gsp_module()
{
define('REPONAME', 'OGP-Website');
define('REPONAME', 'GSP-Website');
if($_SESSION['users_group'] != "admin")
{
print_failure( get_lang("no_access") );
@ -107,7 +107,7 @@ function exec_gsp_module()
$new_files = "";
$unwanted_path = REPONAME . "-" . $_GET['version'];
$extract_path = $temp . DIRECTORY_SEPARATOR . "OGP_update";
$extract_path = $temp . DIRECTORY_SEPARATOR . "GSP_update";
if( !file_exists($extract_path) )
mkdir($extract_path, 0775);

View file

@ -10,7 +10,7 @@ function create_selection($selection,$flag)
<td align='left'><input id='".clean_id_string($selection)."' type='checkbox' name='".$selection."' value='1' checked='checked' /></td></tr><tr>
<td align='left' class='info' colspan='2'>".get_lang($selection.'_info')."</td></tr>";
}
function exec_ogp_module()
function exec_gsp_module()
{
global $db, $settings;
global $view;
@ -81,7 +81,7 @@ function exec_ogp_module()
}
foreach ( $remote_servers as $server )
{
if($server['remote_server_id'] == $rserver_id) $ogp_user = $server['ogp_user'];
if($server['remote_server_id'] == $rserver_id) $gsp_user = $server['gsp_user'];
}
foreach ( $users as $user )
{
@ -90,7 +90,7 @@ function exec_ogp_module()
$ftppassword = genRandomString(8);
// Game path logic
$game_path = "/home/".$ogp_user."/OGP_User_Files/"; // Default
$game_path = "/home/".$gsp_user."/GSP_User_Files/"; // Default
$skipId = false;
if(hasValue($default_home_dir)){

View file

@ -35,7 +35,7 @@ function exec_gsp_module()
$web_user = $web_user["users_login"];
// Game path logic
$game_path = "/home/".$server_row['ogp_user']."/OGP_User_Files/"; // Default
$game_path = "/home/".$server_row['gsp_user']."/GSP_User_Files/"; // Default
$skipId = false;
if(hasValue($default_home_dir)){
@ -179,7 +179,7 @@ function exec_gsp_module()
$ft->add_field('string','new_home_name',htmlentities($server_row['home_name']));
echo "<tr><td class='right'>".get_lang('clone_mods').":</td>
<td class='left'><input type='checkbox' name='clone_mods' value='y' /></td></tr>";
echo "<input name='user_group' type='hidden' value='".get_user_uid_gid_from_passwd($passwd_array,$server_row['ogp_user'])."' /></tr>";
echo "<input name='user_group' type='hidden' value='".get_user_uid_gid_from_passwd($passwd_array,$server_row['gsp_user'])."' /></tr>";
echo "</table>";
$ft->add_button('submit','clone_home',get_lang('clone_home'));
echo "<p class='info'>".get_lang('the_name_of_the_server_to_help_users_to_identify_it')."</p>";

View file

@ -7,8 +7,8 @@ function logHandling($home_id, $action = 'delete', &$remote){
$fileId = str_pad($home_id, 9, '0', STR_PAD_LEFT);
$files = array(
'screenlogs/screenlog.OGP_HOME_'.$fileId => 'file',
'screenlogs/screenlog.OGP_UPDATE_'.$fileId => 'file',
'screenlogs/screenlog.GSP_HOME_'.$fileId => 'file',
'screenlogs/screenlog.GSP_UPDATE_'.$fileId => 'file',
'screenlogs/home_id_'.$home_id.'/' => 'dir',
);

View file

@ -5,7 +5,7 @@
require_once("modules/config_games/server_config_parser.php");
function exec_ogp_module()
function exec_gsp_module()
{
global $db;
$isAdmin = $db->isAdmin( $_SESSION['user_id'] );
@ -413,7 +413,7 @@ function exec_ogp_module()
if ( $db->changeUserIdMain($home_id,$user_id_main) == TRUE )
{
$db->assignHomeTo("user",$user_id_main,$home_id,$old_home['access_rights']);
$query="UPDATE `ogp_billing_orders` SET `user_id`=".$user_id_main." WHERE `home_id` = ".$home_id.";";
$query="UPDATE `gsp_billing_orders` SET `user_id`=".$user_id_main." WHERE `home_id` = ".$home_id.";";
$db->query($query);
echo json_encode(array('result' => 'success', 'info' => get_lang("successfully_changed_game_server")));
$db->logger( get_lang("successfully_changed_game_server") ." HOME ID:$home_id - ". get_lang("change_user_id_main") .":$user_id_main");