Merge pull request #14 from Gameservers-World/copilot/fix-8fc6c99c-d1c4-4910-a47a-f763647bf0e7
Complete rebrand from Open Game Panel (OGP) to GameServer Panel (GSP)
This commit is contained in:
commit
02c94766c6
308 changed files with 1412 additions and 1412 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Should Remote Agent Code Be Included?
|
||||
|
||||
Based on my analysis of the Open Game Panel architecture, **I recommend including both the Linux and Windows agent code in this repository**. Here's why:
|
||||
Based on my analysis of the GameServer Panel architecture, **I recommend including both the Linux and Windows agent code in this repository**. Here's why:
|
||||
|
||||
## Benefits of Including Agent Code
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ panel/
|
|||
|
||||
### Phase 1: Repository Restructuring
|
||||
1. **Move Current Files**: Reorganize current web panel code into `/web` directory
|
||||
2. **Add Agent Code**: Clone and integrate OGP-Agent-Linux and OGP-Agent-Windows
|
||||
2. **Add Agent Code**: Clone and integrate GSP-Agent-Linux and GSP-Agent-Windows
|
||||
3. **Create Shared Libraries**: Extract common code into `/shared`
|
||||
4. **Update Paths**: Adjust all file references and includes
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Open Game Panel (OGP) Architecture Documentation
|
||||
# GameServer Panel (GSP) Architecture Documentation
|
||||
|
||||
## Overview
|
||||
|
||||
Open Game Panel is a distributed game server management system consisting of three main components:
|
||||
GameServer Panel is a distributed game server management system consisting of three main components:
|
||||
|
||||
1. **Web Panel** (this repository) - PHP-based web interface for management
|
||||
2. **Linux Agent** - Remote agent for Linux game servers
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Open Game Panel Development Guide
|
||||
# GameServer Panel Development Guide
|
||||
|
||||
## Understanding the Codebase
|
||||
|
||||
This guide helps developers understand and work with the Open Game Panel codebase effectively.
|
||||
This guide helps developers understand and work with the GameServer Panel codebase effectively.
|
||||
|
||||
## Component Integration
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ $encrypted_data = $enc->encrypt($command_json);
|
|||
// modules/mymodule/mymodule.php
|
||||
|
||||
// Security check
|
||||
if (!defined('OGP_LANG')) {
|
||||
if (!defined('GSP_LANG')) {
|
||||
exit('Direct access not allowed');
|
||||
}
|
||||
|
||||
|
|
@ -145,8 +145,8 @@ $encrypted_data = $enc->encrypt($command_json);
|
|||
```php
|
||||
<?php
|
||||
// lang/English/modules/mymodule.php
|
||||
define('OGP_LANG_mymodule_title', 'My Module');
|
||||
define('OGP_LANG_mymodule_description', 'Module description');
|
||||
define('GSP_LANG_mymodule_title', 'My Module');
|
||||
define('GSP_LANG_mymodule_description', 'Module description');
|
||||
?>
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Open Game Panel - Project Statistics
|
||||
# GameServer Panel - Project Statistics
|
||||
|
||||
## Codebase Analysis
|
||||
|
||||
|
|
|
|||
18
README.md
18
README.md
|
|
@ -1,10 +1,10 @@
|
|||
# Open Game Panel - Enhanced Fork
|
||||
# GameServer Panel - Enhanced Fork
|
||||
|
||||
This repository contains an enhanced version of Open Game Panel (OGP) with AdminLTE theme integration and additional features. Open Game Panel is a comprehensive game server management system that allows hosting providers and users to easily manage game servers across multiple platforms.
|
||||
This repository contains an enhanced version of GameServer Panel (GSP) with AdminLTE theme integration and additional features. GameServer Panel is a comprehensive game server management system that allows hosting providers and users to easily manage game servers across multiple platforms.
|
||||
|
||||
## What is Open Game Panel?
|
||||
## What is GameServer Panel?
|
||||
|
||||
Open Game Panel is a distributed system consisting of:
|
||||
GameServer Panel is a distributed system consisting of:
|
||||
- **Web Panel** (this repository) - PHP-based web interface for server management
|
||||
- **Remote Agents** - Lightweight applications that run on game servers (Linux/Windows)
|
||||
- **Game Server Integration** - Support for 100+ games with automated installation and management
|
||||
|
|
@ -81,10 +81,10 @@ Open Game Panel is a distributed system consisting of:
|
|||
|
||||
## Related Repositories
|
||||
|
||||
This project is based on the original Open Game Panel:
|
||||
- [OpenGamePanel/OGP-Website](https://github.com/OpenGamePanel/OGP-Website) - Original web panel
|
||||
- [OpenGamePanel/OGP-Agent-Linux](https://github.com/OpenGamePanel/OGP-Agent-Linux) - Linux agent
|
||||
- [OpenGamePanel/OGP-Agent-Windows](https://github.com/OpenGamePanel/OGP-Agent-Windows) - Windows agent
|
||||
This project is based on the original GameServer Panel:
|
||||
- [OpenGamePanel/GSP-Website](https://github.com/OpenGamePanel/GSP-Website) - Original web panel
|
||||
- [OpenGamePanel/GSP-Agent-Linux](https://github.com/OpenGamePanel/GSP-Agent-Linux) - Linux agent
|
||||
- [OpenGamePanel/GSP-Agent-Windows](https://github.com/OpenGamePanel/GSP-Agent-Windows) - Windows agent
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ This project is licensed under the GNU General Public License v2.0 - see the [LI
|
|||
|
||||
## Support
|
||||
|
||||
- Original OGP Community: https://opengamepanel.org
|
||||
- GameServer Panel Community: https://gameservers-world.com
|
||||
- Issues and bug reports: Use GitHub Issues
|
||||
- Development discussions: See GitHub Discussions
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
# Open Game Panel - System Analysis Report
|
||||
# GameServer Panel - System Analysis Report
|
||||
|
||||
## Executive Summary
|
||||
|
||||
This repository contains a fork of the Open Game Panel (OGP) project, which is a comprehensive game server management system. After thorough analysis, I've documented the complete architecture and provide recommendations for integrating the remote agent code to create a unified development environment.
|
||||
This repository contains a fork of the GameServer Panel (GSP) project, which is a comprehensive game server management system. After thorough analysis, I've documented the complete architecture and provide recommendations for integrating the remote agent code to create a unified development environment.
|
||||
|
||||
## Original Project Context
|
||||
|
||||
The original Open Game Panel project is maintained by the OpenGamePanel organization on GitHub:
|
||||
- **Main Web Panel**: [OpenGamePanel/OGP-Website](https://github.com/OpenGamePanel/OGP-Website)
|
||||
- **Linux Agent**: [OpenGamePanel/OGP-Agent-Linux](https://github.com/OpenGamePanel/OGP-Agent-Linux)
|
||||
- **Windows Agent**: [OpenGamePanel/OGP-Agent-Windows](https://github.com/OpenGamePanel/OGP-Agent-Windows)
|
||||
The original GameServer Panel project is maintained by the OpenGamePanel organization on GitHub:
|
||||
- **Main Web Panel**: [OpenGamePanel/GSP-Website](https://github.com/OpenGamePanel/GSP-Website)
|
||||
- **Linux Agent**: [OpenGamePanel/GSP-Agent-Linux](https://github.com/OpenGamePanel/GSP-Agent-Linux)
|
||||
- **Windows Agent**: [OpenGamePanel/GSP-Agent-Windows](https://github.com/OpenGamePanel/GSP-Agent-Windows)
|
||||
- **Official Website**: opengamepanel.org (blocked in this environment)
|
||||
|
||||
## Current Repository State
|
||||
|
||||
This repository appears to be a customized version of the OGP web panel with:
|
||||
This repository appears to be a customized version of the GSP web panel with:
|
||||
- AdminLTE theme integration
|
||||
- Custom modules and functionality
|
||||
- Modified database configurations
|
||||
|
|
@ -109,4 +109,4 @@ The documentation includes detailed setup instructions for:
|
|||
- Testing procedures
|
||||
- Debugging techniques
|
||||
|
||||
This analysis provides you with a solid foundation for understanding the complex OGP codebase and making informed decisions about improvements and architectural changes.
|
||||
This analysis provides you with a solid foundation for understanding the complex GSP codebase and making informed decisions about improvements and architectural changes.
|
||||
12
TODO.md
12
TODO.md
|
|
@ -1,6 +1,6 @@
|
|||
# Gameservers World – Development & Operations TODO
|
||||
|
||||
This document tracks development tasks, infrastructure setup, and business steps for building our commercial game server community around the **GS Panel** (fork of OGP), aka **GSP**.
|
||||
This document tracks development tasks, infrastructure setup, and business steps for building our commercial game server community around the **GS Panel** (fork of GSP), aka **GSP**.
|
||||
The software is developed and maintained by **World Domination Software (WDS)**.
|
||||
|
||||
---
|
||||
|
|
@ -9,7 +9,7 @@ The software is developed and maintained by **World Domination Software (WDS)**.
|
|||
- [ ] Repo for GSW website
|
||||
- [ ] Repo for WDS website
|
||||
- [ ] Create organization for WDS
|
||||
- [ ] Create OGP-like section and forum/docs on WDS website
|
||||
- [ ] Create GSP-like section and forum/docs on WDS website
|
||||
- [ ] Repo for game post-install config scripts and files
|
||||
- [ ] Compare agent files — can we use the same files?
|
||||
- [ ] Add scripts for setting up servers with required files, DLL, settings
|
||||
|
|
@ -17,12 +17,12 @@ The software is developed and maintained by **World Domination Software (WDS)**.
|
|||
|
||||
---
|
||||
|
||||
## 1. Core Panel (OGP → GS Fork)
|
||||
## 1. Core Panel (GSP → GS Fork)
|
||||
- [ ] GSW is a host provider. GSP is a product of WDS. Brand as such. The WDS site needs to keep the forum and documentation.
|
||||
- [ ] Replace all references from **OGP** → **GS / Gameservers World**
|
||||
- [ ] Replace all references from **GSP** → **GS / Gameservers World**
|
||||
- [ ] Update UI text, branding, and logos
|
||||
- [ ] Create new default theme (dark/light mode support)
|
||||
- [ ] Review and clean up legacy OGP code no longer needed
|
||||
- [ ] Review and clean up legacy GSP code no longer needed
|
||||
- [ ] Update README.md with GS branding + installation instructions
|
||||
- [ ] Ensure GPL license text is preserved and updated with attribution
|
||||
- [ ] Remove `print` language as there is probably a better option now — which one?
|
||||
|
|
@ -130,6 +130,6 @@ The software is developed and maintained by **World Domination Software (WDS)**.
|
|||
---
|
||||
|
||||
# ✅ Notes
|
||||
- **GPL Compliance**: Keep OGP attribution in LICENSE, but rebrand UI and docs to GS.
|
||||
- **GPL Compliance**: Keep GSP attribution in LICENSE, but rebrand UI and docs to GS.
|
||||
- **Secrets**: Never commit live passwords or IPs to public repos — use `.env` or secrets repo.
|
||||
- **Testing**: Always stage DB changes, backup scripts, and automation before production.
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/*
|
||||
This FTP addon works with EHCP (www.ehcp.net)
|
||||
It allows OGP - the open game panel - to manage custom FTP user accounts
|
||||
It allows GSP - the GameServer Panel - to manage custom FTP user accounts
|
||||
|
||||
by own3mall
|
||||
*/
|
||||
|
|
@ -37,7 +37,7 @@ function addToLog($errors) {
|
|||
$createLog = fopen($logFile, 'a+');
|
||||
|
||||
if (!$createLog) {
|
||||
trigger_error("Unable to create EHCP FTP Integration log file! Please create a file named \"ehcp_ftp_log.txt\" in the ogp_agent install directory under the EHCP folder with permissions of 777", E_USER_NOTICE);
|
||||
trigger_error("Unable to create EHCP FTP Integration log file! Please create a file named \"ehcp_ftp_log.txt\" in the gsp_agent install directory under the EHCP folder with permissions of 777", E_USER_NOTICE);
|
||||
}
|
||||
fclose($createLog);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ use constant SCREEN_LOG_LOCAL => $Cfg::Preferences{screen_log_local};
|
|||
use constant DELETE_LOGS_AFTER => $Cfg::Preferences{delete_logs_after};
|
||||
use constant LINUX_USER_PER_GAME_SERVER => $Cfg::Preferences{linux_user_per_game_server};
|
||||
use constant AGENT_PID_FILE =>
|
||||
Path::Class::File->new(AGENT_RUN_DIR, 'ogp_agent.pid');
|
||||
Path::Class::File->new(AGENT_RUN_DIR, 'gsp_agent.pid');
|
||||
use constant AGENT_RSYNC_GENERIC_LOG =>
|
||||
Path::Class::File->new(AGENT_RUN_DIR, 'rsync_update_generic.log');
|
||||
use constant STEAM_LICENSE_OK => "Accept";
|
||||
|
|
@ -864,7 +864,7 @@ sub universal_start_without_decrypt
|
|||
}
|
||||
}
|
||||
|
||||
# Fix perms on ogp_agent user's homedir so that other users can access their owned files within this dir
|
||||
# Fix perms on gsp_agent user's homedir so that other users can access their owned files within this dir
|
||||
my $fixOGPHomeDirCommand = 'chmod -R ug+rwx $( getent passwd "' . $ogpAgentGroup . '" | cut -d: -f6 )';
|
||||
sudo_exec_without_decrypt($fixOGPHomeDirCommand);
|
||||
|
||||
|
|
@ -3800,19 +3800,19 @@ sub agent_restart
|
|||
if ($dec_check eq 'restart')
|
||||
{
|
||||
chdir AGENT_RUN_DIR;
|
||||
if(-e "ogp_agent_run.pid")
|
||||
if(-e "gsp_agent_run.pid")
|
||||
{
|
||||
my $init_pid = `cat ogp_agent_run.pid`;
|
||||
my $init_pid = `cat gsp_agent_run.pid`;
|
||||
chomp($init_pid);
|
||||
|
||||
if(kill 0, $init_pid)
|
||||
{
|
||||
my $or_exist = "";
|
||||
my $rm_pid_file = "";
|
||||
if(-e "ogp_agent.pid")
|
||||
if(-e "gsp_agent.pid")
|
||||
{
|
||||
$rm_pid_file = " ogp_agent.pid";
|
||||
my $agent_pid = `cat ogp_agent.pid`;
|
||||
$rm_pid_file = " gsp_agent.pid";
|
||||
my $agent_pid = `cat gsp_agent.pid`;
|
||||
chomp($agent_pid);
|
||||
if( kill 0, $agent_pid )
|
||||
{
|
||||
|
|
@ -3824,10 +3824,10 @@ sub agent_restart
|
|||
my $restart = "echo -n \"Stopping OGP Agent...\"\n".
|
||||
"kill $init_pid\n".
|
||||
"while [ -e /proc/$init_pid $or_exist ];do echo -n .;sleep 1;done\n".
|
||||
"rm -f ogp_agent_run.pid $rm_pid_file\necho \" [OK]\"\n".
|
||||
"rm -f gsp_agent_run.pid $rm_pid_file\necho \" [OK]\"\n".
|
||||
"echo -n \"Starting OGP Agent...\"\n".
|
||||
"screen -d -m -t \"ogp_agent\" -c \"" . SCREENRC_FILE . "\" -S ogp_agent bash ogp_agent_run -pidfile ogp_agent_run.pid\n".
|
||||
"while [ ! -e ogp_agent_run.pid -o ! -e ogp_agent.pid ];do echo -n .;sleep 1;done\n".
|
||||
"screen -d -m -t \"gsp_agent\" -c \"" . SCREENRC_FILE . "\" -S gsp_agent bash gsp_agent_run -pidfile gsp_agent_run.pid\n".
|
||||
"while [ ! -e gsp_agent_run.pid -o ! -e gsp_agent.pid ];do echo -n .;sleep 1;done\n".
|
||||
"echo \" [OK]\"\n".
|
||||
"rm -f tmp_restart.sh\n".
|
||||
"exit 0\n";
|
||||
|
|
@ -4648,7 +4648,7 @@ sub generate_post_install_scripts
|
|||
' fi'."\n".
|
||||
' fi'."\n".
|
||||
' if [ ! -d "${mods_info_path}" ];then mkdir -p "${mods_info_path}";fi'."\n".
|
||||
' echo "${mod_name[$i]}" > "${mods_info_path}${mod_string[$i]}.ogpmod"'."\n".
|
||||
' echo "${mod_name[$i]}" > "${mods_info_path}${mod_string[$i]}.gspmod"'."\n".
|
||||
' i=$(expr $i + 1)'."\n".
|
||||
'done'."\n";
|
||||
return "$post_install_scripts";
|
||||
|
|
@ -4666,7 +4666,7 @@ sub get_workshop_mods_info()
|
|||
my @mods_info;
|
||||
while(my $mod_info_file = readdir(MODS_INFO_DIR))
|
||||
{
|
||||
if($mod_info_file =~ /\.ogpmod$/)
|
||||
if($mod_info_file =~ /\.gspmod$/)
|
||||
{
|
||||
my $mod_info_file_path = Path::Class::File->new($mods_info_dir_path, $mod_info_file);
|
||||
if(open(my $fh, '<:encoding(UTF-8)', $mod_info_file_path))
|
||||
|
|
@ -121,7 +121,7 @@ detectSystemD(){
|
|||
echo -e "Updating OGP agent systemd service init script."
|
||||
echo -e "Copying ogp_agent systemd service file to $SystemDDir"
|
||||
echo "$sudoPass" | sudo -S -p "" cp "${AGENTDIR}/systemd/ogp_agent.service" "$SystemDDir"
|
||||
echo "$sudoPass" | sudo -S -p "" sed -i "s#{OGP_AGENT_PATH}#$AGENTDIR#g" "${SystemDDir}/ogp_agent.service"
|
||||
echo "$sudoPass" | sudo -S -p "" sed -i "s#{GSP_AGENT_PATH}#$AGENTDIR#g" "${SystemDDir}/ogp_agent.service"
|
||||
echo "$sudoPass" | sudo -S -p "" systemctl daemon-reload
|
||||
echo "$sudoPass" | sudo -S -p "" systemctl enable ogp_agent.service
|
||||
echo "$sudoPass" | sudo -S -p "" service ogp_agent restart
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Generic Init script if we can't find what kind of Linux we're on
|
||||
|
||||
agent_dir=OGP_AGENT_DIR
|
||||
agent_dir=GSP_AGENT_DIR
|
||||
agent_user=OGP_USER
|
||||
|
||||
# Start function.
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
### END INIT INFO
|
||||
#
|
||||
|
||||
agent_dir=OGP_AGENT_DIR
|
||||
agent_dir=GSP_AGENT_DIR
|
||||
agent_user=OGP_USER
|
||||
|
||||
#
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
# GF: Config is in $agent_dir/Cfg/Config.pm
|
||||
|
||||
agent_dir=OGP_AGENT_DIR
|
||||
agent_dir=GSP_AGENT_DIR
|
||||
agent_user=OGP_USER
|
||||
|
||||
depend() {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
# chkconfig: 2345 88 10
|
||||
# description: Startup/shutdown script for the Game Server Agent
|
||||
|
||||
agent_dir=OGP_AGENT_DIR
|
||||
agent_dir=GSP_AGENT_DIR
|
||||
agent_user=OGP_USER
|
||||
service=agent
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ copySystemDInit(){
|
|||
if [ ! -e "$SystemDDir/ogp_agent.service" ]; then
|
||||
echo -e "Copying ogp_agent systemd service file to $SystemDDir"
|
||||
echo "$sudoPass" | sudo -S -p "" cp "${AGENTDIR}/systemd/ogp_agent.service" "$SystemDDir"
|
||||
echo "$sudoPass" | sudo -S -p "" sed -i "s#{OGP_AGENT_PATH}#$AGENTDIR#g" "${SystemDDir}/ogp_agent.service"
|
||||
echo "$sudoPass" | sudo -S -p "" sed -i "s#{GSP_AGENT_PATH}#$AGENTDIR#g" "${SystemDDir}/ogp_agent.service"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
@ -292,8 +292,8 @@ fi
|
|||
init_file=${init_dir}/ogp_agent
|
||||
|
||||
cp -f $init_file_template $init_file || failed "Failed to create init file ($init_file)."
|
||||
# Next we replace the OGP_AGENT_DIR with the actual dir in init file.
|
||||
sed -i "s|OGP_AGENT_DIR|${agent_home}|" ${init_file} || failed "Failed to modify init file ($init_file)."
|
||||
# Next we replace the GSP_AGENT_DIR with the actual dir in init file.
|
||||
sed -i "s|GSP_AGENT_DIR|${agent_home}|" ${init_file} || failed "Failed to modify init file ($init_file)."
|
||||
sed -i "s|OGP_USER|${username}|" ${init_file} || failed "Failed to modify init file ($init_file)."
|
||||
chmod a+x $init_file
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ After=network.target
|
|||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/sh -c "{OGP_AGENT_PATH}/agent_init start"
|
||||
ExecStop=/bin/sh -c "{OGP_AGENT_PATH}/agent_init stop"
|
||||
ExecStart=/bin/sh -c "{GSP_AGENT_PATH}/agent_init start"
|
||||
ExecStop=/bin/sh -c "{GSP_AGENT_PATH}/agent_init stop"
|
||||
RemainAfterExit=yes
|
||||
PIDFile="{OGP_AGENT_PATH}/agent_run.pid"
|
||||
PIDFile="{GSP_AGENT_PATH}/agent_run.pid"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/*
|
||||
This FTP addon works with EHCP (www.ehcp.net)
|
||||
It allows OGP - the open game panel - to manage custom FTP user accounts
|
||||
It allows GSP - the GameServer Panel - to manage custom FTP user accounts
|
||||
|
||||
by own3mall
|
||||
*/
|
||||
|
|
@ -37,7 +37,7 @@ function addToLog($errors) {
|
|||
$createLog = fopen($logFile, 'a+');
|
||||
|
||||
if (!$createLog) {
|
||||
trigger_error("Unable to create EHCP FTP Integration log file! Please create a file named \"ehcp_ftp_log.txt\" in the ogp_agent install directory under the EHCP folder with permissions of 777", E_USER_NOTICE);
|
||||
trigger_error("Unable to create EHCP FTP Integration log file! Please create a file named \"ehcp_ftp_log.txt\" in the gsp_agent install directory under the EHCP folder with permissions of 777", E_USER_NOTICE);
|
||||
}
|
||||
fclose($createLog);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ use constant AGENT_VERSION => $Cfg::Config{version};
|
|||
use constant SCREEN_LOG_LOCAL => $Cfg::Preferences{screen_log_local};
|
||||
use constant DELETE_LOGS_AFTER => $Cfg::Preferences{delete_logs_after};
|
||||
use constant AGENT_PID_FILE =>
|
||||
Path::Class::File->new(AGENT_RUN_DIR, 'ogp_agent.pid');
|
||||
Path::Class::File->new(AGENT_RUN_DIR, 'gsp_agent.pid');
|
||||
use constant AGENT_RSYNC_GENERIC_LOG =>
|
||||
Path::Class::File->new(AGENT_RUN_DIR, 'rsync_update_generic.log');
|
||||
use constant STEAM_LICENSE_OK => "Accept";
|
||||
|
|
@ -3367,9 +3367,9 @@ sub agent_restart
|
|||
if ($dec_check eq 'restart')
|
||||
{
|
||||
chdir AGENT_RUN_DIR;
|
||||
if(-e "ogp_agent_run.pid")
|
||||
if(-e "gsp_agent_run.pid")
|
||||
{
|
||||
my $init_pid = `cat ogp_agent_run.pid`;
|
||||
my $init_pid = `cat gsp_agent_run.pid`;
|
||||
chomp($init_pid);
|
||||
|
||||
if(kill 0, $init_pid)
|
||||
|
|
@ -3378,7 +3378,7 @@ sub agent_restart
|
|||
my $rm_pid_file = "";
|
||||
my $agent_pid = "";
|
||||
my $restart_scr_log = Path::Class::File->new(SCREEN_LOGS_DIR, 'screenlog.agent_restart');
|
||||
my $agent_scr_log = Path::Class::File->new(SCREEN_LOGS_DIR, 'screenlog.ogp_agent');
|
||||
my $agent_scr_log = Path::Class::File->new(SCREEN_LOGS_DIR, 'screenlog.gsp_agent');
|
||||
|
||||
if(-e $restart_scr_log)
|
||||
{
|
||||
|
|
@ -3390,10 +3390,10 @@ sub agent_restart
|
|||
unlink $agent_scr_log;
|
||||
}
|
||||
|
||||
if(-e "ogp_agent.pid")
|
||||
if(-e "gsp_agent.pid")
|
||||
{
|
||||
$rm_pid_file .= " ogp_agent.pid";
|
||||
$agent_pid = `cat ogp_agent.pid`;
|
||||
$rm_pid_file .= " gsp_agent.pid";
|
||||
$agent_pid = `cat gsp_agent.pid`;
|
||||
chomp($agent_pid);
|
||||
if( kill 0, $agent_pid )
|
||||
{
|
||||
|
|
@ -3419,8 +3419,8 @@ sub agent_restart
|
|||
"while [ -e /proc/$init_pid $or_exist ];do echo -n .;sleep 1;done\n".
|
||||
"rm -f $rm_pid_file\necho \" [OK]\"\n".
|
||||
"echo -n \"Starting OGP Agent...\"\n".
|
||||
"screen -d -m -t \"ogp_agent\" -c \"" . SCREENRC_FILE . "\" -S ogp_agent bash ogp_agent -pidfile /OGP/ogp_agent_run.pid\n".
|
||||
"while [ ! -e 'ogp_agent.pid' ];do echo -n .;sleep 1;done\n".
|
||||
"screen -d -m -t \"gsp_agent\" -c \"" . SCREENRC_FILE . "\" -S gsp_agent bash gsp_agent -pidfile /OGP/gsp_agent_run.pid\n".
|
||||
"while [ ! -e 'gsp_agent.pid' ];do echo -n .;sleep 1;done\n".
|
||||
"echo \" [OK]\"\n".
|
||||
"rm -f tmp_restart.sh\n".
|
||||
"exit 0\n";
|
||||
|
|
@ -4219,7 +4219,7 @@ sub generate_post_install_scripts
|
|||
' fi'."\n".
|
||||
' fi'."\n".
|
||||
' if [ ! -d "${mods_info_path}" ];then mkdir -p "${mods_info_path}";fi'."\n".
|
||||
' echo "${mod_name[$i]}" > "${mods_info_path}${mod_string[$i]}.ogpmod"'."\n".
|
||||
' echo "${mod_name[$i]}" > "${mods_info_path}${mod_string[$i]}.gspmod"'."\n".
|
||||
' i=$(expr $i + 1)'."\n".
|
||||
'done'."\n";
|
||||
return "$post_install_scripts";
|
||||
|
|
@ -4237,7 +4237,7 @@ sub get_workshop_mods_info()
|
|||
my @mods_info;
|
||||
while(my $mod_info_file = readdir(MODS_INFO_DIR))
|
||||
{
|
||||
if($mod_info_file =~ /\.ogpmod$/)
|
||||
if($mod_info_file =~ /\.gspmod$/)
|
||||
{
|
||||
my $mod_info_file_path = Path::Class::File->new($mods_info_dir_path, $mod_info_file);
|
||||
if(open(my $fh, '<:encoding(UTF-8)', $mod_info_file_path))
|
||||
|
|
@ -23,7 +23,7 @@ span.versionInfo{
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
div.OGPVersionArea{
|
||||
div.GSPVersionArea{
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,59 +1,59 @@
|
|||
<?php
|
||||
/*
|
||||
______________ Token Management
|
||||
ogp_api.php?token/create/{panel_user}/{panel_password}
|
||||
ogp_api.php?token/test/{token}
|
||||
gsp_api.php?token/create/{panel_user}/{panel_password}
|
||||
gsp_api.php?token/test/{token}
|
||||
|
||||
______________ Remote Servers
|
||||
ogp_api.php?server/list (POST/GET {token})
|
||||
ogp_api.php?server/status (POST/GET {token}{remote_server_id})
|
||||
ogp_api.php?server/restart (POST/GET {token}{remote_server_id})
|
||||
ogp_api.php?server/create (POST/GET {token}{agent_name}{agent_ip}{agent_port}{agent_user}{encryption_key}{ftp_ip}{ftp_port}{timeout}{use_nat}{display_public_ip})
|
||||
ogp_api.php?server/remove (POST/GET {token}{remote_server_id})
|
||||
ogp_api.php?server/add_ip (POST/GET {token}{remote_server_id}{ip})
|
||||
ogp_api.php?server/remove_ip (POST/GET {token}{remote_server_id}{ip})
|
||||
ogp_api.php?server/list_ips (POST/GET {token}{remote_server_id})
|
||||
ogp_api.php?server/edit_ip (POST/GET {token}{remote_server_id}{old_ip}{new_ip})
|
||||
gsp_api.php?server/list (POST/GET {token})
|
||||
gsp_api.php?server/status (POST/GET {token}{remote_server_id})
|
||||
gsp_api.php?server/restart (POST/GET {token}{remote_server_id})
|
||||
gsp_api.php?server/create (POST/GET {token}{agent_name}{agent_ip}{agent_port}{agent_user}{encryption_key}{ftp_ip}{ftp_port}{timeout}{use_nat}{display_public_ip})
|
||||
gsp_api.php?server/remove (POST/GET {token}{remote_server_id})
|
||||
gsp_api.php?server/add_ip (POST/GET {token}{remote_server_id}{ip})
|
||||
gsp_api.php?server/remove_ip (POST/GET {token}{remote_server_id}{ip})
|
||||
gsp_api.php?server/list_ips (POST/GET {token}{remote_server_id})
|
||||
gsp_api.php?server/edit_ip (POST/GET {token}{remote_server_id}{old_ip}{new_ip})
|
||||
|
||||
______________ Game Servers
|
||||
ogp_api.php?user_games/list_games (POST/GET {token}{system(windows|linux)}{architecture(32|64)})
|
||||
ogp_api.php?user_games/list_servers (POST/GET {token})
|
||||
ogp_api.php?user_games/create (POST/GET {token}{remote_server_id}{server_name}{home_cfg_id}{mod_cfg_id}{ip}{port}{control_password}{enable_ftp}{ftp_password}{slots}{affinity}{nice}{assign_to_username}{custom_user_login_homepath}) // {custom_user_login_homepath} is only used when a default_game_server_home_path_prefix setting is defined and used
|
||||
ogp_api.php?user_games/clone (POST/GET {token}{origin_home_id}{new_server_name}{new_ip}{new_port}{control_password}{enable_ftp}{ftp_password}{slots}{affinity}{nice}{assign_to_username}{custom_user_login_homepath}) // {custom_user_login_homepath} is only used when a default_game_server_home_path_prefix setting is defined and used
|
||||
ogp_api.php?user_games/set_expiration (POST/GET {token}{home_id}{timestamp})
|
||||
gsp_api.php?user_games/list_games (POST/GET {token}{system(windows|linux)}{architecture(32|64)})
|
||||
gsp_api.php?user_games/list_servers (POST/GET {token})
|
||||
gsp_api.php?user_games/create (POST/GET {token}{remote_server_id}{server_name}{home_cfg_id}{mod_cfg_id}{ip}{port}{control_password}{enable_ftp}{ftp_password}{slots}{affinity}{nice}{assign_to_username}{custom_user_login_homepath}) // {custom_user_login_homepath} is only used when a default_game_server_home_path_prefix setting is defined and used
|
||||
gsp_api.php?user_games/clone (POST/GET {token}{origin_home_id}{new_server_name}{new_ip}{new_port}{control_password}{enable_ftp}{ftp_password}{slots}{affinity}{nice}{assign_to_username}{custom_user_login_homepath}) // {custom_user_login_homepath} is only used when a default_game_server_home_path_prefix setting is defined and used
|
||||
gsp_api.php?user_games/set_expiration (POST/GET {token}{home_id}{timestamp})
|
||||
|
||||
______________ Users
|
||||
ogp_api.php?user_admin/list (POST/GET {token})
|
||||
ogp_api.php?user_admin/get (POST/GET {token}{email})
|
||||
ogp_api.php?user_admin/create (POST/GET {token}{email}{name}{password})
|
||||
ogp_api.php?user_admin/remove (POST/GET {token}{email})
|
||||
ogp_api.php?user_admin/set_expiration (POST/GET {token}{email}{timestamp})
|
||||
ogp_api.php?user_admin/list_assigned (POST/GET {token}{email})
|
||||
ogp_api.php?user_admin/assign (POST/GET {token}{email}{home_id}{timestamp})
|
||||
ogp_api.php?user_admin/remove_assign (POST/GET {token}{email}{home_id})
|
||||
gsp_api.php?user_admin/list (POST/GET {token})
|
||||
gsp_api.php?user_admin/get (POST/GET {token}{email})
|
||||
gsp_api.php?user_admin/create (POST/GET {token}{email}{name}{password})
|
||||
gsp_api.php?user_admin/remove (POST/GET {token}{email})
|
||||
gsp_api.php?user_admin/set_expiration (POST/GET {token}{email}{timestamp})
|
||||
gsp_api.php?user_admin/list_assigned (POST/GET {token}{email})
|
||||
gsp_api.php?user_admin/assign (POST/GET {token}{email}{home_id}{timestamp})
|
||||
gsp_api.php?user_admin/remove_assign (POST/GET {token}{email}{home_id})
|
||||
|
||||
______________ Game Manager
|
||||
ogp_api.php?gamemanager/start (POST/GET {token}{ip}{port}{mod_key})
|
||||
ogp_api.php?gamemanager/stop (POST/GET {token}{ip}{port}{mod_key})
|
||||
ogp_api.php?gamemanager/restart (POST/GET {token}{ip}{port}{mod_key})
|
||||
ogp_api.php?gamemanager/rcon (POST/GET {token}{ip}{port}{mod_key}{command})
|
||||
ogp_api.php?gamemanager/update (POST/GET {token}{ip}{port}{mod_key}{type}{manual_url})
|
||||
gsp_api.php?gamemanager/start (POST/GET {token}{ip}{port}{mod_key})
|
||||
gsp_api.php?gamemanager/stop (POST/GET {token}{ip}{port}{mod_key})
|
||||
gsp_api.php?gamemanager/restart (POST/GET {token}{ip}{port}{mod_key})
|
||||
gsp_api.php?gamemanager/rcon (POST/GET {token}{ip}{port}{mod_key}{command})
|
||||
gsp_api.php?gamemanager/update (POST/GET {token}{ip}{port}{mod_key}{type}{manual_url})
|
||||
|
||||
______________ Lite File Manager
|
||||
ogp_api.php?litefm/list (POST/GET {token}{ip}{port}{relative_path})
|
||||
ogp_api.php?litefm/get (POST/GET {token}{ip}{port}{relative_path})
|
||||
ogp_api.php?litefm/save (POST/GET {token}{ip}{port}{relative_path}{contents})
|
||||
ogp_api.php?litefm/remove (POST/GET {token}{ip}{port}{relative_path})
|
||||
gsp_api.php?litefm/list (POST/GET {token}{ip}{port}{relative_path})
|
||||
gsp_api.php?litefm/get (POST/GET {token}{ip}{port}{relative_path})
|
||||
gsp_api.php?litefm/save (POST/GET {token}{ip}{port}{relative_path}{contents})
|
||||
gsp_api.php?litefm/remove (POST/GET {token}{ip}{port}{relative_path})
|
||||
|
||||
______________ Addons Manager
|
||||
ogp_api.php?addonsmanager/list (POST/GET {token})
|
||||
ogp_api.php?addonsmanager/install (POST/GET {token}{ip}{port}{mod_key}{addon_id})
|
||||
gsp_api.php?addonsmanager/list (POST/GET {token})
|
||||
gsp_api.php?addonsmanager/install (POST/GET {token}{ip}{port}{mod_key}{addon_id})
|
||||
|
||||
______________ Steam Workshop
|
||||
ogp_api.php?steam_workshop/install (POST/GET {token}{ip}{port}{mods_list})
|
||||
gsp_api.php?steam_workshop/install (POST/GET {token}{ip}{port}{mods_list})
|
||||
*
|
||||
______________ Panel Setting
|
||||
ogp_api.php?setting/get (POST/GET {token}{setting_name})
|
||||
gsp_api.php?setting/get (POST/GET {token}{setting_name})
|
||||
|
||||
*/
|
||||
$main_request = key($_GET);
|
||||
|
|
@ -281,7 +281,7 @@ function api_server()
|
|||
{
|
||||
$remote_server_id = $_POST['remote_server_id'];
|
||||
$remote_server = $db->getRemoteServer($remote_server_id);
|
||||
$remote = new OGPRemoteLibrary($remote_server['agent_ip'],$remote_server['agent_port'],$remote_server['encryption_key'],$remote_server['timeout']);
|
||||
$remote = new GSPRemoteLibrary($remote_server['agent_ip'],$remote_server['agent_port'],$remote_server['encryption_key'],$remote_server['timeout']);
|
||||
$status = "200";
|
||||
$message = $remote->status_chk() == 1?'online':'offline';
|
||||
}
|
||||
|
|
@ -290,7 +290,7 @@ function api_server()
|
|||
{
|
||||
$remote_server_id = $_POST['remote_server_id'];
|
||||
$remote_server = $db->getRemoteServer($remote_server_id);
|
||||
$remote = new OGPRemoteLibrary($remote_server['agent_ip'],$remote_server['agent_port'],$remote_server['encryption_key'],$remote_server['timeout']);
|
||||
$remote = new GSPRemoteLibrary($remote_server['agent_ip'],$remote_server['agent_port'],$remote_server['encryption_key'],$remote_server['timeout']);
|
||||
$remote->agent_restart();
|
||||
$status = "200";
|
||||
$message = "success";
|
||||
|
|
@ -480,7 +480,7 @@ function api_user_games()
|
|||
if($mod_key === FALSE)
|
||||
return array("status" => '307', "message" => "The mod_cfg_id #" . $mod_cfg_id . " does not belong to the game configuration for home_cfg_id #" . $home_cfg_id . ".");
|
||||
|
||||
$ip_info = $db->resultQuery( "SELECT ip,ip_id FROM OGP_DB_PREFIXremote_server_ips WHERE ip='".$db->real_escape_string($ip)."' AND remote_server_id=".$db->real_escape_string($remote_server_id));
|
||||
$ip_info = $db->resultQuery( "SELECT ip,ip_id FROM GSP_DB_PREFIXremote_server_ips WHERE ip='".$db->real_escape_string($ip)."' AND remote_server_id=".$db->real_escape_string($remote_server_id));
|
||||
if($ip_info === FALSE)
|
||||
return array("status" => '308', "message" => "The given IP address does not belongs to the given remote server.");
|
||||
|
||||
|
|
@ -488,7 +488,7 @@ function api_user_games()
|
|||
if(!isPortValid($port))
|
||||
return array("status" => '309', "message" => "The given port is not a valid port.");
|
||||
|
||||
$remote = new OGPRemoteLibrary($remote_server['agent_ip'],$remote_server['agent_port'],$remote_server['encryption_key'],$remote_server['timeout']);
|
||||
$remote = new GSPRemoteLibrary($remote_server['agent_ip'],$remote_server['agent_port'],$remote_server['encryption_key'],$remote_server['timeout']);
|
||||
$host_stat = $remote->status_chk();
|
||||
if($host_stat !== 1)
|
||||
return array("status" => '310', "message" => "The remote server is offline.");
|
||||
|
|
@ -510,7 +510,7 @@ function api_user_games()
|
|||
}
|
||||
}
|
||||
else
|
||||
$game_path = "/home/".$remote_server['ogp_user']."/User_Files/"; // Default
|
||||
$game_path = "/home/".$remote_server['gsp_user']."/User_Files/"; // Default
|
||||
|
||||
$game_path = clean_path($game_path); // Clean it
|
||||
|
||||
|
|
@ -581,12 +581,12 @@ function api_user_games()
|
|||
}
|
||||
}
|
||||
|
||||
$remote = new OGPRemoteLibrary($game_home['agent_ip'],$game_home['agent_port'],$game_home['encryption_key'],$game_home['timeout']);
|
||||
$remote = new GSPRemoteLibrary($game_home['agent_ip'],$game_home['agent_port'],$game_home['encryption_key'],$game_home['timeout']);
|
||||
$host_stat = $remote->status_chk();
|
||||
if($host_stat !== 1)
|
||||
return array("status" => '310', "message" => "The remote server is offline.");
|
||||
|
||||
$ip_info = $db->resultQuery("SELECT ip,ip_id FROM OGP_DB_PREFIXremote_server_ips WHERE ip='".$db->real_escape_string($ip)."' AND remote_server_id=".$db->real_escape_string($game_home['remote_server_id']));
|
||||
$ip_info = $db->resultQuery("SELECT ip,ip_id FROM GSP_DB_PREFIXremote_server_ips WHERE ip='".$db->real_escape_string($ip)."' AND remote_server_id=".$db->real_escape_string($game_home['remote_server_id']));
|
||||
if($ip_info === FALSE)
|
||||
return array("status" => '308', "message" => "The given IP address does not belongs to the given remote server.");
|
||||
|
||||
|
|
@ -611,7 +611,7 @@ function api_user_games()
|
|||
}
|
||||
}
|
||||
else
|
||||
$game_path = "/home/".$game_home['ogp_user']."/User_Files/"; // Default
|
||||
$game_path = "/home/".$game_home['gsp_user']."/User_Files/"; // Default
|
||||
|
||||
$game_path = clean_path($game_path); // Clean it
|
||||
|
||||
|
|
@ -641,7 +641,7 @@ function api_user_games()
|
|||
$db->changeFtpStatus('enabled', $clone_home_id);
|
||||
}
|
||||
|
||||
$user_group = get_user_uid_gid_from_passwd(explode("\n", $remote->sudo_exec('cat /etc/passwd')), $game_home['ogp_user']);
|
||||
$user_group = get_user_uid_gid_from_passwd(explode("\n", $remote->sudo_exec('cat /etc/passwd')), $game_home['gsp_user']);
|
||||
|
||||
$status = "200";
|
||||
$message = array("clone_home_id" => $clone_home_id, "cloning_status" => $remote->clone_home($game_home['home_path'], $game_path, $user_group));
|
||||
|
|
@ -957,7 +957,7 @@ function api_gamemanager()
|
|||
if($server_xml === FALSE)
|
||||
return array("status" => '305', "message" => "No game configuration found for home_cfg_id #" . $home_cfg_id . ".");
|
||||
|
||||
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$host_stat = $remote->status_chk();
|
||||
if($host_stat !== 1)
|
||||
return array("status" => '310', "message" => "The remote server is offline.");
|
||||
|
|
@ -1421,7 +1421,7 @@ function api_litefm()
|
|||
if($server_xml === FALSE)
|
||||
return array("status" => '305', "message" => "No game configuration found for home_cfg_id #" . $home_cfg_id . ".");
|
||||
|
||||
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$host_stat = $remote->status_chk();
|
||||
if($host_stat !== 1)
|
||||
return array("status" => '310', "message" => "The remote server is offline.");
|
||||
|
|
@ -1488,7 +1488,7 @@ function api_addonsmanager()
|
|||
|
||||
if($request[0] == "list")
|
||||
{
|
||||
$addons_rows = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXaddons");
|
||||
$addons_rows = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXaddons");
|
||||
$status = "200";
|
||||
$message = $addons_rows;
|
||||
}
|
||||
|
|
@ -1514,7 +1514,7 @@ function api_addonsmanager()
|
|||
if($server_xml === FALSE)
|
||||
return array("status" => '305', "message" => "No game configuration found for home_cfg_id #" . $home_cfg_id . ".");
|
||||
|
||||
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$host_stat = $remote->status_chk();
|
||||
if($host_stat !== 1)
|
||||
return array("status" => '310', "message" => "The remote server is offline.");
|
||||
|
|
@ -1545,7 +1545,7 @@ function api_addonsmanager()
|
|||
$query_groups .= "group_id=0 OR group_id IS NULL)";
|
||||
}
|
||||
|
||||
$addons_rows = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXaddons WHERE home_cfg_id=".$home_info['home_cfg_id']." AND addon_id=".$addon_id.$query_groups);
|
||||
$addons_rows = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXaddons WHERE home_cfg_id=".$home_info['home_cfg_id']." AND addon_id=".$addon_id.$query_groups);
|
||||
|
||||
if($addons_rows === FALSE)
|
||||
return array("status" => '341', "message" => "Invalid addon id #" . $addon_id . ".");
|
||||
|
|
@ -1632,7 +1632,7 @@ function api_steam_workshop()
|
|||
if($server_xml === FALSE)
|
||||
return array("status" => '305', "message" => "No game configuration found for home_cfg_id #" . $home_cfg_id . ".");
|
||||
|
||||
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$host_stat = $remote->status_chk();
|
||||
if($host_stat !== 1)
|
||||
return array("status" => '310', "message" => "The remote server is offline.");
|
||||
8
home.php
8
home.php
|
|
@ -25,8 +25,8 @@ $db = createDatabaseConnection($db_type, $db_host, $db_user, $db_pass, $db_name,
|
|||
// Load languages.
|
||||
include_once("includes/lang.php");
|
||||
|
||||
if (!$db instanceof OGPDatabase) {
|
||||
ogpLang();
|
||||
if (!$db instanceof GSPDatabase) {
|
||||
gspLang();
|
||||
die(get_lang('no_db_connection'));
|
||||
}
|
||||
|
||||
|
|
@ -37,10 +37,10 @@ if(hasValue($_SESSION['user_id'])){
|
|||
|
||||
$settings = $db->getSettings();
|
||||
@$GLOBALS['panel_language'] = $settings['panel_language'];
|
||||
ogpLang();
|
||||
gspLang();
|
||||
|
||||
require_once("includes/view.php");
|
||||
$view = new OGPView();
|
||||
$view = new GSPView();
|
||||
$view->setCharset(get_lang('lang_charset'));
|
||||
$view->setTimeZone($settings['time_zone']);
|
||||
if(isset($_GET['type']) && $_GET['type'] == 'cleared')
|
||||
|
|
|
|||
|
|
@ -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'] = "ogp_game_startup.pid";
|
||||
$cli_param_data['PID_FILE'] = "gsp_game_startup.pid";
|
||||
|
||||
// Linux
|
||||
if( preg_match("/Linux/", $os) )
|
||||
|
|
@ -342,7 +342,7 @@ function get_faster_rsync($rsync_sites)
|
|||
}
|
||||
|
||||
if($faster == "NONE")
|
||||
$faster = "rsync.opengamepanel.org";
|
||||
$faster = "rsync.gameservers-world.com";
|
||||
return $faster;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ $db_host="localhost";
|
|||
$db_user="localuser";
|
||||
$db_pass="Pkloyn7yvpht!";
|
||||
$db_name="panel";
|
||||
$table_prefix="ogp_";
|
||||
$table_prefix="gsp_";
|
||||
$db_type="mysql";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
* Database connection and query functions
|
||||
*/
|
||||
|
||||
define("OGP_DB_PREFIX", "OGP_DB_PREFIX");
|
||||
define("GSP_DB_PREFIX", "GSP_DB_PREFIX");
|
||||
|
||||
abstract class OGPDatabase {
|
||||
abstract class GSPDatabase {
|
||||
|
||||
protected $queries_ = 0;
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ abstract class OGPDatabase {
|
|||
|
||||
abstract public function getCurrentHomeConfigMods($clear_all);
|
||||
|
||||
abstract public function updateOGPGameModsWithNewIDs($oldModStructure);
|
||||
abstract public function updateGSPGameModsWithNewIDs($oldModStructure);
|
||||
|
||||
abstract public function clearGameCfgs($clear_all);
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ function real_escape_string_recursive(&$item, $key, $link){
|
|||
$item = $this->realEscapeSingle($item);
|
||||
}
|
||||
|
||||
class OGPDatabaseMySQL extends OGPDatabase
|
||||
class GSPDatabaseMySQL extends GSPDatabase
|
||||
{
|
||||
protected $link;
|
||||
|
||||
|
|
@ -938,7 +938,7 @@ class OGPDatabaseMySQL extends OGPDatabase
|
|||
return false;
|
||||
}
|
||||
|
||||
public function updateOGPGameModsWithNewIDs($oldModStructure){
|
||||
public function updateGSPGameModsWithNewIDs($oldModStructure){
|
||||
$currentStructure = $this->getCurrentHomeConfigMods(false);
|
||||
|
||||
if(isset($oldModStructure) && is_array($oldModStructure) && isset($currentStructure) && is_array($currentStructure)){
|
||||
|
|
@ -1144,7 +1144,7 @@ class OGPDatabaseMySQL extends OGPDatabase
|
|||
{
|
||||
if ( !$this->link ) return FALSE;
|
||||
|
||||
$query = str_replace( "OGP_DB_PREFIX", $this->table_prefix, $query );
|
||||
$query = str_replace( "GSP_DB_PREFIX", $this->table_prefix, $query );
|
||||
|
||||
++$this->queries_;
|
||||
mysqli_query($this->link,$query);
|
||||
|
|
@ -1159,7 +1159,7 @@ class OGPDatabaseMySQL extends OGPDatabase
|
|||
|
||||
/// \brief This query return array of values or false on failure.
|
||||
public function resultQuery( $query ) {
|
||||
$query = str_replace( "OGP_DB_PREFIX", $this->table_prefix, $query );
|
||||
$query = str_replace( "GSP_DB_PREFIX", $this->table_prefix, $query );
|
||||
return $this->listQuery($query);
|
||||
}
|
||||
|
||||
|
|
@ -1217,7 +1217,7 @@ class OGPDatabaseMySQL extends OGPDatabase
|
|||
return false;
|
||||
|
||||
$rhost_name = trim($rhost_name);
|
||||
$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)
|
||||
$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)
|
||||
VALUES('%s','%s','%s','%d','%s','%s','%s','%s','%s','%s');",
|
||||
$this->table_prefix,
|
||||
$this->realEscapeSingle($rhost_ip),
|
||||
|
|
@ -1379,7 +1379,7 @@ class OGPDatabaseMySQL extends OGPDatabase
|
|||
$query = sprintf("UPDATE %sremote_servers SET agent_ip='%s',
|
||||
agent_port='%s', encryption_key='%s',
|
||||
remote_server_name='%s',
|
||||
ogp_user='%s',
|
||||
gsp_user='%s',
|
||||
ftp_ip='%s',
|
||||
ftp_port='%s',
|
||||
timeout='%s',
|
||||
|
|
@ -3370,7 +3370,7 @@ class OGPDatabaseMySQL extends OGPDatabase
|
|||
$user_id = isset($_SESSION['user_id']) ? $_SESSION['user_id'] : 0;
|
||||
$client_ip = getClientIPAddress();
|
||||
$message = $this->realEscapeSingle($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');");
|
||||
$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');");
|
||||
}
|
||||
|
||||
public function get_logger_count($search_field) {
|
||||
|
|
@ -3762,7 +3762,7 @@ class OGPDatabaseMySQL extends OGPDatabase
|
|||
case 'server':
|
||||
require_once('includes/lib_remote.php');
|
||||
$home_info = $this->getGameHomeWithoutMods($home_id);
|
||||
$remote = new OGPRemoteLibrary($home_info['agent_ip'], $home_info['agent_port'], $home_info['encryption_key'], $home_info['timeout']);
|
||||
$remote = new GSPRemoteLibrary($home_info['agent_ip'], $home_info['agent_port'], $home_info['encryption_key'], $home_info['timeout']);
|
||||
$agent_online = $remote->status_chk() === 1;
|
||||
if( $agent_online )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ class FormTable {
|
|||
print_failure(get_lang_f('invalid_setting_type',$type));
|
||||
}
|
||||
|
||||
if ( defined("OGP_LANG_".$name."_info") )
|
||||
if ( defined("GSP_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("OGP_LANG_".$name."_info") )
|
||||
if ( defined("GSP_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++;
|
||||
|
|
|
|||
|
|
@ -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://opengamepanel.org/forum/viewthread.php?thread_id=5209#post_25073)
|
||||
// Thanks adjo (http://gameserver-panel.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@opengamepanel.org";
|
||||
$panel_email = "noreply@gameserver-panel.org";
|
||||
}else{
|
||||
$panel_email = $panel_settings['panel_email_address'];
|
||||
}
|
||||
|
|
@ -626,7 +626,7 @@ function getClientIPAddress(){
|
|||
return $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
|
||||
function getOGPSiteURL(){
|
||||
function getGSPSiteURL(){
|
||||
$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 OGPRemoteLibrary($remote_server['agent_ip'],$remote_server['agent_port'],$remote_server['encryption_key'],$remote_server['timeout']);
|
||||
$remote = new GSPRemoteLibrary($remote_server['agent_ip'],$remote_server['agent_port'],$remote_server['encryption_key'],$remote_server['timeout']);
|
||||
$host_stat = $remote->status_chk();
|
||||
if($host_stat === 1 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
// Globals
|
||||
$OGPLangPre = "OGP_LANG_";
|
||||
$GSPLangPre = "GSP_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'>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();
|
||||
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();
|
||||
$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,"OGPDatabase"))
|
||||
if (is_a($db_retval,"GSPDatabase"))
|
||||
return FALSE;
|
||||
|
||||
switch ($db_retval) {
|
||||
|
|
@ -229,7 +229,7 @@ function sanitizeInputStr($strToProcess, $removeHTML = true, $trim = true, $remo
|
|||
|
||||
function startSession(){
|
||||
if(!isset($_SESSION)){
|
||||
session_name("opengamepanel_web");
|
||||
session_name("gameserver-panel_web");
|
||||
session_start();
|
||||
}
|
||||
}
|
||||
|
|
@ -410,9 +410,9 @@ function runPostUpdateOperations(){
|
|||
}
|
||||
}
|
||||
|
||||
function getOGPGitHubURL($gitHubUsername, $repo){
|
||||
$OGPGitHub = "https://github.com/OpenGamePanel/";
|
||||
$gitHubURL = $OGPGitHub;
|
||||
function getGSPGitHubURL($gitHubUsername, $repo){
|
||||
$GSPGitHub = "https://github.com/Gameservers-World/";
|
||||
$gitHubURL = $GSPGitHub;
|
||||
if(isset($gitHubUsername) && !empty($gitHubUsername)){
|
||||
$gitHubURL = "https://github.com/" . $gitHubUsername . "/";
|
||||
}
|
||||
|
|
@ -423,12 +423,12 @@ function getOGPGitHubURL($gitHubUsername, $repo){
|
|||
return $gitHubURL;
|
||||
}
|
||||
|
||||
return $OGPGitHub;
|
||||
return $GSPGitHub;
|
||||
}
|
||||
|
||||
function getOGPGitHubURLUnstrict($gitHubUsername){
|
||||
$OGPGitHub = "https://github.com/OpenGamePanel/";
|
||||
$gitHubURL = $OGPGitHub;
|
||||
function getGSPGitHubURLUnstrict($gitHubUsername){
|
||||
$GSPGitHub = "https://github.com/Gameservers-World/";
|
||||
$gitHubURL = $GSPGitHub;
|
||||
if(isset($gitHubUsername) && !empty($gitHubUsername)){
|
||||
$gitHubURL = "https://github.com/" . $gitHubUsername . "/";
|
||||
}
|
||||
|
|
@ -440,7 +440,7 @@ function getOGPGitHubURLUnstrict($gitHubUsername){
|
|||
return $gitHubURL;
|
||||
}
|
||||
|
||||
return $OGPGitHub;
|
||||
return $GSPGitHub;
|
||||
}
|
||||
|
||||
function getGitHubOrganization($gitHubURL){
|
||||
|
|
@ -456,13 +456,13 @@ function getGitHubOrganization($gitHubURL){
|
|||
return $gitHubOrg;
|
||||
}
|
||||
|
||||
function getOGPLangConstantsJSON(){
|
||||
global $OGPLangPre;
|
||||
function getGSPLangConstantsJSON(){
|
||||
global $GSPLangPre;
|
||||
$finalConsts = array();
|
||||
|
||||
$consts = get_defined_constants(true);
|
||||
foreach($consts["user"] as $key => $value){
|
||||
if(startsWith($key, $OGPLangPre)){
|
||||
if(startsWith($key, $GSPLangPre)){
|
||||
$finalConsts[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 ogpLang call.
|
||||
ogpLang();
|
||||
// Need to reload langs if module is added after the first gspLang call.
|
||||
gspLang();
|
||||
}
|
||||
|
||||
function ogpLang()
|
||||
function gspLang()
|
||||
{
|
||||
global $lang_modules;
|
||||
$locale_files = makefilelist("lang/", ".|..|.svn", true, "folders");
|
||||
|
|
@ -68,15 +68,15 @@ function ogpLang()
|
|||
|
||||
function get_lang($lang_index)
|
||||
{
|
||||
global $OGPLangPre;
|
||||
global $GSPLangPre;
|
||||
|
||||
if (defined($lang_index))
|
||||
{
|
||||
return constant($lang_index);
|
||||
}
|
||||
|
||||
if(!startsWith($lang_index, $OGPLangPre)){
|
||||
$newLangIndex = $OGPLangPre . $lang_index;
|
||||
if(!startsWith($lang_index, $GSPLangPre)){
|
||||
$newLangIndex = $GSPLangPre . $lang_index;
|
||||
if (defined($newLangIndex))
|
||||
{
|
||||
return constant($newLangIndex);
|
||||
|
|
@ -89,7 +89,7 @@ function get_lang($lang_index)
|
|||
|
||||
function get_lang_f()
|
||||
{
|
||||
global $OGPLangPre;
|
||||
global $GSPLangPre;
|
||||
$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, $OGPLangPre)){
|
||||
$newLangIndex = $OGPLangPre . $lang_index;
|
||||
if(!startsWith($lang_index, $GSPLangPre)){
|
||||
$newLangIndex = $GSPLangPre . $lang_index;
|
||||
if (defined($newLangIndex))
|
||||
{
|
||||
return vsprintf(constant($newLangIndex),$args);
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@
|
|||
require_once("Crypt/XXTEA.php");
|
||||
|
||||
// Screen type for servers
|
||||
define("OGP_SCREEN_TYPE_HOME","HOME");
|
||||
define("OGP_SCREEN_TYPE_UPDATE","UPDATE");
|
||||
define("GSP_SCREEN_TYPE_HOME","HOME");
|
||||
define("GSP_SCREEN_TYPE_UPDATE","UPDATE");
|
||||
|
||||
define("AGENT_ERROR_NOT_EXECUTABLE",-13);
|
||||
|
||||
class OGPRemoteLibrary
|
||||
class GSPRemoteLibrary
|
||||
{
|
||||
private $port;
|
||||
private $host;
|
||||
|
|
|
|||
|
|
@ -78,13 +78,13 @@ function navigation() {
|
|||
|
||||
include_once( $include_file );
|
||||
|
||||
if ( !function_exists( 'exec_ogp_module' ) )
|
||||
if ( !function_exists( 'exec_gsp_module' ) )
|
||||
{
|
||||
print_failure("Missing module execute function.");
|
||||
return;
|
||||
}
|
||||
|
||||
exec_ogp_module();
|
||||
exec_gsp_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_ogp_module' ) )
|
||||
if ( !function_exists( 'exec_gsp_module' ) )
|
||||
{
|
||||
print_failure("Missing module execute function.");
|
||||
return;
|
||||
}
|
||||
exec_ogp_module();
|
||||
exec_gsp_module();
|
||||
}
|
||||
// If files above are not found then we print an error.
|
||||
else
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
define("DEFAULT_REFRESH_TIME","2");
|
||||
|
||||
class OGPView {
|
||||
class GSPView {
|
||||
|
||||
private $meta;
|
||||
private $title;
|
||||
|
|
@ -29,9 +29,9 @@ class OGPView {
|
|||
function menu(){}
|
||||
|
||||
function printView($cleared = false, $dataType = "html") {
|
||||
global $db, $OGPLangPre;
|
||||
global $db, $GSPLangPre;
|
||||
|
||||
if ( is_object($db) && array_key_exists( "OGPDatabase", class_parents($db) ) ) {
|
||||
if ( is_object($db) && array_key_exists( "GSPDatabase", class_parents($db) ) ) {
|
||||
$panel_settings = $db->getSettings();
|
||||
}
|
||||
|
||||
|
|
@ -80,9 +80,9 @@ class OGPView {
|
|||
$this->title = $title == "" ? $this->title : $this->title . " [$title]";
|
||||
|
||||
// Dump defined constants to json (for language javascript)
|
||||
$jsonStrConsts = getOGPLangConstantsJSON();
|
||||
$jsonStrConsts = getGSPLangConstantsJSON();
|
||||
if($jsonStrConsts !== false){
|
||||
$this->header_code .= '<script type="text/javascript">var langConsts = ' . $jsonStrConsts . ';' . "\n" . 'var langConstPrefix = "' . $OGPLangPre . '";</script>' . "\n";
|
||||
$this->header_code .= '<script type="text/javascript">var langConsts = ' . $jsonStrConsts . ';' . "\n" . 'var langConstPrefix = "' . $GSPLangPre . '";</script>' . "\n";
|
||||
}
|
||||
|
||||
// Include jQuery, jQuery UI, and our global CSS file in the header code
|
||||
|
|
@ -110,7 +110,7 @@ class OGPView {
|
|||
$javascript .= '</script>' . "\n";
|
||||
|
||||
// Include global JS for modules
|
||||
if(is_object($db) && array_key_exists("OGPDatabase", class_parents($db))){
|
||||
if(is_object($db) && array_key_exists("GSPDatabase", class_parents($db))){
|
||||
foreach($db->getInstalledModules() as $m)
|
||||
{
|
||||
$global_js_file = 'js/' . MODULES . "{$m['folder']}_global.js";
|
||||
|
|
@ -194,14 +194,14 @@ class OGPView {
|
|||
|
||||
$footer = "";
|
||||
|
||||
if ( is_object($db) && array_key_exists( "OGPDatabase", class_parents($db) ) ) {
|
||||
if ( is_object($db) && array_key_exists( "GSPDatabase", 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')." © <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> <span class='hide versionNumber'>".@$panel_settings['ogp_version']."</span> <span class='copyVersionResult' lang='" . get_lang('copied') . "'></span></div></div>";
|
||||
$footer .= "<br />".get_lang('copyright')." © <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> <span class='hide versionNumber'>".@$panel_settings['gsp_version']."</span> <span class='copyVersionResult' lang='" . get_lang('copied') . "'></span></div></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$footer .= "<div class='footer center'>".get_lang('copyright')." © <a href=\"http://www.opengamepanel.org\">Open Game Panel</a> " . date("Y") . " - ".get_lang('all_rights_reserved').".</div>";
|
||||
$footer .= "<div class='footer center'>".get_lang('copyright')." © <a href=\"http://www.gameserver-panel.org\">Open Game Panel</a> " . date("Y") . " - ".get_lang('all_rights_reserved').".</div>";
|
||||
}
|
||||
|
||||
// Add our magnific popup holder to the page (hidden element):
|
||||
|
|
|
|||
32
index.php
32
index.php
|
|
@ -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 opengamepanel_web only
|
||||
// Start the session valid for gameserver-panel_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 OGPDatabase) {
|
||||
ogpLang();
|
||||
if (!$db instanceof GSPDatabase) {
|
||||
gspLang();
|
||||
die(get_lang('no_db_connection'));
|
||||
}
|
||||
|
||||
|
|
@ -54,10 +54,10 @@ if(hasValue($_SESSION['user_id'])){
|
|||
|
||||
$settings = $db->getSettings();
|
||||
@$GLOBALS['panel_language'] = $settings['panel_language'];
|
||||
ogpLang();
|
||||
gspLang();
|
||||
|
||||
require_once("includes/view.php");
|
||||
$view = new OGPView();
|
||||
$view = new GSPView();
|
||||
$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 'OGP_DB_PREFIXban_list';");
|
||||
$ban_list = $db->resultQuery("SHOW TABLES LIKE 'GSP_DB_PREFIXban_list';");
|
||||
if ( empty( $ban_list ) )
|
||||
{
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `OGP_DB_PREFIXban_list` (
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `GSP_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 `OGP_DB_PREFIXban_list` WHERE client_ip='".$client_ip."';");
|
||||
$banlist_info = $db->resultQuery("SELECT logging_attempts, banned_until FROM `GSP_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 `OGP_DB_PREFIXban_list` WHERE client_ip='$client_ip';");
|
||||
$db->query("DELETE FROM `GSP_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 `OGP_DB_PREFIXban_list` WHERE client_ip='$client_ip';");
|
||||
$db->query("DELETE FROM `GSP_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 OGP_DB_PREFIXbilling_orders WHERE user_id='".$_SESSION['user_id']."' AND status < 1 ");
|
||||
$result = $db->resultQuery("SELECT * FROM GSP_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 `OGP_DB_PREFIXban_list` (`client_ip`) VALUES('$client_ip');");
|
||||
$db->query("INSERT INTO `GSP_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 `OGP_DB_PREFIXban_list` SET logging_attempts='$login_attempts', banned_until='$banned_until' WHERE client_ip='$client_ip';");
|
||||
$db->query("UPDATE `GSP_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 `OGP_DB_PREFIXban_list` (`client_ip`) VALUES('$client_ip');");
|
||||
$db->query("INSERT INTO `GSP_DB_PREFIXban_list` (`client_ip`) VALUES('$client_ip');");
|
||||
|
||||
$db->logger( get_lang("bad_login") . " ( $login_attempts ) [ " . login . ": $_POST[ulogin], " . password . ": ******** ]" );
|
||||
$db->query("UPDATE `OGP_DB_PREFIXban_list` SET logging_attempts='$login_attempts' WHERE client_ip='$client_ip';");
|
||||
$db->query("UPDATE `GSP_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 `OGP_DB_PREFIXban_list` (`client_ip`,`logging_attempts`) VALUES('$client_ip','-1');");
|
||||
$db->query("INSERT INTO `GSP_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]);
|
||||
}
|
||||
|
||||
|
|
|
|||
16
js/global.js
16
js/global.js
|
|
@ -58,23 +58,23 @@ function showAPILinks(elem){
|
|||
if(apiToken && ipAddr && port && modKey && panelURL){
|
||||
|
||||
var actions = new Array(
|
||||
{url: 'ogp_api.php?gamemanager/start', lang: 'start_server'},
|
||||
{url: 'ogp_api.php?gamemanager/stop', lang: 'stop_server'},
|
||||
{url: 'ogp_api.php?gamemanager/restart', lang: 'restart_server'}
|
||||
{url: 'gsp_api.php?gamemanager/start', lang: 'start_server'},
|
||||
{url: 'gsp_api.php?gamemanager/stop', lang: 'stop_server'},
|
||||
{url: 'gsp_api.php?gamemanager/restart', lang: 'restart_server'}
|
||||
);
|
||||
|
||||
|
||||
var hasRcon = elem.attr('hasrcon');
|
||||
if(hasRcon && hasRcon === 'true'){
|
||||
actions.push({url: 'ogp_api.php?gamemanager/rcon', lang: 'rcon_command_title', additional: '&command={YOUR_RCON_COMMAND}'});
|
||||
actions.push({url: 'gsp_api.php?gamemanager/rcon', lang: 'rcon_command_title', additional: '&command={YOUR_RCON_COMMAND}'});
|
||||
}
|
||||
|
||||
var isSteam = elem.attr('hassteam');
|
||||
if(isSteam && isSteam === 'true'){
|
||||
actions.push({url: 'ogp_api.php?gamemanager/update', lang: 'get_steam_autoupdate_api_link', additional: '&type=steam', selected: true});
|
||||
actions.push({url: 'gsp_api.php?gamemanager/update', lang: 'get_steam_autoupdate_api_link', additional: '&type=steam', selected: true});
|
||||
}
|
||||
|
||||
var selectListHTML = '<select class="ogpAPIActions">';
|
||||
var selectListHTML = '<select class="gspAPIActions">';
|
||||
for(var i = 0; i < actions.length; i++){
|
||||
selectListHTML += '<option value="' + actions[i]["url"] + '" ' + (actions[i].hasOwnProperty('additional') && actions[i].additional ? 'additional="' + actions[i].additional + '"' : '') + ' ' + (actions[i].hasOwnProperty('selected') && actions[i]["selected"] && actions[i]["selected"] == true ? 'selected' : '') + '>' + getLang(actions[i]["lang"]) + '</option>';
|
||||
}
|
||||
|
|
@ -83,7 +83,7 @@ function showAPILinks(elem){
|
|||
$("div.mangificWrapper .magnificContentsDiv").html(decodeEntities(getLang('api_links_popup_html')) + '<p>' + getLang('actions') +': ' + selectListHTML + '</p><p><input class="updateLink" style="width: 75%;" type="text" value=""><button class="copyButton">' + $(elem).attr('copyme') + '</button> <span class="copyStatus"></span></p>');
|
||||
|
||||
showPopup(function(){
|
||||
$(".ogpAPIActions").change(function(e){
|
||||
$(".gspAPIActions").change(function(e){
|
||||
var newActionValue = $(this).val();
|
||||
var apiURL = panelURL + '/' + newActionValue + '&token=' + apiToken + '&ip=' + ipAddr + '&port=' + port + '&mod_key=' + modKey;
|
||||
var additionalParamsToAdd = $('option:selected', $(this)).attr('additional');
|
||||
|
|
@ -103,7 +103,7 @@ function showAPILinks(elem){
|
|||
|
||||
copyInput($("input.updateLink"), $("span.copyStatus"), elem);
|
||||
|
||||
$(".ogpAPIActions").trigger('change');
|
||||
$(".gspAPIActions").trigger('change');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ function saveGameServerOrder(){
|
|||
// Make the call
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "ogp_api.php?gamemanager_admin/reorder&token=" + userAPIKey,
|
||||
url: "gsp_api.php?gamemanager_admin/reorder&token=" + userAPIKey,
|
||||
data: JSON.stringify(postData),
|
||||
success: function(e){
|
||||
logToConsole("Game server order successfully saved!");
|
||||
|
|
|
|||
|
|
@ -1038,7 +1038,7 @@ $(document).ready(function(){
|
|||
"<label for='subject'>"+subject+"</label><br>\n"+
|
||||
"<input name='subject' id='subject' type=text value='Files attached' style='width:100%;'><br>\n"+
|
||||
"<label for='message'>"+message+"</label><br>\n"+
|
||||
"<textarea name='message' id='message' style='width:100%;'>There are the files you requested from OGP</textarea><br>\n"+
|
||||
"<textarea name='message' id='message' style='width:100%;'>There are the files you requested from GSP</textarea><br>\n"+
|
||||
"<label for='dest_email'>"+dest_email+"</label><br>\n"+
|
||||
"<input name='dest_email' id='dest_email' type=text value='"+user_email+"' style='width:100%;'><br>\n");
|
||||
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ function change_access_rights(id_type, assign_id)
|
|||
{
|
||||
return true;
|
||||
}
|
||||
check_access_rights += "<tr><td align='right'><label for='" + value + "'>" + langConsts['OGP_LANG_' + value] + ":</label></td>" +
|
||||
check_access_rights += "<tr><td align='right'><label for='" + value + "'>" + langConsts['GSP_LANG_' + value] + ":</label></td>" +
|
||||
"<td align='left'><input class='ar_flag' id='" + value + "' type='checkbox' name='" + value + "' value='" + index + "' checked='checked' /></td></tr>" +
|
||||
"<tr><td colspan='2' class='info'>" + langConsts['OGP_LANG_' + value + '_info'] + "</td></tr>";
|
||||
"<tr><td colspan='2' class='info'>" + langConsts['GSP_LANG_' + value + '_info'] + "</td></tr>";
|
||||
});
|
||||
|
||||
check_access_rights += '</table>';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Administrative interface for the ts3admin module
|
||||
*/
|
||||
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
$templates_folder = 'modules/TS3Admin/templates_c';
|
||||
if( is_writable( $templates_folder ) )
|
||||
|
|
@ -50,11 +50,11 @@ function exec_ogp_module()
|
|||
$_SESSION['rserver_id'] = $_GET['rserver_id'];
|
||||
if( $isAdmin )
|
||||
{
|
||||
$TS3_list = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXts3_homes WHERE rserver_id='".$_SESSION['rserver_id']."'");
|
||||
$TS3_list = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXts3_homes WHERE rserver_id='".$_SESSION['rserver_id']."'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT * FROM OGP_DB_PREFIXts3_homes WHERE";
|
||||
$sql = "SELECT * FROM GSP_DB_PREFIXts3_homes WHERE";
|
||||
if(!$isAdmin){
|
||||
$sql .= " user_id='".$_SESSION['user_id']."' AND";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 `".OGP_DB_PREFIX."ts3_homes`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."ts3_homes`
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."ts3_homes`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_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 `".OGP_DB_PREFIX."ts3_homes` DROP INDEX `user_id` ,
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."ts3_homes` DROP INDEX `user_id` ,
|
||||
ADD UNIQUE `rserver_id` ( `rserver_id` , `vserver_id` , `user_id` );");
|
||||
$install_queries[2] = array(
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."ts3_homes` ADD `port` int(11) DEFAULT '10011'"
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."ts3_homes` ADD `port` int(11) DEFAULT '10011'"
|
||||
);
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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']['OGP_LANG_js_error']; ?>
|
||||
<span id="js_error"><?php echo $this->_tpl_vars['lang']['GSP_LANG_js_error']; ?>
|
||||
</span>
|
||||
<span id="js_ajax_error"><?php echo $this->_tpl_vars['lang']['OGP_LANG_js_ajax_error']; ?>
|
||||
<span id="js_ajax_error"><?php echo $this->_tpl_vars['lang']['GSP_LANG_js_ajax_error']; ?>
|
||||
</span>
|
||||
<span id="js_confirm_server_stop" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_confirm_server_stop']; ?>
|
||||
<span id="js_confirm_server_stop" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_confirm_server_stop']; ?>
|
||||
"></span>
|
||||
<span id="js_confirm_server_delete" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_confirm_server_delete']; ?>
|
||||
<span id="js_confirm_server_delete" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_confirm_server_delete']; ?>
|
||||
"></span>
|
||||
<span id="js_notice_server_deleted" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_notice_server_deleted']; ?>
|
||||
<span id="js_notice_server_deleted" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_notice_server_deleted']; ?>
|
||||
"></span>
|
||||
<span id="js_prompt_banduration" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_prompt_banduration']; ?>
|
||||
<span id="js_prompt_banduration" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_prompt_banduration']; ?>
|
||||
"></span>
|
||||
<span id="js_prompt_banreason" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_prompt_banreason']; ?>
|
||||
<span id="js_prompt_banreason" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_prompt_banreason']; ?>
|
||||
"></span>
|
||||
<span id="js_prompt_msg_to" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_prompt_msg_to']; ?>
|
||||
<span id="js_prompt_msg_to" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_prompt_msg_to']; ?>
|
||||
"></span>
|
||||
<span id="js_prompt_poke_to" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_prompt_poke_to']; ?>
|
||||
<span id="js_prompt_poke_to" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_prompt_poke_to']; ?>
|
||||
"></span>
|
||||
<span id="js_prompt_new_propvalue" title="<?php echo $this->_tpl_vars['lang']['OGP_LANG_js_prompt_new_propvalue']; ?>
|
||||
<span id="js_prompt_new_propvalue" title="<?php echo $this->_tpl_vars['lang']['GSP_LANG_js_prompt_new_propvalue']; ?>
|
||||
"></span>
|
||||
</div>
|
||||
<!--[if IE]>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ require_once('ts3remote.class.php');
|
|||
function getAssignedServerUsers()
|
||||
{
|
||||
global $db;
|
||||
$ts3vservers = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXts3_homes
|
||||
$ts3vservers = $db->resultQuery("SELECT * FROM GSP_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 OGP_DB_PREFIXremote_servers WHERE remote_server_id=".$_SESSION['rserver_id']);
|
||||
$getPublicIp = $db->resultQuery("SELECT display_public_ip FROM GSP_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 OGP_DB_PREFIXts3_homes
|
||||
$db->query("INSERT INTO GSP_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 OGP_DB_PREFIXts3_homes WHERE vserver_id='".
|
||||
$db->query( "DELETE FROM GSP_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 OGP_DB_PREFIXremote_servers WHERE remote_server_id=".$_SESSION['rserver_id']);
|
||||
$getPublicIp = $db->resultQuery("SELECT display_public_ip FROM GSP_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);
|
||||
|
|
|
|||
|
|
@ -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_ogp_module() {
|
||||
function exec_gsp_module() {
|
||||
|
||||
global $db,$view;
|
||||
$home_id = $_REQUEST['home_id'];
|
||||
|
|
@ -66,7 +66,7 @@ function exec_ogp_module() {
|
|||
{
|
||||
$addon_id = (int)$_REQUEST['addon_id'];
|
||||
|
||||
$addons_rows = $db->resultQuery("SELECT url, path, post_script FROM OGP_DB_PREFIXaddons WHERE addon_id=".$addon_id.$query_groups);
|
||||
$addons_rows = $db->resultQuery("SELECT url, path, post_script FROM GSP_DB_PREFIXaddons WHERE addon_id=".$addon_id.$query_groups);
|
||||
|
||||
if (!$addons_rows) {
|
||||
print_failure(get_lang('invalid_addon'));
|
||||
|
|
@ -74,7 +74,7 @@ function exec_ogp_module() {
|
|||
return;
|
||||
}
|
||||
|
||||
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$remote = new GSPRemoteLibrary($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_ogp_module() {
|
|||
<td align='left'>
|
||||
<select name="addon_id">
|
||||
<?php
|
||||
$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");
|
||||
$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");
|
||||
foreach($addons as $addon)
|
||||
{
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Component of the addonsmanager module
|
||||
*/
|
||||
|
||||
function exec_ogp_module() {
|
||||
function exec_gsp_module() {
|
||||
|
||||
global $db;
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ function exec_ogp_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 OGP_DB_PREFIXaddons WHERE addon_id=" . (int)$_POST['addon_id']);
|
||||
$db->query("DELETE FROM GSP_DB_PREFIXaddons WHERE addon_id=" . (int)$_POST['addon_id']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ function exec_ogp_module() {
|
|||
|
||||
if (isset($_POST['addon_id']) && (int)$_POST['addon_id'] > 0 && isset($_POST['edit']))
|
||||
{
|
||||
$addons_rows = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXaddons WHERE addon_id=".(int)$_POST['addon_id']);
|
||||
$addons_rows = $db->resultQuery("SELECT * FROM GSP_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_ogp_module() {
|
|||
<?php
|
||||
if (isset($_POST['addon_id']) && (int)$_POST['addon_id'] > 0 && isset($_POST['remove']))
|
||||
{
|
||||
if (!$db->query("DELETE FROM OGP_DB_PREFIXaddons WHERE addon_id=" . (int)$_POST['addon_id']))
|
||||
if (!$db->query("DELETE FROM GSP_DB_PREFIXaddons WHERE addon_id=" . (int)$_POST['addon_id']))
|
||||
print_lang('can_not_remove_addon');
|
||||
}
|
||||
|
||||
|
|
@ -301,24 +301,24 @@ function exec_ogp_module() {
|
|||
|
||||
if ( isset($_GET['show']) )
|
||||
{
|
||||
$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);
|
||||
$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);
|
||||
}
|
||||
elseif ( isset($_GET['show_all']) )
|
||||
{
|
||||
$result = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name, url, path, group_id FROM OGP_DB_PREFIXaddons NATURAL JOIN OGP_DB_PREFIXconfig_homes");
|
||||
$result = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name, url, path, group_id FROM GSP_DB_PREFIXaddons NATURAL JOIN GSP_DB_PREFIXconfig_homes");
|
||||
}
|
||||
elseif ( isset($_GET['show_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."'");
|
||||
$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."'");
|
||||
}
|
||||
elseif ( isset($_GET['show_game']))
|
||||
{
|
||||
$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);
|
||||
$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);
|
||||
}
|
||||
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 OGP_DB_PREFIXaddons NATURAL JOIN OGP_DB_PREFIXconfig_homes WHERE group_id=".$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);
|
||||
}
|
||||
?>
|
||||
<table class="center">
|
||||
|
|
|
|||
|
|
@ -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 `".OGP_DB_PREFIX."addons`;",
|
||||
"CREATE TABLE IF NOT EXISTS ".OGP_DB_PREFIX."addons
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."addons`;",
|
||||
"CREATE TABLE IF NOT EXISTS ".GSP_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 `".OGP_DB_PREFIX."addons` ADD `post_script` longtext NOT NULL;");
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."addons` ADD `post_script` longtext NOT NULL;");
|
||||
|
||||
$install_queries[2] = array(
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."addons` ADD `group_id` int(11) NULL;");
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."addons` ADD `group_id` int(11) NULL;");
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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 OGP_DB_PREFIXaddons WHERE home_cfg_id=".$server_home['home_cfg_id'].$query_groups);
|
||||
$addons = $db->resultQuery("SELECT addon_id FROM GSP_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(
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Component of the addonsmanager module
|
||||
*/
|
||||
|
||||
function exec_ogp_module() {
|
||||
function exec_gsp_module() {
|
||||
global $db;
|
||||
$home_id = $_GET['home_id'];
|
||||
$mod_id = $_GET['mod_id'];
|
||||
|
|
@ -31,8 +31,8 @@ function exec_ogp_module() {
|
|||
"<table class='center' >\n".
|
||||
"<tr><td>\n";
|
||||
$plugins = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name ".
|
||||
"FROM OGP_DB_PREFIXaddons ".
|
||||
"NATURAL JOIN OGP_DB_PREFIXconfig_homes ".
|
||||
"FROM GSP_DB_PREFIXaddons ".
|
||||
"NATURAL JOIN GSP_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_ogp_module() {
|
|||
"&port=".$port."'>".get_lang('install_plugin')."(".$plugins_qty.")</a>\n";
|
||||
|
||||
$mappacks = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name ".
|
||||
"FROM OGP_DB_PREFIXaddons ".
|
||||
"NATURAL JOIN OGP_DB_PREFIXconfig_homes ".
|
||||
"FROM GSP_DB_PREFIXaddons ".
|
||||
"NATURAL JOIN GSP_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_ogp_module() {
|
|||
"&port=".$port."'>".get_lang('install_mappack')."(".$mappacks_qty.")</a>\n";
|
||||
}
|
||||
$configs = $db->resultQuery("SELECT DISTINCT addon_id, name, game_name ".
|
||||
"FROM OGP_DB_PREFIXaddons ".
|
||||
"NATURAL JOIN OGP_DB_PREFIXconfig_homes ".
|
||||
"FROM GSP_DB_PREFIXaddons ".
|
||||
"NATURAL JOIN GSP_DB_PREFIXconfig_homes ".
|
||||
"WHERE addon_type='config' ".
|
||||
"AND home_cfg_id=".$home_cfg_id.$query_groups);
|
||||
$configs_qty = count($configs);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Administrative interface for the administration module
|
||||
*/
|
||||
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
global $db,$view;
|
||||
echo "<h2>".get_lang('administration')."</h2>";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Component of the administration module
|
||||
*/
|
||||
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
$path = getcwd()."/".$_GET['randir']."/"; // change the path to fit your websites document structure
|
||||
$fullPath = $path.$_GET['dwfile'];
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Component of the administration module
|
||||
*/
|
||||
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
echo "<h2>".get_lang('ban_list')."</h2>";
|
||||
global $db, $settings;
|
||||
|
|
@ -15,10 +15,10 @@ function exec_ogp_module()
|
|||
foreach($_POST as $name => $ip)
|
||||
{
|
||||
$ip = $db->real_escape_string($ip);
|
||||
$db->query("DELETE FROM `OGP_DB_PREFIXban_list` WHERE client_ip = '$ip';");
|
||||
$db->query("DELETE FROM `GSP_DB_PREFIXban_list` WHERE client_ip = '$ip';");
|
||||
}
|
||||
}
|
||||
$ban_list = $db->resultQuery("SELECT logging_attempts, banned_until, client_ip FROM `OGP_DB_PREFIXban_list`;");
|
||||
$ban_list = $db->resultQuery("SELECT logging_attempts, banned_until, client_ip FROM `GSP_DB_PREFIXban_list`;");
|
||||
$ban_qty = 0;
|
||||
$ban_table = '';
|
||||
if($ban_list)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Component of the administration module
|
||||
*/
|
||||
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
|
||||
if(isset($_POST['default']))
|
||||
|
|
|
|||
|
|
@ -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 `".OGP_DB_PREFIX."adminExternalLinks`;",
|
||||
"CREATE TABLE IF NOT EXISTS ".OGP_DB_PREFIX."adminExternalLinks
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."adminExternalLinks`;",
|
||||
"CREATE TABLE IF NOT EXISTS ".GSP_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 `".OGP_DB_PREFIX."logger`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."logger`
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."logger`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_DB_PREFIX."logger`
|
||||
(
|
||||
`log_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
`date` varchar(20) NOT NULL,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Component of the administration module
|
||||
*/
|
||||
|
||||
function exec_ogp_module() {
|
||||
function exec_gsp_module() {
|
||||
global $db, $view, $loggedInUserInfo;
|
||||
|
||||
$search_field = (isset($_GET['search']) && !empty($_GET['search'])) ? $_GET['search'] : false;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
include "function.php";
|
||||
|
||||
function exec_ogp_module(){
|
||||
function exec_gsp_module(){
|
||||
|
||||
if($_SERVER['REQUEST_METHOD'] === 'GET'){
|
||||
$homeid = $_GET['home_id'];
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
*
|
||||
* http://www.opengamepanel.org/
|
||||
* http://www.gameserver-panel.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_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
global $db ,$view;
|
||||
$settings = $db->getSettings();
|
||||
|
|
@ -31,7 +31,7 @@ function exec_ogp_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 OGP_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 GSP_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_ogp_module()
|
|||
|
||||
// request ogp user to create a home path.
|
||||
$r_server = $db->getRemoteServer($remote_server_id);
|
||||
$ogp_user = $r_server['ogp_user'];
|
||||
$gsp_user = $r_server['gsp_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_ogp_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 OGP_DB_PREFIXbilling_services".$where_service_id;
|
||||
$qry_services = "SELECT * FROM GSP_DB_PREFIXbilling_services".$where_service_id;
|
||||
$services = $db->resultQuery($qry_services);
|
||||
foreach ($services as $key => $row) {
|
||||
if($max_players < $row['slot_min_qty'] || $qty < 1){
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
*
|
||||
* http://www.opengamepanel.org/
|
||||
* http://www.gameserver-panel.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_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
global $db ,$view;
|
||||
$settings = $db->getSettings();
|
||||
|
|
@ -31,7 +31,7 @@ function exec_ogp_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 OGP_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 GSP_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_ogp_module()
|
|||
|
||||
// request ogp user to create a home path.
|
||||
$r_server = $db->getRemoteServer($remote_server_id);
|
||||
$ogp_user = $r_server['ogp_user'];
|
||||
$gsp_user = $r_server['gsp_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_ogp_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 OGP_DB_PREFIXbilling_services".$where_service_id;
|
||||
$qry_services = "SELECT * FROM GSP_DB_PREFIXbilling_services".$where_service_id;
|
||||
$services = $db->resultQuery($qry_services);
|
||||
foreach ($services as $key => $row) {
|
||||
if($max_players < $row['slot_min_qty'] || $qty < 1){
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
//Include database connection details
|
||||
require('includes/config.inc.php');
|
||||
|
|
@ -16,11 +16,11 @@ function exec_ogp_module()
|
|||
$cart_id = $db->realEscapeSingle($cart_id);
|
||||
$isAdmin = $db->isAdmin( $_SESSION['user_id'] );
|
||||
if ( $isAdmin )
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
else
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id)." AND user_id=".$db->realEscapeSingle($user_id) );
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id)." AND user_id=".$db->realEscapeSingle($user_id) );
|
||||
|
||||
$cart = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$cart = $db->resultQuery( "SELECT * FROM GSP_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_ogp_module()
|
|||
|
||||
$coupon_savings = 0;
|
||||
if($cart[0]['coupon_id']>0) {
|
||||
$result = $db->resultquery("SELECT discount from OGP_DB_PREFIXbilling_coupons WHERE id = '". $cart[0]['coupon_id'] . "'");
|
||||
$result = $db->resultquery("SELECT discount from GSP_DB_PREFIXbilling_coupons WHERE id = '". $cart[0]['coupon_id'] . "'");
|
||||
foreach($result as $coupon){
|
||||
$coupon_savings = $subtotal2 * ($coupon['discount'] / 100);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,12 +36,12 @@ function assignOrdersToCart($user_id,$tax_amount,$currency,$coupon_id){
|
|||
//discount coupon
|
||||
if (!isset($coupon_id)) $coupon_id = "0";
|
||||
$fields['coupon_id'] = $coupon_id;
|
||||
$check_expired = $db->resultquery("SELECT id from OGP_DB_PREFIXbilling_coupons WHERE id = $fields[coupon_id] AND count > 0 AND expires >= NOW()");
|
||||
$check_expired = $db->resultquery("SELECT id from GSP_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_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
error_reporting(E_ALL);
|
||||
|
||||
|
|
@ -52,10 +52,10 @@ function exec_ogp_module()
|
|||
|
||||
if( isset($_POST["update_cart"] )) {
|
||||
//print_r($_POST);
|
||||
$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']));
|
||||
$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']));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ function exec_ogp_module()
|
|||
if( isset($_POST["coupon_code"] ) && $_POST["coupon_code"] != "") {
|
||||
$coupon_id = 0;
|
||||
$coupon_code = "";
|
||||
$result = $db->resultquery("SELECT * from OGP_DB_PREFIXbilling_coupons WHERE code= '". $_POST['coupon_code'] . "'");
|
||||
$result = $db->resultquery("SELECT * from GSP_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_ogp_module()
|
|||
|
||||
if ($coupon_count > 0) {
|
||||
$coupon_count--;
|
||||
$db->resultquery("UPDATE ogp_billing_coupons SET count = $coupon_count WHERE code = '$_POST[coupon_code]'");
|
||||
$db->resultquery("UPDATE gsp_billing_coupons SET count = $coupon_count WHERE code = '$_POST[coupon_code]'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -150,7 +150,7 @@ function exec_ogp_module()
|
|||
if( isset( $_POST["extend"] ) or isset( $_POST["extend_and_pay_paypal"] ))
|
||||
{
|
||||
|
||||
$orders = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE order_id=".$db->realEscapeSingle($_POST['order_id']));
|
||||
$orders = $db->resultQuery("SELECT * FROM GSP_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_ogp_module()
|
|||
$status = 0;
|
||||
$finish_date = $order['finish_date'];
|
||||
$services = $db->resultQuery( "SELECT *
|
||||
FROM OGP_DB_PREFIXbilling_services
|
||||
FROM GSP_DB_PREFIXbilling_services
|
||||
WHERE service_id=".$db->realEscapeSingle($service_id) );
|
||||
$service = $services[0];
|
||||
//Calculating Price
|
||||
|
|
@ -196,7 +196,7 @@ function exec_ogp_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 OGP_DB_PREFIXbilling_orders
|
||||
$db->query( "UPDATE GSP_DB_PREFIXbilling_orders
|
||||
SET status=-3
|
||||
WHERE order_id=".$db->realEscapeSingle($_POST['order_id']));
|
||||
|
||||
|
|
@ -221,11 +221,11 @@ function exec_ogp_module()
|
|||
unset($_SESSION['coupon_id']);
|
||||
}
|
||||
$order_id = $_POST['order_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) );
|
||||
$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) );
|
||||
if( !$orders_in_cart )
|
||||
{
|
||||
$db->query( "DELETE FROM OGP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$db->query( "DELETE FROM GSP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -262,7 +262,7 @@ function exec_ogp_module()
|
|||
$carts[0] = $_SESSION['CART'];
|
||||
}
|
||||
|
||||
$user_carts = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE user_id=".$db->realEscapeSingle($user_id) ." order by cart_id desc" );
|
||||
$user_carts = $db->resultQuery( "SELECT * FROM GSP_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_ogp_module()
|
|||
{
|
||||
$cart_id = $user_cart['cart_id'];
|
||||
|
||||
$carts[$cart_id] = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_carts AS cart JOIN
|
||||
OGP_DB_PREFIXbilling_orders AS orders
|
||||
$carts[$cart_id] = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_carts AS cart JOIN
|
||||
GSP_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_ogp_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 ogp_billing_orders WHERE user_id=".$user_id);
|
||||
$result = $db->resultQuery("SELECT * FROM gsp_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_ogp_module()
|
|||
//get max_slots and min_slots from the billing_services for this game.
|
||||
|
||||
$services = $db->resultQuery( "SELECT *
|
||||
FROM OGP_DB_PREFIXbilling_services
|
||||
FROM GSP_DB_PREFIXbilling_services
|
||||
WHERE service_id=".$db->realEscapeSingle($order['service_id']) );
|
||||
$service = $services[0];
|
||||
$min = $service['slot_min_qty'];
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ function exec_ogp_module()
|
|||
$id = $db->realEscapeSingle($_POST['id']);
|
||||
|
||||
//Create INSERT query
|
||||
$qry_change_url = "UPDATE OGP_DB_PREFIXbilling_coupons
|
||||
$qry_change_url = "UPDATE GSP_DB_PREFIXbilling_coupons
|
||||
SET code ='".$new_code."',
|
||||
name = '".$new_name."',
|
||||
discount ='".$new_discount."',
|
||||
|
|
@ -35,14 +35,14 @@ function exec_ogp_module()
|
|||
$expires = $_POST['expires'];
|
||||
|
||||
|
||||
$query = "INSERT INTO OGP_DB_PREFIXbilling_coupons(code, name, discount, count, expires) VALUES('".$code."', '".$name."', '".$discount."', '".$count."', '".$expires."')";
|
||||
$query = "INSERT INTO GSP_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 OGP_DB_PREFIXbilling_coupons WHERE id=" . $db->realEscapeSingle($_POST['id']) );
|
||||
$db->query( "DELETE FROM GSP_DB_PREFIXbilling_coupons WHERE id=" . $db->realEscapeSingle($_POST['id']) );
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ function exec_ogp_module()
|
|||
</table>
|
||||
<br>
|
||||
<?php
|
||||
$result = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_coupons");
|
||||
$result = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_coupons");
|
||||
if ($result > 0)
|
||||
{
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ function exec_ogp_module()
|
|||
$id = $db->realEscapeSingle($_POST['id']);
|
||||
|
||||
//Create INSERT query
|
||||
$qry_change_url = "UPDATE OGP_DB_PREFIXbilling_coupons
|
||||
$qry_change_url = "UPDATE GSP_DB_PREFIXbilling_coupons
|
||||
SET code ='".$new_code."',
|
||||
name = '".$new_name."',
|
||||
discount ='".$new_discount."',
|
||||
|
|
@ -35,14 +35,14 @@ function exec_ogp_module()
|
|||
$expires = $_POST['expires'];
|
||||
|
||||
|
||||
$query = "INSERT INTO OGP_DB_PREFIXbilling_coupons(code, name, discount, count, expires) VALUES('".$code."', '".$name."', '".$discount."', '".$count."', '".$expires."')";
|
||||
$query = "INSERT INTO GSP_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 OGP_DB_PREFIXbilling_coupons WHERE id=" . $db->realEscapeSingle($_POST['id']) );
|
||||
$db->query( "DELETE FROM GSP_DB_PREFIXbilling_coupons WHERE id=" . $db->realEscapeSingle($_POST['id']) );
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ function exec_ogp_module()
|
|||
</table>
|
||||
<br>
|
||||
<?php
|
||||
$result = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_coupons");
|
||||
$result = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_coupons");
|
||||
if ($result > 0)
|
||||
{
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
require_once("includes/lib_remote.php");
|
||||
require_once("modules/config_games/server_config_parser.php");
|
||||
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
global $db,$view,$settings;
|
||||
$user_id = $_SESSION['user_id'];
|
||||
|
|
@ -12,12 +12,12 @@ function exec_ogp_module()
|
|||
if(isset($_GET['cart_id'])){
|
||||
$cart_id = $_GET['cart_id'];
|
||||
}
|
||||
$cart_paid = $db->resultQuery( "SELECT paid FROM OGP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$cart_paid = $db->resultQuery( "SELECT paid FROM GSP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$isAdmin = $db->isAdmin( $_SESSION['user_id'] );
|
||||
if ( $isAdmin ){
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id) );
|
||||
} else {
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id)." AND user_id=".$db->realEscapeSingle($user_id) );
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_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_ogp_module()
|
|||
$extended = $order['extended'] == "1" ? TRUE : FALSE;
|
||||
//Query service info
|
||||
$service = $db->resultQuery( "SELECT *
|
||||
FROM OGP_DB_PREFIXbilling_services
|
||||
FROM GSP_DB_PREFIXbilling_services
|
||||
WHERE service_id=".$db->realEscapeSingle($service_id) );
|
||||
|
||||
if( !empty( $service[0] ) )
|
||||
|
|
@ -62,7 +62,7 @@ function exec_ogp_module()
|
|||
$home_info = $db->getGameHomeWithoutMods($home_id);
|
||||
|
||||
//Create the remote connection
|
||||
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$remote = new GSPRemoteLibrary($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_ogp_module()
|
|||
$settings = $db->getSettings();
|
||||
$subject = "Gameserver Renewel at " . $settings['panel_name'];
|
||||
$email = $db->resultQuery(" SELECT DISTINCT users_email
|
||||
FROM ogp_users, ogp_billing_orders
|
||||
WHERE ogp_users.user_id = $user_id")[0]["users_email"];
|
||||
FROM gsp_users, gsp_billing_orders
|
||||
WHERE gsp_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_ogp_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 OGP_DB_PREFIXremote_server_ips WHERE remote_server_id=".$ip);
|
||||
$result = $db->resultQuery("SELECT ip_id FROM GSP_DB_PREFIXremote_server_ips WHERE remote_server_id=".$ip);
|
||||
foreach ($result as $rs)
|
||||
{
|
||||
$ip_id = $rs['ip_id'];
|
||||
|
|
@ -147,7 +147,7 @@ function exec_ogp_module()
|
|||
$home_info = $db->getGameHomeWithoutMods($home_id);
|
||||
|
||||
//Create the remote connection
|
||||
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
|
||||
$remote = new GSPRemoteLibrary($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_ogp_module()
|
|||
$settings = $db->getSettings();
|
||||
$subject = "New Gameserver installed at " . $settings['panel_name'];
|
||||
$email = $db->resultQuery(" SELECT DISTINCT users_email
|
||||
FROM ogp_users, ogp_billing_orders
|
||||
WHERE ogp_users.user_id = $user_id")[0]["users_email"];
|
||||
FROM gsp_users, gsp_billing_orders
|
||||
WHERE gsp_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_ogp_module()
|
|||
|
||||
|
||||
}
|
||||
// Set expiration date in ogp database
|
||||
// Set expiration date in gsp 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_ogp_module()
|
|||
|
||||
}
|
||||
// set order status
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_orders
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_orders
|
||||
SET status='" . $db->realEscapeSingle($status) . "'
|
||||
WHERE order_id=".$db->realEscapeSingle($order_id));
|
||||
|
||||
// set the order expiration
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_orders
|
||||
$db->query("UPDATE GSP_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 OGP_DB_PREFIXbilling_orders
|
||||
$db->query("UPDATE GSP_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 OGP_DB_PREFIXbilling_carts
|
||||
$db->query("UPDATE GSP_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 OGP_DB_PREFIXbilling_carts
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_carts
|
||||
SET date='" . $db->realEscapeSingle($date) . "'
|
||||
WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
|
||||
$db->query( "UPDATE OGP_DB_PREFIXgame_mods SET max_players= ".$order['max_players']." WHERE home_id=".$db->realEscapeSingle($home_id));
|
||||
$db->query( "UPDATE GSP_DB_PREFIXgame_mods SET max_players= ".$order['max_players']." WHERE home_id=".$db->realEscapeSingle($home_id));
|
||||
|
||||
|
||||
//Refresh to Game Monitor.
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
*
|
||||
* http://www.opengamepanel.org/
|
||||
* http://www.gameserver-panel.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 ogp web files */
|
||||
chdir("../.."); /* Base path to gsp 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 OGPRemoteLibrary($server_info['agent_ip'], $server_info['agent_port'], $server_info['encryption_key'],$server_info['timeout']);
|
||||
$remote = new GSPRemoteLibrary($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 OGPRemoteLibrary($server_info['agent_ip'], $server_info['agent_port'], $server_info['encryption_key'],$server_info['timeout']);
|
||||
$remote = new GSPRemoteLibrary($server_info['agent_ip'], $server_info['agent_port'], $server_info['encryption_key'],$server_info['timeout']);
|
||||
|
||||
// Remove the game home from db
|
||||
$db->deleteGameHome($home_id);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ if (strcmp ($res, "VERIFIED") == 0) {
|
|||
$receiver_email = $_POST['receiver_email'];
|
||||
$payer_email = $_POST['payer_email'];
|
||||
|
||||
$db->query("UPDATE OGP_DB_PREFIXbilling_carts
|
||||
$db->query("UPDATE GSP_DB_PREFIXbilling_carts
|
||||
SET paid=1
|
||||
WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
fwrite($fpx, "IPN Processed\n");
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
*
|
||||
* http://www.opengamepanel.org/
|
||||
* http://www.gameserver-panel.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 `".OGP_DB_PREFIX."billing_services`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."billing_services` (
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."billing_services`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_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 `".OGP_DB_PREFIX."billing_orders`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."billing_orders` (
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."billing_orders`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_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 `".OGP_DB_PREFIX."billing_carts`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."billing_carts` (
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."billing_carts`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_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 `".OGP_DB_PREFIX."billing_orders`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".OGP_DB_PREFIX."billing_orders` (
|
||||
"DROP TABLE IF EXISTS `".GSP_DB_PREFIX."billing_orders`;",
|
||||
"CREATE TABLE IF NOT EXISTS `".GSP_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 `".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';"
|
||||
"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';"
|
||||
);
|
||||
|
||||
$install_queries[3] = array(
|
||||
"ALTER TABLE `".OGP_DB_PREFIX."billing_orders` ADD `finish_date` varchar(16) NOT NULL DEFAULT '0';"
|
||||
"ALTER TABLE `".GSP_DB_PREFIX."billing_orders` ADD `finish_date` varchar(16) NOT NULL DEFAULT '0';"
|
||||
);
|
||||
|
||||
$install_queries[4] = array(
|
||||
"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';"
|
||||
"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';"
|
||||
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
error_reporting(E_ALL);
|
||||
|
||||
|
|
@ -7,12 +7,12 @@ function exec_ogp_module()
|
|||
|
||||
if(isset($_POST['remove']))
|
||||
{
|
||||
$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']));
|
||||
$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']));
|
||||
}
|
||||
if(isset($_POST['paid']))
|
||||
{
|
||||
$query_set_as_paid = $db->query("UPDATE OGP_DB_PREFIXbilling_carts
|
||||
$query_set_as_paid = $db->query("UPDATE GSP_DB_PREFIXbilling_carts
|
||||
SET paid=1
|
||||
WHERE cart_id=".$db->realEscapeSingle($_POST['cart_id']));
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ function exec_ogp_module()
|
|||
echo "<h1>Accounting</h1>";
|
||||
$servercount = 0;
|
||||
$income = 0;
|
||||
$paidOrders = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE status > 0");
|
||||
$paidOrders = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE status > 0");
|
||||
foreach($paidOrders as $inc)
|
||||
{
|
||||
$servercount = $servercount +1;
|
||||
|
|
@ -70,9 +70,9 @@ function exec_ogp_module()
|
|||
{
|
||||
{
|
||||
if ($isAdmin){
|
||||
$carts = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE paid =" . $db->realEscapeSingle($paid_value) ." order by cart_id DESC");
|
||||
$carts = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_carts WHERE paid =" . $db->realEscapeSingle($paid_value) ." order by cart_id DESC");
|
||||
}else{
|
||||
$carts = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE paid=3 AND user_id = " . $user_id ." order by cart_id DESC");
|
||||
$carts = $db->resultQuery("SELECT * FROM GSP_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_ogp_module()
|
|||
}?>
|
||||
</tr>
|
||||
<?php
|
||||
$orders = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart['cart_id'])." order by order_id DESC" );
|
||||
$orders = $db->resultQuery("SELECT * FROM GSP_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_ogp_module()
|
|||
//obter as informações de cupom usadas neste pedido
|
||||
$coupon_savings = 0;
|
||||
if($cart['coupon_id']>0) {
|
||||
$result = $db->resultquery("SELECT * from OGP_DB_PREFIXbilling_coupons WHERE id = '". $cart['coupon_id'] . "'");
|
||||
$result = $db->resultquery("SELECT * from GSP_DB_PREFIXbilling_coupons WHERE id = '". $cart['coupon_id'] . "'");
|
||||
foreach($result as $coupon){
|
||||
$coupon_savings = $subtotal * ($coupon['discount']/ 100);
|
||||
echo "Sub-total c/discount <b>$" .number_format( ($subtotal - $coupon_savings) , 2 ).$cart['currency']."</b></br><td>";
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
global $db,$view,$settings;
|
||||
$loadpage = "?m=billing&p=paid";
|
||||
$count = $_POST['count'] + 1;
|
||||
|
||||
$result = $db->resultquery("SELECT * from OGP_DB_PREFIXbilling_carts WHERE cart_id= '". $_POST['cart_id'] . "'");
|
||||
$result = $db->resultquery("SELECT * from GSP_DB_PREFIXbilling_carts WHERE cart_id= '". $_POST['cart_id'] . "'");
|
||||
foreach($result as $cartID){
|
||||
$paid = $cartID['paid'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
global $db,$view;
|
||||
$settings = $db->getSettings();
|
||||
|
|
@ -28,15 +28,15 @@ $debug = $settings['debug'];
|
|||
|
||||
if(!empty($cart_id))
|
||||
{
|
||||
$orders = $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
$orders = $db->resultQuery( "SELECT * FROM GSP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
//get couponID then discount for this cart
|
||||
$result= $db->resultQuery( "SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($cart_id));
|
||||
$result= $db->resultQuery( "SELECT * FROM GSP_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 ogp_billing_coupons WHERE id=".$db->realEscapeSingle($cartDB['coupon_id']));
|
||||
$result = $db->resultQuery( "SELECT discount FROM gsp_billing_coupons WHERE id=".$db->realEscapeSingle($cartDB['coupon_id']));
|
||||
foreach ($result as $couponDB){
|
||||
$coupon_discount=$couponDB['discount'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ function exec_ogp_module()
|
|||
$service = $db->realEscapeSingle($_POST['service']);
|
||||
|
||||
//Create UPDATE query
|
||||
$qry_change_url = "UPDATE OGP_DB_PREFIXbilling_services
|
||||
$qry_change_url = "UPDATE GSP_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_ogp_module()
|
|||
//Querying UPDATE enabled/disabled remote servers DB
|
||||
if (isset($_POST['update_remote_servers']))
|
||||
{
|
||||
$result = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXremote_servers");
|
||||
$result = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXremote_servers");
|
||||
foreach($result as $rs)
|
||||
{
|
||||
$server_enabled = 0;
|
||||
|
|
@ -40,7 +40,7 @@ function exec_ogp_module()
|
|||
}
|
||||
|
||||
//update the table with current value
|
||||
$query = "UPDATE OGP_DB_PREFIXremote_servers SET enabled = '".$server_enabled."' WHERE remote_server_id=".$rs['remote_server_id'];
|
||||
$query = "UPDATE GSP_DB_PREFIXremote_servers SET enabled = '".$server_enabled."' WHERE remote_server_id=".$rs['remote_server_id'];
|
||||
$db->query($query);
|
||||
|
||||
}
|
||||
|
|
@ -83,14 +83,14 @@ function exec_ogp_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 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 . "')";
|
||||
$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 . "')";
|
||||
$db->query($qry_add_service);
|
||||
}
|
||||
|
||||
//Querying REMOVE service FROM DB
|
||||
if (isset($_POST['service_id']))
|
||||
{
|
||||
$db->query( "DELETE FROM OGP_DB_PREFIXbilling_services WHERE service_id=" . $db->realEscapeSingle($_POST['service_id']) );
|
||||
$db->query( "DELETE FROM GSP_DB_PREFIXbilling_services WHERE service_id=" . $db->realEscapeSingle($_POST['service_id']) );
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -106,7 +106,7 @@ function exec_ogp_module()
|
|||
<td>
|
||||
<select name="modcfgid">
|
||||
<?php
|
||||
$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']));
|
||||
$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']));
|
||||
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_ogp_module()
|
|||
</tr>
|
||||
<tr>
|
||||
<?php
|
||||
$result3 = $db->resultQuery("SELECT DISTINCT remote_server_id, remote_server_name, agent_ip, ogp_user FROM OGP_DB_PREFIXremote_servers");
|
||||
$result3 = $db->resultQuery("SELECT DISTINCT remote_server_id, remote_server_name, agent_ip, gsp_user FROM GSP_DB_PREFIXremote_servers");
|
||||
?>
|
||||
<td><?php print_lang('remote_server');?></td>
|
||||
<td>
|
||||
|
|
@ -146,7 +146,7 @@ function exec_ogp_module()
|
|||
</tr>
|
||||
<tr>
|
||||
<?php
|
||||
$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']));
|
||||
$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']));
|
||||
foreach($mods as $mod)
|
||||
{
|
||||
?>
|
||||
|
|
@ -257,7 +257,7 @@ function exec_ogp_module()
|
|||
<h2>Enable/Disable Server Locations</h2>
|
||||
<?php
|
||||
//ENABLE OR DISABLE REMOTE SERVERS FOR GAMES
|
||||
$result = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXremote_servers");
|
||||
$result = $db->resultQuery("SELECT * FROM GSP_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_ogp_module()
|
|||
<br><br>";
|
||||
//end ENABLE REMOTE SERVERS
|
||||
|
||||
$services = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_services ORDER BY service_name");
|
||||
$services = $db->resultQuery("SELECT * FROM GSP_DB_PREFIXbilling_services ORDER BY service_name");
|
||||
if ($services > 0)
|
||||
{
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ function curPageName()
|
|||
return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
|
||||
}
|
||||
|
||||
function exec_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
require('includes/config.inc.php');
|
||||
require_once('modules/settings/functions.php');
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
*
|
||||
* http://www.opengamepanel.org/
|
||||
* http://www.gameserver-panel.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_ogp_module()
|
||||
function exec_gsp_module()
|
||||
{
|
||||
global $db, $view;
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ function exec_ogp_module()
|
|||
$new_description = str_replace("\\r\\n", "<br>", $_POST['description']);
|
||||
$service = $_POST['service_id'];
|
||||
|
||||
$change_description = "UPDATE OGP_DB_PREFIXbilling_services
|
||||
$change_description = "UPDATE GSP_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 OGP_DB_PREFIXbilling_services".$where_service_id;
|
||||
$qry_services = "SELECT * FROM GSP_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 OGP_DB_PREFIXremote_servers WHERE remote_server_id = ".$rsi;
|
||||
$query = "SELECT * FROM GSP_DB_PREFIXremote_servers WHERE remote_server_id = ".$rsi;
|
||||
$result = $db->resultQuery($query);
|
||||
foreach($result as $rs)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2017 The OGP Development Team
|
||||
* GSP - GameServer Panel
|
||||
* Copyright (C) 2008 - 2017 The GSP Development Team
|
||||
*
|
||||
* http://www.opengamepanel.org/
|
||||
* http://www.gameserver-panel.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 ogp web files */
|
||||
chdir("../.."); /* Base path to gsp web files */
|
||||
// Report all PHP errors
|
||||
error_reporting(E_ALL);
|
||||
// Path definitions
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue