Revert "Complete rebrand from Open Game Panel (OGP) to GameServer Panel (GSP)"
This commit is contained in:
parent
02c94766c6
commit
deee7d6ac5
308 changed files with 1412 additions and 1412 deletions
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
*
|
||||
* http://www.gameserver-panel.org/
|
||||
* http://www.opengamepanel.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db ,$view;
|
||||
$settings = $db->getSettings();
|
||||
|
|
@ -31,7 +31,7 @@ function exec_gsp_module()
|
|||
$service_id = intval($_REQUEST['service_id']);
|
||||
|
||||
// Query for Selected service info.
|
||||
$qry_service = "SELECT DISTINCT service_id, home_cfg_id, mod_cfg_id, service_name, remote_server_id, slot_max_qty, slot_min_qty, price_daily, price_monthly, price_year, description, img_url FROM GSP_DB_PREFIXbilling_services WHERE service_id=".$db->realEscapeSingle($service_id);
|
||||
$qry_service = "SELECT DISTINCT service_id, home_cfg_id, mod_cfg_id, service_name, remote_server_id, slot_max_qty, slot_min_qty, price_daily, price_monthly, price_year, description, img_url FROM OGP_DB_PREFIXbilling_services WHERE service_id=".$db->realEscapeSingle($service_id);
|
||||
$result_service = $db->resultQuery($qry_service);
|
||||
$row_service = $result_service[0];
|
||||
//Compiling info about invoice to create an invoice order.
|
||||
|
|
@ -52,7 +52,7 @@ function exec_gsp_module()
|
|||
|
||||
// request ogp user to create a home path.
|
||||
$r_server = $db->getRemoteServer($remote_server_id);
|
||||
$gsp_user = $r_server['gsp_user'];
|
||||
$ogp_user = $r_server['ogp_user'];
|
||||
|
||||
// request the user name and the game name to generate a game home name.
|
||||
$home_name = $_POST['home_name'];
|
||||
|
|
@ -93,7 +93,7 @@ function exec_gsp_module()
|
|||
Checking if it's higher than 0 because if it's a non-numeric value, after casting it to an int it'll be 0.
|
||||
*/
|
||||
if($service_id !== 0) $where_service_id = " WHERE service_id=".$db->realEscapeSingle($service_id); else $where_service_id = "";
|
||||
$qry_services = "SELECT * FROM GSP_DB_PREFIXbilling_services".$where_service_id;
|
||||
$qry_services = "SELECT * FROM OGP_DB_PREFIXbilling_services".$where_service_id;
|
||||
$services = $db->resultQuery($qry_services);
|
||||
foreach ($services as $key => $row) {
|
||||
if($max_players < $row['slot_min_qty'] || $qty < 1){
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
*
|
||||
* http://www.gameserver-panel.org/
|
||||
* http://www.opengamepanel.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db ,$view;
|
||||
$settings = $db->getSettings();
|
||||
|
|
@ -31,7 +31,7 @@ function exec_gsp_module()
|
|||
$service_id = intval($_REQUEST['service_id']);
|
||||
|
||||
// Query for Selected service info.
|
||||
$qry_service = "SELECT DISTINCT service_id, home_cfg_id, mod_cfg_id, service_name, remote_server_id, slot_max_qty, slot_min_qty, price_daily, price_monthly, price_year, description, img_url FROM GSP_DB_PREFIXbilling_services WHERE service_id=".$db->realEscapeSingle($service_id);
|
||||
$qry_service = "SELECT DISTINCT service_id, home_cfg_id, mod_cfg_id, service_name, remote_server_id, slot_max_qty, slot_min_qty, price_daily, price_monthly, price_year, description, img_url FROM OGP_DB_PREFIXbilling_services WHERE service_id=".$db->realEscapeSingle($service_id);
|
||||
$result_service = $db->resultQuery($qry_service);
|
||||
$row_service = $result_service[0];
|
||||
//Compiling info about invoice to create an invoice order.
|
||||
|
|
@ -52,7 +52,7 @@ function exec_gsp_module()
|
|||
|
||||
// request ogp user to create a home path.
|
||||
$r_server = $db->getRemoteServer($remote_server_id);
|
||||
$gsp_user = $r_server['gsp_user'];
|
||||
$ogp_user = $r_server['ogp_user'];
|
||||
|
||||
// request the user name and the game name to generate a game home name.
|
||||
$home_name = $_POST['home_name'];
|
||||
|
|
@ -93,7 +93,7 @@ function exec_gsp_module()
|
|||
Checking if it's higher than 0 because if it's a non-numeric value, after casting it to an int it'll be 0.
|
||||
*/
|
||||
if($service_id !== 0) $where_service_id = " WHERE service_id=".$db->realEscapeSingle($service_id); else $where_service_id = "";
|
||||
$qry_services = "SELECT * FROM GSP_DB_PREFIXbilling_services".$where_service_id;
|
||||
$qry_services = "SELECT * FROM OGP_DB_PREFIXbilling_services".$where_service_id;
|
||||
$services = $db->resultQuery($qry_services);
|
||||
foreach ($services as $key => $row) {
|
||||
if($max_players < $row['slot_min_qty'] || $qty < 1){
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
//Include database connection details
|
||||
require('includes/config.inc.php');
|
||||
|
|
@ -16,11 +16,11 @@ function exec_gsp_module()
|
|||
$cart_id = $db->realEscapeSingle($cart_id);
|
||||
$isAdmin = $db->isAdmin( $_SESSION['user_id'] );
|
||||
if ( $isAdmin )
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
else
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id)." AND user_id=".$db->realEscapeSingle($user_id) );
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id)." AND user_id=".$db->realEscapeSingle($user_id) );
|
||||
|
||||
$cart = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$cart = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$tempdate = date_create( $cart[0]['date']);
|
||||
$paid_date = date_format($tempdate,"d M Y H:m");
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ function exec_gsp_module()
|
|||
|
||||
$coupon_savings = 0;
|
||||
if($cart[0]['coupon_id']>0) {
|
||||
$result = $db->resultquery("SELECT discount from GSP_DB_PREFIXbilling_coupons WHERE id = '". $cart[0]['coupon_id'] . "'");
|
||||
$result = $db->resultquery("SELECT discount from OGP_DB_PREFIXbilling_coupons WHERE id = '". $cart[0]['coupon_id'] . "'");
|
||||
foreach($result as $coupon){
|
||||
$coupon_savings = $subtotal2 * ($coupon['discount'] / 100);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,12 +36,12 @@ function assignOrdersToCart($user_id,$tax_amount,$currency,$coupon_id){
|
|||
//discount coupon
|
||||
if (!isset($coupon_id)) $coupon_id = "0";
|
||||
$fields['coupon_id'] = $coupon_id;
|
||||
$check_expired = $db->resultquery("SELECT id from GSP_DB_PREFIXbilling_coupons WHERE id = $fields[coupon_id] AND count > 0 AND expires >= NOW()");
|
||||
$check_expired = $db->resultquery("SELECT id from OGP_DB_PREFIXbilling_coupons WHERE id = $fields[coupon_id] AND count > 0 AND expires >= NOW()");
|
||||
if ($check_expired <= 0) $fields['coupon_id'] = 0;
|
||||
return $db->resultInsertId( 'billing_carts', $fields );
|
||||
}
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
error_reporting(E_ALL);
|
||||
|
||||
|
|
@ -52,10 +52,10 @@ function exec_gsp_module()
|
|||
|
||||
if( isset($_POST["update_cart"] )) {
|
||||
//print_r($_POST);
|
||||
$db->query( "UPDATE GSP_DB_PREFIXbilling_orders SET max_players= ".$_POST['slots']." WHERE order_id=".$db->realEscapeSingle($_POST['order_id']));
|
||||
$db->query( "UPDATE GSP_DB_PREFIXbilling_orders SET qty= ".$_POST['qty']." WHERE order_id=".$db->realEscapeSingle($_POST['order_id']));
|
||||
$db->query( "UPDATE GSP_DB_PREFIXbilling_orders SET invoice_duration = 'month' WHERE order_id=".$db->realEscapeSingle($_POST['order_id']));
|
||||
$db->query( "UPDATE GSP_DB_PREFIXgame_mods SET max_players= ".$_POST['slots']." WHERE home_id=".$db->realEscapeSingle($_POST['homeid']));
|
||||
$db->query( "UPDATE OGP_DB_PREFIXbilling_orders SET max_players= ".$_POST['slots']." WHERE order_id=".$db->realEscapeSingle($_POST['order_id']));
|
||||
$db->query( "UPDATE OGP_DB_PREFIXbilling_orders SET qty= ".$_POST['qty']." WHERE order_id=".$db->realEscapeSingle($_POST['order_id']));
|
||||
$db->query( "UPDATE OGP_DB_PREFIXbilling_orders SET invoice_duration = 'month' WHERE order_id=".$db->realEscapeSingle($_POST['order_id']));
|
||||
$db->query( "UPDATE OGP_DB_PREFIXgame_mods SET max_players= ".$_POST['slots']." WHERE home_id=".$db->realEscapeSingle($_POST['homeid']));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ function exec_gsp_module()
|
|||
if( isset($_POST["coupon_code"] ) && $_POST["coupon_code"] != "") {
|
||||
$coupon_id = 0;
|
||||
$coupon_code = "";
|
||||
$result = $db->resultquery("SELECT * from GSP_DB_PREFIXbilling_coupons WHERE code= '". $_POST['coupon_code'] . "'");
|
||||
$result = $db->resultquery("SELECT * from OGP_DB_PREFIXbilling_coupons WHERE code= '". $_POST['coupon_code'] . "'");
|
||||
$coupon_name = "<b style='color:red'>NON-EXISTING COUPON</b>";
|
||||
$coupon_discount = 0;
|
||||
foreach($result as $couponDB){
|
||||
|
|
@ -84,7 +84,7 @@ function exec_gsp_module()
|
|||
|
||||
if ($coupon_count > 0) {
|
||||
$coupon_count--;
|
||||
$db->resultquery("UPDATE gsp_billing_coupons SET count = $coupon_count WHERE code = '$_POST[coupon_code]'");
|
||||
$db->resultquery("UPDATE ogp_billing_coupons SET count = $coupon_count WHERE code = '$_POST[coupon_code]'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -150,7 +150,7 @@ function exec_gsp_module()
|
|||
if( isset( $_POST["extend"] ) or isset( $_POST["extend_and_pay_paypal"] ))
|
||||
{
|
||||
|
||||
$orders = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE order_id=".$db->realEscapeSingle($_POST['order_id']));
|
||||
$orders = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE order_id=".$db->realEscapeSingle($_POST['order_id']));
|
||||
|
||||
// *****************************************
|
||||
//FIGURE OUT IF THIS IS ALREADY BEEN UPDATED
|
||||
|
|
@ -175,7 +175,7 @@ function exec_gsp_module()
|
|||
$status = 0;
|
||||
$finish_date = $order['finish_date'];
|
||||
$services = $db->resultQuery( "SELECT *
|
||||
FROM GSP_DB_PREFIXbilling_services
|
||||
FROM OGP_DB_PREFIXbilling_services
|
||||
WHERE service_id=".$db->realEscapeSingle($service_id) );
|
||||
$service = $services[0];
|
||||
//Calculating Price
|
||||
|
|
@ -196,7 +196,7 @@ function exec_gsp_module()
|
|||
//save the EXPIRED finish date into NEW finish date. Then check if FINISH DATE !=0 and move that + 1 month into status
|
||||
$order_id = saveOrderToDb($user_id,$service_id,$home_name,$ip,$max_players,$qty,$invoice_duration,$price,$remote_control_password,$ftp_password,$cart_id,$home_id,$status,$finish_date,"1");
|
||||
//Change the old order expiration to -3 so it can not be extended, since there is a new order managing the same game home.
|
||||
$db->query( "UPDATE GSP_DB_PREFIXbilling_orders
|
||||
$db->query( "UPDATE OGP_DB_PREFIXbilling_orders
|
||||
SET status=-3
|
||||
WHERE order_id=".$db->realEscapeSingle($_POST['order_id']));
|
||||
|
||||
|
|
@ -221,11 +221,11 @@ function exec_gsp_module()
|
|||
unset($_SESSION['coupon_id']);
|
||||
}
|
||||
$order_id = $_POST['order_id'];
|
||||
$db->query( "DELETE FROM GSP_DB_PREFIXbilling_orders WHERE order_id=".$db->realEscapeSingle($order_id) );
|
||||
$orders_in_cart = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$db->query( "DELETE FROM OGP_DB_PREFIXbilling_orders WHERE order_id=".$db->realEscapeSingle($order_id) );
|
||||
$orders_in_cart = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
if( !$orders_in_cart )
|
||||
{
|
||||
$db->query( "DELETE FROM GSP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$db->query( "DELETE FROM OGP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -262,7 +262,7 @@ function exec_gsp_module()
|
|||
$carts[0] = $_SESSION['CART'];
|
||||
}
|
||||
|
||||
$user_carts = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_carts WHERE user_id=".$db->realEscapeSingle($user_id) ." order by cart_id desc" );
|
||||
$user_carts = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE user_id=".$db->realEscapeSingle($user_id) ." order by cart_id desc" );
|
||||
|
||||
|
||||
if( $user_carts >=1 )
|
||||
|
|
@ -273,8 +273,8 @@ function exec_gsp_module()
|
|||
{
|
||||
$cart_id = $user_cart['cart_id'];
|
||||
|
||||
$carts[$cart_id] = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_carts AS cart JOIN
|
||||
GSP_DB_PREFIXbilling_orders AS orders
|
||||
$carts[$cart_id] = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_carts AS cart JOIN
|
||||
OGP_DB_PREFIXbilling_orders AS orders
|
||||
ON orders.cart_id=cart.cart_id
|
||||
WHERE orders.status IN (0, -1 , -2) AND (cart.cart_id=".$db->realEscapeSingle($cart_id). ") order by order_id asc");
|
||||
}
|
||||
|
|
@ -369,7 +369,7 @@ function exec_gsp_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 gsp_billing_orders WHERE user_id=".$user_id);
|
||||
$result = $db->resultQuery("SELECT * FROM ogp_billing_orders WHERE user_id=".$user_id);
|
||||
$server_price = number_format( $order['price'], 2 );
|
||||
if(isset($settings['display_free'])) {
|
||||
$display_free = $settings['display_free'];
|
||||
|
|
@ -465,7 +465,7 @@ function exec_gsp_module()
|
|||
//get max_slots and min_slots from the billing_services for this game.
|
||||
|
||||
$services = $db->resultQuery( "SELECT *
|
||||
FROM GSP_DB_PREFIXbilling_services
|
||||
FROM OGP_DB_PREFIXbilling_services
|
||||
WHERE service_id=".$db->realEscapeSingle($order['service_id']) );
|
||||
$service = $services[0];
|
||||
$min = $service['slot_min_qty'];
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ function exec_gsp_module()
|
|||
$id = $db->realEscapeSingle($_POST['id']);
|
||||
|
||||
//Create INSERT query
|
||||
$qry_change_url = "UPDATE GSP_DB_PREFIXbilling_coupons
|
||||
$qry_change_url = "UPDATE OGP_DB_PREFIXbilling_coupons
|
||||
SET code ='".$new_code."',
|
||||
name = '".$new_name."',
|
||||
discount ='".$new_discount."',
|
||||
|
|
@ -35,14 +35,14 @@ function exec_gsp_module()
|
|||
$expires = $_POST['expires'];
|
||||
|
||||
|
||||
$query = "INSERT INTO GSP_DB_PREFIXbilling_coupons(code, name, discount, count, expires) VALUES('".$code."', '".$name."', '".$discount."', '".$count."', '".$expires."')";
|
||||
$query = "INSERT INTO OGP_DB_PREFIXbilling_coupons(code, name, discount, count, expires) VALUES('".$code."', '".$name."', '".$discount."', '".$count."', '".$expires."')";
|
||||
$db->query($query);
|
||||
}
|
||||
|
||||
//Querying REMOVE coupon FROM DB
|
||||
if (isset($_POST['del_coupon']))
|
||||
{
|
||||
$db->query( "DELETE FROM GSP_DB_PREFIXbilling_coupons WHERE id=" . $db->realEscapeSingle($_POST['id']) );
|
||||
$db->query( "DELETE FROM OGP_DB_PREFIXbilling_coupons WHERE id=" . $db->realEscapeSingle($_POST['id']) );
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ function exec_gsp_module()
|
|||
</table>
|
||||
<br>
|
||||
<?php
|
||||
$result = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_coupons");
|
||||
$result = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_coupons");
|
||||
if ($result > 0)
|
||||
{
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ function exec_gsp_module()
|
|||
$id = $db->realEscapeSingle($_POST['id']);
|
||||
|
||||
//Create INSERT query
|
||||
$qry_change_url = "UPDATE GSP_DB_PREFIXbilling_coupons
|
||||
$qry_change_url = "UPDATE OGP_DB_PREFIXbilling_coupons
|
||||
SET code ='".$new_code."',
|
||||
name = '".$new_name."',
|
||||
discount ='".$new_discount."',
|
||||
|
|
@ -35,14 +35,14 @@ function exec_gsp_module()
|
|||
$expires = $_POST['expires'];
|
||||
|
||||
|
||||
$query = "INSERT INTO GSP_DB_PREFIXbilling_coupons(code, name, discount, count, expires) VALUES('".$code."', '".$name."', '".$discount."', '".$count."', '".$expires."')";
|
||||
$query = "INSERT INTO OGP_DB_PREFIXbilling_coupons(code, name, discount, count, expires) VALUES('".$code."', '".$name."', '".$discount."', '".$count."', '".$expires."')";
|
||||
$db->query($query);
|
||||
}
|
||||
|
||||
//Querying REMOVE coupon FROM DB
|
||||
if (isset($_POST['del_coupon']))
|
||||
{
|
||||
$db->query( "DELETE FROM GSP_DB_PREFIXbilling_coupons WHERE id=" . $db->realEscapeSingle($_POST['id']) );
|
||||
$db->query( "DELETE FROM OGP_DB_PREFIXbilling_coupons WHERE id=" . $db->realEscapeSingle($_POST['id']) );
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ function exec_gsp_module()
|
|||
</table>
|
||||
<br>
|
||||
<?php
|
||||
$result = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_coupons");
|
||||
$result = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_coupons");
|
||||
if ($result > 0)
|
||||
{
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
require_once("includes/lib_remote.php");
|
||||
require_once("modules/config_games/server_config_parser.php");
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db,$view,$settings;
|
||||
$user_id = $_SESSION['user_id'];
|
||||
|
|
@ -12,12 +12,12 @@ function exec_gsp_module()
|
|||
if(isset($_GET['cart_id'])){
|
||||
$cart_id = $_GET['cart_id'];
|
||||
}
|
||||
$cart_paid = $db->resultQuery( "SELECT paid FROM GSP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$cart_paid = $db->resultQuery( "SELECT paid FROM OGP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$isAdmin = $db->isAdmin( $_SESSION['user_id'] );
|
||||
if ( $isAdmin ){
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
} else {
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id)." AND user_id=".$db->realEscapeSingle($user_id) );
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id)." AND user_id=".$db->realEscapeSingle($user_id) );
|
||||
}
|
||||
if( !empty($orders) and !empty($cart_paid) )
|
||||
{
|
||||
|
|
@ -35,7 +35,7 @@ function exec_gsp_module()
|
|||
$extended = $order['extended'] == "1" ? TRUE : FALSE;
|
||||
//Query service info
|
||||
$service = $db->resultQuery( "SELECT *
|
||||
FROM GSP_DB_PREFIXbilling_services
|
||||
FROM OGP_DB_PREFIXbilling_services
|
||||
WHERE service_id=".$db->realEscapeSingle($service_id) );
|
||||
|
||||
if( !empty( $service[0] ) )
|
||||
|
|
@ -62,7 +62,7 @@ function exec_gsp_module()
|
|||
$home_info = $db->getGameHomeWithoutMods($home_id);
|
||||
|
||||
//Create the remote connection
|
||||
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
|
||||
//Reassign the server
|
||||
$db->assignHomeTo( "user", $user_id, $home_id, $access_rights );
|
||||
|
|
@ -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 gsp_users, gsp_billing_orders
|
||||
WHERE gsp_users.user_id = $user_id")[0]["users_email"];
|
||||
FROM ogp_users, ogp_billing_orders
|
||||
WHERE ogp_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>
|
||||
|
|
@ -131,7 +131,7 @@ function exec_gsp_module()
|
|||
|
||||
//Add IP:Port Pair to the Game Home
|
||||
//need to get the IP_ID for this remote server.
|
||||
$result = $db->resultQuery("SELECT ip_id FROM GSP_DB_PREFIXremote_server_ips WHERE remote_server_id=".$ip);
|
||||
$result = $db->resultQuery("SELECT ip_id FROM OGP_DB_PREFIXremote_server_ips WHERE remote_server_id=".$ip);
|
||||
foreach ($result as $rs)
|
||||
{
|
||||
$ip_id = $rs['ip_id'];
|
||||
|
|
@ -147,7 +147,7 @@ function exec_gsp_module()
|
|||
$home_info = $db->getGameHomeWithoutMods($home_id);
|
||||
|
||||
//Create the remote connection
|
||||
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
|
||||
//Get Full home info in 1 array
|
||||
$home_info = $db->getGameHome($home_id);
|
||||
|
|
@ -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 gsp_users, gsp_billing_orders
|
||||
WHERE gsp_users.user_id = $user_id")[0]["users_email"];
|
||||
FROM ogp_users, ogp_billing_orders
|
||||
WHERE ogp_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 gsp database
|
||||
// Set expiration date in ogp database
|
||||
//status is -3 -2 -1 0 and 1
|
||||
// deleted, suspended, invoiced, inactive, active
|
||||
//finish_date the server will be suspended
|
||||
|
|
@ -336,33 +336,33 @@ function exec_gsp_module()
|
|||
|
||||
}
|
||||
// set order status
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_orders
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_orders
|
||||
SET status='" . $db->realEscapeSingle($status) . "'
|
||||
WHERE order_id=".$db->realEscapeSingle($order_id));
|
||||
|
||||
// set the order expiration
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_orders
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_orders
|
||||
SET finish_date='" . $db->realEscapeSingle($finish_date) . "'
|
||||
WHERE order_id=".$db->realEscapeSingle($order_id));
|
||||
|
||||
// Save home id created by this order
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_orders
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_orders
|
||||
SET home_id='" . $db->realEscapeSingle($home_id) . "' WHERE order_id=".$db->realEscapeSingle($order_id));
|
||||
|
||||
}
|
||||
|
||||
//Update Cart Payment Status as 3(paid and installed)
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_carts
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_carts
|
||||
SET paid=3
|
||||
WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
|
||||
// Set payment/creation date
|
||||
$date = date('d M Y');
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_carts
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_carts
|
||||
SET date='" . $db->realEscapeSingle($date) . "'
|
||||
WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
|
||||
$db->query( "UPDATE GSP_DB_PREFIXgame_mods SET max_players= ".$order['max_players']." WHERE home_id=".$db->realEscapeSingle($home_id));
|
||||
$db->query( "UPDATE OGP_DB_PREFIXgame_mods SET max_players= ".$order['max_players']." WHERE home_id=".$db->realEscapeSingle($home_id));
|
||||
|
||||
|
||||
//Refresh to Game Monitor.
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
*
|
||||
* http://www.gameserver-panel.org/
|
||||
* http://www.opengamepanel.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
chdir(realpath(dirname(__FILE__))); /* Change to the current file path */
|
||||
chdir("../.."); /* Base path to gsp web files */
|
||||
chdir("../.."); /* Base path to ogp web files */
|
||||
// Report all PHP errors
|
||||
error_reporting(E_ALL);
|
||||
// Path definitions
|
||||
|
|
@ -114,7 +114,7 @@ else
|
|||
$home_id = $user_home['home_id'];
|
||||
$home_info = $db->getGameHomeWithoutMods($home_id);
|
||||
$server_info = $db->getRemoteServerById($home_info['remote_server_id']);
|
||||
$remote = new GSPRemoteLibrary($server_info['agent_ip'], $server_info['agent_port'], $server_info['encryption_key'],$server_info['timeout']);
|
||||
$remote = new OGPRemoteLibrary($server_info['agent_ip'], $server_info['agent_port'], $server_info['encryption_key'],$server_info['timeout']);
|
||||
$ftp_login = isset($home_info['ftp_login']) ? $home_info['ftp_login'] : $home_id;
|
||||
$remote->ftp_mgr("userdel", $ftp_login);
|
||||
$db->changeFtpStatus('disabled',$home_id);
|
||||
|
|
@ -168,7 +168,7 @@ else
|
|||
$home_id = $user_home['home_id'];
|
||||
$home_info = $db->getGameHomeWithoutMods($home_id);
|
||||
$server_info = $db->getRemoteServerById($home_info['remote_server_id']);
|
||||
$remote = new GSPRemoteLibrary($server_info['agent_ip'], $server_info['agent_port'], $server_info['encryption_key'],$server_info['timeout']);
|
||||
$remote = new OGPRemoteLibrary($server_info['agent_ip'], $server_info['agent_port'], $server_info['encryption_key'],$server_info['timeout']);
|
||||
|
||||
// Remove the game home from db
|
||||
$db->deleteGameHome($home_id);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ if (strcmp ($res, "VERIFIED") == 0) {
|
|||
$receiver_email = $_POST['receiver_email'];
|
||||
$payer_email = $_POST['payer_email'];
|
||||
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_carts
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_carts
|
||||
SET paid=1
|
||||
WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
fwrite($fpx, "IPN Processed\n");
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
*
|
||||
* http://www.gameserver-panel.org/
|
||||
* http://www.opengamepanel.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
@ -37,8 +37,8 @@ $module_menus = array(
|
|||
|
||||
$install_queries = array();
|
||||
$install_queries[0] = array(
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."billing_services`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."billing_services` (
|
||||
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."billing_services`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."billing_services` (
|
||||
`service_id` int(11) NOT NULL auto_increment,
|
||||
`home_cfg_id` int(11) NOT NULL,
|
||||
`mod_cfg_id` int(11) NOT NULL,
|
||||
|
|
@ -58,8 +58,8 @@ $install_queries[0] = array(
|
|||
PRIMARY KEY (`service_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=UTF8;",
|
||||
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."billing_orders`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."billing_orders` (
|
||||
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."billing_orders`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."billing_orders` (
|
||||
`order_id` int(11) NOT NULL auto_increment,
|
||||
`user_id` int(11) NOT NULL,
|
||||
`service_id` int(11) NOT NULL,
|
||||
|
|
@ -81,16 +81,16 @@ $install_queries[0] = array(
|
|||
);
|
||||
|
||||
$install_queries[1] = array(
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."billing_carts`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."billing_carts` (
|
||||
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."billing_carts`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."billing_carts` (
|
||||
`cart_id` int(11) NOT NULL auto_increment,
|
||||
`user_id` int(11) NOT NULL,
|
||||
`paid` int(11) NULL,
|
||||
PRIMARY KEY (`cart_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=UTF8;",
|
||||
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."billing_orders`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."billing_orders` (
|
||||
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."billing_orders`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."billing_orders` (
|
||||
`order_id` int(11) NOT NULL auto_increment,
|
||||
`user_id` int(11) NOT NULL,
|
||||
`service_id` int(11) NOT NULL,
|
||||
|
|
@ -111,25 +111,25 @@ $install_queries[1] = array(
|
|||
);
|
||||
|
||||
$install_queries[2] = array(
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` DROP `date`;",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` DROP `home_path`;",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` DROP `paid`;",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` ADD `home_id` varchar(255) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` ADD `status` varchar(16) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_carts` ADD `date` varchar(16) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_carts` ADD `tax_amount` varchar(16) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_carts` ADD `currency` varchar(3) NOT NULL DEFAULT '0';"
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` DROP `date`;",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` DROP `home_path`;",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` DROP `paid`;",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` ADD `home_id` varchar(255) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` ADD `status` varchar(16) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_carts` ADD `date` varchar(16) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_carts` ADD `tax_amount` varchar(16) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_carts` ADD `currency` varchar(3) NOT NULL DEFAULT '0';"
|
||||
);
|
||||
|
||||
$install_queries[3] = array(
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` ADD `finish_date` varchar(16) NOT NULL DEFAULT '0';"
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` ADD `finish_date` varchar(16) NOT NULL DEFAULT '0';"
|
||||
);
|
||||
|
||||
$install_queries[4] = array(
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` ADD `extended` tinyint(1) NOT NULL;",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_services` ADD `enabled` int(11) NOT NULL;"
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_carts` ADD `coupon_id` varchar(3) NOT NULL DEFAULT '0';"
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` ADD `coupon_id` varchar(3) NOT NULL DEFAULT '0';"
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` ADD `extended` tinyint(1) NOT NULL;",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_services` ADD `enabled` int(11) NOT NULL;"
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_carts` ADD `coupon_id` varchar(3) NOT NULL DEFAULT '0';"
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` ADD `coupon_id` varchar(3) NOT NULL DEFAULT '0';"
|
||||
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
error_reporting(E_ALL);
|
||||
|
||||
|
|
@ -7,12 +7,12 @@ function exec_gsp_module()
|
|||
|
||||
if(isset($_POST['remove']))
|
||||
{
|
||||
$query_delete_order = $db->query("DELETE FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($_POST['cart_id']));
|
||||
$query_delete_order = $db->query("DELETE FROM GSP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($_POST['cart_id']));
|
||||
$query_delete_order = $db->query("DELETE FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($_POST['cart_id']));
|
||||
$query_delete_order = $db->query("DELETE FROM OGP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($_POST['cart_id']));
|
||||
}
|
||||
if(isset($_POST['paid']))
|
||||
{
|
||||
$query_set_as_paid = $db->query("UPDATE GSP_DB_PREFIXbilling_carts
|
||||
$query_set_as_paid = $db->query("UPDATE OGP_DB_PREFIXbilling_carts
|
||||
SET paid=1
|
||||
WHERE cart_id=".$db->realEscapeSingle($_POST['cart_id']));
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ function exec_gsp_module()
|
|||
echo "<h1>Accounting</h1>";
|
||||
$servercount = 0;
|
||||
$income = 0;
|
||||
$paidOrders = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE status > 0");
|
||||
$paidOrders = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE status > 0");
|
||||
foreach($paidOrders as $inc)
|
||||
{
|
||||
$servercount = $servercount +1;
|
||||
|
|
@ -70,9 +70,9 @@ function exec_gsp_module()
|
|||
{
|
||||
{
|
||||
if ($isAdmin){
|
||||
$carts = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_carts WHERE paid =" . $db->realEscapeSingle($paid_value) ." order by cart_id DESC");
|
||||
$carts = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE paid =" . $db->realEscapeSingle($paid_value) ." order by cart_id DESC");
|
||||
}else{
|
||||
$carts = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_carts WHERE paid=3 AND user_id = " . $user_id ." order by cart_id DESC");
|
||||
$carts = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE paid=3 AND user_id = " . $user_id ." order by cart_id DESC");
|
||||
}
|
||||
if( $carts > 0 )
|
||||
{
|
||||
|
|
@ -97,7 +97,7 @@ function exec_gsp_module()
|
|||
}?>
|
||||
</tr>
|
||||
<?php
|
||||
$orders = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart['cart_id'])." order by order_id DESC" );
|
||||
$orders = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart['cart_id'])." order by order_id DESC" );
|
||||
$subtotal = 0;
|
||||
foreach($orders as $order)
|
||||
{
|
||||
|
|
@ -212,7 +212,7 @@ function exec_gsp_module()
|
|||
//obter as informações de cupom usadas neste pedido
|
||||
$coupon_savings = 0;
|
||||
if($cart['coupon_id']>0) {
|
||||
$result = $db->resultquery("SELECT * from GSP_DB_PREFIXbilling_coupons WHERE id = '". $cart['coupon_id'] . "'");
|
||||
$result = $db->resultquery("SELECT * from OGP_DB_PREFIXbilling_coupons WHERE id = '". $cart['coupon_id'] . "'");
|
||||
foreach($result as $coupon){
|
||||
$coupon_savings = $subtotal * ($coupon['discount']/ 100);
|
||||
echo "Sub-total c/discount <b>$" .number_format( ($subtotal - $coupon_savings) , 2 ).$cart['currency']."</b></br><td>";
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db,$view,$settings;
|
||||
$loadpage = "?m=billing&p=paid";
|
||||
$count = $_POST['count'] + 1;
|
||||
|
||||
$result = $db->resultquery("SELECT * from GSP_DB_PREFIXbilling_carts WHERE cart_id= '". $_POST['cart_id'] . "'");
|
||||
$result = $db->resultquery("SELECT * from OGP_DB_PREFIXbilling_carts WHERE cart_id= '". $_POST['cart_id'] . "'");
|
||||
foreach($result as $cartID){
|
||||
$paid = $cartID['paid'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db,$view;
|
||||
$settings = $db->getSettings();
|
||||
|
|
@ -28,15 +28,15 @@ $debug = $settings['debug'];
|
|||
|
||||
if(!empty($cart_id))
|
||||
{
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
//get couponID then discount for this cart
|
||||
$result= $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
$result= $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
foreach ($result as $cartDB){
|
||||
$coupon_id = $cartDB['id'];
|
||||
}
|
||||
|
||||
$coupon_discount = 0;
|
||||
$result = $db->resultQuery( "SELECT discount FROM gsp_billing_coupons WHERE id=".$db->realEscapeSingle($cartDB['coupon_id']));
|
||||
$result = $db->resultQuery( "SELECT discount FROM ogp_billing_coupons WHERE id=".$db->realEscapeSingle($cartDB['coupon_id']));
|
||||
foreach ($result as $couponDB){
|
||||
$coupon_discount=$couponDB['discount'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ function exec_gsp_module()
|
|||
$service = $db->realEscapeSingle($_POST['service']);
|
||||
|
||||
//Create UPDATE query
|
||||
$qry_change_url = "UPDATE GSP_DB_PREFIXbilling_services
|
||||
$qry_change_url = "UPDATE OGP_DB_PREFIXbilling_services
|
||||
SET remote_server_id = '".$new_remote_server_id."',
|
||||
price_monthly ='".$new_price_monthly."',
|
||||
remote_server_id = '".$new_remote_server_id."',
|
||||
|
|
@ -28,7 +28,7 @@ function exec_gsp_module()
|
|||
//Querying UPDATE enabled/disabled remote servers DB
|
||||
if (isset($_POST['update_remote_servers']))
|
||||
{
|
||||
$result = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXremote_servers");
|
||||
$result = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXremote_servers");
|
||||
foreach($result as $rs)
|
||||
{
|
||||
$server_enabled = 0;
|
||||
|
|
@ -40,7 +40,7 @@ function exec_gsp_module()
|
|||
}
|
||||
|
||||
//update the table with current value
|
||||
$query = "UPDATE GSP_DB_PREFIXremote_servers SET enabled = '".$server_enabled."' WHERE remote_server_id=".$rs['remote_server_id'];
|
||||
$query = "UPDATE OGP_DB_PREFIXremote_servers SET enabled = '".$server_enabled."' WHERE remote_server_id=".$rs['remote_server_id'];
|
||||
$db->query($query);
|
||||
|
||||
}
|
||||
|
|
@ -83,14 +83,14 @@ function exec_gsp_module()
|
|||
if(isset($_POST['allow_ftp_usage']))$access_rights .= $db->realEscapeSingle($_POST['allow_ftp_usage']);
|
||||
if(isset($_POST['allow_custom_fields']))$access_rights .= $db->realEscapeSingle($_POST['allow_custom_fields']);
|
||||
|
||||
$qry_add_service = "INSERT INTO GSP_DB_PREFIXbilling_services(service_id, home_cfg_id, mod_cfg_id, service_name, remote_server_id, out_of_stock, slot_max_qty , slot_min_qty, price_daily, price_monthly, price_year, description, img_url, ftp, install_method, manual_url, access_rights,enabled) VALUES(NULL, '".$home_cfg_id."', '".$mod_cfg_id."', '".$service_name."', '".$remote_server_id."', 0,'".$slot_max_qty."', '".$slot_min_qty."', '".$price_daily."', '".$price_monthly."', '".$price_year."', '".$description."', '".$img_url."', '".$ftp."', '".$install_method."', '".$manual_url."', '".$access_rights."', '" . $enabled . "')";
|
||||
$qry_add_service = "INSERT INTO OGP_DB_PREFIXbilling_services(service_id, home_cfg_id, mod_cfg_id, service_name, remote_server_id, out_of_stock, slot_max_qty , slot_min_qty, price_daily, price_monthly, price_year, description, img_url, ftp, install_method, manual_url, access_rights,enabled) VALUES(NULL, '".$home_cfg_id."', '".$mod_cfg_id."', '".$service_name."', '".$remote_server_id."', 0,'".$slot_max_qty."', '".$slot_min_qty."', '".$price_daily."', '".$price_monthly."', '".$price_year."', '".$description."', '".$img_url."', '".$ftp."', '".$install_method."', '".$manual_url."', '".$access_rights."', '" . $enabled . "')";
|
||||
$db->query($qry_add_service);
|
||||
}
|
||||
|
||||
//Querying REMOVE service FROM DB
|
||||
if (isset($_POST['service_id']))
|
||||
{
|
||||
$db->query( "DELETE FROM GSP_DB_PREFIXbilling_services WHERE service_id=" . $db->realEscapeSingle($_POST['service_id']) );
|
||||
$db->query( "DELETE FROM OGP_DB_PREFIXbilling_services WHERE service_id=" . $db->realEscapeSingle($_POST['service_id']) );
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -106,7 +106,7 @@ function exec_gsp_module()
|
|||
<td>
|
||||
<select name="modcfgid">
|
||||
<?php
|
||||
$mod_qry = $db->resultQuery("SELECT DISTINCT mod_cfg_id, mod_name, game_name FROM GSP_DB_PREFIXconfig_mods NATURAL JOIN GSP_DB_PREFIXconfig_homes WHERE home_cfg_id=" . $db->realEscapeSingle($_POST['home_cfg_id']));
|
||||
$mod_qry = $db->resultQuery("SELECT DISTINCT mod_cfg_id, mod_name, game_name FROM OGP_DB_PREFIXconfig_mods NATURAL JOIN OGP_DB_PREFIXconfig_homes WHERE home_cfg_id=" . $db->realEscapeSingle($_POST['home_cfg_id']));
|
||||
foreach($mod_qry as $array_mods)
|
||||
{
|
||||
if($array_mods['mod_name'] == "none")$array_mods['mod_name']=$array_mods['game_name'];
|
||||
|
|
@ -128,7 +128,7 @@ function exec_gsp_module()
|
|||
</tr>
|
||||
<tr>
|
||||
<?php
|
||||
$result3 = $db->resultQuery("SELECT DISTINCT remote_server_id, remote_server_name, agent_ip, gsp_user FROM GSP_DB_PREFIXremote_servers");
|
||||
$result3 = $db->resultQuery("SELECT DISTINCT remote_server_id, remote_server_name, agent_ip, ogp_user FROM OGP_DB_PREFIXremote_servers");
|
||||
?>
|
||||
<td><?php print_lang('remote_server');?></td>
|
||||
<td>
|
||||
|
|
@ -146,7 +146,7 @@ function exec_gsp_module()
|
|||
</tr>
|
||||
<tr>
|
||||
<?php
|
||||
$mods = $db->resultQuery("SELECT DISTINCT mod_cfg_id, mod_name, game_name FROM GSP_DB_PREFIXconfig_mods NATURAL JOIN GSP_DB_PREFIXconfig_homes WHERE mod_cfg_id=" . $db->realEscapeSingle($_POST['modcfgid']));
|
||||
$mods = $db->resultQuery("SELECT DISTINCT mod_cfg_id, mod_name, game_name FROM OGP_DB_PREFIXconfig_mods NATURAL JOIN OGP_DB_PREFIXconfig_homes WHERE mod_cfg_id=" . $db->realEscapeSingle($_POST['modcfgid']));
|
||||
foreach($mods as $mod)
|
||||
{
|
||||
?>
|
||||
|
|
@ -257,7 +257,7 @@ function exec_gsp_module()
|
|||
<h2>Enable/Disable Server Locations</h2>
|
||||
<?php
|
||||
//ENABLE OR DISABLE REMOTE SERVERS FOR GAMES
|
||||
$result = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXremote_servers");
|
||||
$result = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXremote_servers");
|
||||
echo "<form method='post' action=''>";
|
||||
echo "<input type='hidden' name='update_remote_servers' value='update' />";
|
||||
foreach($result as $rs)
|
||||
|
|
@ -278,7 +278,7 @@ function exec_gsp_module()
|
|||
<br><br>";
|
||||
//end ENABLE REMOTE SERVERS
|
||||
|
||||
$services = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_services ORDER BY service_name");
|
||||
$services = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_services ORDER BY service_name");
|
||||
if ($services > 0)
|
||||
{
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ function curPageName()
|
|||
return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
|
||||
}
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
require('includes/config.inc.php');
|
||||
require_once('modules/settings/functions.php');
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
*
|
||||
* http://www.gameserver-panel.org/
|
||||
* http://www.opengamepanel.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db, $view;
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ function exec_gsp_module()
|
|||
$new_description = str_replace("\\r\\n", "<br>", $_POST['description']);
|
||||
$service = $_POST['service_id'];
|
||||
|
||||
$change_description = "UPDATE GSP_DB_PREFIXbilling_services
|
||||
$change_description = "UPDATE OGP_DB_PREFIXbilling_services
|
||||
SET description ='".$db->realEscapeSingle($new_description)."'
|
||||
WHERE service_id=".$db->realEscapeSingle($service);
|
||||
$save = $db->query($change_description);
|
||||
|
|
@ -63,7 +63,7 @@ THIS IS WHAT WE DISPLAY ON THE SHOP PAGE AT THE TOP
|
|||
|
||||
// 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 GSP_DB_PREFIXbilling_services".$where_service_id;
|
||||
$qry_services = "SELECT * FROM OGP_DB_PREFIXbilling_services".$where_service_id;
|
||||
$services = $db->resultQuery($qry_services);
|
||||
|
||||
if (isset($_REQUEST['service_id']) && $services === false) {
|
||||
|
|
@ -208,7 +208,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 GSP_DB_PREFIXremote_servers WHERE remote_server_id = ".$rsi;
|
||||
$query = "SELECT * FROM OGP_DB_PREFIXremote_servers WHERE remote_server_id = ".$rsi;
|
||||
$result = $db->resultQuery($query);
|
||||
foreach($result as $rs)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
*
|
||||
* http://www.gameserver-panel.org/
|
||||
* http://www.opengamepanel.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
chdir(realpath(dirname(__FILE__))); /* Change to the current file path */
|
||||
chdir("../.."); /* Base path to gsp web files */
|
||||
chdir("../.."); /* Base path to ogp web files */
|
||||
// Report all PHP errors
|
||||
error_reporting(E_ALL);
|
||||
// Path definitions
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
//Include database connection details
|
||||
require('includes/config.inc.php');
|
||||
|
|
@ -16,11 +16,11 @@ function exec_gsp_module()
|
|||
$cart_id = $db->realEscapeSingle($cart_id);
|
||||
$isAdmin = $db->isAdmin( $_SESSION['user_id'] );
|
||||
if ( $isAdmin )
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
else
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id)." AND user_id=".$db->realEscapeSingle($user_id) );
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id)." AND user_id=".$db->realEscapeSingle($user_id) );
|
||||
|
||||
$cart = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$cart = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$tempdate = date_create( $cart[0]['date']);
|
||||
$paid_date = date_format($tempdate,"d M Y H:m");
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ function exec_gsp_module()
|
|||
|
||||
$coupon_savings = 0;
|
||||
if($cart[0]['coupon_id']>0) {
|
||||
$result = $db->resultquery("SELECT discount from GSP_DB_PREFIXbilling_coupons WHERE id = '". $cart[0]['coupon_id'] . "'");
|
||||
$result = $db->resultquery("SELECT discount from OGP_DB_PREFIXbilling_coupons WHERE id = '". $cart[0]['coupon_id'] . "'");
|
||||
foreach($result as $coupon){
|
||||
$coupon_savings = $subtotal2 * ($coupon['discount'] / 100);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,12 +36,12 @@ function assignOrdersToCart($user_id,$tax_amount,$currency,$coupon_id){
|
|||
//discount coupon
|
||||
if (!isset($coupon_id)) $coupon_id = "0";
|
||||
$fields['coupon_id'] = $coupon_id;
|
||||
$check_expired = $db->resultquery("SELECT id from GSP_DB_PREFIXbilling_coupons WHERE id = $fields[coupon_id] AND count > 0 AND expires >= NOW()");
|
||||
$check_expired = $db->resultquery("SELECT id from OGP_DB_PREFIXbilling_coupons WHERE id = $fields[coupon_id] AND count > 0 AND expires >= NOW()");
|
||||
if ($check_expired <= 0) $fields['coupon_id'] = 0;
|
||||
return $db->resultInsertId( 'billing_carts', $fields );
|
||||
}
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
error_reporting(E_ALL);
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ function exec_gsp_module()
|
|||
$carts[0] = $_SESSION['CART'];
|
||||
}
|
||||
|
||||
$user_carts = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_carts WHERE user_id=".$db->realEscapeSingle($user_id) ." order by cart_id desc" );
|
||||
$user_carts = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE user_id=".$db->realEscapeSingle($user_id) ." order by cart_id desc" );
|
||||
|
||||
|
||||
if( $user_carts >=1 )
|
||||
|
|
@ -112,8 +112,8 @@ function exec_gsp_module()
|
|||
{
|
||||
$cart_id = $user_cart['cart_id'];
|
||||
|
||||
$carts[$cart_id] = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_carts AS cart JOIN
|
||||
GSP_DB_PREFIXbilling_orders AS orders
|
||||
$carts[$cart_id] = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_carts AS cart JOIN
|
||||
OGP_DB_PREFIXbilling_orders AS orders
|
||||
ON orders.cart_id=cart.cart_id
|
||||
WHERE orders.status IN (0, -1 , -2) AND (cart.cart_id=".$db->realEscapeSingle($cart_id). ") order by order_id asc");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ function exec_gsp_module()
|
|||
$id = $db->realEscapeSingle($_POST['id']);
|
||||
|
||||
//Create INSERT query
|
||||
$qry_change_url = "UPDATE GSP_DB_PREFIXbilling_coupons
|
||||
$qry_change_url = "UPDATE OGP_DB_PREFIXbilling_coupons
|
||||
SET code ='".$new_code."',
|
||||
name = '".$new_name."',
|
||||
discount ='".$new_discount."',
|
||||
|
|
@ -35,14 +35,14 @@ function exec_gsp_module()
|
|||
$expires = $_POST['expires'];
|
||||
|
||||
|
||||
$query = "INSERT INTO GSP_DB_PREFIXbilling_coupons(code, name, discount, count, expires) VALUES('".$code."', '".$name."', '".$discount."', '".$count."', '".$expires."')";
|
||||
$query = "INSERT INTO OGP_DB_PREFIXbilling_coupons(code, name, discount, count, expires) VALUES('".$code."', '".$name."', '".$discount."', '".$count."', '".$expires."')";
|
||||
$db->query($query);
|
||||
}
|
||||
|
||||
//Querying REMOVE coupon FROM DB
|
||||
if (isset($_POST['del_coupon']))
|
||||
{
|
||||
$db->query( "DELETE FROM GSP_DB_PREFIXbilling_coupons WHERE id=" . $db->realEscapeSingle($_POST['id']) );
|
||||
$db->query( "DELETE FROM OGP_DB_PREFIXbilling_coupons WHERE id=" . $db->realEscapeSingle($_POST['id']) );
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ function exec_gsp_module()
|
|||
</table>
|
||||
<br>
|
||||
<?php
|
||||
$result = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_coupons");
|
||||
$result = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_coupons");
|
||||
if ($result > 0)
|
||||
{
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ function exec_gsp_module()
|
|||
$id = $db->realEscapeSingle($_POST['id']);
|
||||
|
||||
//Create INSERT query
|
||||
$qry_change_url = "UPDATE GSP_DB_PREFIXbilling_coupons
|
||||
$qry_change_url = "UPDATE OGP_DB_PREFIXbilling_coupons
|
||||
SET code ='".$new_code."',
|
||||
name = '".$new_name."',
|
||||
discount ='".$new_discount."',
|
||||
|
|
@ -35,14 +35,14 @@ function exec_gsp_module()
|
|||
$expires = $_POST['expires'];
|
||||
|
||||
|
||||
$query = "INSERT INTO GSP_DB_PREFIXbilling_coupons(code, name, discount, count, expires) VALUES('".$code."', '".$name."', '".$discount."', '".$count."', '".$expires."')";
|
||||
$query = "INSERT INTO OGP_DB_PREFIXbilling_coupons(code, name, discount, count, expires) VALUES('".$code."', '".$name."', '".$discount."', '".$count."', '".$expires."')";
|
||||
$db->query($query);
|
||||
}
|
||||
|
||||
//Querying REMOVE coupon FROM DB
|
||||
if (isset($_POST['del_coupon']))
|
||||
{
|
||||
$db->query( "DELETE FROM GSP_DB_PREFIXbilling_coupons WHERE id=" . $db->realEscapeSingle($_POST['id']) );
|
||||
$db->query( "DELETE FROM OGP_DB_PREFIXbilling_coupons WHERE id=" . $db->realEscapeSingle($_POST['id']) );
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ function exec_gsp_module()
|
|||
</table>
|
||||
<br>
|
||||
<?php
|
||||
$result = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_coupons");
|
||||
$result = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_coupons");
|
||||
if ($result > 0)
|
||||
{
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
require_once("includes/lib_remote.php");
|
||||
require_once("modules/config_games/server_config_parser.php");
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db,$view,$settings;
|
||||
$user_id = $_SESSION['user_id'];
|
||||
|
|
@ -12,12 +12,12 @@ function exec_gsp_module()
|
|||
if(isset($_GET['cart_id'])){
|
||||
$cart_id = $_GET['cart_id'];
|
||||
}
|
||||
$cart_paid = $db->resultQuery( "SELECT paid FROM GSP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$cart_paid = $db->resultQuery( "SELECT paid FROM OGP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$isAdmin = $db->isAdmin( $_SESSION['user_id'] );
|
||||
if ( $isAdmin ){
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
} else {
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id)." AND user_id=".$db->realEscapeSingle($user_id) );
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id)." AND user_id=".$db->realEscapeSingle($user_id) );
|
||||
}
|
||||
if( !empty($orders) and !empty($cart_paid) )
|
||||
{
|
||||
|
|
@ -35,7 +35,7 @@ function exec_gsp_module()
|
|||
$extended = $order['extended'] == "1" ? TRUE : FALSE;
|
||||
//Query service info
|
||||
$service = $db->resultQuery( "SELECT *
|
||||
FROM GSP_DB_PREFIXbilling_services
|
||||
FROM OGP_DB_PREFIXbilling_services
|
||||
WHERE service_id=".$db->realEscapeSingle($service_id) );
|
||||
|
||||
if( !empty( $service[0] ) )
|
||||
|
|
@ -62,7 +62,7 @@ function exec_gsp_module()
|
|||
$home_info = $db->getGameHomeWithoutMods($home_id);
|
||||
|
||||
//Create the remote connection
|
||||
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
|
||||
//Reassign the server
|
||||
$db->assignHomeTo( "user", $user_id, $home_id, $access_rights );
|
||||
|
|
@ -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 gsp_users, gsp_billing_orders
|
||||
WHERE gsp_users.user_id = $user_id")[0]["users_email"];
|
||||
FROM ogp_users, ogp_billing_orders
|
||||
WHERE ogp_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>
|
||||
|
|
@ -131,7 +131,7 @@ function exec_gsp_module()
|
|||
|
||||
//Add IP:Port Pair to the Game Home
|
||||
//need to get the IP_ID for this remote server.
|
||||
$result = $db->resultQuery("SELECT ip_id FROM GSP_DB_PREFIXremote_server_ips WHERE remote_server_id=".$ip);
|
||||
$result = $db->resultQuery("SELECT ip_id FROM OGP_DB_PREFIXremote_server_ips WHERE remote_server_id=".$ip);
|
||||
foreach ($result as $rs)
|
||||
{
|
||||
$ip_id = $rs['ip_id'];
|
||||
|
|
@ -147,7 +147,7 @@ function exec_gsp_module()
|
|||
$home_info = $db->getGameHomeWithoutMods($home_id);
|
||||
|
||||
//Create the remote connection
|
||||
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
|
||||
//Get Full home info in 1 array
|
||||
$home_info = $db->getGameHome($home_id);
|
||||
|
|
@ -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 gsp_users, gsp_billing_orders
|
||||
WHERE gsp_users.user_id = $user_id")[0]["users_email"];
|
||||
FROM ogp_users, ogp_billing_orders
|
||||
WHERE ogp_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 gsp database
|
||||
// Set expiration date in ogp database
|
||||
//status is -3 -2 -1 0 and 1
|
||||
// deleted, suspended, invoiced, inactive, active
|
||||
//finish_date the server will be suspended
|
||||
|
|
@ -336,33 +336,33 @@ function exec_gsp_module()
|
|||
|
||||
}
|
||||
// set order status
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_orders
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_orders
|
||||
SET status='" . $db->realEscapeSingle($status) . "'
|
||||
WHERE order_id=".$db->realEscapeSingle($order_id));
|
||||
|
||||
// set the order expiration
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_orders
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_orders
|
||||
SET finish_date='" . $db->realEscapeSingle($finish_date) . "'
|
||||
WHERE order_id=".$db->realEscapeSingle($order_id));
|
||||
|
||||
// Save home id created by this order
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_orders
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_orders
|
||||
SET home_id='" . $db->realEscapeSingle($home_id) . "' WHERE order_id=".$db->realEscapeSingle($order_id));
|
||||
|
||||
}
|
||||
|
||||
//Update Cart Payment Status as 3(paid and installed)
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_carts
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_carts
|
||||
SET paid=3
|
||||
WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
|
||||
// Set payment/creation date
|
||||
$date = date('d M Y');
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_carts
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_carts
|
||||
SET date='" . $db->realEscapeSingle($date) . "'
|
||||
WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
|
||||
$db->query( "UPDATE GSP_DB_PREFIXgame_mods SET max_players= ".$order['max_players']." WHERE home_id=".$db->realEscapeSingle($home_id));
|
||||
$db->query( "UPDATE OGP_DB_PREFIXgame_mods SET max_players= ".$order['max_players']." WHERE home_id=".$db->realEscapeSingle($home_id));
|
||||
|
||||
|
||||
//Refresh to Game Monitor.
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
*
|
||||
* http://www.gameserver-panel.org/
|
||||
* http://www.opengamepanel.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
chdir(realpath(dirname(__FILE__))); /* Change to the current file path */
|
||||
chdir("../.."); /* Base path to gsp web files */
|
||||
chdir("../.."); /* Base path to ogp web files */
|
||||
// Report all PHP errors
|
||||
error_reporting(E_ALL);
|
||||
// Path definitions
|
||||
|
|
@ -115,7 +115,7 @@ else
|
|||
$home_id = $user_home['home_id'];
|
||||
$home_info = $db->getGameHomeWithoutMods($home_id);
|
||||
$server_info = $db->getRemoteServerById($home_info['remote_server_id']);
|
||||
$remote = new GSPRemoteLibrary($server_info['agent_ip'], $server_info['agent_port'], $server_info['encryption_key'],$server_info['timeout']);
|
||||
$remote = new OGPRemoteLibrary($server_info['agent_ip'], $server_info['agent_port'], $server_info['encryption_key'],$server_info['timeout']);
|
||||
$ftp_login = isset($home_info['ftp_login']) ? $home_info['ftp_login'] : $home_id;
|
||||
$remote->ftp_mgr("userdel", $ftp_login);
|
||||
$db->changeFtpStatus('disabled',$home_id);
|
||||
|
|
@ -169,7 +169,7 @@ else
|
|||
$home_id = $user_home['home_id'];
|
||||
$home_info = $db->getGameHomeWithoutMods($home_id);
|
||||
$server_info = $db->getRemoteServerById($home_info['remote_server_id']);
|
||||
$remote = new GSPRemoteLibrary($server_info['agent_ip'], $server_info['agent_port'], $server_info['encryption_key'],$server_info['timeout']);
|
||||
$remote = new OGPRemoteLibrary($server_info['agent_ip'], $server_info['agent_port'], $server_info['encryption_key'],$server_info['timeout']);
|
||||
|
||||
// Remove the game home from db
|
||||
$db->deleteGameHome($home_id);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ if (strcmp ($res, "VERIFIED") == 0) {
|
|||
$receiver_email = $_POST['receiver_email'];
|
||||
$payer_email = $_POST['payer_email'];
|
||||
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_carts
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_carts
|
||||
SET paid=1
|
||||
WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
fwrite($fpx, "IPN Processed\n");
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
*
|
||||
* http://www.gameserver-panel.org/
|
||||
* http://www.opengamepanel.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
@ -36,8 +36,8 @@ $module_menus = array(
|
|||
|
||||
$install_queries = array();
|
||||
$install_queries[0] = array(
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."billing_services`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."billing_services` (
|
||||
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."billing_services`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."billing_services` (
|
||||
`service_id` int(11) NOT NULL auto_increment,
|
||||
`home_cfg_id` int(11) NOT NULL,
|
||||
`mod_cfg_id` int(11) NOT NULL,
|
||||
|
|
@ -57,8 +57,8 @@ $install_queries[0] = array(
|
|||
PRIMARY KEY (`service_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=UTF8;",
|
||||
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."billing_orders`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."billing_orders` (
|
||||
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."billing_orders`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."billing_orders` (
|
||||
`order_id` int(11) NOT NULL auto_increment,
|
||||
`user_id` int(11) NOT NULL,
|
||||
`service_id` int(11) NOT NULL,
|
||||
|
|
@ -80,16 +80,16 @@ $install_queries[0] = array(
|
|||
);
|
||||
|
||||
$install_queries[1] = array(
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."billing_carts`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."billing_carts` (
|
||||
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."billing_carts`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."billing_carts` (
|
||||
`cart_id` int(11) NOT NULL auto_increment,
|
||||
`user_id` int(11) NOT NULL,
|
||||
`paid` int(11) NULL,
|
||||
PRIMARY KEY (`cart_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=UTF8;",
|
||||
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."billing_orders`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."billing_orders` (
|
||||
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."billing_orders`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."billing_orders` (
|
||||
`order_id` int(11) NOT NULL auto_increment,
|
||||
`user_id` int(11) NOT NULL,
|
||||
`service_id` int(11) NOT NULL,
|
||||
|
|
@ -110,25 +110,25 @@ $install_queries[1] = array(
|
|||
);
|
||||
|
||||
$install_queries[2] = array(
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` DROP `date`;",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` DROP `home_path`;",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` DROP `paid`;",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` ADD `home_id` varchar(255) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` ADD `status` varchar(16) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_carts` ADD `date` varchar(16) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_carts` ADD `tax_amount` varchar(16) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_carts` ADD `currency` varchar(3) NOT NULL DEFAULT '0';"
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` DROP `date`;",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` DROP `home_path`;",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` DROP `paid`;",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` ADD `home_id` varchar(255) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` ADD `status` varchar(16) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_carts` ADD `date` varchar(16) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_carts` ADD `tax_amount` varchar(16) NOT NULL DEFAULT '0';",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_carts` ADD `currency` varchar(3) NOT NULL DEFAULT '0';"
|
||||
);
|
||||
|
||||
$install_queries[3] = array(
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` ADD `finish_date` varchar(16) NOT NULL DEFAULT '0';"
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` ADD `finish_date` varchar(16) NOT NULL DEFAULT '0';"
|
||||
);
|
||||
|
||||
$install_queries[4] = array(
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` ADD `extended` tinyint(1) NOT NULL;",
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_services` ADD `enabled` int(11) NOT NULL;"
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_carts` ADD `coupon_id` varchar(3) NOT NULL DEFAULT '0';"
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` ADD `coupon_id` varchar(3) NOT NULL DEFAULT '0';"
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` ADD `extended` tinyint(1) NOT NULL;",
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_services` ADD `enabled` int(11) NOT NULL;"
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_carts` ADD `coupon_id` varchar(3) NOT NULL DEFAULT '0';"
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` ADD `coupon_id` varchar(3) NOT NULL DEFAULT '0';"
|
||||
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
error_reporting(E_ALL);
|
||||
|
||||
|
|
@ -7,12 +7,12 @@ function exec_gsp_module()
|
|||
|
||||
if(isset($_POST['remove']))
|
||||
{
|
||||
$query_delete_order = $db->query("DELETE FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($_POST['cart_id']));
|
||||
$query_delete_order = $db->query("DELETE FROM GSP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($_POST['cart_id']));
|
||||
$query_delete_order = $db->query("DELETE FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($_POST['cart_id']));
|
||||
$query_delete_order = $db->query("DELETE FROM OGP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($_POST['cart_id']));
|
||||
}
|
||||
if(isset($_POST['paid']))
|
||||
{
|
||||
$query_set_as_paid = $db->query("UPDATE GSP_DB_PREFIXbilling_carts
|
||||
$query_set_as_paid = $db->query("UPDATE OGP_DB_PREFIXbilling_carts
|
||||
SET paid=1
|
||||
WHERE cart_id=".$db->realEscapeSingle($_POST['cart_id']));
|
||||
}
|
||||
|
|
@ -49,7 +49,7 @@ function exec_gsp_module()
|
|||
echo "<h1>Accounting</h1>";
|
||||
$servercount = 0;
|
||||
$income = 0;
|
||||
$paidOrders = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE status > 0");
|
||||
$paidOrders = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE status > 0");
|
||||
foreach($paidOrders as $inc)
|
||||
{
|
||||
$servercount = $servercount +1;
|
||||
|
|
@ -65,9 +65,9 @@ function exec_gsp_module()
|
|||
if($isAdmin or $status > "not_paid")
|
||||
{
|
||||
if ($isAdmin){
|
||||
$carts = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_carts WHERE paid =" . $db->realEscapeSingle($paid_value) ." order by cart_id DESC");
|
||||
$carts = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE paid =" . $db->realEscapeSingle($paid_value) ." order by cart_id DESC");
|
||||
}else{
|
||||
$carts = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_carts WHERE paid =" . $db->realEscapeSingle($paid_value) ." AND user_id = " . $user_id ." order by cart_id DESC");
|
||||
$carts = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE paid =" . $db->realEscapeSingle($paid_value) ." AND user_id = " . $user_id ." order by cart_id DESC");
|
||||
}
|
||||
if( $carts > 0 )
|
||||
{
|
||||
|
|
@ -103,7 +103,7 @@ function exec_gsp_module()
|
|||
}?>
|
||||
</tr>
|
||||
<?php
|
||||
$orders = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart['cart_id'])." order by order_id DESC" );
|
||||
$orders = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart['cart_id'])." order by order_id DESC" );
|
||||
$subtotal = 0;
|
||||
foreach($orders as $order)
|
||||
{
|
||||
|
|
@ -221,7 +221,7 @@ function exec_gsp_module()
|
|||
//obter as informações de cupom usadas neste pedido
|
||||
$coupon_savings = 0;
|
||||
if($cart['coupon_id']>0) {
|
||||
$result = $db->resultquery("SELECT * from GSP_DB_PREFIXbilling_coupons WHERE id = '". $cart['coupon_id'] . "'");
|
||||
$result = $db->resultquery("SELECT * from OGP_DB_PREFIXbilling_coupons WHERE id = '". $cart['coupon_id'] . "'");
|
||||
foreach($result as $coupon){
|
||||
$coupon_savings = $subtotal * ($coupon['discount']/ 100);
|
||||
echo "Sub-total c/discount <b>$" .number_format( ($subtotal - $coupon_savings) , 2 ).$cart['currency']."</b></br><td>";
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db,$view,$settings;
|
||||
$loadpage = "?m=billing&p=paid";
|
||||
$count = $_POST['count'] + 1;
|
||||
|
||||
$result = $db->resultquery("SELECT * from GSP_DB_PREFIXbilling_carts WHERE cart_id= '". $_POST['cart_id'] . "'");
|
||||
$result = $db->resultquery("SELECT * from OGP_DB_PREFIXbilling_carts WHERE cart_id= '". $_POST['cart_id'] . "'");
|
||||
foreach($result as $cartID){
|
||||
$paid = $cartID['paid'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db,$view;
|
||||
$settings = $db->getSettings();
|
||||
|
|
@ -28,15 +28,15 @@ $debug = $settings['debug'];
|
|||
|
||||
if(!empty($cart_id))
|
||||
{
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
//get couponID then discount for this cart
|
||||
$result= $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
$result= $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
foreach ($result as $cartDB){
|
||||
$coupon_id = $cartDB['id'];
|
||||
}
|
||||
|
||||
$coupon_discount = 0;
|
||||
$result = $db->resultQuery( "SELECT discount FROM gsp_billing_coupons WHERE id=".$db->realEscapeSingle($cartDB['coupon_id']));
|
||||
$result = $db->resultQuery( "SELECT discount FROM ogp_billing_coupons WHERE id=".$db->realEscapeSingle($cartDB['coupon_id']));
|
||||
foreach ($result as $couponDB){
|
||||
$coupon_discount=$couponDB['discount'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ function exec_gsp_module()
|
|||
$service = $db->realEscapeSingle($_POST['service']);
|
||||
|
||||
//Create UPDATE query
|
||||
$qry_change_url = "UPDATE GSP_DB_PREFIXbilling_services
|
||||
$qry_change_url = "UPDATE OGP_DB_PREFIXbilling_services
|
||||
SET remote_server_id = '".$new_remote_server_id."',
|
||||
price_monthly ='".$new_price_monthly."',
|
||||
remote_server_id = '".$new_remote_server_id."',
|
||||
|
|
@ -28,7 +28,7 @@ function exec_gsp_module()
|
|||
//Querying UPDATE enabled/disabled remote servers DB
|
||||
if (isset($_POST['update_remote_servers']))
|
||||
{
|
||||
$result = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXremote_servers");
|
||||
$result = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXremote_servers");
|
||||
foreach($result as $rs)
|
||||
{
|
||||
$server_enabled = 0;
|
||||
|
|
@ -40,7 +40,7 @@ function exec_gsp_module()
|
|||
}
|
||||
|
||||
//update the table with current value
|
||||
$query = "UPDATE GSP_DB_PREFIXremote_servers SET enabled = '".$server_enabled."' WHERE remote_server_id=".$rs['remote_server_id'];
|
||||
$query = "UPDATE OGP_DB_PREFIXremote_servers SET enabled = '".$server_enabled."' WHERE remote_server_id=".$rs['remote_server_id'];
|
||||
$db->query($query);
|
||||
|
||||
}
|
||||
|
|
@ -83,14 +83,14 @@ function exec_gsp_module()
|
|||
if(isset($_POST['allow_ftp_usage']))$access_rights .= $db->realEscapeSingle($_POST['allow_ftp_usage']);
|
||||
if(isset($_POST['allow_custom_fields']))$access_rights .= $db->realEscapeSingle($_POST['allow_custom_fields']);
|
||||
|
||||
$qry_add_service = "INSERT INTO GSP_DB_PREFIXbilling_services(service_id, home_cfg_id, mod_cfg_id, service_name, remote_server_id, out_of_stock, slot_max_qty , slot_min_qty, price_daily, price_monthly, price_year, description, img_url, ftp, install_method, manual_url, access_rights,enabled) VALUES(NULL, '".$home_cfg_id."', '".$mod_cfg_id."', '".$service_name."', '".$remote_server_id."', 0,'".$slot_max_qty."', '".$slot_min_qty."', '".$price_daily."', '".$price_monthly."', '".$price_year."', '".$description."', '".$img_url."', '".$ftp."', '".$install_method."', '".$manual_url."', '".$access_rights."', '" . $enabled . "')";
|
||||
$qry_add_service = "INSERT INTO OGP_DB_PREFIXbilling_services(service_id, home_cfg_id, mod_cfg_id, service_name, remote_server_id, out_of_stock, slot_max_qty , slot_min_qty, price_daily, price_monthly, price_year, description, img_url, ftp, install_method, manual_url, access_rights,enabled) VALUES(NULL, '".$home_cfg_id."', '".$mod_cfg_id."', '".$service_name."', '".$remote_server_id."', 0,'".$slot_max_qty."', '".$slot_min_qty."', '".$price_daily."', '".$price_monthly."', '".$price_year."', '".$description."', '".$img_url."', '".$ftp."', '".$install_method."', '".$manual_url."', '".$access_rights."', '" . $enabled . "')";
|
||||
$db->query($qry_add_service);
|
||||
}
|
||||
|
||||
//Querying REMOVE service FROM DB
|
||||
if (isset($_POST['service_id']))
|
||||
{
|
||||
$db->query( "DELETE FROM GSP_DB_PREFIXbilling_services WHERE service_id=" . $db->realEscapeSingle($_POST['service_id']) );
|
||||
$db->query( "DELETE FROM OGP_DB_PREFIXbilling_services WHERE service_id=" . $db->realEscapeSingle($_POST['service_id']) );
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -106,7 +106,7 @@ function exec_gsp_module()
|
|||
<td>
|
||||
<select name="modcfgid">
|
||||
<?php
|
||||
$mod_qry = $db->resultQuery("SELECT DISTINCT mod_cfg_id, mod_name, game_name FROM GSP_DB_PREFIXconfig_mods NATURAL JOIN GSP_DB_PREFIXconfig_homes WHERE home_cfg_id=" . $db->realEscapeSingle($_POST['home_cfg_id']));
|
||||
$mod_qry = $db->resultQuery("SELECT DISTINCT mod_cfg_id, mod_name, game_name FROM OGP_DB_PREFIXconfig_mods NATURAL JOIN OGP_DB_PREFIXconfig_homes WHERE home_cfg_id=" . $db->realEscapeSingle($_POST['home_cfg_id']));
|
||||
foreach($mod_qry as $array_mods)
|
||||
{
|
||||
if($array_mods['mod_name'] == "none")$array_mods['mod_name']=$array_mods['game_name'];
|
||||
|
|
@ -128,7 +128,7 @@ function exec_gsp_module()
|
|||
</tr>
|
||||
<tr>
|
||||
<?php
|
||||
$result3 = $db->resultQuery("SELECT DISTINCT remote_server_id, remote_server_name, agent_ip, gsp_user FROM GSP_DB_PREFIXremote_servers");
|
||||
$result3 = $db->resultQuery("SELECT DISTINCT remote_server_id, remote_server_name, agent_ip, ogp_user FROM OGP_DB_PREFIXremote_servers");
|
||||
?>
|
||||
<td><?php print_lang('remote_server');?></td>
|
||||
<td>
|
||||
|
|
@ -146,7 +146,7 @@ function exec_gsp_module()
|
|||
</tr>
|
||||
<tr>
|
||||
<?php
|
||||
$mods = $db->resultQuery("SELECT DISTINCT mod_cfg_id, mod_name, game_name FROM GSP_DB_PREFIXconfig_mods NATURAL JOIN GSP_DB_PREFIXconfig_homes WHERE mod_cfg_id=" . $db->realEscapeSingle($_POST['modcfgid']));
|
||||
$mods = $db->resultQuery("SELECT DISTINCT mod_cfg_id, mod_name, game_name FROM OGP_DB_PREFIXconfig_mods NATURAL JOIN OGP_DB_PREFIXconfig_homes WHERE mod_cfg_id=" . $db->realEscapeSingle($_POST['modcfgid']));
|
||||
foreach($mods as $mod)
|
||||
{
|
||||
?>
|
||||
|
|
@ -257,7 +257,7 @@ function exec_gsp_module()
|
|||
<h2>Enable/Disable Server Locations</h2>
|
||||
<?php
|
||||
//ENABLE OR DISABLE REMOTE SERVERS FOR GAMES
|
||||
$result = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXremote_servers");
|
||||
$result = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXremote_servers");
|
||||
echo "<form method='post' action=''>";
|
||||
echo "<input type='hidden' name='update_remote_servers' value='update' />";
|
||||
foreach($result as $rs)
|
||||
|
|
@ -278,7 +278,7 @@ function exec_gsp_module()
|
|||
<br><br>";
|
||||
//end ENABLE REMOTE SERVERS
|
||||
|
||||
$services = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_services ORDER BY service_name");
|
||||
$services = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_services ORDER BY service_name");
|
||||
if ($services > 0)
|
||||
{
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ function curPageName()
|
|||
return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
|
||||
}
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
require('includes/config.inc.php');
|
||||
require_once('modules/settings/functions.php');
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
*
|
||||
* http://www.gameserver-panel.org/
|
||||
* http://www.opengamepanel.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
function exec_gsp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db, $view;
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ function exec_gsp_module()
|
|||
$new_description = str_replace("\\r\\n", "<br>", $_POST['description']);
|
||||
$service = $_POST['service_id'];
|
||||
|
||||
$change_description = "UPDATE GSP_DB_PREFIXbilling_services
|
||||
$change_description = "UPDATE OGP_DB_PREFIXbilling_services
|
||||
SET description ='".$db->realEscapeSingle($new_description)."'
|
||||
WHERE service_id=".$db->realEscapeSingle($service);
|
||||
$save = $db->query($change_description);
|
||||
|
|
@ -63,7 +63,7 @@ THIS IS WHAT WE DISPLAY ON THE SHOP PAGE AT THE TOP
|
|||
|
||||
// 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 GSP_DB_PREFIXbilling_services".$where_service_id;
|
||||
$qry_services = "SELECT * FROM OGP_DB_PREFIXbilling_services".$where_service_id;
|
||||
$services = $db->resultQuery($qry_services);
|
||||
|
||||
if (isset($_REQUEST['service_id']) && $services === false) {
|
||||
|
|
@ -208,7 +208,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 GSP_DB_PREFIXremote_servers WHERE remote_server_id = ".$rsi;
|
||||
$query = "SELECT * FROM OGP_DB_PREFIXremote_servers WHERE remote_server_id = ".$rsi;
|
||||
$result = $db->resultQuery($query);
|
||||
foreach($result as $rs)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
*
|
||||
* http://www.gameserver-panel.org/
|
||||
* http://www.opengamepanel.org/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
chdir(realpath(dirname(__FILE__))); /* Change to the current file path */
|
||||
chdir("../.."); /* Base path to gsp web files */
|
||||
chdir("../.."); /* Base path to ogp 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, 'gsp_billing_services', 'remote_server_id') ? 'remote_server_id' :
|
||||
(col_exists($db, 'gsp_billing_services', 'remote_server') ? 'remote_server' : 'remote_server_id');
|
||||
$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');
|
||||
|
||||
$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 gsp_remote_servers");
|
||||
$allIds = fetch_all_assoc($db, "SELECT remote_server_id FROM ogp_remote_servers");
|
||||
foreach ($allIds as $row) {
|
||||
$id = (int)$row['remote_server_id'];
|
||||
$e = isset($enabledSet[$id]) ? 1 : 0;
|
||||
$db->query("UPDATE gsp_remote_servers SET enabled={$e} WHERE remote_server_id={$id}");
|
||||
$db->query("UPDATE ogp_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 gsp_billing_services
|
||||
$sql = "UPDATE ogp_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 gsp_billing_services WHERE service_id={$sid}");
|
||||
$db->query("DELETE FROM ogp_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 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");
|
||||
$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");
|
||||
?>
|
||||
|
||||
<?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 gsp_billing_orders WHERE order_id = ? AND user_id = ?");
|
||||
$stmt = $db->prepare("SELECT status FROM ogp_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 gsp_billing_orders SET status = 'expired' WHERE order_id = ? AND user_id = ?");
|
||||
$update = $db->prepare("UPDATE ogp_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 gsp_billing_orders WHERE order_id = ? AND user_id = ?");
|
||||
$delete = $db->prepare("DELETE FROM ogp_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 gsp_billing_orders AS cart
|
||||
$carts = $db->query("SELECT * FROM ogp_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 gsp_users WHERE userID = $userID");
|
||||
$adminField = $db->query("SELECT 'users_role' FROM ogp_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 "gsp_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 "ogp_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 gsp_billing_services ".$where_service_id ." ORDER BY service_name";
|
||||
$qry_services = "SELECT * FROM ogp_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 gsp_remote_servers WHERE remote_server_id = ".$rsi;
|
||||
$query = "SELECT * FROM ogp_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 gsp_billing_services SET description = ? WHERE service_id = ?");
|
||||
$stmt = $db->prepare("UPDATE ogp_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 gsp_billing_services $where_service_id ORDER BY service_name";
|
||||
$qry_services = "SELECT * FROM ogp_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