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

@ -91,7 +91,7 @@ function get_start_cmd($user_info,$remote,$server_xml,$home_info,$mod_id,$ip,$po
$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) )
@ -342,7 +342,7 @@ function get_faster_rsync($rsync_sites)
}
if($faster == "NONE")
$faster = "rsync.gameservers-world.com";
$faster = "rsync.opengamepanel.org";
return $faster;
}

View file

@ -6,6 +6,6 @@ $db_host="localhost";
$db_user="localuser";
$db_pass="Pkloyn7yvpht!";
$db_name="panel";
$table_prefix="gsp_";
$table_prefix="ogp_";
$db_type="mysql";
?>

View file

@ -3,9 +3,9 @@
* Database connection and query functions
*/
define("GSP_DB_PREFIX", "GSP_DB_PREFIX");
define("OGP_DB_PREFIX", "OGP_DB_PREFIX");
abstract class GSPDatabase {
abstract class OGPDatabase {
protected $queries_ = 0;
@ -134,7 +134,7 @@ abstract class GSPDatabase {
abstract public function getCurrentHomeConfigMods($clear_all);
abstract public function updateGSPGameModsWithNewIDs($oldModStructure);
abstract public function updateOGPGameModsWithNewIDs($oldModStructure);
abstract public function clearGameCfgs($clear_all);

View file

@ -12,7 +12,7 @@ function real_escape_string_recursive(&$item, $key, $link){
$item = $this->realEscapeSingle($item);
}
class GSPDatabaseMySQL extends GSPDatabase
class OGPDatabaseMySQL extends OGPDatabase
{
protected $link;
@ -938,7 +938,7 @@ class GSPDatabaseMySQL extends GSPDatabase
return false;
}
public function updateGSPGameModsWithNewIDs($oldModStructure){
public function updateOGPGameModsWithNewIDs($oldModStructure){
$currentStructure = $this->getCurrentHomeConfigMods(false);
if(isset($oldModStructure) && is_array($oldModStructure) && isset($currentStructure) && is_array($currentStructure)){
@ -1144,7 +1144,7 @@ class GSPDatabaseMySQL extends GSPDatabase
{
if ( !$this->link ) return FALSE;
$query = str_replace( "GSP_DB_PREFIX", $this->table_prefix, $query );
$query = str_replace( "OGP_DB_PREFIX", $this->table_prefix, $query );
++$this->queries_;
mysqli_query($this->link,$query);
@ -1159,7 +1159,7 @@ class GSPDatabaseMySQL extends GSPDatabase
/// \brief This query return array of values or false on failure.
public function resultQuery( $query ) {
$query = str_replace( "GSP_DB_PREFIX", $this->table_prefix, $query );
$query = str_replace( "OGP_DB_PREFIX", $this->table_prefix, $query );
return $this->listQuery($query);
}
@ -1217,7 +1217,7 @@ class GSPDatabaseMySQL extends GSPDatabase
return false;
$rhost_name = trim($rhost_name);
$query = sprintf("INSERT INTO `%sremote_servers` (`agent_ip`,remote_server_name,gsp_user,agent_port,ftp_ip,ftp_port,`encryption_key`,timeout,use_nat,display_public_ip)
$query = sprintf("INSERT INTO `%sremote_servers` (`agent_ip`,remote_server_name,ogp_user,agent_port,ftp_ip,ftp_port,`encryption_key`,timeout,use_nat,display_public_ip)
VALUES('%s','%s','%s','%d','%s','%s','%s','%s','%s','%s');",
$this->table_prefix,
$this->realEscapeSingle($rhost_ip),
@ -1379,7 +1379,7 @@ class GSPDatabaseMySQL extends GSPDatabase
$query = sprintf("UPDATE %sremote_servers SET agent_ip='%s',
agent_port='%s', encryption_key='%s',
remote_server_name='%s',
gsp_user='%s',
ogp_user='%s',
ftp_ip='%s',
ftp_port='%s',
timeout='%s',
@ -3370,7 +3370,7 @@ class GSPDatabaseMySQL extends GSPDatabase
$user_id = isset($_SESSION['user_id']) ? $_SESSION['user_id'] : 0;
$client_ip = getClientIPAddress();
$message = $this->realEscapeSingle($message);
$this->query("INSERT INTO GSP_DB_PREFIXlogger (date, user_id, ip, message) VALUE (FROM_UNIXTIME(UNIX_TIMESTAMP(), '%d-%m-%Y %H:%i:%s'), $user_id, '$client_ip', '$message');");
$this->query("INSERT INTO OGP_DB_PREFIXlogger (date, user_id, ip, message) VALUE (FROM_UNIXTIME(UNIX_TIMESTAMP(), '%d-%m-%Y %H:%i:%s'), $user_id, '$client_ip', '$message');");
}
public function get_logger_count($search_field) {
@ -3762,7 +3762,7 @@ class GSPDatabaseMySQL extends GSPDatabase
case 'server':
require_once('includes/lib_remote.php');
$home_info = $this->getGameHomeWithoutMods($home_id);
$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']);
$agent_online = $remote->status_chk() === 1;
if( $agent_online )
{

View file

@ -112,7 +112,7 @@ class FormTable {
print_failure(get_lang_f('invalid_setting_type',$type));
}
if ( defined("GSP_LANG_".$name."_info") )
if ( defined("OGP_LANG_".$name."_info") )
{
echo "</td><td><div class='image-tip' id='".$this->i."' ><img src='images/icon_help_small.gif' ><span class='tip' id='".$this->i."' >".str_replace("'",'"',get_lang($name."_info"))."</span></div></td></tr>";
$this->i++;
@ -128,7 +128,7 @@ class FormTable {
echo "<tr><td align='right' $td_extra><label for='".$name."'>".get_lang($name).":</label></td>";
echo "<td align='left'>".$data."</td>\n";
if ( defined("GSP_LANG_".$name."_info") )
if ( defined("OGP_LANG_".$name."_info") )
{
echo "<td><div class='image-tip' id='".$this->i."' ><img src='images/icon_help_small.gif' ><span class='tip' id='".$this->i."' >".str_replace("'",'"',get_lang($name."_info"))."</span></div></td>\n</tr>\n";
$this->i++;

View file

@ -150,7 +150,7 @@ function get_map_path($query_name,$mod,$map) {
return get_first_existing_file($map_paths, 'http://gametracker.com', 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0');
}
// Thanks adjo (http://gameserver-panel.org/forum/viewthread.php?thread_id=5209#post_25073)
// Thanks adjo (http://opengamepanel.org/forum/viewthread.php?thread_id=5209#post_25073)
function curlCacheImage($cachePath, $resource){
if(preg_match('/^(https?:\/\/)/', $resource)){
$map = explode('/', $resource);
@ -365,7 +365,7 @@ function mymail($email_address, $subject, $message, $panel_settings, $user_to_pa
}
if(empty($panel_settings['panel_email_address'])){
$panel_email = "noreply@gameserver-panel.org";
$panel_email = "noreply@opengamepanel.org";
}else{
$panel_email = $panel_settings['panel_email_address'];
}
@ -626,7 +626,7 @@ function getClientIPAddress(){
return $_SERVER['REMOTE_ADDR'];
}
function getGSPSiteURL(){
function getOGPSiteURL(){
$url = '';
$scheme = ( isset($_SERVER['HTTPS']) and get_true_boolean($_SERVER['HTTPS']) ) ? "https://" : "http://";
$url .= $scheme;
@ -1047,7 +1047,7 @@ function deleteMysqlAddonDatabasesForGameServerHome($home_id){
if($mysql_db['remote_server_id'] != "0")
{
$remote_server = $db->getRemoteServer($mysql_db['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']);
$host_stat = $remote->status_chk();
if($host_stat === 1 )
{

View file

@ -4,7 +4,7 @@
*/
// Globals
$GSPLangPre = "GSP_LANG_";
$OGPLangPre = "OGP_LANG_";
// Ignore any request with unwanted values at 'm' or 'p'
if( isset($_REQUEST['m']) and !preg_match("/^([a-z]|[0-9]|_|-)+$/i", $_REQUEST['m']) )
@ -33,8 +33,8 @@ function createDatabaseConnection($db_type,$db_host,$db_user,$db_pass,$db_name,$
if ( function_exists('mysqli_connect') )
require_once("includes/database_mysqli.php");
else
die("<p class='failure'>GSP requires the <a href='http://php.net/manual/en/book.mysqli.php' target='_blank'>mysqli PHP extension</a>. Please install it, and then try again.</p>");
$database = new GSPDatabaseMysql();
die("<p class='failure'>OGP requires the <a href='http://php.net/manual/en/book.mysqli.php' target='_blank'>mysqli PHP extension</a>. Please install it, and then try again.</p>");
$database = new OGPDatabaseMysql();
$connect_value = $database->connect($db_host,$db_user,$db_pass,$db_name,$table_prefix);
if ($connect_value === TRUE)
@ -51,7 +51,7 @@ function createDatabaseConnection($db_type,$db_host,$db_user,$db_pass,$db_name,$
function get_db_error_text ($db_retval, &$error_text)
{
if (is_a($db_retval,"GSPDatabase"))
if (is_a($db_retval,"OGPDatabase"))
return FALSE;
switch ($db_retval) {
@ -229,7 +229,7 @@ function sanitizeInputStr($strToProcess, $removeHTML = true, $trim = true, $remo
function startSession(){
if(!isset($_SESSION)){
session_name("gameserver-panel_web");
session_name("opengamepanel_web");
session_start();
}
}
@ -410,9 +410,9 @@ function runPostUpdateOperations(){
}
}
function getGSPGitHubURL($gitHubUsername, $repo){
$GSPGitHub = "https://github.com/Gameservers-World/";
$gitHubURL = $GSPGitHub;
function getOGPGitHubURL($gitHubUsername, $repo){
$OGPGitHub = "https://github.com/OpenGamePanel/";
$gitHubURL = $OGPGitHub;
if(isset($gitHubUsername) && !empty($gitHubUsername)){
$gitHubURL = "https://github.com/" . $gitHubUsername . "/";
}
@ -423,12 +423,12 @@ function getGSPGitHubURL($gitHubUsername, $repo){
return $gitHubURL;
}
return $GSPGitHub;
return $OGPGitHub;
}
function getGSPGitHubURLUnstrict($gitHubUsername){
$GSPGitHub = "https://github.com/Gameservers-World/";
$gitHubURL = $GSPGitHub;
function getOGPGitHubURLUnstrict($gitHubUsername){
$OGPGitHub = "https://github.com/OpenGamePanel/";
$gitHubURL = $OGPGitHub;
if(isset($gitHubUsername) && !empty($gitHubUsername)){
$gitHubURL = "https://github.com/" . $gitHubUsername . "/";
}
@ -440,7 +440,7 @@ function getGSPGitHubURLUnstrict($gitHubUsername){
return $gitHubURL;
}
return $GSPGitHub;
return $OGPGitHub;
}
function getGitHubOrganization($gitHubURL){
@ -456,13 +456,13 @@ function getGitHubOrganization($gitHubURL){
return $gitHubOrg;
}
function getGSPLangConstantsJSON(){
global $GSPLangPre;
function getOGPLangConstantsJSON(){
global $OGPLangPre;
$finalConsts = array();
$consts = get_defined_constants(true);
foreach($consts["user"] as $key => $value){
if(startsWith($key, $GSPLangPre)){
if(startsWith($key, $OGPLangPre)){
$finalConsts[$key] = $value;
}
}

View file

@ -17,11 +17,11 @@ function add_lang_module($lang_module)
{
global $lang_modules;
array_push($lang_modules,$lang_module);
// Need to reload langs if module is added after the first gspLang call.
gspLang();
// Need to reload langs if module is added after the first ogpLang call.
ogpLang();
}
function gspLang()
function ogpLang()
{
global $lang_modules;
$locale_files = makefilelist("lang/", ".|..|.svn", true, "folders");
@ -68,15 +68,15 @@ function gspLang()
function get_lang($lang_index)
{
global $GSPLangPre;
global $OGPLangPre;
if (defined($lang_index))
{
return constant($lang_index);
}
if(!startsWith($lang_index, $GSPLangPre)){
$newLangIndex = $GSPLangPre . $lang_index;
if(!startsWith($lang_index, $OGPLangPre)){
$newLangIndex = $OGPLangPre . $lang_index;
if (defined($newLangIndex))
{
return constant($newLangIndex);
@ -89,7 +89,7 @@ function get_lang($lang_index)
function get_lang_f()
{
global $GSPLangPre;
global $OGPLangPre;
$args = func_get_args();
$lang_index = array_shift($args);
@ -98,8 +98,8 @@ function get_lang_f()
return vsprintf(constant($lang_index),$args);
}
if(!startsWith($lang_index, $GSPLangPre)){
$newLangIndex = $GSPLangPre . $lang_index;
if(!startsWith($lang_index, $OGPLangPre)){
$newLangIndex = $OGPLangPre . $lang_index;
if (defined($newLangIndex))
{
return vsprintf(constant($newLangIndex),$args);

View file

@ -6,12 +6,12 @@
require_once("Crypt/XXTEA.php");
// Screen type for servers
define("GSP_SCREEN_TYPE_HOME","HOME");
define("GSP_SCREEN_TYPE_UPDATE","UPDATE");
define("OGP_SCREEN_TYPE_HOME","HOME");
define("OGP_SCREEN_TYPE_UPDATE","UPDATE");
define("AGENT_ERROR_NOT_EXECUTABLE",-13);
class GSPRemoteLibrary
class OGPRemoteLibrary
{
private $port;
private $host;

View file

@ -78,13 +78,13 @@ function navigation() {
include_once( $include_file );
if ( !function_exists( 'exec_gsp_module' ) )
if ( !function_exists( 'exec_ogp_module' ) )
{
print_failure("Missing module execute function.");
return;
}
exec_gsp_module();
exec_ogp_module();
return;
}
print_failure("Invalid subpage given.");
@ -94,12 +94,12 @@ function navigation() {
else if ( is_file( MODULES.$_REQUEST['m'].'/'.$_REQUEST['m'].'.php') )
{
include( MODULES.$_REQUEST['m'].'/'.$_REQUEST['m'].'.php');
if ( !function_exists( 'exec_gsp_module' ) )
if ( !function_exists( 'exec_ogp_module' ) )
{
print_failure("Missing module execute function.");
return;
}
exec_gsp_module();
exec_ogp_module();
}
// If files above are not found then we print an error.
else

View file

@ -5,7 +5,7 @@
define("DEFAULT_REFRESH_TIME","2");
class GSPView {
class OGPView {
private $meta;
private $title;
@ -29,9 +29,9 @@ class GSPView {
function menu(){}
function printView($cleared = false, $dataType = "html") {
global $db, $GSPLangPre;
global $db, $OGPLangPre;
if ( is_object($db) && array_key_exists( "GSPDatabase", class_parents($db) ) ) {
if ( is_object($db) && array_key_exists( "OGPDatabase", class_parents($db) ) ) {
$panel_settings = $db->getSettings();
}
@ -80,9 +80,9 @@ class GSPView {
$this->title = $title == "" ? $this->title : $this->title . " [$title]";
// Dump defined constants to json (for language javascript)
$jsonStrConsts = getGSPLangConstantsJSON();
$jsonStrConsts = getOGPLangConstantsJSON();
if($jsonStrConsts !== false){
$this->header_code .= '<script type="text/javascript">var langConsts = ' . $jsonStrConsts . ';' . "\n" . 'var langConstPrefix = "' . $GSPLangPre . '";</script>' . "\n";
$this->header_code .= '<script type="text/javascript">var langConsts = ' . $jsonStrConsts . ';' . "\n" . 'var langConstPrefix = "' . $OGPLangPre . '";</script>' . "\n";
}
// Include jQuery, jQuery UI, and our global CSS file in the header code
@ -110,7 +110,7 @@ class GSPView {
$javascript .= '</script>' . "\n";
// Include global JS for modules
if(is_object($db) && array_key_exists("GSPDatabase", class_parents($db))){
if(is_object($db) && array_key_exists("OGPDatabase", class_parents($db))){
foreach($db->getInstalledModules() as $m)
{
$global_js_file = 'js/' . MODULES . "{$m['folder']}_global.js";
@ -194,14 +194,14 @@ class GSPView {
$footer = "";
if ( is_object($db) && array_key_exists( "GSPDatabase", class_parents($db) ) ) {
if ( is_object($db) && array_key_exists( "OGPDatabase", class_parents($db) ) ) {
$footer .= "<div class=\"footer center\">";
$footer .= get_lang_f('cur_theme', !empty($_SESSION['users_theme']) ? $_SESSION['users_theme'] : @$panel_settings['theme']) . " - " . $db->getNbOfQueries()." ".get_lang('queries_executed');
$footer .= "<br />".get_lang('copyright')." &copy; <a href=\"http://www.gameservers-world.com\">GameServer Panel</a> " . date("Y") . " - ".get_lang('all_rights_reserved')." - <span class='versionInfo'>".get_lang('show_version')."</span><br /><div class='inline-block GSPVersionArea'><span class='version hide'>" . get_lang('version') . ":</span>&nbsp; <span class='hide versionNumber'>".@$panel_settings['gsp_version']."</span> <span class='copyVersionResult' lang='" . get_lang('copied') . "'></span></div></div>";
$footer .= "<br />".get_lang('copyright')." &copy; <a href=\"http://www.opengamepanel.org\">Open Game Panel</a> " . date("Y") . " - ".get_lang('all_rights_reserved')." - <span class='versionInfo'>".get_lang('show_version')."</span><br /><div class='inline-block OGPVersionArea'><span class='version hide'>" . get_lang('version') . ":</span>&nbsp; <span class='hide versionNumber'>".@$panel_settings['ogp_version']."</span> <span class='copyVersionResult' lang='" . get_lang('copied') . "'></span></div></div>";
}
else
{
$footer .= "<div class='footer center'>".get_lang('copyright')." &copy; <a href=\"http://www.gameserver-panel.org\">Open Game Panel</a> " . date("Y") . " - ".get_lang('all_rights_reserved').".</div>";
$footer .= "<div class='footer center'>".get_lang('copyright')." &copy; <a href=\"http://www.opengamepanel.org\">Open Game Panel</a> " . date("Y") . " - ".get_lang('all_rights_reserved').".</div>";
}
// Add our magnific popup holder to the page (hidden element):