updated from actual site files
This commit is contained in:
parent
1434929258
commit
955c9202e4
33 changed files with 4388 additions and 987 deletions
|
|
@ -32,37 +32,41 @@
|
|||
<server_params>
|
||||
<param id="MODLIST" key="-mod=" type="text">
|
||||
<default></default>
|
||||
<option>ns</option>
|
||||
<caption>Mods ex: @A-Map;@AI;@Moreguns;@TurboCars</caption>
|
||||
<desc>Semicolon after each mod and you MUST copy the KEY into your keys folder.
|
||||
Make sure if you install a MOD, you list the name here or else it wont get loaded.
|
||||
</desc>
|
||||
</param>
|
||||
</server_params>
|
||||
<pre_install>
|
||||
wget http://files.iaregamer.com/installers/arma2oa_win32/arma2oa_win32.tar
|
||||
tar -xvf arma2oa_win32.tar
|
||||
rm arma2oa_win32.tar
|
||||
</pre_install>
|
||||
<post_install>
|
||||
wget http://files.iaregamer.com/installers/arma2oa_win32/PostInstall.tar
|
||||
tar -xvf PostInstall.tar
|
||||
chmod +x setup_db.sh
|
||||
./setup_db.sh
|
||||
rm setup_db.sh
|
||||
rm PostInstall.tar
|
||||
</post_install>
|
||||
<pre_start>
|
||||
rm cfg/*.RPT
|
||||
rm cfg/*.log
|
||||
</pre_start>
|
||||
<lock_files>
|
||||
arma2oaserver.exe
|
||||
</lock_files>
|
||||
<configuration_files>
|
||||
<file description="Server settings">cfg\server.cfg</file>
|
||||
<file description="Basic Network settings">cfg\basic.cfg</file>
|
||||
<file description="BattlEye RconPassword">cfg\battleye\beserver.cfg</file>
|
||||
<file description="Difficulty Settings">cfg\users\player\player.arma2oaprofile</file>
|
||||
</configuration_files>
|
||||
|
||||
|
||||
<default>@dayz_epoch;@epochserver;</default>
|
||||
<option>ns</option>
|
||||
<caption>Mods ex: @dayz;@hive or @dayz_epoch;@dayz_epoch_server</caption>
|
||||
<desc>Semicolon after each mod and you MUST copy the KEY into your keys folder.
|
||||
Make sure if you install a MOD, you list the name here or else it wont get loaded.
|
||||
</desc>
|
||||
</param>
|
||||
</server_params>
|
||||
|
||||
<post_install>
|
||||
mkdir -p ./cfg
|
||||
touch ./cfg/dayz_arma2co_win32.xml.txt
|
||||
|
||||
</post_install>
|
||||
<pre_start>
|
||||
</pre_start>
|
||||
|
||||
<lock_files>
|
||||
Arma2Server.exe
|
||||
Arma2Server_x64.exe
|
||||
</lock_files>
|
||||
|
||||
<configuration_files>
|
||||
<file description="Server settings">cfg\server.cfg</file>
|
||||
<file description="Basic Network settings" >cfg\basic.cfg</file>
|
||||
<file description="BattlEye Rcon Password" >cfg\battleye\beserver.cfg</file>
|
||||
<file description="DB settings and Date/Time">cfg\hiveext.ini</file>
|
||||
<file description="Difficulty Settings">cfg\users\dayz\dayz.arma2oaprofile</file>
|
||||
<file description="For DayZmod: 224580 All others: 33930">steam_appid.txt</file>
|
||||
<file description="BEC Scheduler">bec\config\scheduler.xml</file>
|
||||
<file description="BEC Admins">bec\config\admins.xml</file>
|
||||
<file description="BEC Whitelist">bec\config\whitelist.xml</file>
|
||||
<file description="BEC Message List">bec\config\fortune.txt</file>
|
||||
|
||||
</configuration_files>
|
||||
</game_config>
|
||||
|
|
|
|||
|
|
@ -1,100 +1,114 @@
|
|||
<game_config>
|
||||
<game_key>dayzmod_win32</game_key>
|
||||
<protocol>lgsl</protocol>
|
||||
<lgsl_query_name>dayzmod</lgsl_query_name>
|
||||
<installer>steamcmd</installer>
|
||||
<game_name>DayZ Mod</game_name>
|
||||
<server_exec_name>arma2oaserver.exe</server_exec_name>
|
||||
<cli_template>%MODLIST% -cfg=cfg\basic.cfg -config=cfg\server.cfg -name=dayz -profiles=cfg %IP% %PORT%</cli_template>
|
||||
<cli_params>
|
||||
<cli_param id="PORT" cli_string="-port=" />
|
||||
<cli_param id="IP" cli_string="-ip=" />
|
||||
</cli_params>
|
||||
<reserve_ports>
|
||||
<port type="add" id="QUERY_PORT">1</port>
|
||||
</reserve_ports>
|
||||
<cli_allow_chars>;</cli_allow_chars>
|
||||
<game_key>dayzmod_win32</game_key>
|
||||
<installer>steamcmd</installer>
|
||||
<game_name>DayZ Mod</game_name>
|
||||
<server_exec_name>arma2oaserver.exe</server_exec_name>
|
||||
<cli_template>%MODLIST% -cfg=cfg\basic.cfg -config=cfg\server.cfg -name=dayz -profiles=cfg %IP% %PORT%</cli_template>
|
||||
<cli_params>
|
||||
<cli_param id="PORT" cli_string="-port=" />
|
||||
<cli_param id="IP" cli_string="-ip=" />
|
||||
</cli_params>
|
||||
<reserve_ports>
|
||||
<port type="add" id="QUERY_PORT">1</port>
|
||||
</reserve_ports>
|
||||
<cli_allow_chars>;</cli_allow_chars>
|
||||
|
||||
<console_log>cfg/arma2oaserver.RPT</console_log>
|
||||
<max_user_amount>64</max_user_amount>
|
||||
<control_protocol>armabe</control_protocol>
|
||||
<mods>
|
||||
<mod>
|
||||
<name>none</name>
|
||||
<installer_name>33930</installer_name>
|
||||
</mod>
|
||||
</mods>
|
||||
<replace_texts>
|
||||
|
||||
<text key="max_players">
|
||||
<default>(maxPlayers\s*=\s*)(.*)(;)</default>
|
||||
<var>maxPlayers = "%key%";</var>
|
||||
<filepath>cfg/server.cfg</filepath>
|
||||
<options>key-regex</options>
|
||||
</text>
|
||||
|
||||
<text key="port">
|
||||
<default>Port =.*</default>
|
||||
<var>Port = %key% </var>
|
||||
<filepath>bec/config/config.cfg</filepath>
|
||||
<options>key-regex</options>
|
||||
</text>
|
||||
<text key="ip">
|
||||
<default>Ip =.*</default>
|
||||
<var>Ip = %key% </var>
|
||||
<filepath>bec/config/config.cfg</filepath>
|
||||
<options>key-regex</options>
|
||||
</text>
|
||||
<text key="home_path">
|
||||
<default>BePath =.*</default>
|
||||
<var>BePath = %key%/cfg/Battleye</var>
|
||||
<filepath>bec/config/config.cfg</filepath>
|
||||
<options>key-regex</options>
|
||||
</text>
|
||||
|
||||
</replace_texts>
|
||||
|
||||
<server_params>
|
||||
|
||||
|
||||
<param id="MODLIST" key="-mod=" type="text">
|
||||
<default>@dayz_epoch;@epochserver;</default>
|
||||
<option>ns</option>
|
||||
<caption>Mods ex: @dayz;@hive or @dayz_epoch;@dayz_epoch_server</caption>
|
||||
<desc>Semicolon after each mod and you MUST copy the KEY into your keys folder.
|
||||
Make sure if you install a MOD, you list the name here or else it wont get loaded.
|
||||
</desc>
|
||||
</param>
|
||||
</server_params>
|
||||
|
||||
<post_install>
|
||||
|
||||
<console_log>cfg/arma2oaserver.RPT</console_log>
|
||||
<max_user_amount>64</max_user_amount>
|
||||
<control_protocol>armabe</control_protocol>
|
||||
<mods>
|
||||
<mod>
|
||||
<name>none</name>
|
||||
<installer_name>33930</installer_name>
|
||||
</mod>
|
||||
</mods>
|
||||
<replace_texts>
|
||||
<text key="max_players">
|
||||
<default>(maxPlayers\s*=\s*)(.*)(;)</default>
|
||||
<var>maxPlayers = "%key%";</var>
|
||||
<filepath>cfg/server.cfg</filepath>
|
||||
<options>key-regex</options>
|
||||
</text>
|
||||
<text key="port">
|
||||
<default>Port =.*</default>
|
||||
<var>Port = %key% </var>
|
||||
<filepath>bec/config/config.cfg</filepath>
|
||||
<options>key-regex</options>
|
||||
</text>
|
||||
<text key="ip">
|
||||
<default>Ip =.*</default>
|
||||
<var>Ip = %key% </var>
|
||||
<filepath>bec/config/config.cfg</filepath>
|
||||
<options>key-regex</options>
|
||||
</text>
|
||||
<text key="home_path">
|
||||
<default>BePath =.*</default>
|
||||
<var>BePath = %key%/cfg/Battleye</var>
|
||||
<filepath>bec/config/config.cfg</filepath>
|
||||
<options>key-regex</options>
|
||||
</text>
|
||||
</replace_texts>
|
||||
<server_params>
|
||||
<param id="MODLIST" key="-mod=" type="text">
|
||||
<default>@dayz;@hive;</default>
|
||||
<option>ns</option>
|
||||
<caption>Mods ex: @dayz;@hive or @dayz_epoch;@dayz_epoch_server</caption>
|
||||
<desc>
|
||||
Semicolon after each mod and you MUST copy the KEY into your keys folder.
|
||||
Make sure if you install a MOD, you list the name here or else it wont get loaded.
|
||||
</desc>
|
||||
</param>
|
||||
</server_params>
|
||||
<pre_install>
|
||||
cp D:/installers/arma2/arma2Addons.tar .
|
||||
tar -xvf arma2Addons.tar
|
||||
rm arma2Addons.tar
|
||||
</pre_install>
|
||||
<post_install>
|
||||
mkdir -p ./cfg
|
||||
touch ./cfg/dayz_arma2co_win32.xml.txt
|
||||
wget http://files.iaregamer.com/installers/dayz_mod/dayz_mod-1.9.0.tar .
|
||||
tar -xvf dayz_mod-1.9.0.tar
|
||||
wget http://files.iaregamer.com/addons/dayz-mod-1.9.tar.gz .
|
||||
tar -xzvf dayz-mod-1.9.tar.gz
|
||||
chmod +x setup_db.sh
|
||||
./setup_db.sh
|
||||
rm setup_db.sh
|
||||
rm 1.9.0_fresh.sql
|
||||
rm dayz_mod-1.9.0.tar
|
||||
</post_install>
|
||||
<pre_start>
|
||||
cd bec
|
||||
start "BEC" bec.exe --dsc --dec -f config.cfg
|
||||
</pre_start>
|
||||
<lock_files>
|
||||
arma2oaserver.exe
|
||||
arma2oaserver_x64.exe
|
||||
</lock_files>
|
||||
<configuration_files>
|
||||
<file description="Server settings">cfg\server.cfg</file>
|
||||
<file description="Basic Network settings" >cfg\basic.cfg</file>
|
||||
<file description="BattlEye Rcon Password" >cfg\battleye\beserver.cfg</file>
|
||||
<file description="DB settings and Date/Time">cfg\hiveext.ini</file>
|
||||
<file description="Difficulty Settings">cfg\users\dayz\dayz.arma2oaprofile</file>
|
||||
<file description="For DayZmod: 224580 All others: 33930">steam_appid.txt</file>
|
||||
<file description="BEC Scheduler">bec\config\scheduler.xml</file>
|
||||
<file description="BEC Admins">bec\config\admins.xml</file>
|
||||
<file description="BEC Whitelist">bec\config\whitelist.xml</file>
|
||||
<file description="BEC Message List">bec\config\fortune.txt</file>
|
||||
</configuration_files>
|
||||
rm *.sh
|
||||
rm *.sql
|
||||
rm *.gz
|
||||
|
||||
printf '%s\r\n' \
|
||||
'@echo off' \
|
||||
'del /q "..\_alsoRun.pid" 2>nul' \
|
||||
'cd bec
|
||||
'start "BEC" bec.exe --dsc --dec -f config.cfg' \
|
||||
'cd ..
|
||||
'timeout /t 3 /nobreak >nul' \
|
||||
'for /f "tokens=2 delims==" %%P in ('"'"'wmic process where "ExecutablePath='"'"'%cd:\=\\%\\bec.exe'"'"'" get ProcessId /value ^| find "="'"'"') do >"..\_alsoRun.pid" echo %%P' \
|
||||
> _alsoRun.bat
|
||||
|
||||
|
||||
</post_install>
|
||||
<pre_start>
|
||||
</pre_start>
|
||||
|
||||
<lock_files>
|
||||
Arma2Server.exe
|
||||
Arma2Server_x64.exe
|
||||
</lock_files>
|
||||
|
||||
<configuration_files>
|
||||
<file description="Server settings">cfg\server.cfg</file>
|
||||
<file description="Basic Network settings" >cfg\basic.cfg</file>
|
||||
<file description="BattlEye Rcon Password" >cfg\battleye\beserver.cfg</file>
|
||||
<file description="DB settings and Date/Time">cfg\hiveext.ini</file>
|
||||
<file description="Difficulty Settings">cfg\users\dayz\dayz.arma2oaprofile</file>
|
||||
<file description="For DayZmod: 224580 All others: 33930">steam_appid.txt</file>
|
||||
<file description="BEC Scheduler">bec\config\scheduler.xml</file>
|
||||
<file description="BEC Admins">bec\config\admins.xml</file>
|
||||
<file description="BEC Whitelist">bec\config\whitelist.xml</file>
|
||||
<file description="BEC Message List">bec\config\fortune.txt</file>
|
||||
|
||||
</configuration_files>
|
||||
|
||||
</game_config>
|
||||
|
|
|
|||
|
|
@ -68,20 +68,29 @@ Make sure if you install a MOD, you list the name here or else it wont get loade
|
|||
<post_install>
|
||||
mkdir -p ./cfg
|
||||
touch ./cfg/epochmod_win32.xml
|
||||
wget http://files.iaregamer.com/installers/arma2/arma2Addons.tar .
|
||||
wget http://files.iaregamer.com/installers/epoch_mod/epoch_mod.tar .
|
||||
tar -xvf arma2Addons.tar
|
||||
tar -xvf epoch_mod.tar
|
||||
wget http://files.iaregamer.com/addons/arma2Addons.tar.gz .
|
||||
wget http://files.iaregamer.com/addons/epochmod-1.0.7.1.tar.gz .
|
||||
tar -zxvf arma2Addons.tar.gz
|
||||
tar -zxvf epoch_mod.tar.gz
|
||||
chmod +x setup_db.sh
|
||||
#chmod +x _start_co.bat
|
||||
./setup_db.sh
|
||||
#rm setup_db.sh
|
||||
rm epoch_mod.tar
|
||||
rm arma2Addons.tar
|
||||
|
||||
rm *.sh
|
||||
rm *.gz
|
||||
rm *.sql
|
||||
|
||||
printf '%s\r\n' \
|
||||
'@echo off' \
|
||||
'del /q "..\_alsoRun.pid" 2>nul' \
|
||||
'cd bec \
|
||||
'start "BEC" bec.exe --dsc --dec -f config.cfg' \
|
||||
'cd .. \
|
||||
'timeout /t 1 /nobreak >nul' \
|
||||
'for /f "tokens=2 delims==" %%P in ('"'"'wmic process where "ExecutablePath='"'"'%cd:\=\\%\\bec.exe'"'"'" get ProcessId /value ^| find "="'"'"') do >"..\_alsoRun.pid" echo %%P' \
|
||||
> _alsoRun.bat
|
||||
|
||||
</post_install>
|
||||
<pre_start>
|
||||
cd bec
|
||||
start "BEC" bec.exe --dsc --dec -f config.cfg
|
||||
</pre_start>
|
||||
|
||||
<lock_files>
|
||||
|
|
|
|||
|
|
@ -27,292 +27,292 @@
|
|||
require_once('includes/lib_remote.php');
|
||||
|
||||
|
||||
function exec_ogp_module()
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db, $settings, $loggedInUserInfo;
|
||||
global $db, $settings, $loggedInUserInfo;
|
||||
|
||||
$isAdmin = $db->isAdmin($_SESSION['user_id']);
|
||||
$user_id = $_SESSION['user_id'];
|
||||
|
||||
$isAdmin = $db->isAdmin($_SESSION['user_id']);
|
||||
$user_id = $_SESSION['user_id'];
|
||||
$page_user = (isset($_GET['page']) && (int)$_GET['page'] > 0) ? (int)$_GET['page'] : 1; // thanks for Adjokip
|
||||
$limit_user = isset($_GET['limit']) ? $_GET['limit'] : 10;
|
||||
|
||||
$page_user = (isset($_GET['page']) && (int)$_GET['page'] > 0) ? (int)$_GET['page'] : 1; // thanks for Adjokip
|
||||
$limit_user = isset($_GET['limit']) ? $_GET['limit'] : 10;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(hasValue($loggedInUserInfo) && is_array($loggedInUserInfo) && $loggedInUserInfo["users_page_limit"] && !(isset($_GET['limit']) and !empty($_GET['limit']))){
|
||||
$limit_user = $loggedInUserInfo["users_page_limit"];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if(hasValue($loggedInUserInfo) && is_array($loggedInUserInfo) && $loggedInUserInfo["users_page_limit"] && !(isset($_GET['limit']) and !empty($_GET['limit']))){
|
||||
$limit_user = $loggedInUserInfo["users_page_limit"];
|
||||
}
|
||||
|
||||
|
||||
//show if new server created
|
||||
$cartresult = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE user_id='".$_SESSION['user_id']."' AND status = 'paid'");
|
||||
$newServices=0;
|
||||
$cartresult = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE user_id='".$_SESSION['user_id']."' AND status = 'paid'");
|
||||
$newServices=0;
|
||||
foreach($cartresult as $res){
|
||||
$newServices=$newServices + 1;
|
||||
}
|
||||
//Popup notification
|
||||
if($newServices > 0) {
|
||||
echo'<div class="alert alert-success alert-dismissible">
|
||||
|
||||
|
||||
<a href="#" class="close" data-dismiss="alert" aria-label="close"></a>
|
||||
|
||||
|
||||
<strong>GOOD NEWS!</strong> You have a new server! <br>
|
||||
<form method="post" action="home.php?m=billing&p=create_servers">
|
||||
<input type="hidden" name="order_id" value="'. $res['order_id'].'">
|
||||
<button type="submit" name="submit_param" value="submit_value" class="link-button">
|
||||
Create Server
|
||||
</button>
|
||||
</form>
|
||||
<form method="post" action="home.php?m=billing&p=create_servers">
|
||||
<input type="hidden" name="cart_id" value="'. $res['cart_id'].'">
|
||||
<button type="submit" name="submit_param" value="submit_value" class="link-button">
|
||||
Create Server
|
||||
</button>
|
||||
</form>
|
||||
|
||||
</div>';
|
||||
}
|
||||
//Invoice is due.
|
||||
$orderresult = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE user_id='".$_SESSION['user_id']."' AND status = 'invoiced'");
|
||||
$invoicesDue=0;
|
||||
foreach($orderresult as $res){
|
||||
$invoicesDue=$invoicesDue + 1;
|
||||
}
|
||||
//Invoice is due.
|
||||
$orderresult = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE user_id='".$_SESSION['user_id']."' AND status = 'invoiced'");
|
||||
$invoicesDue=0;
|
||||
foreach($orderresult as $res){
|
||||
$invoicesDue=$invoicesDue + 1;
|
||||
}
|
||||
//Popup notification WARNING
|
||||
if($invoicesDue > 0) {
|
||||
if($invoicesDue > 0) {
|
||||
echo'<div class="alert alert-warning alert-dismissible">
|
||||
<a href="#" class="close" data-dismiss="alert" aria-label="close"></a>
|
||||
<a href="#" class="close" data-dismiss="alert" aria-label="close"></a>
|
||||
You have an Invoice Due <br>
|
||||
<form method="post" action="home.php?m=billing&p=create_servers">
|
||||
<input type="hidden" name="order_id" value="'. $res['order_id'].'">
|
||||
<button type="submit" name="submit_param" value="submit_value" class="link-button">
|
||||
View Invoice
|
||||
</button>
|
||||
|
||||
</div>';
|
||||
}
|
||||
//Server is suspended DANGER
|
||||
$orderresult = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE user_id='".$_SESSION['user_id']."' AND status = 'suspended'");
|
||||
$invoicesDue=0;
|
||||
foreach($orderresult as $res){
|
||||
$invoicesDue=$invoicesDue + 1;
|
||||
}
|
||||
//Popup notification
|
||||
if($invoicesDue > 0) {
|
||||
<form method="post" action="home.php?m=billing&p=create_servers">
|
||||
<input type="hidden" name="cart_id" value="'. $res['cart_id'].'">
|
||||
<button type="submit" name="submit_param" value="submit_value" class="link-button">
|
||||
View Invoice
|
||||
</button>
|
||||
|
||||
</div>';
|
||||
}
|
||||
//Server is suspended DANGER
|
||||
$orderresult = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE user_id='".$_SESSION['user_id']."' AND status = 'suspended'");
|
||||
$invoicesDue=0;
|
||||
foreach($orderresult as $res){
|
||||
$invoicesDue=$invoicesDue + 1;
|
||||
}
|
||||
//Popup notification
|
||||
if($invoicesDue > 0) {
|
||||
echo'<div class="alert alert-danger alert-dismissible">
|
||||
<a href="#" class="close" data-dismiss="alert" aria-label="close"></a>
|
||||
<a href="#" class="close" data-dismiss="alert" aria-label="close"></a>
|
||||
<strong>Warning!</strong> You have an OVERDUE invoice<br>
|
||||
<form method="post" action="home.php?m=billing&p=create_servers">
|
||||
<input type="hidden" name="order_id" value="'. $res['order_id'].'">
|
||||
<button type="submit" name="submit_param" value="submit_value" class="link-button">
|
||||
View Overdue Invoice
|
||||
</button>
|
||||
</div>';
|
||||
}
|
||||
|
||||
if( isset($settings['welcome_title']) && $settings['welcome_title'] == "1" )
|
||||
{
|
||||
if( isset($settings['welcome_title_message']) && !empty($settings['welcome_title_message'] ))
|
||||
{
|
||||
echo "<div>" . $settings['welcome_title_message'] . "</div>";
|
||||
}
|
||||
}
|
||||
<form method="post" action="home.php?m=billing&p=create_servers">
|
||||
<input type="hidden" name="cart_id" value="'. $res['cart_id'].'">
|
||||
<button type="submit" name="submit_param" value="submit_value" class="link-button">
|
||||
View Overdue Invoice
|
||||
</button>
|
||||
</div>';
|
||||
}
|
||||
|
||||
if( isset($settings['welcome_title']) && $settings['welcome_title'] == "1" )
|
||||
{
|
||||
if( isset($settings['welcome_title_message']) && !empty($settings['welcome_title_message'] ))
|
||||
{
|
||||
echo "<div>" . $settings['welcome_title_message'] . "</div>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
require_once("includes/refreshed.php");
|
||||
$refresh = new refreshed();
|
||||
require_once("includes/refreshed.php");
|
||||
$refresh = new refreshed();
|
||||
$OnlineServers .= "<p>Recent updates and changes</p>";
|
||||
?>
|
||||
<div style="margin-top:20px;">
|
||||
<?php
|
||||
//$title[$id] = "The Title";
|
||||
//$content[$id] = "Content of the Widget";
|
||||
$title = array();
|
||||
$content = array();
|
||||
$href = array();
|
||||
// Order History
|
||||
$title[1] = "Order History"; // get_lang('orders');
|
||||
$content[1] = 'View all your orders, invoices and expiration dates. ';
|
||||
$href[1] = 'home.php?m=billing&p=orders';
|
||||
|
||||
// Recent News
|
||||
?>
|
||||
<div style="margin-top:20px;">
|
||||
<?php
|
||||
//$title[$id] = "The Title";
|
||||
//$content[$id] = "Content of the Widget";
|
||||
$title = array();
|
||||
$content = array();
|
||||
$href = array();
|
||||
// Order History
|
||||
$title[1] = "Order History"; // get_lang('orders');
|
||||
$content[1] = 'View all your orders, invoices and expiration dates. ';
|
||||
$href[1] = 'home.php?m=billing&p=orders';
|
||||
|
||||
// Recent News
|
||||
//$xml=simplexml_load_file("modules/news/data/listings.xml");
|
||||
//$lastnews = count($xml)-1;
|
||||
//$title[2] = "Recent News";
|
||||
//$content[2] = $xml->listing[$lastnews]->title;
|
||||
//$href[2] = 'home.php?m=news&p=news';
|
||||
//$lastnews = count($xml)-1;
|
||||
//$title[2] = "Recent News";
|
||||
//$content[2] = $xml->listing[$lastnews]->title;
|
||||
//$href[2] = 'home.php?m=news&p=news';
|
||||
|
||||
// Notifications
|
||||
$title[3] = "Notifications"; // get_lang('orders');
|
||||
$content[3] = 'View all your notifications. ';
|
||||
$href[3] = 'home.php?m=circular&p=show_circular&list=true';
|
||||
|
||||
// Notifications
|
||||
$title[3] = "Notifications"; // get_lang('orders');
|
||||
$content[3] = 'View all your notifications. ';
|
||||
$href[3] = 'home.php?m=circular&p=show_circular&list=true';
|
||||
// Invoices
|
||||
$title[4] = 'Current Invoices';
|
||||
$content[4] ='An Invoice will be created before your server expires. Click here to view current invoices.<br>Invoices Due : '. $invoicesDue ;
|
||||
$href[4] = 'home.php?m=billing&p=cart';
|
||||
|
||||
// Invoices
|
||||
$title[4] = 'Current Invoices';
|
||||
$content[4] ='An Invoice will be created before your server expires. Click here to view current invoices.<br>Invoices Due : '. $invoicesDue ;
|
||||
$href[4] = 'home.php?m=billing&p=cart';
|
||||
|
||||
// Support
|
||||
$title[5] = (isset($settings['support_widget_title']) && $settings['support_widget_title'] != "") ?
|
||||
$settings['support_widget_title'] : get_lang('support');
|
||||
$content[5] = '<img src="themes/' . $settings['theme'] . '/images/icons/support.png" style="width:48px;float:right;margin:0 0 0 8px" /> Submit a SUPPORT TICKET or use our Discord Chat at the bottom right. Click this box to JOIN our Discord';
|
||||
$href[5] = 'https://discord.gg/cWHAbav';
|
||||
// Support
|
||||
$title[5] = (isset($settings['support_widget_title']) && $settings['support_widget_title'] != "") ?
|
||||
$settings['support_widget_title'] : get_lang('support');
|
||||
$content[5] = '<img src="themes/' . $settings['theme'] . '/images/icons/support.png" style="width:48px;float:right;margin:0 0 0 8px" /> Submit a SUPPORT TICKET or use our Discord Chat at the bottom right. Click this box to JOIN our Discord';
|
||||
$href[5] = 'https://discord.gg/cWHAbav';
|
||||
|
||||
|
||||
|
||||
|
||||
$widgets = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXwidgets_users WHERE user_id='".$_SESSION['user_id']."' ORDER BY sort_no");
|
||||
|
||||
if(!$widgets)
|
||||
{
|
||||
if($db->createUserWidgets($_SESSION['user_id']))
|
||||
$widgets = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXwidgets_users WHERE user_id='".$_SESSION['user_id']."' ORDER BY sort_no");
|
||||
}
|
||||
|
||||
if($widgets)
|
||||
{
|
||||
$colhtml[1] = '<div class="column one_fourth" id="column1" >';
|
||||
$colhtml[2] = '<div class="column one_two" id="column2" >';
|
||||
$colhtml[3] = '<div class="column one_fourth" id="column3" >';
|
||||
foreach($widgets as $widget)
|
||||
{
|
||||
if(array_key_exists($widget["widget_id"], $title)){
|
||||
if( (!isset($settings['old_dashboard_behavior']) or $settings['old_dashboard_behavior'] == 0) AND $widget['widget_id'] == "3" )
|
||||
continue;
|
||||
$colhtml[$widget['column_id']] .= '<div class="dragbox bloc rounded" id="item'.$widget['widget_id'].'">'.
|
||||
'<h4><span class="configure"></span>';
|
||||
if(!is_null($title[$widget['widget_id']]))
|
||||
$colhtml[$widget['column_id']] .= $title[$widget['widget_id']];
|
||||
|
||||
$colhtml[$widget['column_id']] .= '</h4><div class="dragbox-content" ';
|
||||
if(!is_null($href[$widget['widget_id']]))
|
||||
{
|
||||
$colhtml[$widget['column_id']] .= "onclick=\"location.href='". $href[$widget['widget_id']] . "'\" style=\"cursor:pointer;";
|
||||
if($widget['collapsed']==1)
|
||||
$colhtml[$widget['column_id']] .= 'display:none;';
|
||||
$colhtml[$widget['column_id']] .= '"';
|
||||
}
|
||||
elseif($widget['collapsed']==1)
|
||||
$colhtml[$widget['column_id']] .= 'style="display:none;"';
|
||||
|
||||
$colhtml[$widget['column_id']] .= '>';
|
||||
|
||||
$widgets = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXwidgets_users WHERE user_id='".$_SESSION['user_id']."' ORDER BY sort_no");
|
||||
if(!is_null($content[$widget['widget_id']]))
|
||||
$colhtml[$widget['column_id']] .= $content[$widget['widget_id']];
|
||||
|
||||
if(!$widgets)
|
||||
{
|
||||
if($db->createUserWidgets($_SESSION['user_id']))
|
||||
$widgets = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXwidgets_users WHERE user_id='".$_SESSION['user_id']."' ORDER BY sort_no");
|
||||
}
|
||||
$colhtml[$widget['column_id']] .= '</div></div>';
|
||||
}
|
||||
}
|
||||
foreach($colhtml as $html )
|
||||
echo $html.'</div>';
|
||||
}
|
||||
|
||||
// Server Status Link - Available to all users
|
||||
echo "<div style='margin-top:20px;'>
|
||||
<div class='bloc rounded' >
|
||||
<h4>Server Status</h4>
|
||||
<div style='text-align: center; padding: 20px;'>
|
||||
<p>View the status of all game servers</p>
|
||||
<a href='server_status.php' target='_blank' style='background-color: #4CAF50; color: white; padding: 10px 20px; text-decoration: none; border-radius: 4px; display: inline-block; margin: 10px;'>
|
||||
🖥️ View Server Status
|
||||
</a>
|
||||
<br><small style='color: #666;'>Opens in a new window</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>";
|
||||
|
||||
if( $isAdmin AND $db->isModuleInstalled('status') )
|
||||
{
|
||||
echo "<h0>".get_lang('server_status')."</h0><br>";
|
||||
$servers = $db->getRemoteServers();
|
||||
|
||||
echo "<div id='column4' style='float:left;width:40%;' >
|
||||
<div class='bloc rounded' >
|
||||
<h4>".get_lang('select_remote_server')."</h4>
|
||||
<div>
|
||||
<br>
|
||||
<center>
|
||||
<form action='' method='GET'>
|
||||
<input type='hidden' name='m' value='".$_GET['m']."'/>
|
||||
<input type='hidden' name='p' value='".$_GET['p']."'/>
|
||||
<select name='remote_server_id' onchange=".'"this.form.submit()"'.">\n";
|
||||
|
||||
$agents_ips = array();
|
||||
foreach ( $servers as $server_row )
|
||||
{
|
||||
$agents_ips[$server_row['remote_server_id']] = gethostbyname($server_row['agent_ip']);
|
||||
if( !empty( $server_row['remote_server_id'] ) and !isset( $_GET['remote_server_id'] ) OR !empty( $server_row['remote_server_id'] ) and empty( $_GET['remote_server_id'] ) )
|
||||
{
|
||||
$_GET['remote_server_id'] = $server_row['remote_server_id'];
|
||||
}
|
||||
|
||||
if($widgets)
|
||||
{
|
||||
$colhtml[1] = '<div class="column one_fourth" id="column1" >';
|
||||
$colhtml[2] = '<div class="column one_two" id="column2" >';
|
||||
$colhtml[3] = '<div class="column one_fourth" id="column3" >';
|
||||
foreach($widgets as $widget)
|
||||
{
|
||||
if(array_key_exists($widget["widget_id"], $title)){
|
||||
if( (!isset($settings['old_dashboard_behavior']) or $settings['old_dashboard_behavior'] == 0) AND $widget['widget_id'] == "3" )
|
||||
continue;
|
||||
$colhtml[$widget['column_id']] .= '<div class="dragbox bloc rounded" id="item'.$widget['widget_id'].'">'.
|
||||
'<h4><span class="configure"></span>';
|
||||
if(!is_null($title[$widget['widget_id']]))
|
||||
$colhtml[$widget['column_id']] .= $title[$widget['widget_id']];
|
||||
if( isset($_GET['remote_server_id']) AND $_GET['remote_server_id'] == $server_row['remote_server_id'] )
|
||||
{
|
||||
$remote = new OGPRemoteLibrary( $server_row['agent_ip'], $server_row['agent_port'],
|
||||
$server_row['encryption_key'], $server_row['timeout'] );
|
||||
$host_stat = $remote->status_chk();
|
||||
if( $host_stat === 1 )
|
||||
{
|
||||
$checked = "selected='selected'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$checked = '';
|
||||
$_GET['remote_server_id'] = 'webhost';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$checked = '';
|
||||
}
|
||||
echo "<option value='".$server_row['remote_server_id']."' $checked >".$server_row['remote_server_name']."</option>\n";
|
||||
}
|
||||
|
||||
$colhtml[$widget['column_id']] .= '</h4><div class="dragbox-content" ';
|
||||
if(!is_null($href[$widget['widget_id']]))
|
||||
{
|
||||
$colhtml[$widget['column_id']] .= "onclick=\"location.href='". $href[$widget['widget_id']] . "'\" style=\"cursor:pointer;";
|
||||
if($widget['collapsed']==1)
|
||||
$colhtml[$widget['column_id']] .= 'display:none;';
|
||||
$colhtml[$widget['column_id']] .= '"';
|
||||
}
|
||||
elseif($widget['collapsed']==1)
|
||||
$colhtml[$widget['column_id']] .= 'style="display:none;"';
|
||||
if ( function_exists('exec') )
|
||||
{
|
||||
$host_ip = isset($_SERVER['LOCAL_ADDR']) ? $_SERVER['LOCAL_ADDR'] : $_SERVER['SERVER_ADDR'];
|
||||
$remote_server_id = array_search($host_ip,$agents_ips);
|
||||
$show_webhost = true;
|
||||
if($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'] );
|
||||
$host_stat = $remote->status_chk();
|
||||
if( $host_stat === 1 )
|
||||
$show_webhost = false;
|
||||
}
|
||||
if($show_webhost)
|
||||
{
|
||||
$checked = ( isset($_GET['remote_server_id']) AND $_GET['remote_server_id'] == 'webhost' ) ? "selected='selected'" : "";
|
||||
echo "<option value='webhost' $checked >Webhost Status</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$colhtml[$widget['column_id']] .= '>';
|
||||
echo " </select>
|
||||
</form>
|
||||
</center>
|
||||
<br><br>
|
||||
</div>
|
||||
</div>
|
||||
</div>\n";
|
||||
|
||||
if(!is_null($content[$widget['widget_id']]))
|
||||
$colhtml[$widget['column_id']] .= $content[$widget['widget_id']];
|
||||
|
||||
$colhtml[$widget['column_id']] .= '</div></div>';
|
||||
}
|
||||
}
|
||||
foreach($colhtml as $html )
|
||||
echo $html.'</div>';
|
||||
}
|
||||
|
||||
// Server Status Link - Available to all users
|
||||
echo "<div style='margin-top:20px;'>
|
||||
<div class='bloc rounded' >
|
||||
<h4>Server Status</h4>
|
||||
<div style='text-align: center; padding: 20px;'>
|
||||
<p>View the status of all game servers</p>
|
||||
<a href='server_status.php' target='_blank' style='background-color: #4CAF50; color: white; padding: 10px 20px; text-decoration: none; border-radius: 4px; display: inline-block; margin: 10px;'>
|
||||
🖥️ View Server Status
|
||||
</a>
|
||||
<br><small style='color: #666;'>Opens in a new window</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>";
|
||||
|
||||
if( $isAdmin AND $db->isModuleInstalled('status') )
|
||||
{
|
||||
echo "<h0>".get_lang('server_status')."</h0><br>";
|
||||
$servers = $db->getRemoteServers();
|
||||
|
||||
echo "<div id='column4' style='float:left;width:40%;' >
|
||||
<div class='bloc rounded' >
|
||||
<h4>".get_lang('select_remote_server')."</h4>
|
||||
<div>
|
||||
<br>
|
||||
<center>
|
||||
<form action='' method='GET'>
|
||||
<input type='hidden' name='m' value='".$_GET['m']."'/>
|
||||
<input type='hidden' name='p' value='".$_GET['p']."'/>
|
||||
<select name='remote_server_id' onchange=".'"this.form.submit()"'.">\n";
|
||||
|
||||
$agents_ips = array();
|
||||
foreach ( $servers as $server_row )
|
||||
{
|
||||
$agents_ips[$server_row['remote_server_id']] = gethostbyname($server_row['agent_ip']);
|
||||
if( !empty( $server_row['remote_server_id'] ) and !isset( $_GET['remote_server_id'] ) OR !empty( $server_row['remote_server_id'] ) and empty( $_GET['remote_server_id'] ) )
|
||||
{
|
||||
$_GET['remote_server_id'] = $server_row['remote_server_id'];
|
||||
}
|
||||
|
||||
if( isset($_GET['remote_server_id']) AND $_GET['remote_server_id'] == $server_row['remote_server_id'] )
|
||||
{
|
||||
$remote = new OGPRemoteLibrary( $server_row['agent_ip'], $server_row['agent_port'],
|
||||
$server_row['encryption_key'], $server_row['timeout'] );
|
||||
$host_stat = $remote->status_chk();
|
||||
if( $host_stat === 1 )
|
||||
{
|
||||
$checked = "selected='selected'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$checked = '';
|
||||
$_GET['remote_server_id'] = 'webhost';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$checked = '';
|
||||
}
|
||||
echo "<option value='".$server_row['remote_server_id']."' $checked >".$server_row['remote_server_name']."</option>\n";
|
||||
}
|
||||
|
||||
if ( function_exists('exec') )
|
||||
{
|
||||
$host_ip = isset($_SERVER['LOCAL_ADDR']) ? $_SERVER['LOCAL_ADDR'] : $_SERVER['SERVER_ADDR'];
|
||||
$remote_server_id = array_search($host_ip,$agents_ips);
|
||||
$show_webhost = true;
|
||||
if($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'] );
|
||||
$host_stat = $remote->status_chk();
|
||||
if( $host_stat === 1 )
|
||||
$show_webhost = false;
|
||||
}
|
||||
if($show_webhost)
|
||||
{
|
||||
$checked = ( isset($_GET['remote_server_id']) AND $_GET['remote_server_id'] == 'webhost' ) ? "selected='selected'" : "";
|
||||
echo "<option value='webhost' $checked >Webhost Status</option>";
|
||||
}
|
||||
}
|
||||
|
||||
echo " </select>
|
||||
</form>
|
||||
</center>
|
||||
<br><br>
|
||||
</div>
|
||||
</div>
|
||||
</div>\n";
|
||||
|
||||
if( isset($_GET['remote_server_id']) AND ( $_GET['remote_server_id'] == "webhost" or $_GET['remote_server_id'] == "" ) )
|
||||
unset($_GET['remote_server_id']);
|
||||
|
||||
if( isset($_GET['remote_server_id']) )
|
||||
$remote_server = "&remote_server_id=".$_GET['remote_server_id'];
|
||||
else
|
||||
$remote_server = "";
|
||||
|
||||
if( isset($_GET['remote_server_id']) OR function_exists('exec') )
|
||||
echo $refresh->getdiv($refresh->add("home.php?m=status&type=cleared".$remote_server));
|
||||
}
|
||||
if( isset($_GET['remote_server_id']) AND ( $_GET['remote_server_id'] == "webhost" or $_GET['remote_server_id'] == "" ) )
|
||||
unset($_GET['remote_server_id']);
|
||||
|
||||
if( isset($_GET['remote_server_id']) )
|
||||
$remote_server = "&remote_server_id=".$_GET['remote_server_id'];
|
||||
else
|
||||
$remote_server = "";
|
||||
|
||||
if( isset($_GET['remote_server_id']) OR function_exists('exec') )
|
||||
echo $refresh->getdiv($refresh->add("home.php?m=status&type=cleared".$remote_server));
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
<?php echo $refresh->build(isset($settings['query_cache_life']) ? $settings['query_cache_life'] * 2000 : 60000); ?>
|
||||
$(document).ready(function(){
|
||||
<?php echo $refresh->build(isset($settings['query_cache_life']) ? $settings['query_cache_life'] * 2000 : 60000); ?>
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -341,57 +341,33 @@ echo "<table id='servermonitor' class='tablesorter' data-sortlist='[[0,0],[3,1]]
|
|||
//default is it never expires
|
||||
$expiration_dates = "This Server Will NEVER Expire";
|
||||
//get all orders thare are active or invoiced
|
||||
$query = "SELECT * FROM ogp_billing_orders WHERE home_id = " . $server_home['home_id'] . " AND status IN ('installed', 'paid', 'renew', 'invoiced', 'suspended', 'in-cart', 'unknown')" ;
|
||||
$query = "SELECT * FROM ogp_billing_orders WHERE home_id = " . $server_home['home_id'] . " AND status >= -2" ;
|
||||
$results = $db->resultQuery($query);
|
||||
if(!is_null($results[0]['status']))
|
||||
{
|
||||
//there is an end date
|
||||
if($results[0]['status'] == 'installed' || $results[0]['status'] == 'paid')
|
||||
if($results[0]['status'] > 0)
|
||||
{
|
||||
$expire_date = strtotime($results[0]['end_date']);
|
||||
$current_time = time();
|
||||
$days_until_expiry = floor(($expire_date - $current_time) / 86400);
|
||||
|
||||
// Color coding based on time until expiration
|
||||
if($days_until_expiry <= 3 && $days_until_expiry >= 0) {
|
||||
// 3 days or less before expiration - RED
|
||||
$expiration_dates = "<font color='red'>" . read_expire($expire_date) . "</font>";
|
||||
} elseif($days_until_expiry <= 7 && $days_until_expiry > 3) {
|
||||
// 7 days or less (but more than 3) before expiration - YELLOW
|
||||
$expiration_dates = "<font color='yellow'>" . read_expire($expire_date) . "</font>";
|
||||
} elseif($days_until_expiry < 0) {
|
||||
// Already expired - RED
|
||||
$expiration_dates = "<font color='red'>" . read_expire($expire_date) . " (EXPIRED)</font>";
|
||||
} else {
|
||||
// More than 7 days - GREEN
|
||||
$expiration_dates = "<font color='green'>" . read_expire($expire_date) . "</font>";
|
||||
$expire_date = $results[0]['finish_date'];
|
||||
$expiration_dates = "<font color='green'>" . read_expire($expire_date) . "</font>";
|
||||
}
|
||||
}
|
||||
|
||||
// renew status - renewal invoice created, server still running
|
||||
if($results[0]['status'] == 'renew')
|
||||
// 0 its expire, invoice printed
|
||||
if($results[0]['status'] == 0)
|
||||
{
|
||||
$expire_date = strtotime($results[0]['end_date']);
|
||||
$expiration_dates = "<font color='yellow'>". read_expire($expire_date) . "</font><a href='home.php?m=billing&p=cart'> Renew Invoice</a>";
|
||||
}
|
||||
|
||||
// in-cart its expire, invoice printed
|
||||
if($results[0]['status'] == 'in-cart' || $results[0]['status'] == 'unknown')
|
||||
{
|
||||
$expire_date = strtotime($results[0]['end_date']);
|
||||
$expire_date = $results[0]['finish_date'];
|
||||
$expiration_dates = "<font color='yellow'>". read_expire($expire_date) . "</font><a href='home.php?m=billing&p=cart'> Invoice</a>";
|
||||
}
|
||||
|
||||
// invoiced its expire, invoice printed
|
||||
if($results[0]['status'] == 'invoiced')
|
||||
// -1 its expire, invoice printed
|
||||
if($results[0]['status'] == -1)
|
||||
{
|
||||
$expire_date = strtotime($results[0]['end_date']);
|
||||
$expire_date = $results[0]['finish_date'];
|
||||
$expiration_dates = "<font color='yellow'>". read_expire($expire_date) . "</font><a href='home.php?m=billing&p=cart'> Invoice</a>";
|
||||
}
|
||||
// suspended its suspended, invoice still available
|
||||
if($results[0]['status'] == 'suspended')
|
||||
// -2 its suspended, invoice still available
|
||||
if($results[0]['status'] == -2)
|
||||
{
|
||||
$expire_date = strtotime($results[0]['end_date']);
|
||||
$expire_date = $results[0]['finish_date'];
|
||||
$expiration_dates = "<font color='red'> SUSPENDED </font><a href='home.php?m=billing&p=cart'> Invoice</a>";
|
||||
}
|
||||
|
||||
|
|
@ -556,7 +532,7 @@ echo "<table id='servermonitor' class='tablesorter' data-sortlist='[[0,0],[3,1]]
|
|||
$address = "<span style='color:darkred;font-weight:bold;'>Agent Offline</span>";
|
||||
}
|
||||
$user = $db->getUserById($server_home['user_id_main']);
|
||||
$query = "SELECT * FROM ogp_billing_orders WHERE home_id = " . $server_home['home_id'] . " AND status = 'paid'" ;
|
||||
$query = "SELECT * FROM ogp_billing_orders WHERE home_id = " . $server_home['home_id'] . " AND status > 0" ;
|
||||
//DISABLE SHOWING EXPIRATION DATES
|
||||
//$expiration_dates = "";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue