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

@ -17,7 +17,7 @@ require_once("includes/functions.php");
require_once("includes/helpers.php");
require_once("includes/html_functions.php");
// Start the session valid for gameserver-panel_web only
// Start the session valid for opengamepanel_web only
startSession();
// Useful for debugging :)
@ -42,8 +42,8 @@ $db = createDatabaseConnection($db_type, $db_host, $db_user, $db_pass, $db_name,
// Load languages.
include_once("includes/lang.php");
if (!$db instanceof GSPDatabase) {
gspLang();
if (!$db instanceof OGPDatabase) {
ogpLang();
die(get_lang('no_db_connection'));
}
@ -54,10 +54,10 @@ if(hasValue($_SESSION['user_id'])){
$settings = $db->getSettings();
@$GLOBALS['panel_language'] = $settings['panel_language'];
gspLang();
ogpLang();
require_once("includes/view.php");
$view = new GSPView();
$view = new OGPView();
$view->setCharset( get_lang('lang_charset') );
if(isset($_GET['type']) && $_GET['type'] == 'cleared')
{
@ -216,10 +216,10 @@ function ogpHome()
{
$client_ip = getClientIPAddress();
$ban_list = $db->resultQuery("SHOW TABLES LIKE 'GSP_DB_PREFIXban_list';");
$ban_list = $db->resultQuery("SHOW TABLES LIKE 'OGP_DB_PREFIXban_list';");
if ( empty( $ban_list ) )
{
$db->query("CREATE TABLE IF NOT EXISTS `GSP_DB_PREFIXban_list` (
$db->query("CREATE TABLE IF NOT EXISTS `OGP_DB_PREFIXban_list` (
`client_ip` varchar(255) NOT NULL,
`logging_attempts` int(11) NOT NULL DEFAULT '0',
`banned_until` varchar(16) NOT NULL DEFAULT '0',
@ -227,12 +227,12 @@ function ogpHome()
) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
}
$banlist_info = $db->resultQuery("SELECT logging_attempts, banned_until FROM `GSP_DB_PREFIXban_list` WHERE client_ip='".$client_ip."';");
$banlist_info = $db->resultQuery("SELECT logging_attempts, banned_until FROM `OGP_DB_PREFIXban_list` WHERE client_ip='".$client_ip."';");
$login_attempts = !$banlist_info ? 0 : $banlist_info['0']['logging_attempts'];
if( $banlist_info AND $banlist_info['0']['banned_until'] > 0 AND $banlist_info['0']['banned_until'] <= time() )
{
$db->query("DELETE FROM `GSP_DB_PREFIXban_list` WHERE client_ip='$client_ip';");
$db->query("DELETE FROM `OGP_DB_PREFIXban_list` WHERE client_ip='$client_ip';");
$login_attempts = 0;
}
@ -308,9 +308,9 @@ function ogpHome()
$_SESSION['users_api_key'] = $db->getApiToken($userInfo['user_id']);
print_success( get_lang("logging_in") ."...");
$db->logger( get_lang("logging_in") ."...");
$db->query("DELETE FROM `GSP_DB_PREFIXban_list` WHERE client_ip='$client_ip';");
$db->query("DELETE FROM `OGP_DB_PREFIXban_list` WHERE client_ip='$client_ip';");
//find number of servers user has. if zero, then redirect to the shop page.
$result = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE user_id='".$_SESSION['user_id']."' AND status < 1 ");
$result = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE user_id='".$_SESSION['user_id']."' AND status < 1 ");
$servercount = 0;
foreach($result as $servers)
{
@ -341,26 +341,26 @@ function ogpHome()
$banned_until = time() + (array_key_exists("login_ban_time" , $settings) && !empty($settings["login_ban_time"]) && is_numeric($settings["login_ban_time"]) ? $settings["login_ban_time"] : 300); // Five minutes or user defined setting.
if( !$banlist_info )
$db->query("INSERT INTO `GSP_DB_PREFIXban_list` (`client_ip`) VALUES('$client_ip');");
$db->query("INSERT INTO `OGP_DB_PREFIXban_list` (`client_ip`) VALUES('$client_ip');");
$db->logger( get_lang("bad_login") . " ( Banned until " . date("r", $banned_until) . " ) [ " . login . ": $_POST[ulogin], " . password . ": ******** ]" );
$db->query("UPDATE `GSP_DB_PREFIXban_list` SET logging_attempts='$login_attempts', banned_until='$banned_until' WHERE client_ip='$client_ip';");
$db->query("UPDATE `OGP_DB_PREFIXban_list` SET logging_attempts='$login_attempts', banned_until='$banned_until' WHERE client_ip='$client_ip';");
print_failure("Banned until " . date("r",$banned_until));
}
else
{
if( !$banlist_info )
$db->query("INSERT INTO `GSP_DB_PREFIXban_list` (`client_ip`) VALUES('$client_ip');");
$db->query("INSERT INTO `OGP_DB_PREFIXban_list` (`client_ip`) VALUES('$client_ip');");
$db->logger( get_lang("bad_login") . " ( $login_attempts ) [ " . login . ": $_POST[ulogin], " . password . ": ******** ]" );
$db->query("UPDATE `GSP_DB_PREFIXban_list` SET logging_attempts='$login_attempts' WHERE client_ip='$client_ip';");
$db->query("UPDATE `OGP_DB_PREFIXban_list` SET logging_attempts='$login_attempts' WHERE client_ip='$client_ip';");
$view->refresh("index.php",2);
}
}
//ADD USERS IN BANNED GROUP TO BAN TABLE
if($userInfo['users_role'] == "banned")
{
$db->query("INSERT INTO `GSP_DB_PREFIXban_list` (`client_ip`,`logging_attempts`) VALUES('$client_ip','-1');");
$db->query("INSERT INTO `OGP_DB_PREFIXban_list` (`client_ip`,`logging_attempts`) VALUES('$client_ip','-1');");
$db->logger("BANNED: Added IP ".$client_ip." to ban table of banned user " . $_POST[ulogin]);
}