Revert "Complete rebrand from Open Game Panel (OGP) to GameServer Panel (GSP)"

This commit is contained in:
Frank Harris 2025-09-08 12:42:34 -05:00 committed by GitHub
parent 02c94766c6
commit deee7d6ac5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
308 changed files with 1412 additions and 1412 deletions

View file

@ -3,7 +3,7 @@
* Administrative interface for the ts3admin module
*/
function exec_gsp_module()
function exec_ogp_module()
{
$templates_folder = 'modules/TS3Admin/templates_c';
if( is_writable( $templates_folder ) )
@ -50,11 +50,11 @@ function exec_gsp_module()
$_SESSION['rserver_id'] = $_GET['rserver_id'];
if( $isAdmin )
{
$TS3_list = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXts3_homes WHERE rserver_id='".$_SESSION['rserver_id']."'");
$TS3_list = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXts3_homes WHERE rserver_id='".$_SESSION['rserver_id']."'");
}
else
{
$sql = "SELECT * FROM GSP_DB_PREFIXts3_homes WHERE";
$sql = "SELECT * FROM OGP_DB_PREFIXts3_homes WHERE";
if(!$isAdmin){
$sql .= " user_id='".$_SESSION['user_id']."' AND";
}

View file

@ -11,8 +11,8 @@ $module_required = TRUE;
$module_menus = array( array( 'subpage' => '', 'name'=>'ts3admin', 'group'=>'user' ) );
$install_queries = array();
$install_queries[0] = array(
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."ts3_homes`;",
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."ts3_homes`
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."ts3_homes`;",
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."ts3_homes`
(`ts3_id` int(50) NOT NULL auto_increment,
`rserver_id` int(50) NOT NULL,
`ip` varchar(20) NOT NULL,
@ -22,9 +22,9 @@ $install_queries[0] = array(
PRIMARY KEY (`ts3_id`),
UNIQUE KEY user_id (user_id,vserver_id)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
$install_queries[1] = array(
"ALTER TABLE `".GSP_DB_PREFIX."ts3_homes` DROP INDEX `user_id` ,
"ALTER TABLE `".OGP_DB_PREFIX."ts3_homes` DROP INDEX `user_id` ,
ADD UNIQUE `rserver_id` ( `rserver_id` , `vserver_id` , `user_id` );");
$install_queries[2] = array(
"ALTER TABLE `".GSP_DB_PREFIX."ts3_homes` ADD `port` int(11) DEFAULT '10011'"
"ALTER TABLE `".OGP_DB_PREFIX."ts3_homes` ADD `port` int(11) DEFAULT '10011'"
);
?>

View file

@ -3,25 +3,25 @@
<script src="modules/TS3Admin/webinterface.js" type="text/javascript"></script>
<body onload="onLoad();<?php if ($this->_tpl_vars['liveviewAutoUpdate'] == true): ?>liveViewUpdateInterval = setInterval('serverViewUpdate(false)', 10000);<?php endif; ?>">
<div id="jsMsg" style="display:none;">
<span id="js_error"><?php echo $this->_tpl_vars['lang']['GSP_LANG_js_error']; ?>
<span id="js_error"><?php echo $this->_tpl_vars['lang']['OGP_LANG_js_error']; ?>
</span>
<span id="js_ajax_error"><?php echo $this->_tpl_vars['lang']['GSP_LANG_js_ajax_error']; ?>
<span id="js_ajax_error"><?php echo $this->_tpl_vars['lang']['OGP_LANG_js_ajax_error']; ?>
</span>
<span id="js_confirm_server_stop" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_confirm_server_stop']; ?>
<span id="js_confirm_server_stop" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_confirm_server_stop']; ?>
"></span>
<span id="js_confirm_server_delete" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_confirm_server_delete']; ?>
<span id="js_confirm_server_delete" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_confirm_server_delete']; ?>
"></span>
<span id="js_notice_server_deleted" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_notice_server_deleted']; ?>
<span id="js_notice_server_deleted" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_notice_server_deleted']; ?>
"></span>
<span id="js_prompt_banduration" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_prompt_banduration']; ?>
<span id="js_prompt_banduration" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_prompt_banduration']; ?>
"></span>
<span id="js_prompt_banreason" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_prompt_banreason']; ?>
<span id="js_prompt_banreason" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_prompt_banreason']; ?>
"></span>
<span id="js_prompt_msg_to" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_prompt_msg_to']; ?>
<span id="js_prompt_msg_to" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_prompt_msg_to']; ?>
"></span>
<span id="js_prompt_poke_to" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_prompt_poke_to']; ?>
<span id="js_prompt_poke_to" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_prompt_poke_to']; ?>
"></span>
<span id="js_prompt_new_propvalue" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_prompt_new_propvalue']; ?>
<span id="js_prompt_new_propvalue" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_prompt_new_propvalue']; ?>
"></span>
</div>
<!--[if IE]>

View file

@ -26,7 +26,7 @@ require_once('ts3remote.class.php');
function getAssignedServerUsers()
{
global $db;
$ts3vservers = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXts3_homes
$ts3vservers = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXts3_homes
WHERE vserver_id='".
TS3WEBINTERFACE_VSERVER_ID."' AND rserver_id=".
$_SESSION['rserver_id'] );
@ -637,7 +637,7 @@ class TS3webinterface
$vServerList = $tmp;
}
$getPublicIp = $db->resultQuery("SELECT display_public_ip FROM GSP_DB_PREFIXremote_servers WHERE remote_server_id=".$_SESSION['rserver_id']);
$getPublicIp = $db->resultQuery("SELECT display_public_ip FROM OGP_DB_PREFIXremote_servers WHERE remote_server_id=".$_SESSION['rserver_id']);
$display_ip = checkDisplayPublicIP($getPublicIp[0]['display_public_ip'],$this->serverIP);
$this->template->assign('IP', $this->serverIP);
@ -799,7 +799,7 @@ class TS3webinterface
if( isset($_POST['assign_subuser']) and
in_array($_POST['user_id'],$assigned_info['subusers']) )
{
$db->query("INSERT INTO GSP_DB_PREFIXts3_homes
$db->query("INSERT INTO OGP_DB_PREFIXts3_homes
(`rserver_id`, `ip`, `pwd`, `vserver_id`, `user_id`)
VALUES ('".$_SESSION['rserver_id']."', '".
TS3WEBINTERFACE_IP."', '".
@ -814,7 +814,7 @@ class TS3webinterface
in_array($_POST['user_id'],$assigned_info['users_assigned']) and
in_array($_POST['user_id'],$assigned_info['subusers']) )
{
$db->query( "DELETE FROM GSP_DB_PREFIXts3_homes WHERE vserver_id='".
$db->query( "DELETE FROM OGP_DB_PREFIXts3_homes WHERE vserver_id='".
TS3WEBINTERFACE_VSERVER_ID."' AND user_id='".
$_POST['user_id']."' AND rserver_id='".
$_SESSION['rserver_id'].
@ -831,7 +831,7 @@ class TS3webinterface
$this->template->assign('is_parent_user', $is_parent_user);
$this->template->assign('subusers_installed', $subusers_installed);
$getPublicIp = $db->resultQuery("SELECT display_public_ip FROM GSP_DB_PREFIXremote_servers WHERE remote_server_id=".$_SESSION['rserver_id']);
$getPublicIp = $db->resultQuery("SELECT display_public_ip FROM OGP_DB_PREFIXremote_servers WHERE remote_server_id=".$_SESSION['rserver_id']);
$display_ip = checkDisplayPublicIP($getPublicIp[0]['display_public_ip'],$this->serverIP);
$this->template->assign('display_public_ip', $display_ip);

View file

@ -23,7 +23,7 @@ require_once("includes/lib_remote.php");
require_once("modules/config_games/server_config_parser.php");
require_once("protocol/lgsl/lgsl_protocol.php");
function exec_gsp_module() {
function exec_ogp_module() {
global $db,$view;
$home_id = $_REQUEST['home_id'];
@ -66,7 +66,7 @@ function exec_gsp_module() {
{
$addon_id = (int)$_REQUEST['addon_id'];
$addons_rows = $db->resultQuery("SELECT url, path, post_script FROM GSP_DB_PREFIXaddons WHERE addon_id=".$addon_id.$query_groups);
$addons_rows = $db->resultQuery("SELECT url, path, post_script FROM OGP_DB_PREFIXaddons WHERE addon_id=".$addon_id.$query_groups);
if (!$addons_rows) {
print_failure(get_lang('invalid_addon'));
@ -74,7 +74,7 @@ function exec_gsp_module() {
return;
}
$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']);
$addon_info = $addons_rows[0];
$url = $addon_info['url'];
@ -241,7 +241,7 @@ function exec_gsp_module() {
<td align='left'>
<select name="addon_id">
<?php
$addons = $db->resultQuery("SELECT addon_id, name FROM GSP_DB_PREFIXaddons WHERE addon_type='".$addon_type."' AND home_cfg_id=" . $home_cfg_id . $query_groups . " ORDER BY name ASC");
$addons = $db->resultQuery("SELECT addon_id, name FROM OGP_DB_PREFIXaddons WHERE addon_type='".$addon_type."' AND home_cfg_id=" . $home_cfg_id . $query_groups . " ORDER BY name ASC");
foreach($addons as $addon)
{
?>

View file

@ -4,7 +4,7 @@
* Component of the addonsmanager module
*/
function exec_gsp_module() {
function exec_ogp_module() {
global $db;
@ -37,7 +37,7 @@ function exec_gsp_module() {
{
print_success(get_lang_f("addon_has_been_created",$_POST['name']));
if (isset($_POST['addon_id']) && (int)$_POST['addon_id'] > 0 && isset($_POST['edit']))
$db->query("DELETE FROM GSP_DB_PREFIXaddons WHERE addon_id=" . (int)$_POST['addon_id']);
$db->query("DELETE FROM OGP_DB_PREFIXaddons WHERE addon_id=" . (int)$_POST['addon_id']);
}
}
@ -53,7 +53,7 @@ function exec_gsp_module() {
if (isset($_POST['addon_id']) && (int)$_POST['addon_id'] > 0 && isset($_POST['edit']))
{
$addons_rows = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXaddons WHERE addon_id=".(int)$_POST['addon_id']);
$addons_rows = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXaddons WHERE addon_id=".(int)$_POST['addon_id']);
$addon_info = $addons_rows[0];
$name = isset($addon_info['name']) ? $addon_info['name'] : "";
$url = isset($addon_info['url']) ? $addon_info['url'] : "";
@ -291,7 +291,7 @@ function exec_gsp_module() {
<?php
if (isset($_POST['addon_id']) && (int)$_POST['addon_id'] > 0 && isset($_POST['remove']))
{
if (!$db->query("DELETE FROM GSP_DB_PREFIXaddons WHERE addon_id=" . (int)$_POST['addon_id']))
if (!$db->query("DELETE FROM OGP_DB_PREFIXaddons WHERE addon_id=" . (int)$_POST['addon_id']))
print_lang('can_not_remove_addon');
}
@ -301,24 +301,24 @@ function exec_gsp_module() {
if ( isset($_GET['show']) )
{
$result = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name, url, path, group_id FROM GSP_DB_PREFIXaddons NATURAL JOIN GSP_DB_PREFIXconfig_homes WHERE addon_type='".$addon_type."' AND home_cfg_id=".$home_cfg_id);
$result = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name, url, path, group_id FROM OGP_DB_PREFIXaddons NATURAL JOIN OGP_DB_PREFIXconfig_homes WHERE addon_type='".$addon_type."' AND home_cfg_id=".$home_cfg_id);
}
elseif ( isset($_GET['show_all']) )
{
$result = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name, url, path, group_id FROM GSP_DB_PREFIXaddons NATURAL JOIN GSP_DB_PREFIXconfig_homes");
$result = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name, url, path, group_id FROM OGP_DB_PREFIXaddons NATURAL JOIN OGP_DB_PREFIXconfig_homes");
}
elseif ( isset($_GET['show_type']))
{
$result = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name, url, path, group_id FROM GSP_DB_PREFIXaddons NATURAL JOIN GSP_DB_PREFIXconfig_homes WHERE addon_type='".$addon_type."'");
$result = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name, url, path, group_id FROM OGP_DB_PREFIXaddons NATURAL JOIN OGP_DB_PREFIXconfig_homes WHERE addon_type='".$addon_type."'");
}
elseif ( isset($_GET['show_game']))
{
$result = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name, url, path, group_id FROM GSP_DB_PREFIXaddons NATURAL JOIN GSP_DB_PREFIXconfig_homes WHERE home_cfg_id=".$home_cfg_id);
$result = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name, url, path, group_id FROM OGP_DB_PREFIXaddons NATURAL JOIN OGP_DB_PREFIXconfig_homes WHERE home_cfg_id=".$home_cfg_id);
}
elseif ( isset($_GET['show_group']))
{
$group_id = $group_id == '0' ? $group_id." OR group_id IS NULL" : $group_id;
$result = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name, url, path, group_id FROM GSP_DB_PREFIXaddons NATURAL JOIN GSP_DB_PREFIXconfig_homes WHERE group_id=".$group_id);
$result = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name, url, path, group_id FROM OGP_DB_PREFIXaddons NATURAL JOIN OGP_DB_PREFIXconfig_homes WHERE group_id=".$group_id);
}
?>
<table class="center">

View file

@ -12,8 +12,8 @@ $module_menus = array( array( 'subpage' => 'addons_manager', 'name'=>'Addons Man
$install_queries = array();
$install_queries[0] = array(
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."addons`;",
"CREATE TABLE IF NOT EXISTS ".GSP_DB_PREFIX."addons
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."addons`;",
"CREATE TABLE IF NOT EXISTS ".OGP_DB_PREFIX."addons
(addon_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(80) NOT NULL,
url VARCHAR(200) NOT NULL,
@ -22,8 +22,8 @@ $install_queries[0] = array(
home_cfg_id VARCHAR(7) NOT NULL) ENGINE=MyISAM;");
$install_queries[1] = array(
"ALTER TABLE `".GSP_DB_PREFIX."addons` ADD `post_script` longtext NOT NULL;");
"ALTER TABLE `".OGP_DB_PREFIX."addons` ADD `post_script` longtext NOT NULL;");
$install_queries[2] = array(
"ALTER TABLE `".GSP_DB_PREFIX."addons` ADD `group_id` int(11) NULL;");
"ALTER TABLE `".OGP_DB_PREFIX."addons` ADD `group_id` int(11) NULL;");
?>

View file

@ -12,7 +12,7 @@ if($_SESSION['users_role'] != "admin")
$query_groups .= "group_id=".$group['group_id']." OR ";
$query_groups .= "group_id=0 OR group_id IS NULL)";
}
$addons = $db->resultQuery("SELECT addon_id FROM GSP_DB_PREFIXaddons WHERE home_cfg_id=".$server_home['home_cfg_id'].$query_groups);
$addons = $db->resultQuery("SELECT addon_id FROM OGP_DB_PREFIXaddons WHERE home_cfg_id=".$server_home['home_cfg_id'].$query_groups);
$addons_qty = count($addons);
if($addons and $addons_qty >= 1){
$module_buttons = array(

View file

@ -3,7 +3,7 @@
* Component of the addonsmanager module
*/
function exec_gsp_module() {
function exec_ogp_module() {
global $db;
$home_id = $_GET['home_id'];
$mod_id = $_GET['mod_id'];
@ -31,8 +31,8 @@ function exec_gsp_module() {
"<table class='center' >\n".
"<tr><td>\n";
$plugins = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name ".
"FROM GSP_DB_PREFIXaddons ".
"NATURAL JOIN GSP_DB_PREFIXconfig_homes ".
"FROM OGP_DB_PREFIXaddons ".
"NATURAL JOIN OGP_DB_PREFIXconfig_homes ".
"WHERE addon_type='plugin' ".
"AND home_cfg_id=".$home_cfg_id.$query_groups);
$plugins_qty = count($plugins);
@ -42,8 +42,8 @@ function exec_gsp_module() {
"&amp;port=".$port."'>".get_lang('install_plugin')."(".$plugins_qty.")</a>\n";
$mappacks = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name ".
"FROM GSP_DB_PREFIXaddons ".
"NATURAL JOIN GSP_DB_PREFIXconfig_homes ".
"FROM OGP_DB_PREFIXaddons ".
"NATURAL JOIN OGP_DB_PREFIXconfig_homes ".
"WHERE addon_type='mappack' ".
"AND home_cfg_id=".$home_cfg_id.$query_groups);
$mappacks_qty = count($mappacks);
@ -54,8 +54,8 @@ function exec_gsp_module() {
"&amp;port=".$port."'>".get_lang('install_mappack')."(".$mappacks_qty.")</a>\n";
}
$configs = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name ".
"FROM GSP_DB_PREFIXaddons ".
"NATURAL JOIN GSP_DB_PREFIXconfig_homes ".
"FROM OGP_DB_PREFIXaddons ".
"NATURAL JOIN OGP_DB_PREFIXconfig_homes ".
"WHERE addon_type='config' ".
"AND home_cfg_id=".$home_cfg_id.$query_groups);
$configs_qty = count($configs);

View file

@ -3,7 +3,7 @@
* Administrative interface for the administration module
*/
function exec_gsp_module()
function exec_ogp_module()
{
global $db,$view;
echo "<h2>".get_lang('administration')."</h2>";

View file

@ -3,7 +3,7 @@
* Component of the administration module
*/
function exec_gsp_module()
function exec_ogp_module()
{
$path = getcwd()."/".$_GET['randir']."/"; // change the path to fit your websites document structure
$fullPath = $path.$_GET['dwfile'];

View file

@ -4,7 +4,7 @@
* Component of the administration module
*/
function exec_gsp_module()
function exec_ogp_module()
{
echo "<h2>".get_lang('ban_list')."</h2>";
global $db, $settings;
@ -15,10 +15,10 @@ function exec_gsp_module()
foreach($_POST as $name => $ip)
{
$ip = $db->real_escape_string($ip);
$db->query("DELETE FROM `GSP_DB_PREFIXban_list` WHERE client_ip = '$ip';");
$db->query("DELETE FROM `OGP_DB_PREFIXban_list` WHERE client_ip = '$ip';");
}
}
$ban_list = $db->resultQuery("SELECT logging_attempts, banned_until, client_ip FROM `GSP_DB_PREFIXban_list`;");
$ban_list = $db->resultQuery("SELECT logging_attempts, banned_until, client_ip FROM `OGP_DB_PREFIXban_list`;");
$ban_qty = 0;
$ban_table = '';
if($ban_list)

View file

@ -3,7 +3,7 @@
* Component of the administration module
*/
function exec_gsp_module()
function exec_ogp_module()
{
if(isset($_POST['default']))

View file

@ -11,8 +11,8 @@ $module_required = TRUE;
$module_menus = array( array( 'subpage' => 'watch_logger', 'name'=>'Watch Logger', 'group'=>'admin' ) );
$install_queries = array();
$install_queries[0] = array(
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."adminExternalLinks`;",
"CREATE TABLE IF NOT EXISTS ".GSP_DB_PREFIX."adminExternalLinks
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."adminExternalLinks`;",
"CREATE TABLE IF NOT EXISTS ".OGP_DB_PREFIX."adminExternalLinks
(
link_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(80) NOT NULL,
@ -21,8 +21,8 @@ $install_queries[0] = array(
) ENGINE=MyISAM;");
$install_queries[1] = array(
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."logger`;",
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."logger`
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."logger`;",
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."logger`
(
`log_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
`date` varchar(20) NOT NULL,

View file

@ -4,7 +4,7 @@
* Component of the administration module
*/
function exec_gsp_module() {
function exec_ogp_module() {
global $db, $view, $loggedInUserInfo;
$search_field = (isset($_GET['search']) && !empty($_GET['search'])) ? $_GET['search'] : false;

View file

@ -2,7 +2,7 @@
include "function.php";
function exec_gsp_module(){
function exec_ogp_module(){
if($_SERVER['REQUEST_METHOD'] === 'GET'){
$homeid = $_GET['home_id'];

View file

@ -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){

View file

@ -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){

View file

@ -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);
}

View file

@ -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'];

View file

@ -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)
{
?>

View file

@ -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)
{
?>

View file

@ -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.

View file

@ -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);

View file

@ -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");

View file

@ -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';"
);

View file

@ -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>";

View file

@ -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'];
}

View file

@ -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'];
}

View file

@ -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)
{
?>

View file

@ -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');

View file

@ -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)
{

View file

@ -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

View file

@ -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);
}

View file

@ -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");
}

View file

@ -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)
{
?>

View file

@ -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)
{
?>

View file

@ -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.

View file

@ -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);

View file

@ -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");

View file

@ -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';"
);

View file

@ -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>";

View file

@ -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'];
}

View file

@ -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'];
}

View file

@ -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)
{
?>

View file

@ -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');

View file

@ -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)
{

View file

@ -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

View file

@ -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): ?>

View file

@ -21,21 +21,21 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['delete_single'])) {
$order_id = intval($_POST['delete_single']);
if ($order_id > 0) {
// First, check if the status is 'renew'
$stmt = $db->prepare("SELECT status FROM 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");

View file

@ -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{

View file

@ -8,7 +8,7 @@ When the user clicks the "Add to Cart" button, the next page to load is "add_to_
All the configuration info is passed to the add_to_cart.php in hidden fields
In our website, we are setting "post" pages with a "Tag". The first tag in our post should be the service ID from the services table
There are other methods that might be better to get the info. But all we need is the "service_ID" in the "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)
{

View file

@ -11,7 +11,7 @@ include "website_db.php";
if (isset($_POST['save']) && !empty($_POST['description'])) {
$new_description = str_replace("\\r\\n", "<br>", $_POST['description']);
$service = intval($_POST['service_id']);
$stmt = $db->prepare("UPDATE 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) {

View file

@ -3,7 +3,7 @@
* Component of the circular module
*/
include 'modules/circular/functions.php';
function exec_gsp_module()
function exec_ogp_module()
{
global $db;
if(isset($_POST['send_circular']))

View file

@ -7,7 +7,7 @@ function get_usernames_not_read_circular($circular_id)
global $db;
$circular_id = $db->real_escape_string($circular_id);
$query = "SELECT user_id ".
"FROM `GSP_DB_PREFIXcircular_recipients` ".
"FROM `OGP_DB_PREFIXcircular_recipients` ".
"WHERE `circular_id` = '$circular_id' ".
"AND `status` = '0'";
$users = $db->resultQuery($query);
@ -31,14 +31,14 @@ function remove_circular($circular_id, $admin = false)
if($admin)
{
$db->query("DELETE FROM `GSP_DB_PREFIXcircular_recipients` ".
$db->query("DELETE FROM `OGP_DB_PREFIXcircular_recipients` ".
"WHERE `circular_id` = '$circular_id'");
$db->query("DELETE FROM `GSP_DB_PREFIXcircular` ".
$db->query("DELETE FROM `OGP_DB_PREFIXcircular` ".
"WHERE `circular_id` = '$circular_id'");
}
else
{
$db->query("DELETE FROM `GSP_DB_PREFIXcircular_recipients` ".
$db->query("DELETE FROM `OGP_DB_PREFIXcircular_recipients` ".
"WHERE `circular_id` = '$circular_id' ".
"AND `user_id` = '$_SESSION[user_id]'");
}
@ -48,7 +48,7 @@ function set_circular_readed($circular_id)
{
global $db;
$circular_id = $db->real_escape_string($circular_id);
$db->query("UPDATE `GSP_DB_PREFIXcircular_recipients` ".
$db->query("UPDATE `OGP_DB_PREFIXcircular_recipients` ".
"SET `status` = '1' ".
"WHERE `circular_id` = '$circular_id' ".
"AND `user_id` = '$_SESSION[user_id]'");
@ -58,11 +58,11 @@ function get_circulars($all = false)
{
global $db;
if($all)
$query = "SELECT * FROM `GSP_DB_PREFIXcircular`";
$query = "SELECT * FROM `OGP_DB_PREFIXcircular`";
else
$query = "SELECT * ".
"FROM `GSP_DB_PREFIXcircular_recipients` ".
"NATURAL JOIN `GSP_DB_PREFIXcircular` ".
"FROM `OGP_DB_PREFIXcircular_recipients` ".
"NATURAL JOIN `OGP_DB_PREFIXcircular` ".
"WHERE user_id = $_SESSION[user_id]";
return $db->resultQuery($query);
@ -73,7 +73,7 @@ function send_to_user($user_id, $circular_id)
global $db;
$user_id = $db->real_escape_string($user_id);
$circular_id = $db->real_escape_string($circular_id);
return $db->query("INSERT INTO `GSP_DB_PREFIXcircular_recipients` VALUES('$user_id','$circular_id','0');");
return $db->query("INSERT INTO `OGP_DB_PREFIXcircular_recipients` VALUES('$user_id','$circular_id','0');");
}
function get_user_ids($type, $ids, &$user_ids)

View file

@ -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
@ -35,16 +35,16 @@ $module_menus = array(
);
$install_queries[0] = array(
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."circular`",
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."circular` (
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."circular`",
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."circular` (
`circular_id` int NOT NULL AUTO_INCREMENT,
`subject` TEXT NOT NULL,
`message` TEXT NOT NULL,
`timestamp` TIMESTAMP,
PRIMARY KEY (`circular_id`)
);",
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."circular_recipients`",
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."circular_recipients` (
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."circular_recipients`",
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."circular_recipients` (
`user_id` int NOT NULL,
`circular_id` int NOT NULL,
`status` tinyint NOT NULL,

View file

@ -3,7 +3,7 @@
* Component of the circular module
*/
include 'modules/circular/functions.php';
function exec_gsp_module()
function exec_ogp_module()
{
$circulars = get_circulars();
if(isset($_GET['list']))

View file

@ -3,7 +3,7 @@
* Component of the config_games module
*/
function exec_gsp_module() {
function exec_ogp_module() {
@$arch = $_POST['arch'];
@$os = $_POST['os'];
@$protocol = $_POST['protocol'];

View file

@ -5,7 +5,7 @@
require_once("server_config_parser.php");
function exec_gsp_module() {
function exec_ogp_module() {
global $db,$view;
$game_cfgs = $db->getGameCfgs();
@ -67,7 +67,7 @@ function exec_gsp_module() {
// Update and remove invalid old game mod ids
if($clear_old){
$db->updateGSPGameModsWithNewIDs($oldStructure);
$db->updateOGPGameModsWithNewIDs($oldStructure);
}
print_success(get_lang('configs_updated_ok'));

View file

@ -3,7 +3,7 @@
* Component of the config_games module
*/
function exec_gsp_module() {
function exec_ogp_module() {
@$arch = $_POST['arch'];
@$os = $_POST['os'];
@$protocol = $_POST['protocol'];

View file

@ -18,8 +18,8 @@ $module_menus = array(
$install_queries = array();
$install_queries[0] = array(
"DROP TABLE IF EXISTS ".GSP_DB_PREFIX."config_homes;",
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."config_homes` (
"DROP TABLE IF EXISTS ".OGP_DB_PREFIX."config_homes;",
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."config_homes` (
`home_cfg_id` int(20) NOT NULL auto_increment,
`game_key` varchar(64) NOT NULL,
`game_name` varchar(255) NOT NULL,
@ -28,8 +28,8 @@ $install_queries[0] = array(
UNIQUE KEY `game_key` (`game_key`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;",
"DROP TABLE IF EXISTS ".GSP_DB_PREFIX."config_mods;",
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."config_mods` (
"DROP TABLE IF EXISTS ".OGP_DB_PREFIX."config_mods;",
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."config_mods` (
`mod_cfg_id` int(50) NOT NULL auto_increment,
`home_cfg_id` varchar(50) NOT NULL,
`mod_key` varchar(100) NOT NULL COMMENT 'mod short name - used by the game server for startup commands - ex cstrike',

View file

@ -3,7 +3,7 @@
* Component of the config_games module
*/
function exec_gsp_module() {
function exec_ogp_module() {
@$arch = $_POST['arch'];
@$os = $_POST['os'];
@$protocol = $_POST['protocol'];

View file

@ -3,7 +3,7 @@
* Component of the config_games module
*/
function exec_gsp_module() {
function exec_ogp_module() {
@$arch = $_POST['arch'];
@$os = $_POST['os'];
@$protocol = $_POST['protocol'];

View file

@ -3,7 +3,7 @@
* Component of the config_games module
*/
function exec_gsp_module() {
function exec_ogp_module() {
?>
<h2>XML Config Creator</h2>
<table BORDER=1>

View file

@ -5,14 +5,14 @@
require_once('includes/lib_remote.php');
require_once('modules/cron/shared_cron_functions.php');
function exec_gsp_module()
function exec_ogp_module()
{
global $db, $view;
$r_servers = $db->getRemoteServers();
$homes = $db->getIpPorts();
if(!$homes)
{
print_failure(get_lang('cron_admin_no_gsp_servers_to_display'));
print_failure(get_lang('cron_admin_no_ogp_servers_to_display'));
return 0;
}
@ -37,14 +37,14 @@ function exec_gsp_module()
{
if(!checkCronInput($_POST['minute'], $_POST['hour'], $_POST['dayOfTheMonth'], $_POST['month'], $_POST['dayOfTheWeek']))
{
print_failure(get_lang('GSP_LANG_bad_inputs'));
print_failure(get_lang('OGP_LANG_bad_inputs'));
$view->refresh('?m=cron&p=cron',2);
return;
}
if(isset($_POST['homeid_ip_port']) and isset($server_homes[$_POST['homeid_ip_port']]))
{
$panelURL = getGSPSiteURL();
$panelURL = getOGPSiteURL();
if($panelURL === false)
{
print_failure('Failed to retrieve panel URL.');
@ -60,26 +60,26 @@ function exec_gsp_module()
switch ($_POST['action']) {
case "stop":
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/stop&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/stop&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "start":
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/start&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/start&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "restart":
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/restart&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/restart&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "steam_auto_update":
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/update&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/update&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1";
break;
}
$remote = new GSPRemoteLibrary( $game_home['agent_ip'], $game_home['agent_port'],
$remote = new OGPRemoteLibrary( $game_home['agent_ip'], $game_home['agent_port'],
$game_home['encryption_key'], $game_home['timeout'] );
}
else
{
$r_server_id = $_POST['r_server_id'];
$remote = new GSPRemoteLibrary( $remote_servers[$r_server_id]['agent_ip'],
$remote = new OGPRemoteLibrary( $remote_servers[$r_server_id]['agent_ip'],
$remote_servers[$r_server_id]['agent_port'],
$remote_servers[$r_server_id]['encryption_key'],
$remote_servers[$r_server_id]['timeout']);
@ -101,7 +101,7 @@ function exec_gsp_module()
}
elseif( isset($_POST['removeJob']) and isset($remote_servers[$_POST['r_server_id']]) and isset($jobsArray[$_POST['r_server_id']][$_POST['job_id']]) )
{
$remote = new GSPRemoteLibrary( $remote_servers[$_POST['r_server_id']]['agent_ip'],
$remote = new OGPRemoteLibrary( $remote_servers[$_POST['r_server_id']]['agent_ip'],
$remote_servers[$_POST['r_server_id']]['agent_port'],
$remote_servers[$_POST['r_server_id']]['encryption_key'],
$remote_servers[$_POST['r_server_id']]['timeout']);

View file

@ -3,7 +3,7 @@
* Component of the cron module
*/
function exec_gsp_module()
function exec_ogp_module()
{
// Using the refreshed class
if( isset($_GET['get_cronevents']) )
@ -12,7 +12,7 @@ function exec_gsp_module()
global $db;
$remote_server_id = $_GET['r_server_id'];
$remote_server = $db->getRemoteServer($remote_server_id);
$remote = new GSPRemoteLibrary($remote_server['agent_ip'], $remote_server['agent_port'], $remote_server['encryption_key'], $remote_server['timeout'] );
$remote = new OGPRemoteLibrary($remote_server['agent_ip'], $remote_server['agent_port'], $remote_server['encryption_key'], $remote_server['timeout'] );
if($remote->status_chk() != 1)
{
print_failure(get_lang("agent_offline"));

View file

@ -9,7 +9,7 @@ function reloadJobs($server_homes, $remote_servers, $getAllJobs = true)
$jobsArray = array();
foreach( $remote_servers as $rhost_id => $remote_server )
{
$remote = new GSPRemoteLibrary($remote_server['agent_ip'], $remote_server['agent_port'], $remote_server['encryption_key'], $remote_server['timeout']);
$remote = new OGPRemoteLibrary($remote_server['agent_ip'], $remote_server['agent_port'], $remote_server['encryption_key'], $remote_server['timeout']);
if($remote->status_chk() != 1)
{
$remote_servers_offline[$rhost_id] = $remote_server;
@ -85,7 +85,7 @@ function updateCronJobTokens($old_token, $token){
$remote_servers = $db->getRemoteServers();
foreach($remote_servers as $remote_server)
{
$remote = new GSPRemoteLibrary($remote_server['agent_ip'], $remote_server['agent_port'], $remote_server['encryption_key'], $remote_server['timeout']);
$remote = new OGPRemoteLibrary($remote_server['agent_ip'], $remote_server['agent_port'], $remote_server['encryption_key'], $remote_server['timeout']);
$jobs = $remote->scheduler_list_tasks();
foreach($jobs as $job_id => $job)
{
@ -105,7 +105,7 @@ function deleteJobsByHomeServerID($home_id){
$remote_servers = $db->getRemoteServers();
foreach($remote_servers as $remote_server)
{
$remote = new GSPRemoteLibrary($remote_server['agent_ip'], $remote_server['agent_port'], $remote_server['encryption_key'], $remote_server['timeout']);
$remote = new OGPRemoteLibrary($remote_server['agent_ip'], $remote_server['agent_port'], $remote_server['encryption_key'], $remote_server['timeout']);
$jobs = $remote->scheduler_list_tasks();
foreach($jobs as $job_id => $job)
{
@ -203,7 +203,7 @@ function updateCronJobsToNewApi()
{
require_once 'includes/lib_remote.php';
$panelURL = getGSPSiteURL();
$panelURL = getOGPSiteURL();
if($panelURL === false)
return false;
@ -214,7 +214,7 @@ function updateCronJobsToNewApi()
$mod_key = '';
foreach($remote_servers as $remote_server)
{
$remote = new GSPRemoteLibrary($remote_server['agent_ip'], $remote_server['agent_port'], $remote_server['encryption_key'], $remote_server['timeout']);
$remote = new OGPRemoteLibrary($remote_server['agent_ip'], $remote_server['agent_port'], $remote_server['encryption_key'], $remote_server['timeout']);
$jobs = $remote->scheduler_list_tasks();
if(!is_array($jobs))
continue;
@ -231,16 +231,16 @@ function updateCronJobsToNewApi()
switch ($action) {
case "stopServer":
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/stop&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/stop&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "startServer":
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/start&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/start&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "restartServer":
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/restart&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/restart&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "autoUpdateSteamHome":
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/update&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/update&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1";
break;
}
list($minute,$hour,$dayOfTheMonth,$month,$dayOfTheWeek,$old_command) = explode(" ", $job, 6);

View file

@ -4,11 +4,11 @@
*/
require_once('includes/lib_remote.php');
function exec_gsp_module()
function exec_ogp_module()
{
global $db;
$remote_server = $db->getRemoteServer($_GET['r_server_id']);
$remote = new GSPRemoteLibrary( $remote_server['agent_ip'], $remote_server['agent_port'],
$remote = new OGPRemoteLibrary( $remote_server['agent_ip'], $remote_server['agent_port'],
$remote_server['encryption_key'], $remote_server['timeout'] );
if($remote->status_chk() == 1)

View file

@ -6,7 +6,7 @@ error_reporting(E_ALL);
require_once('includes/lib_remote.php');
require_once('modules/cron/shared_cron_functions.php');
function exec_gsp_module()
function exec_ogp_module()
{
global $db, $view;
$isAdmin = $db->isAdmin($_SESSION['user_id']);
@ -38,14 +38,14 @@ function exec_gsp_module()
{
if(!checkCronInput($_POST['minute'], $_POST['hour'], $_POST['dayOfTheMonth'], $_POST['month'], $_POST['dayOfTheWeek']))
{
print_failure(get_lang('GSP_LANG_bad_inputs'));
print_failure(get_lang('OGP_LANG_bad_inputs'));
$view->refresh('?m=cron&p=user_cron',2);
return;
}
if ( isset( $_POST['homeid_ip_port'] ) and isset($server_homes[$_POST['homeid_ip_port']]) )
{
$panelURL = getGSPSiteURL();
$panelURL = getOGPSiteURL();
if($panelURL === false)
{
print_failure('Failed to retrieve panel URL.');
@ -61,16 +61,16 @@ function exec_gsp_module()
switch ($_POST['action']) {
case "stop":
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/stop&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/stop&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "start":
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/start&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/start&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "restart":
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/restart&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/restart&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "steam_auto_update":
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/update&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/update&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1";
break;
}
@ -81,7 +81,7 @@ function exec_gsp_module()
$_POST['dayOfTheWeek']." ".
$command;
$remote = new GSPRemoteLibrary( $game_home['agent_ip'],
$remote = new OGPRemoteLibrary( $game_home['agent_ip'],
$game_home['agent_port'],
$game_home['encryption_key'],
$game_home['timeout']);
@ -95,7 +95,7 @@ function exec_gsp_module()
}
elseif( isset($_POST['removeJob']) and isset($remote_servers[$_POST['r_server_id']]) and isset($jobsArray[$_POST['r_server_id']][$_POST['job_id']]) )
{
$remote = new GSPRemoteLibrary( $remote_servers[$_POST['r_server_id']]['agent_ip'],
$remote = new OGPRemoteLibrary( $remote_servers[$_POST['r_server_id']]['agent_ip'],
$remote_servers[$_POST['r_server_id']]['agent_port'],
$remote_servers[$_POST['r_server_id']]['encryption_key'],
$remote_servers[$_POST['r_server_id']]['timeout'] );

View file

@ -8,7 +8,7 @@
require_once('includes/lib_remote.php');
function exec_gsp_module()
function exec_ogp_module()
{
global $db, $settings, $loggedInUserInfo;
@ -28,7 +28,7 @@ function exec_gsp_module()
//show if new server created
$cartresult = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_carts WHERE user_id='".$_SESSION['user_id']."' AND paid='1' ");
$cartresult = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE user_id='".$_SESSION['user_id']."' AND paid='1' ");
$newServices=0;
foreach($cartresult as $res){
$newServices=$newServices + 1;
@ -50,7 +50,7 @@ function exec_gsp_module()
</div>';
}
//Invoice is due.
$orderresult = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE user_id='".$_SESSION['user_id']."' AND status = -1");
$orderresult = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE user_id='".$_SESSION['user_id']."' AND status = -1");
$invoicesDue=0;
foreach($orderresult as $res){
$invoicesDue=$invoicesDue + 1;
@ -69,7 +69,7 @@ function exec_gsp_module()
</div>';
}
//Server is suspended DANGER
$orderresult = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE user_id='".$_SESSION['user_id']."' AND status = -2");
$orderresult = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE user_id='".$_SESSION['user_id']."' AND status = -2");
$invoicesDue=0;
foreach($orderresult as $res){
$invoicesDue=$invoicesDue + 1;
@ -138,12 +138,12 @@ function exec_gsp_module()
$widgets = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXwidgets_users WHERE user_id='".$_SESSION['user_id']."' ORDER BY sort_no");
$widgets = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXwidgets_users WHERE user_id='".$_SESSION['user_id']."' ORDER BY sort_no");
if(!$widgets)
{
if($db->createUserWidgets($_SESSION['user_id']))
$widgets = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXwidgets_users WHERE user_id='".$_SESSION['user_id']."' ORDER BY sort_no");
$widgets = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXwidgets_users WHERE user_id='".$_SESSION['user_id']."' ORDER BY sort_no");
}
if($widgets)
@ -225,7 +225,7 @@ function exec_gsp_module()
if( isset($_GET['remote_server_id']) AND $_GET['remote_server_id'] == $server_row['remote_server_id'] )
{
$remote = new GSPRemoteLibrary( $server_row['agent_ip'], $server_row['agent_port'],
$remote = new OGPRemoteLibrary( $server_row['agent_ip'], $server_row['agent_port'],
$server_row['encryption_key'], $server_row['timeout'] );
$host_stat = $remote->status_chk();
if( $host_stat === 1 )
@ -253,7 +253,7 @@ function exec_gsp_module()
if($remote_server_id)
{
$remote_server = $db->getRemoteServer($remote_server_id);
$remote = new GSPRemoteLibrary( $remote_server['agent_ip'], $remote_server['agent_port'],
$remote = new OGPRemoteLibrary( $remote_server['agent_ip'], $remote_server['agent_port'],
$remote_server['encryption_key'], $remote_server['timeout'] );
$host_stat = $remote->status_chk();
if( $host_stat === 1 )

View file

@ -11,8 +11,8 @@ $module_required = TRUE;
$module_menus = array( array( 'subpage' => 'dashboard', 'name'=>'Dashboard', 'group'=>'user' ) );
$install_queries = array();
$install_queries[0] = array(
"DROP TABLE IF EXISTS ".GSP_DB_PREFIX."widgets;",
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."widgets` (
"DROP TABLE IF EXISTS ".OGP_DB_PREFIX."widgets;",
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."widgets` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`column_id` int(11) NOT NULL,
`sort_no` int(11) NOT NULL,
@ -21,8 +21,8 @@ $install_queries[0] = array(
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;",
"DROP TABLE IF EXISTS ".GSP_DB_PREFIX."widgets_users",
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."widgets_users` (
"DROP TABLE IF EXISTS ".OGP_DB_PREFIX."widgets_users",
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."widgets_users` (
`user_id` int(11) NOT NULL,
`widget_id` int(11) NOT NULL,
`column_id` int(11) NOT NULL,
@ -31,7 +31,7 @@ $install_queries[0] = array(
`title` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;",
"INSERT INTO `".GSP_DB_PREFIX."widgets` (`id`, `column_id`, `sort_no`, `collapsed`, `title`) VALUES
"INSERT INTO `".OGP_DB_PREFIX."widgets` (`id`, `column_id`, `sort_no`, `collapsed`, `title`) VALUES
(1, 1, 1, 0, 'Game Monitor'),
(2, 2, 0, 0, 'Online Server'),
(3, 2, 1, 0, 'Currently Online'),

View file

@ -17,7 +17,7 @@ function print_player_list_ogp_dashboard($player_list,$players,$playersmax,$game
return $data;
}
function exec_gsp_module()
function exec_ogp_module()
{
$server_key = 'server_'.$_GET['ip'].'_'.$_GET['port'];
if(isset($_GET['show']) and $_GET['show'] == "players")

View file

@ -3,7 +3,7 @@
* Component of the dashboard module
*/
function exec_gsp_module()
function exec_ogp_module()
{
global $db;
@ -25,7 +25,7 @@ function exec_gsp_module()
$widget_id = preg_replace('/[^\d\s]/', '', $item->id);
if (is_numeric($col_id) && is_numeric($widget_id)) {
$db->query("UPDATE ".GSP_DB_PREFIX."widgets_users SET column_id='$col_id', sort_no='".(int)$item->order."', collapsed='".(int)$item->collapsed."' WHERE widget_id='".$widget_id."' AND user_id='".$_SESSION['user_id']."'");
$db->query("UPDATE ".OGP_DB_PREFIX."widgets_users SET column_id='$col_id', sort_no='".(int)$item->order."', collapsed='".(int)$item->collapsed."' WHERE widget_id='".$widget_id."' AND user_id='".$_SESSION['user_id']."'");
}
}

View file

@ -21,7 +21,7 @@
define("DSI_BASEPATH", "modules/dsi/");
require_once(DSI_BASEPATH . 'includes/functions_ui.php');
require_once('modules/config_games/server_config_parser.php');
function exec_gsp_module(){
function exec_ogp_module(){
global $db;
global $view;

View file

@ -10,7 +10,7 @@ require_once("modules/config_games/server_config_parser.php");
require_once('includes/lib_remote.php');
require_once('protocol/lgsl/lgsl_protocol.php');
require_once('protocol/GameQ/GameQ.php');
function exec_gsp_module(){
function exec_ogp_module(){
global $db;
$online = isset( $_POST['online'] ) ? TRUE : FALSE;
$server_homes = $db->getIpPorts();
@ -62,8 +62,8 @@ function exec_gsp_module(){
// Get display IP
$public_ip = checkDisplayPublicIP($server_home['display_public_ip'],$server_home['ip'] != $server_home['agent_ip'] ? $server_home['ip'] : $server_home['agent_ip']);
$remote = new GSPRemoteLibrary($server_home['agent_ip'], $server_home['agent_port'], $server_home['encryption_key'], $server_home['timeout']);
$screen_running = $remote->is_screen_running(GSP_SCREEN_TYPE_HOME,$server_home['home_id']) === 1;
$remote = new OGPRemoteLibrary($server_home['agent_ip'], $server_home['agent_port'], $server_home['encryption_key'], $server_home['timeout']);
$screen_running = $remote->is_screen_running(OGP_SCREEN_TYPE_HOME,$server_home['home_id']) === 1;
if($screen_running) $servers_running++;
if( ( $online and $screen_running ) OR ( isset( $_GET['home_id-mod_id-ip-port'] )
and $_GET['home_id-mod_id-ip-port'] ==

View file

@ -25,7 +25,7 @@ require_once('modules/gamemanager/home_handling_functions.php');
require_once('modules/config_games/server_config_parser.php');
require_once('protocol/lgsl/lgsl_protocol.php');
require_once('protocol/GameQ/GameQ.php');
function exec_gsp_module(){
function exec_ogp_module(){
global $db;
echo "<h2>".get_lang("dsi_long")."</h2>";

View file

@ -26,7 +26,7 @@ require(DSI_BASEPATH . 'includes/functions.php');
require("modules/gamemanager/home_handling_functions.php");
require('modules/config_games/server_config_parser.php');
function exec_gsp_module(){
function exec_ogp_module(){
global $db,$view,$settings;
if(isset($_GET["s"])){

View file

@ -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
@ -25,7 +25,7 @@
require_once('modules/editconfigfiles/functions.php');
require_once("modules/config_games/server_config_parser.php");
function exec_gsp_module()
function exec_ogp_module()
{
global $db, $view;

View file

@ -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
@ -27,7 +27,7 @@ require 'modules/editconfigfiles/functions.php';
require_once 'modules/config_games/server_config_parser.php';
require 'includes/lib_remote.php';
function exec_gsp_module()
function exec_ogp_module()
{
global $db, $view;
@ -59,7 +59,7 @@ function exec_gsp_module()
return;
}
$remote = new GSPRemoteLibrary($server_home['agent_ip'], $server_home['agent_port'], $server_home['encryption_key'], $server_home['timeout']);
$remote = new OGPRemoteLibrary($server_home['agent_ip'], $server_home['agent_port'], $server_home['encryption_key'], $server_home['timeout']);
if ($remote->status_chk() === 0) {
print_failure(get_lang('agent_offline'));

View file

@ -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

View file

@ -51,7 +51,7 @@ function installUpdate($info, $base_dir, $current_blacklist = array())
$not_overwritten_files = "";
$new_files = "";
$temp_dir = $tmp . DIRECTORY_SEPARATOR . "GSP_Extras";
$temp_dir = $tmp . DIRECTORY_SEPARATOR . "OGP_Extras";
if( !file_exists($temp_dir) )
mkdir($temp_dir, 0775);
@ -207,13 +207,13 @@ function deeperPathFirst($a, $b)
return ($al > $bl) ? -1 : +1;
}
function exec_gsp_module()
function exec_ogp_module()
{
global $db, $settings;
// Get blacklisted files
$current_blacklist = array();
$blacklisted_files = $db->resultQuery('SELECT file_path FROM `GSP_DB_PREFIXupdate_blacklist`;');
$blacklisted_files = $db->resultQuery('SELECT file_path FROM `OGP_DB_PREFIXupdate_blacklist`;');
if($blacklisted_files !== FALSE)
{
$current_blacklist = array();
@ -224,9 +224,9 @@ function exec_gsp_module()
}
// GitHub URL
if(function_exists("getGSPGitHubURLUnstrict") && function_exists("getGitHubOrganization")){
if(function_exists("getOGPGitHubURLUnstrict") && function_exists("getGitHubOrganization")){
$gitHubUsername = $settings["custom_github_update_username"];
$gitHubURL = getGSPGitHubURLUnstrict($gitHubUsername);
$gitHubURL = getOGPGitHubURLUnstrict($gitHubUsername);
$gitHubOrganization = getGitHubOrganization($gitHubURL);
}else{
$gitHubURL = "https://github.com/OpenGamePanel/";
@ -374,7 +374,7 @@ function exec_gsp_module()
foreach($repos_info_array as $key => $repository)
{
if(preg_match('/^(GSP-Website|OGP-Agent-Linux|OGP-Agent-Windows)$/',$repository['name']))
if(preg_match('/^(OGP-Website|OGP-Agent-Linux|OGP-Agent-Windows)$/',$repository['name']))
continue;
$REMOTE_REPO_FILE = $gitHubURL . $repository['name'] . '/commits/master.atom';

View file

@ -28,14 +28,14 @@
<script type="text/javascript" src="modules/faq/faq.js"></script>
<link type="text/css" rel="stylesheet" href="modules/faq/syntaxhighlighter/styles/shCoreDefault.css"/>
<?php
function exec_gsp_module()
function exec_ogp_module()
{
echo '<h2>F.A.Q.</h2>';
echo '<div class="maincategory"><img class="headerimage" src="modules/faq/faq.png">Categories<div style="float:right" >'.
'<input class=search name=search id=search type=text placeholder="Search"/></div><br></div>';
require 'modules/faq/rss_php.php';
$url = 'https://gameserver-panel.org/faq/rss.php';
$url = 'https://opengamepanel.org/faq/rss.php';
$local_copy = 'modules/faq/faq.rss'; ## Relative path
$save_as = realpath('modules' . DIRECTORY_SEPARATOR . 'faq') . DIRECTORY_SEPARATOR . 'faq.rss';
## Full path (adding the filename to realpath would fail if the file does not exists yet)
@ -123,7 +123,7 @@ function exec_gsp_module()
// Check if user is admin
global $db;
$isAdmin = false;
if(isset($_SESSION['user_id']) && $db && $db instanceof GSPDatabase) {
if(isset($_SESSION['user_id']) && $db && $db instanceof OGPDatabase) {
$isAdmin = $db->isAdmin($_SESSION['user_id']);
}

View file

@ -7,7 +7,7 @@ require_once("modules/config_games/server_config_parser.php");
require_once('includes/lib_remote.php');
require_once('modules/fast_download/functions.php');
require('includes/form_table_class.php');
function exec_gsp_module()
function exec_ogp_module()
{
global $db,$view;
echo "<h2>".get_lang("fast_dl")."</h2>\n";
@ -122,7 +122,7 @@ function exec_gsp_module()
$remote_server_id = $_GET['remote_server_id'];
$remote_server = $db->getRemoteServer($remote_server_id);
$rserver = $db->getRemoteServerById($remote_server_id);
$remote = new GSPRemoteLibrary( $rserver['agent_ip'],
$remote = new OGPRemoteLibrary( $rserver['agent_ip'],
$rserver['agent_port'],
$rserver['encryption_key'],
$rserver['timeout']);
@ -206,7 +206,7 @@ function exec_gsp_module()
{
$remote_server_id = $_GET['remote_server_id'];
$rserver = $db->getRemoteServerById($remote_server_id);
$remote = new GSPRemoteLibrary( $rserver['agent_ip'],
$remote = new OGPRemoteLibrary( $rserver['agent_ip'],
$rserver['agent_port'],
$rserver['encryption_key'],
$rserver['timeout']);
@ -317,7 +317,7 @@ function exec_gsp_module()
$server_home = $db->getGameHomeByIP($ip, $port);
if ( !$server_home )
return;
$remote = new GSPRemoteLibrary($server_home['agent_ip'],
$remote = new OGPRemoteLibrary($server_home['agent_ip'],
$server_home['agent_port'],
$server_home['encryption_key'],
$server_home['timeout']);

View file

@ -52,15 +52,15 @@ function get_access_rules($home_cfg_id = "")
global $db;
if($home_cfg_id == "")
{
return $db->resultQuery("SELECT * FROM `".GSP_DB_PREFIX."fastdl_access_rules`;");
return $db->resultQuery("SELECT * FROM `".OGP_DB_PREFIX."fastdl_access_rules`;");
}
else
{
$result = $db->resultQuery("SELECT * FROM `".GSP_DB_PREFIX."fastdl_access_rules`
$result = $db->resultQuery("SELECT * FROM `".OGP_DB_PREFIX."fastdl_access_rules`
WHERE `home_cfg_id`='".$db->realEscapeSingle($home_cfg_id)."'");
if($result === FALSE)
{
$result = $db->resultQuery("SELECT * FROM `".GSP_DB_PREFIX."fastdl_access_rules`
$result = $db->resultQuery("SELECT * FROM `".OGP_DB_PREFIX."fastdl_access_rules`
WHERE `home_cfg_id`='0'");
if($result === FALSE)
return array('match_file_extension' => NULL,'match_client_ip', NULL);
@ -72,12 +72,12 @@ function get_access_rules($home_cfg_id = "")
function set_access_rule($home_cfg_id, $match_file_extension, $match_client_ip)
{
global $db;
if (!$db->resultQuery("SELECT * FROM `".GSP_DB_PREFIX."fastdl_access_rules`
if (!$db->resultQuery("SELECT * FROM `".OGP_DB_PREFIX."fastdl_access_rules`
WHERE `home_cfg_id`='".$db->realEscapeSingle($home_cfg_id)."'"))
{
if($match_file_extension == "" and $match_client_ip == "")
return TRUE;
return $db->query("INSERT INTO `".GSP_DB_PREFIX."fastdl_access_rules`
return $db->query("INSERT INTO `".OGP_DB_PREFIX."fastdl_access_rules`
(`home_cfg_id`,`match_file_extension`,`match_client_ip`)
VALUES('" . $db->realEscapeSingle($home_cfg_id) . "','" . $db->realEscapeSingle($match_file_extension) . "','" . $db->realEscapeSingle($match_client_ip) . "');");
}
@ -85,11 +85,11 @@ function set_access_rule($home_cfg_id, $match_file_extension, $match_client_ip)
{
if($match_file_extension == "" and $match_client_ip == "")
{
return $db->query("DELETE FROM `".GSP_DB_PREFIX."fastdl_access_rules` WHERE `home_cfg_id`='" . $db->realEscapeSingle($home_cfg_id) . "';");
return $db->query("DELETE FROM `".OGP_DB_PREFIX."fastdl_access_rules` WHERE `home_cfg_id`='" . $db->realEscapeSingle($home_cfg_id) . "';");
}
else
{
return $db->query("UPDATE `".GSP_DB_PREFIX."fastdl_access_rules`
return $db->query("UPDATE `".OGP_DB_PREFIX."fastdl_access_rules`
SET `match_file_extension`='" . $db->realEscapeSingle($match_file_extension) . "',
`match_client_ip`='" . $db->realEscapeSingle($match_client_ip) . "'
WHERE `home_cfg_id`='" . $db->realEscapeSingle($home_cfg_id) . "';");
@ -100,7 +100,7 @@ function set_access_rule($home_cfg_id, $match_file_extension, $match_client_ip)
function del_access_rule($home_cfg_id)
{
global $db;
return $db->query("DELETE FROM `".GSP_DB_PREFIX."fastdl_access_rules` WHERE `home_cfg_id`='" . $db->realEscapeSingle($home_cfg_id) . "';");
return $db->query("DELETE FROM `".OGP_DB_PREFIX."fastdl_access_rules` WHERE `home_cfg_id`='" . $db->realEscapeSingle($home_cfg_id) . "';");
}
function check_access_rules_entries()
@ -165,7 +165,7 @@ function get_fastdl_settings($remote_server_id)
{
global $db;
if( !is_numeric($remote_server_id) ) return FALSE;
$result = $db->resultQuery("SELECT `setting`,`value` FROM `".GSP_DB_PREFIX."fastdl_settings`
$result = $db->resultQuery("SELECT `setting`,`value` FROM `".OGP_DB_PREFIX."fastdl_settings`
WHERE `remote_server_id`='".$db->realEscapeSingle($remote_server_id)."'");
if(!$result) return FALSE;
$results = array();
@ -184,7 +184,7 @@ function set_fastdl_settings($remote_server_id, $settings)
if( !is_array($settings) ) return FALSE;
foreach ( $settings as $s_key => $s_value )
{
$query = 'INSERT INTO `'.GSP_DB_PREFIX.'fastdl_settings` (`remote_server_id`,`setting`,`value`)
$query = 'INSERT INTO `'.OGP_DB_PREFIX.'fastdl_settings` (`remote_server_id`,`setting`,`value`)
VALUES(\''.$db->realEscapeSingle($remote_server_id).'\', \''.$db->realEscapeSingle($s_key).'\', \''.$db->realEscapeSingle($s_value).'\') ON DUPLICATE KEY
UPDATE value=\''.$db->realEscapeSingle($s_value).'\'';
$db->query($query);

View file

@ -12,22 +12,22 @@ $module_menus = array( array( 'subpage' => '', 'name'=>'Fast Download', 'group'=
$module_access_rights = array('d' => 'allow_fast_download');
$install_queries[0] = array("SELECT NOW();");
$install_queries[1] = array("DROP TABLE IF EXISTS `".GSP_DB_PREFIX."fastdl`;");
$install_queries[1] = array("DROP TABLE IF EXISTS `".OGP_DB_PREFIX."fastdl`;");
$install_queries[2] = array("SELECT NOW();");
$install_queries[3] = array(
"CREATE TABLE ".GSP_DB_PREFIX."fastdl_access_rules (
"CREATE TABLE ".OGP_DB_PREFIX."fastdl_access_rules (
`home_cfg_id` varchar(32) NOT NULL,
`match_file_extension` TEXT,
`match_client_ip` TEXT,
UNIQUE KEY (`home_cfg_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
$install_queries[4] = array(
"CREATE TABLE ".GSP_DB_PREFIX."fastdl_settings (
"CREATE TABLE ".OGP_DB_PREFIX."fastdl_settings (
`remote_server_id` int(11) NOT NULL,
`setting` varchar(63) NOT NULL,
`value` varchar(255) NOT NULL,
UNIQUE KEY remote_server_id (remote_server_id,setting)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
$uninstall_queries = array("DROP TABLE IF EXISTS `".GSP_DB_PREFIX."fastdl_access_rules`;",
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."fastdl_settings`;");
$uninstall_queries = array("DROP TABLE IF EXISTS `".OGP_DB_PREFIX."fastdl_access_rules`;",
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."fastdl_settings`;");
?>

View file

@ -6,7 +6,7 @@
require_once("modules/config_games/server_config_parser.php");
require_once('includes/lib_remote.php');
require_once('modules/fast_download/functions.php');
function exec_gsp_module()
function exec_ogp_module()
{
global $db,$view;
echo "<h2>".get_lang("fast_dl")."</h2>\n";
@ -52,7 +52,7 @@ function exec_gsp_module()
return;
}
$remote = new GSPRemoteLibrary($server_home['agent_ip'],
$remote = new OGPRemoteLibrary($server_home['agent_ip'],
$server_home['agent_port'],
$server_home['encryption_key'],
$server_home['timeout']);

View file

@ -3,7 +3,7 @@
* Component of the ftp module
*/
function exec_gsp_module()
function exec_ogp_module()
{
global $db,$view,$settings;

View file

@ -4,7 +4,7 @@
* Administrative interface for the ftp module
*/
function exec_gsp_module()
function exec_ogp_module()
{
include('includes/lib_remote.php');
@ -15,7 +15,7 @@ function exec_gsp_module()
{
$success = true;
$server_row = $db->getRemoteServer($_POST['remote_server_id']);
$remote = new GSPRemoteLibrary($server_row['agent_ip'],$server_row['agent_port'],$server_row['encryption_key'],$server_row['timeout']);
$remote = new OGPRemoteLibrary($server_row['agent_ip'],$server_row['agent_port'],$server_row['encryption_key'],$server_row['timeout']);
$post_ftp_login = strip_real_escape_string($_POST['ftp_login']);
$post_ftp_password = strip_real_escape_string($_POST['ftp_password']);
$post_full_path = strip_real_escape_string($_POST['full_path']);
@ -64,7 +64,7 @@ function exec_gsp_module()
{
$ftp_login = strip_real_escape_string($_POST['ftp_login']);
$server_row = $db->getRemoteServer($_POST['remote_server_id']);
$remote = new GSPRemoteLibrary($server_row['agent_ip'],$server_row['agent_port'],$server_row['encryption_key'],$server_row['timeout']);
$remote = new OGPRemoteLibrary($server_row['agent_ip'],$server_row['agent_port'],$server_row['encryption_key'],$server_row['timeout']);
$remote->ftp_mgr("userdel", $ftp_login);
@ -75,7 +75,7 @@ function exec_gsp_module()
if(isset($_POST['edit_ftp_user']))
{
$server_row = $db->getRemoteServer($_POST['remote_server_id']);
$remote = new GSPRemoteLibrary($server_row['agent_ip'],$server_row['agent_port'],$server_row['encryption_key'],$server_row['timeout']);
$remote = new OGPRemoteLibrary($server_row['agent_ip'],$server_row['agent_port'],$server_row['encryption_key'],$server_row['timeout']);
$ftp_login = strip_real_escape_string($_POST['ftp_login']);
$settings = "";
foreach($_POST as $key => $value)
@ -128,7 +128,7 @@ function exec_gsp_module()
foreach ( $servers as $server_row )
{
$display_ip = checkDisplayPublicIP($server_row['display_public_ip'],$server_row['agent_ip']);
$remote = new GSPRemoteLibrary($server_row['agent_ip'],$server_row['agent_port'],$server_row['encryption_key'],$server_row['timeout']);
$remote = new OGPRemoteLibrary($server_row['agent_ip'],$server_row['agent_port'],$server_row['encryption_key'],$server_row['timeout']);
$host_stat = $remote->status_chk();

View file

@ -107,7 +107,7 @@ if(function_exists("getClientIPAddress")){
if(function_exists("startSession")){
startSession();
}else{
session_name("gameserver-panel_web");
session_name("opengamepanel_web");
session_start();
}

View file

@ -31,7 +31,7 @@ if(file_exists("includes/helpers.php")){
if(function_exists("startSession")){
startSession();
}else{
session_name("gameserver-panel_web");
session_name("opengamepanel_web");
session_start();
}

View file

@ -66,7 +66,7 @@ if(file_exists("includes/helpers.php")){
if(function_exists("startSession")){
startSession();
}else{
session_name("gameserver-panel_web");
session_name("opengamepanel_web");
session_start();
}

View file

@ -103,7 +103,7 @@ print_r($file_replacements);
echo "</xmp>"; */
require_once('includes/lib_remote.php');
$remote = new GSPRemoteLibrary($server_home['agent_ip'], $server_home['agent_port'], $server_home['encryption_key'], $server_home['timeout']);
$remote = new OGPRemoteLibrary($server_home['agent_ip'], $server_home['agent_port'], $server_home['encryption_key'], $server_home['timeout']);
foreach($file_replacements as $filepath => $replacements)
{

View file

@ -16,14 +16,14 @@ if (!$home_id || !$mod_id) {
$db = getOGPDBInstance(); // Replace with your DB instance
$home_info = $db->getGameHome($home_id);
$server_xml = read_server_config(SERVER_CONFIG_LOCATION."/".$home_info['home_cfg_file']);
$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']);
$home_log = "";
if( isset( $server_xml->console_log ) ) {
$log_path = preg_replace("/%mod%/i", $home_info['mods'][$mod_id]['mod_key'], $server_xml->console_log);
$log_retval = $remote->remote_readfile( $home_info['home_path'].'/'.$log_path, $home_log );
} else {
$log_retval = $remote->get_log(GSP_SCREEN_TYPE_HOME, $home_info['home_id'], clean_path($home_info['home_path']."/".$server_xml->exe_location), $home_log);
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME, $home_info['home_id'], clean_path($home_info['home_path']."/".$server_xml->exe_location), $home_log);
}
$lines = explode("\n", $home_log);
$home_log = implode("\n", array_slice($lines, -40));

View file

@ -32,7 +32,7 @@ function get_start_cmd($remote,$server_xml,$home_info,$mod_id,$ip,$port,$db)
$cli_param_data['IP'] = $ip;
$cli_param_data['PORT'] = $port;
$cli_param_data['HOSTNAME'] = $home_info['home_name'];
$cli_param_data['PID_FILE'] = "gsp_game_startup.pid";
$cli_param_data['PID_FILE'] = "ogp_game_startup.pid";
// Linux
if( preg_match("/Linux/", $os) )
@ -217,7 +217,7 @@ function exec_operation( $action, $home_id, $mod_id, $ip, $port, $override = fal
return FALSE;
require_once('includes/lib_remote.php');
$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']);
$os = $remote->what_os();
if ( $action != "stop" )
@ -231,7 +231,7 @@ function exec_operation( $action, $home_id, $mod_id, $ip, $port, $override = fal
}
}
$screen_running = $remote->is_screen_running(GSP_SCREEN_TYPE_HOME,$home_info['home_id']) === 1;
$screen_running = $remote->is_screen_running(OGP_SCREEN_TYPE_HOME,$home_info['home_id']) === 1;
if ( $action == "stop" AND $screen_running )
{

View file

@ -42,20 +42,20 @@ require_once("modules/config_games/server_config_parser.php");
}
require_once('includes/lib_remote.php');
$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']);
$home_log = "";
if( isset( $server_xml->console_log ) )
{
$log_retval = $remote->get_log(GSP_SCREEN_TYPE_HOME,
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME,
$home_info['home_id'],
clean_path($home_info['home_path']),
$home_log, 100, (string) $server_xml->console_log);
}
else
{
$log_retval = $remote->get_log(GSP_SCREEN_TYPE_HOME,
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME,
$home_info['home_id'],
clean_path($home_info['home_path']."/".$server_xml->exe_location),
$home_log);
@ -68,7 +68,7 @@ require_once("modules/config_games/server_config_parser.php");
}
elseif ($log_retval == 1 || $log_retval == 2)
{
// Force log file contents to be UTF-8 (fixes http://www.gameserver-panel.org/forum/viewthread.php?thread_id=5379)
// Force log file contents to be UTF-8 (fixes http://www.opengamepanel.org/forum/viewthread.php?thread_id=5379)
if(hasValue($home_log)){
$home_log = utf8_encode($home_log);
}

View file

@ -85,7 +85,7 @@ if( !isset( $_POST['start_server'] ) )
<input type='hidden' name='home_id' value='$server_home[home_id]' />\n
<input type='hidden' name='remote_server_id' value='".$server_home['remote_server_id']."' />\n
<table class='start-server'>
<tr><td class='right'>". get_lang("gsp_agent_ip") .
<tr><td class='right'>". get_lang("ogp_agent_ip") .
":</td><td class='left'>".$server_home['agent_ip']."</td></tr>";
$max_players = $server_home['max_players'];
@ -294,7 +294,7 @@ elseif($server_home['home_id'] == $_POST['home_id'])
$cli_param_data['HOSTNAME'] = $server_home['home_name'];
$cli_param_data['PID_FILE'] = "gsp_game_startup.pid";
$cli_param_data['PID_FILE'] = "ogp_game_startup.pid";
$os = $remote->what_os();
@ -337,7 +337,7 @@ elseif($server_home['home_id'] == $_POST['home_id'])
// We do this check because sometimes server does not answer to lgsl check
// done below and is still running.
if ( $remote->is_screen_running(GSP_SCREEN_TYPE_HOME,$server_home['home_id']) === 1 )
if ( $remote->is_screen_running(OGP_SCREEN_TYPE_HOME,$server_home['home_id']) === 1 )
{
echo "<p>".get_lang_f('server_already_running')."<a href=?m=gamemanager&amp;p=stop&amp;home_id=".$server_home['home_id'].
"&amp;ip=".$ip."&amp;port=".
@ -565,7 +565,7 @@ elseif($server_home['home_id'] == $_POST['home_id'])
$db->changeLastParam($server_home['home_id'],json_encode($save_param));
echo "<table class='server-starting'>";
echo "<tr><td class='right'>". get_lang("gsp_agent_ip") .
echo "<tr><td class='right'>". get_lang("ogp_agent_ip") .
":</td><td class='left'>".$server_home['agent_ip']."</td></tr>\n";
echo "<tr><td class='right'>". get_lang("game_home") .
":</td><td class='left'>".$server_home['home_path']."</td></tr>";

View file

@ -12,16 +12,16 @@ $module_menus = array( array( 'subpage' => 'game_monitor', 'name'=>'Game Monitor
$module_access_rights = array('u' => 'allow_updates', 'p' => 'allow_parameter_usage', 'e' => 'allow_extra_params', 'c' => 'allow_custom_fields');
$install_queries[0] = array(
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."home_ip_ports`;",
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."home_ip_ports` (
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."home_ip_ports`;",
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."home_ip_ports` (
`ip_id` int(11) NOT NULL,
`port` int(11) NOT NULL,
`home_id` int(11) NOT NULL,
PRIMARY KEY (`ip_id`,`port`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;",
"DROP TABLE IF EXISTS ".GSP_DB_PREFIX."server_homes",
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."server_homes` (
"DROP TABLE IF EXISTS ".OGP_DB_PREFIX."server_homes",
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."server_homes` (
`home_id` int(50) NOT NULL auto_increment,
`remote_server_id` int(11) NOT NULL,
`user_id_main` int(11) NOT NULL,
@ -35,8 +35,8 @@ $install_queries[0] = array(
UNIQUE KEY remote_server_id (remote_server_id,home_path)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;",
"DROP TABLE IF EXISTS ".GSP_DB_PREFIX."rcon_presets;",
"CREATE TABLE ".GSP_DB_PREFIX."rcon_presets (
"DROP TABLE IF EXISTS ".OGP_DB_PREFIX."rcon_presets;",
"CREATE TABLE ".OGP_DB_PREFIX."rcon_presets (
`preset_id` int(50) NOT NULL auto_increment,
`name` varchar(20) NOT NULL,
`command` varchar(100) NOT NULL,
@ -45,8 +45,8 @@ UNIQUE KEY remote_server_id (remote_server_id,home_path)
PRIMARY KEY (`preset_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;",
"DROP TABLE IF EXISTS ".GSP_DB_PREFIX."game_mods",
"CREATE TABLE IF NOT EXISTS ".GSP_DB_PREFIX."game_mods (
"DROP TABLE IF EXISTS ".OGP_DB_PREFIX."game_mods",
"CREATE TABLE IF NOT EXISTS ".OGP_DB_PREFIX."game_mods (
`mod_id` int(50) NOT NULL auto_increment,
`home_id` int(255) NOT NULL,
`mod_cfg_id` int(11) NOT NULL,
@ -61,12 +61,12 @@ UNIQUE KEY home_id (home_id,mod_cfg_id)
) ENGINE=MyISAM;");
$install_queries[1] = array(
"ALTER TABLE `".GSP_DB_PREFIX."server_homes` ADD `ftp_login` varchar(32) NULL;",
"ALTER TABLE `".GSP_DB_PREFIX."server_homes` ADD `ftp_status` int(11) NOT NULL DEFAULT '0';");
"ALTER TABLE `".OGP_DB_PREFIX."server_homes` ADD `ftp_login` varchar(32) NULL;",
"ALTER TABLE `".OGP_DB_PREFIX."server_homes` ADD `ftp_status` int(11) NOT NULL DEFAULT '0';");
$install_queries[2] = array(
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."status_cache`",
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."status_cache` (
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."status_cache`",
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."status_cache` (
`date_timestamp` char(16) NOT NULL,
`ip_id` char(3) NOT NULL,
`port` char(6) NOT NULL,
@ -74,28 +74,28 @@ $install_queries[2] = array(
) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
$install_queries[3] = array(
"ALTER TABLE `".GSP_DB_PREFIX."server_homes` ADD `custom_fields` LONGTEXT NULL;");
"ALTER TABLE `".OGP_DB_PREFIX."server_homes` ADD `custom_fields` LONGTEXT NULL;");
$install_queries[4] = array(
"ALTER TABLE `".GSP_DB_PREFIX."home_ip_ports` ADD `force_mod_id` int(11) NOT NULL DEFAULT '0';");
"ALTER TABLE `".OGP_DB_PREFIX."home_ip_ports` ADD `force_mod_id` int(11) NOT NULL DEFAULT '0';");
$install_queries[5] = array(
"TRUNCATE `".GSP_DB_PREFIX."status_cache`;");
"TRUNCATE `".OGP_DB_PREFIX."status_cache`;");
$install_queries[6] = array(
"ALTER TABLE `".GSP_DB_PREFIX."server_homes` ADD `server_expiration_date` VARCHAR(21) NOT NULL default 'X';");
"ALTER TABLE `".OGP_DB_PREFIX."server_homes` ADD `server_expiration_date` VARCHAR(21) NOT NULL default 'X';");
$install_queries[7] = array(
"ALTER TABLE `".GSP_DB_PREFIX."server_homes` drop index `remote_server_id`;"
"ALTER TABLE `".OGP_DB_PREFIX."server_homes` drop index `remote_server_id`;"
);
$install_queries[8] = array(
"ALTER TABLE `".GSP_DB_PREFIX."server_homes` ADD `home_user_order` INT NOT NULL default 99999;");
"ALTER TABLE `".OGP_DB_PREFIX."server_homes` ADD `home_user_order` INT NOT NULL default 99999;");
// Increase default column sizes
$install_queries[9] = array(
"ALTER TABLE `".GSP_DB_PREFIX."server_homes` MODIFY COLUMN `home_path` VARCHAR(500);",
"ALTER TABLE `".GSP_DB_PREFIX."server_homes` MODIFY COLUMN `home_name` VARCHAR(500);",
"ALTER TABLE `".GSP_DB_PREFIX."server_homes` MODIFY COLUMN `control_password` VARCHAR(128);",
"ALTER TABLE `".GSP_DB_PREFIX."server_homes` MODIFY COLUMN `ftp_password` VARCHAR(128);");
"ALTER TABLE `".OGP_DB_PREFIX."server_homes` MODIFY COLUMN `home_path` VARCHAR(500);",
"ALTER TABLE `".OGP_DB_PREFIX."server_homes` MODIFY COLUMN `home_name` VARCHAR(500);",
"ALTER TABLE `".OGP_DB_PREFIX."server_homes` MODIFY COLUMN `control_password` VARCHAR(128);",
"ALTER TABLE `".OGP_DB_PREFIX."server_homes` MODIFY COLUMN `ftp_password` VARCHAR(128);");
?>

View file

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

View file

@ -3,7 +3,7 @@
* Component of the gamemanager module
*/
function exec_gsp_module() {
function exec_ogp_module() {
global $db;

Some files were not shown because too many files have changed in this diff Show more