Phase 5: Final validation and remaining reference updates
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
0ea24764e3
commit
815f2b0b0c
64 changed files with 144 additions and 144 deletions
|
|
@ -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'];
|
||||
|
|
|
|||
|
|
@ -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'];
|
||||
|
|
|
|||
|
|
@ -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'];
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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/
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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/
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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/
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
error_reporting(E_ALL);
|
||||
|
||||
|
|
|
|||
|
|
@ -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'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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): ?>
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue