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

@ -10,7 +10,7 @@ function create_selection($selection,$flag)
<td align='left'><input id='".clean_id_string($selection)."' type='checkbox' name='".$selection."' value='1' checked='checked' /></td></tr><tr>
<td align='left' class='info' colspan='2'>".get_lang($selection.'_info')."</td></tr>";
}
function exec_gsp_module()
function exec_ogp_module()
{
global $db, $settings;
global $view;
@ -81,7 +81,7 @@ function exec_gsp_module()
}
foreach ( $remote_servers as $server )
{
if($server['remote_server_id'] == $rserver_id) $gsp_user = $server['gsp_user'];
if($server['remote_server_id'] == $rserver_id) $ogp_user = $server['ogp_user'];
}
foreach ( $users as $user )
{
@ -90,7 +90,7 @@ function exec_gsp_module()
$ftppassword = genRandomString(8);
// Game path logic
$game_path = "/home/".$gsp_user."/GSP_User_Files/"; // Default
$game_path = "/home/".$ogp_user."/OGP_User_Files/"; // Default
$skipId = false;
if(hasValue($default_home_dir)){
@ -118,7 +118,7 @@ function exec_gsp_module()
if($success){
$home_info = $db->getGameHomeWithoutMods($new_home_id);
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']);
// Create new home directory if it doesn't already exist
$remote->exec("mkdir -p " . clean_path($game_path) . (!$skipId ? $new_home_id : ""));
@ -166,7 +166,7 @@ function exec_gsp_module()
$rhost_id = $_POST['rserver_id'];
$remote_server = $db->getRemoteServer($rhost_id);
require_once('includes/lib_remote.php');
$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)
$os = $remote->what_os();

View file

@ -14,7 +14,7 @@ function create_selection($selection,$flag,$access_rights)
return $right;
}
function exec_gsp_module()
function exec_ogp_module()
{
global $db;

View file

@ -27,7 +27,7 @@ function litefm_check($home_id)
return TRUE;
}
function exec_gsp_module()
function exec_ogp_module()
{
$home_id = $_REQUEST['home_id'];
@ -54,7 +54,7 @@ function exec_gsp_module()
litefm_check($home_id);
$remote = new GSPRemoteLibrary($home_cfg['agent_ip'], $home_cfg['agent_port'], $home_cfg['encryption_key'], $home_cfg['timeout']);
$remote = new OGPRemoteLibrary($home_cfg['agent_ip'], $home_cfg['agent_port'], $home_cfg['encryption_key'], $home_cfg['timeout']);
if($isAdmin and isset($_GET['all_fs']))
$path = clean_path("/".@$_SESSION['browser_cwd_'.$home_id]);

View file

@ -3,10 +3,10 @@
* Component of the user_games module
*/
function exec_gsp_module()
function exec_ogp_module()
{
global $db;
$expired_servers = $db->resultQuery("SELECT home_name, home_id, server_expiration_date FROM GSP_DB_PREFIXserver_homes WHERE server_expiration_date NOT LIKE 'X' AND server_expiration_date <= ".time().";");
$expired_servers = $db->resultQuery("SELECT home_name, home_id, server_expiration_date FROM OGP_DB_PREFIXserver_homes WHERE server_expiration_date NOT LIKE 'X' AND server_expiration_date <= ".time().";");
if($expired_servers)
{
foreach($expired_servers as $expired_server)
@ -16,7 +16,7 @@ function exec_gsp_module()
}
}
$expired_users = $db->resultQuery("SELECT user_id, home_id, user_expiration_date FROM GSP_DB_PREFIXuser_homes WHERE user_expiration_date NOT LIKE 'X' AND user_expiration_date <= ".time().";");
$expired_users = $db->resultQuery("SELECT user_id, home_id, user_expiration_date FROM OGP_DB_PREFIXuser_homes WHERE user_expiration_date NOT LIKE 'X' AND user_expiration_date <= ".time().";");
if($expired_users)
{
foreach($expired_users as $expired_user)
@ -27,9 +27,9 @@ function exec_gsp_module()
}
$expired_groups = $db->resultQuery("SELECT g.group_id, g.home_id, g.user_group_expiration_date, ug.user_id
FROM GSP_DB_PREFIXuser_group_homes g
FROM OGP_DB_PREFIXuser_group_homes g
INNER JOIN
GSP_DB_PREFIXuser_groups ug
OGP_DB_PREFIXuser_groups ug
ON ug.group_id=g.group_id
WHERE g.user_group_expiration_date NOT LIKE 'X' AND g.user_group_expiration_date <= ".time()." GROUP BY g.home_id;");
if($expired_groups)

View file

@ -3,7 +3,7 @@
* Component of the user_games module
*/
function exec_gsp_module()
function exec_ogp_module()
{
global $db, $settings;
@ -25,7 +25,7 @@ function exec_gsp_module()
echo create_back_button('user_games');
include_once('includes/lib_remote.php');
$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']);
if(isset($_REQUEST['clone_home']))
{
@ -35,7 +35,7 @@ function exec_gsp_module()
$web_user = $web_user["users_login"];
// Game path logic
$game_path = "/home/".$server_row['gsp_user']."/GSP_User_Files/"; // Default
$game_path = "/home/".$server_row['ogp_user']."/OGP_User_Files/"; // Default
$skipId = false;
if(hasValue($default_home_dir)){
@ -179,7 +179,7 @@ function exec_gsp_module()
$ft->add_field('string','new_home_name',htmlentities($server_row['home_name']));
echo "<tr><td class='right'>".get_lang('clone_mods').":</td>
<td class='left'><input type='checkbox' name='clone_mods' value='y' /></td></tr>";
echo "<input name='user_group' type='hidden' value='".get_user_uid_gid_from_passwd($passwd_array,$server_row['gsp_user'])."' /></tr>";
echo "<input name='user_group' type='hidden' value='".get_user_uid_gid_from_passwd($passwd_array,$server_row['ogp_user'])."' /></tr>";
echo "</table>";
$ft->add_button('submit','clone_home',get_lang('clone_home'));
echo "<p class='info'>".get_lang('the_name_of_the_server_to_help_users_to_identify_it')."</p>";

View file

@ -64,7 +64,7 @@ function renderCustomFields($field, $home_id)
echo "</label></td></tr>\n";
}
function exec_gsp_module()
function exec_ogp_module()
{
global $db,$view,$custom_fields,$isAdmin;
@ -91,7 +91,7 @@ function exec_gsp_module()
$server_xml = read_server_config(SERVER_CONFIG_LOCATION.$home_info['home_cfg_file']);
include_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']);
echo "<h2>".get_lang('editing_home_called')." \"".htmlentities($home_info['home_name'])."\"</h2>";

View file

@ -7,8 +7,8 @@ function logHandling($home_id, $action = 'delete', &$remote){
$fileId = str_pad($home_id, 9, '0', STR_PAD_LEFT);
$files = array(
'screenlogs/screenlog.GSP_HOME_'.$fileId => 'file',
'screenlogs/screenlog.GSP_UPDATE_'.$fileId => 'file',
'screenlogs/screenlog.OGP_HOME_'.$fileId => 'file',
'screenlogs/screenlog.OGP_UPDATE_'.$fileId => 'file',
'screenlogs/home_id_'.$home_id.'/' => 'dir',
);
@ -29,7 +29,7 @@ function logHandling($home_id, $action = 'delete', &$remote){
}
}
function exec_gsp_module() {
function exec_ogp_module() {
global $db, $view;
require_once('includes/lib_remote.php');
$home_id = $_GET['home_id'];
@ -47,7 +47,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']);
$agent_online = $remote->status_chk() === 1;
if($y != 'y')

View file

@ -5,7 +5,7 @@
require_once("modules/config_games/server_config_parser.php");
function exec_gsp_module()
function exec_ogp_module()
{
global $db;
$isAdmin = $db->isAdmin( $_SESSION['user_id'] );
@ -53,7 +53,7 @@ function exec_gsp_module()
$server_xml = read_server_config(SERVER_CONFIG_LOCATION.$home_info['home_cfg_file']);
include_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']);
$ftp_installed = $db->isModuleInstalled('ftp');
if( isset($_REQUEST['change_name']) )
@ -413,7 +413,7 @@ function exec_gsp_module()
if ( $db->changeUserIdMain($home_id,$user_id_main) == TRUE )
{
$db->assignHomeTo("user",$user_id_main,$home_id,$old_home['access_rights']);
$query="UPDATE `gsp_billing_orders` SET `user_id`=".$user_id_main." WHERE `home_id` = ".$home_id.";";
$query="UPDATE `ogp_billing_orders` SET `user_id`=".$user_id_main." WHERE `home_id` = ".$home_id.";";
$db->query($query);
echo json_encode(array('result' => 'success', 'info' => get_lang("successfully_changed_game_server")));
$db->logger( get_lang("successfully_changed_game_server") ." HOME ID:$home_id - ". get_lang("change_user_id_main") .":$user_id_main");
@ -781,13 +781,13 @@ function exec_gsp_module()
if ( is_array($avail_ips) && !empty($avail_ips) )
{
echo "<h3>". get_lang("ips_and_ports") ."</h3>";
$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( ! $screen_running )
{
if( isset($_REQUEST['set_ip']) )
{
$ip_id = $db->real_escape_string($_POST['ip']);
$ip_row = $db->resultQuery( "SELECT ip FROM GSP_DB_PREFIXremote_server_ips WHERE ip_id=".$ip_id );
$ip_row = $db->resultQuery( "SELECT ip FROM OGP_DB_PREFIXremote_server_ips WHERE ip_id=".$ip_id );
$ip = $ip_row['0']['ip'];
$port = $_POST['port'];
$port = (int)(trim($port));

View file

@ -6,7 +6,7 @@ function numbersFormatting($bytes){
return sprintf('%1.2f' , $bytes / pow($base,$class)) . ' ' . $si_prefix[$class];
}
function exec_gsp_module()
function exec_ogp_module()
{
global $db;
$isAdmin = $db->isAdmin( $_SESSION['user_id'] );
@ -20,7 +20,7 @@ function exec_gsp_module()
if ( ! $game_home and ! $isAdmin )
return;
$remote = new GSPRemoteLibrary($game_home['agent_ip'], $game_home['agent_port'], $game_home['encryption_key'], $game_home['timeout']);
$remote = new OGPRemoteLibrary($game_home['agent_ip'], $game_home['agent_port'], $game_home['encryption_key'], $game_home['timeout']);
$r = $remote->rfile_exists($game_home['home_path']);
if($r == 1)
{
@ -42,7 +42,7 @@ function exec_gsp_module()
$total_size = 0;
foreach($game_homes as $game_home)
{
$remote = new GSPRemoteLibrary($game_home['agent_ip'], $game_home['agent_port'], $game_home['encryption_key'], $game_home['timeout']);
$remote = new OGPRemoteLibrary($game_home['agent_ip'], $game_home['agent_port'], $game_home['encryption_key'], $game_home['timeout']);
$r = $remote->rfile_exists($game_home['home_path']);
if($r == 1)
{

View file

@ -5,7 +5,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, $settings;
$home_id = $_GET['home_id'];
@ -14,7 +14,7 @@ function exec_gsp_module()
$enabled_mods = $db->getHomeMods($home_id);
$home_info = $db->getGameHomeWithoutMods($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']);
if( empty($enabled_mods) )
{
$cpu_count = $remote->cpu_count();

View file

@ -5,7 +5,7 @@
require_once("modules/config_games/server_config_parser.php");
function exec_gsp_module()
function exec_ogp_module()
{
$home_id = $_GET['home_id'];
$mod_id = $_GET['mod_id'];
@ -23,12 +23,12 @@ function exec_gsp_module()
$precmd = $db->real_escape_string($_POST['edit_preinstall_cmds']);
if( isset( $_POST['save_as_default'] ) )
{
$game_mod_query = "UPDATE GSP_DB_PREFIXconfig_mods SET def_precmd='$precmd' WHERE mod_cfg_id='$mod_cfg_id'";
$game_mod_query = "UPDATE OGP_DB_PREFIXconfig_mods SET def_precmd='$precmd' WHERE mod_cfg_id='$mod_cfg_id'";
$db->query($game_mod_query);
}
else
{
$game_mod_query = "UPDATE GSP_DB_PREFIXgame_mods SET precmd='$precmd' WHERE mod_id='$mod_id'";
$game_mod_query = "UPDATE OGP_DB_PREFIXgame_mods SET precmd='$precmd' WHERE mod_id='$mod_id'";
$db->query($game_mod_query);
}
$home_info = $db->getGameHome($home_id);
@ -39,12 +39,12 @@ function exec_gsp_module()
$postcmd = $db->real_escape_string($_POST['edit_postinstall_cmds']);
if( isset( $_POST['save_as_default'] ) )
{
$game_mod_query = "UPDATE GSP_DB_PREFIXconfig_mods SET def_postcmd='$postcmd' WHERE mod_cfg_id='$mod_cfg_id'";
$game_mod_query = "UPDATE OGP_DB_PREFIXconfig_mods SET def_postcmd='$postcmd' WHERE mod_cfg_id='$mod_cfg_id'";
$db->query($game_mod_query);
}
else
{
$game_mod_query = "UPDATE GSP_DB_PREFIXgame_mods SET postcmd='$postcmd' WHERE mod_id='$mod_id'";
$game_mod_query = "UPDATE OGP_DB_PREFIXgame_mods SET postcmd='$postcmd' WHERE mod_id='$mod_id'";
$db->query($game_mod_query);
}
$home_info = $db->getGameHome($home_id);

View file

@ -13,22 +13,22 @@ $module_menus = array(
);
$install_queries = array();
$install_queries[0] = array(
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."user_homes`;",
"CREATE TABLE IF NOT EXISTS ".GSP_DB_PREFIX."user_homes (
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."user_homes`;",
"CREATE TABLE IF NOT EXISTS ".OGP_DB_PREFIX."user_homes (
`home_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`access_rights` varchar(63) default NULL,
PRIMARY KEY (`user_id`,`home_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;",
"DROP TABLE IF EXISTS ".GSP_DB_PREFIX."user_group_remote_servers;",
"CREATE TABLE ".GSP_DB_PREFIX."user_group_remote_servers (
"DROP TABLE IF EXISTS ".OGP_DB_PREFIX."user_group_remote_servers;",
"CREATE TABLE ".OGP_DB_PREFIX."user_group_remote_servers (
`remote_server_id` int(11) NOT NULL,
`group_id` int(11) NOT NULL,
`access_rights` varchar(63) default NULL,
PRIMARY KEY (`remote_server_id`, `group_id`)
)ENGINE=MyISAM DEFAULT CHARSET=latin1;",
"DROP TABLE IF EXISTS ".GSP_DB_PREFIX."user_group_homes;",
"CREATE TABLE ".GSP_DB_PREFIX."user_group_homes (
"DROP TABLE IF EXISTS ".OGP_DB_PREFIX."user_group_homes;",
"CREATE TABLE ".OGP_DB_PREFIX."user_group_homes (
`home_id` int(11) NOT NULL,
`group_id` int(11) NOT NULL,
`access_rights` varchar(63) default NULL,
@ -36,8 +36,8 @@ $install_queries[0] = array(
)ENGINE=MyISAM DEFAULT CHARSET=latin1;");
$install_queries[1] = array(
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."master_server_homes`;",
"CREATE TABLE IF NOT EXISTS ".GSP_DB_PREFIX."master_server_homes (
"DROP TABLE IF EXISTS `".OGP_DB_PREFIX."master_server_homes`;",
"CREATE TABLE IF NOT EXISTS ".OGP_DB_PREFIX."master_server_homes (
`home_id` int(11) NOT NULL,
`home_cfg_id` int(11) NOT NULL,
`remote_server_id` int(11) NOT NULL,
@ -45,9 +45,9 @@ $install_queries[1] = array(
)ENGINE=MyISAM DEFAULT CHARSET=latin1;");
$install_queries[2] = array(
"ALTER TABLE `".GSP_DB_PREFIX."user_homes` ADD `user_expiration_date` VARCHAR(21) NOT NULL default 'X';",
"ALTER TABLE `".GSP_DB_PREFIX."user_group_homes` ADD `user_group_expiration_date` VARCHAR(21) NOT NULL default 'X';");
"ALTER TABLE `".OGP_DB_PREFIX."user_homes` ADD `user_expiration_date` VARCHAR(21) NOT NULL default 'X';",
"ALTER TABLE `".OGP_DB_PREFIX."user_group_homes` ADD `user_group_expiration_date` VARCHAR(21) NOT NULL default 'X';");
$install_queries[3] = array(
"ALTER TABLE `".GSP_DB_PREFIX."game_mods` modify column `cpu_affinity` varchar(64) null AFTER `extra_params`, comment = 'utf8mb4_general_ci';");
"ALTER TABLE `".OGP_DB_PREFIX."game_mods` modify column `cpu_affinity` varchar(64) null AFTER `extra_params`, comment = 'utf8mb4_general_ci';");
?>

View file

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