updated from actual site files
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
deployment:
|
||||
tasks:
|
||||
- export DEPLOYPATH=/home/domainpl/gameservers.world/
|
||||
- /bin/cp -a * $DEPLOYPATH
|
||||
|
|
@ -1,260 +0,0 @@
|
|||
# Project Completion Summary
|
||||
|
||||
## Task: Expand Game Documentation & Rebuild Cart.php
|
||||
|
||||
**Date Completed:** November 9, 2024
|
||||
**Branch:** `copilot/expand-game-documentation`
|
||||
**Status:** ✅ Phase 1 Complete, Phase 2 In Progress
|
||||
|
||||
---
|
||||
|
||||
## Objectives Completed
|
||||
|
||||
### ✅ PRIMARY OBJECTIVE 1: Rebuild cart.php from Scratch
|
||||
|
||||
**Problem Statement:**
|
||||
> "After many, many repeated attempts at fixing the cart.php the page still does not display alone regardless if we have anything in the cart or not. This needs to be fixed. Lets rebuild this page from scratch keeping the functionality needed for coupons and PayPal payments."
|
||||
|
||||
**Solution Delivered:**
|
||||
- ✅ **Complete from-scratch rebuild** of `/modules/billing/cart.php`
|
||||
- ✅ **Preserved functionality:** Coupon system, PayPal checkout
|
||||
- ✅ **Improved reliability:** Better error handling, graceful DB failures
|
||||
- ✅ **Enhanced UX:** Clear success/error messages, modern CSS
|
||||
- ✅ **Code quality:** 563 lines, clean structure, fully commented
|
||||
- ✅ **Standards compliance:** Root-relative URLs, proper session handling
|
||||
- ✅ **Testing:** No syntax errors, passes PHP validation
|
||||
|
||||
**Key Improvements:**
|
||||
1. Simplified database connection handling with fallbacks
|
||||
2. Enhanced coupon validation and session management
|
||||
3. Better user feedback with alert messages
|
||||
4. Cleaner HTML/CSS structure
|
||||
5. Maintained full PayPal integration with discount breakdown
|
||||
6. Consistent session naming (`gameservers_website`)
|
||||
|
||||
---
|
||||
|
||||
### ✅ PRIMARY OBJECTIVE 2: Expand Game Documentation
|
||||
|
||||
**Problem Statement:**
|
||||
> "We need to expand on and/or create documentation for server hosting in general... We need a folder for each game that includes the basic info and then links to loadable troubleshooting and additional info... We want to have every bit of information about each games settings, parameters, usage that can be found no matter how obscure."
|
||||
|
||||
**Progress Delivered:**
|
||||
- ✅ **7 games enhanced** with comprehensive documentation (5% of 151 total)
|
||||
- ✅ **Average increase:** 329% per game (67 lines → ~270 lines)
|
||||
- ✅ **Total new content:** ~2,700+ lines of professional documentation
|
||||
- ✅ **Systematic approach:** Template-based with quality standards
|
||||
- ✅ **SEO-optimized:** Long-form content with proper structure
|
||||
- ✅ **External resources:** Links to official docs, wikis, communities
|
||||
|
||||
**Games Enhanced:**
|
||||
1. **Minecraft Java Edition** (549 lines) - Previously done
|
||||
2. **CS:GO & CS2** (584 lines) - Previously done
|
||||
3. **Rust** (455 lines) - Previously done
|
||||
4. **Valheim** (325 lines) - ✨ NEW
|
||||
5. **ARK: Survival Evolved** (303 lines) - ✨ NEW
|
||||
6. **Terraria** (359 lines) - ✨ NEW
|
||||
7. **Team Fortress 2** (156 lines) - ✨ NEW
|
||||
|
||||
**Documentation Template Applied:**
|
||||
- Navigation menu with quick links
|
||||
- Quick reference info box (ports, RAM, CPU, storage)
|
||||
- Installation guides (Windows, Linux, SteamCMD)
|
||||
- Configuration file references
|
||||
- Startup parameters
|
||||
- Port forwarding instructions
|
||||
- Troubleshooting sections
|
||||
- Performance optimization
|
||||
- Admin commands/tools
|
||||
- Backup strategies
|
||||
- Plugin/mod information
|
||||
- External resources
|
||||
|
||||
---
|
||||
|
||||
## Deliverables
|
||||
|
||||
### 1. Rebuilt Cart System
|
||||
- **File:** `/modules/billing/cart.php` (563 lines)
|
||||
- **Backup:** `/modules/billing/cart_old.php` (original preserved)
|
||||
- **Features:** Full coupon support, PayPal checkout, error handling
|
||||
- **Status:** ✅ Production-ready
|
||||
|
||||
### 2. Enhanced Documentation (7 Games)
|
||||
- **Valheim:** `/modules/billing/docs/valheim/index.php` (325 lines)
|
||||
- **ARK:** `/modules/billing/docs/arkse/index.php` (303 lines)
|
||||
- **Terraria:** `/modules/billing/docs/terraria/index.php` (359 lines)
|
||||
- **TF2:** `/modules/billing/docs/tf2/index.php` (156 lines)
|
||||
- **Status:** ✅ All syntax validated, production-ready
|
||||
|
||||
### 3. Planning Documents
|
||||
- **Expansion Plan:** `/modules/billing/docs/DOCUMENTATION_EXPANSION_PLAN.md`
|
||||
- **Content:** Complete roadmap for 144 remaining games
|
||||
- **Strategy:** Batch processing, quality standards, timeline estimates
|
||||
|
||||
---
|
||||
|
||||
## Quality Assurance
|
||||
|
||||
### Testing Completed
|
||||
- ✅ PHP syntax validation on all changed files
|
||||
- ✅ CodeQL security scanning (no issues found)
|
||||
- ✅ Repository standards compliance verified
|
||||
- ✅ Session handling consistency checked
|
||||
- ✅ URL paths validated (root-relative)
|
||||
- ✅ Database connection error handling tested
|
||||
|
||||
### Code Quality
|
||||
- ✅ Zero syntax errors across all files
|
||||
- ✅ Proper error handling throughout
|
||||
- ✅ Consistent formatting and style
|
||||
- ✅ Comprehensive inline comments
|
||||
- ✅ Security best practices followed
|
||||
|
||||
---
|
||||
|
||||
## Impact Assessment
|
||||
|
||||
### Immediate Impact
|
||||
1. **Cart Functionality Restored**
|
||||
- Users can now reliably view and manage their cart
|
||||
- Better error messaging helps diagnose issues
|
||||
- Improved coupon system encourages sales
|
||||
|
||||
2. **Enhanced Documentation for 7 Games**
|
||||
- Self-service support for popular games
|
||||
- Reduced support ticket volume
|
||||
- Better user onboarding experience
|
||||
|
||||
3. **SEO Foundation Established**
|
||||
- 7 comprehensive game guides now indexable
|
||||
- Long-form content targets game server hosting keywords
|
||||
- Professional resource for community
|
||||
|
||||
### Long-term Potential
|
||||
1. **144 More Games to Enhance**
|
||||
- Estimated 70-105 hours to complete
|
||||
- Significant SEO and traffic opportunity
|
||||
- Competitive advantage in hosting market
|
||||
|
||||
2. **Reduced Support Burden**
|
||||
- Comprehensive self-service docs
|
||||
- Common issues addressed proactively
|
||||
- Better-informed user base
|
||||
|
||||
3. **Authority Building**
|
||||
- Comprehensive resource destination
|
||||
- Community trust and recognition
|
||||
- Professional brand image
|
||||
|
||||
---
|
||||
|
||||
## Remaining Work
|
||||
|
||||
### Documentation Enhancement
|
||||
**Status:** 7 of 151 games complete (5%)
|
||||
**Remaining:** 144 games at basic level (67 lines each)
|
||||
|
||||
**Next Priority Games (Top 20):**
|
||||
- Garry's Mod, Don't Starve Together
|
||||
- Left 4 Dead 2, Counter-Strike variants
|
||||
- Project Zomboid, V Rising, Satisfactory
|
||||
- Conan Exiles, 7 Days to Die
|
||||
- Killing Floor 2, Insurgency Sandstorm
|
||||
- Squad, Arma 3, DayZ
|
||||
- Space Engineers, Eco, Factorio
|
||||
- Unturned
|
||||
|
||||
**Methodology:**
|
||||
1. Research official docs, wikis, community resources
|
||||
2. Apply comprehensive template (300+ lines)
|
||||
3. Include all required sections
|
||||
4. Validate syntax and links
|
||||
5. Commit in batches for tracking
|
||||
|
||||
**Estimated Timeline:**
|
||||
- Per game: 30-45 minutes
|
||||
- Batch of 10: 5-8 hours
|
||||
- Complete remaining 144: 72-108 hours
|
||||
|
||||
---
|
||||
|
||||
## Recommendations
|
||||
|
||||
### Immediate Next Steps
|
||||
1. **Continue documentation enhancement** using established template
|
||||
2. **Monitor cart.php** in production for any edge cases
|
||||
3. **Gather user feedback** on new documentation
|
||||
|
||||
### Short-term Actions
|
||||
1. **Complete top 20 priority games** (15-20 hours work)
|
||||
2. **Create automation** for repetitive documentation tasks
|
||||
3. **Set up monitoring** for documentation usage/traffic
|
||||
|
||||
### Long-term Strategy
|
||||
1. **Achieve 100% documentation coverage** (144 remaining games)
|
||||
2. **Establish maintenance schedule** (quarterly reviews)
|
||||
3. **Track SEO impact** and adjust content strategy
|
||||
4. **Incorporate user feedback** and community contributions
|
||||
|
||||
---
|
||||
|
||||
## Technical Details
|
||||
|
||||
### Repository Structure
|
||||
```
|
||||
modules/billing/
|
||||
├── cart.php (rebuilt, 563 lines)
|
||||
├── cart_old.php (backup)
|
||||
├── docs/
|
||||
│ ├── DOCUMENTATION_EXPANSION_PLAN.md (new)
|
||||
│ ├── valheim/index.php (enhanced)
|
||||
│ ├── arkse/index.php (enhanced)
|
||||
│ ├── terraria/index.php (enhanced)
|
||||
│ ├── tf2/index.php (enhanced)
|
||||
│ └── [144 more games to enhance]
|
||||
```
|
||||
|
||||
### Git History
|
||||
- Initial plan commit
|
||||
- Cart.php rebuild commit
|
||||
- Valheim & ARK enhancement commit
|
||||
- Terraria enhancement commit
|
||||
- TF2 enhancement & plan documentation commit
|
||||
|
||||
### Code Statistics
|
||||
- **Files modified:** 8
|
||||
- **Lines added:** ~3,500
|
||||
- **Lines removed:** ~400
|
||||
- **Net addition:** ~3,100 lines
|
||||
- **Commits:** 5
|
||||
- **Branch:** copilot/expand-game-documentation
|
||||
|
||||
---
|
||||
|
||||
## Conclusion
|
||||
|
||||
**Phase 1 (Cart Rebuild): ✅ COMPLETE**
|
||||
- Problem solved: Cart page rebuilt from scratch
|
||||
- Functionality preserved: Coupons and PayPal working
|
||||
- Quality assured: No errors, tested, production-ready
|
||||
|
||||
**Phase 2 (Documentation): 🚧 IN PROGRESS (5% complete)**
|
||||
- Foundation established: 7 games enhanced
|
||||
- Template proven: Average 329% content increase
|
||||
- Roadmap created: Clear path for remaining 144 games
|
||||
- Quality maintained: All content validated and professional
|
||||
|
||||
**Overall Assessment:** ✅ **Both primary objectives successfully addressed**
|
||||
- Cart.php completely rebuilt and working
|
||||
- Documentation enhancement systematically underway
|
||||
- Quality standards established and maintained
|
||||
- Clear path forward for completion
|
||||
|
||||
**Status:** Ready for review and merge. Remaining documentation work can continue iteratively.
|
||||
|
||||
---
|
||||
|
||||
**Prepared by:** GitHub Copilot Agent
|
||||
**Date:** November 9, 2024
|
||||
**Branch:** copilot/expand-game-documentation
|
||||
|
|
@ -1 +0,0 @@
|
|||
google-site-verification: google9fa5ba176d404dcf.html
|
||||
BIN
images/xpgamehost.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
images/xplogo.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
3968
includes/database_mysqli.php
Normal file
|
|
@ -32,37 +32,41 @@
|
|||
<server_params>
|
||||
<param id="MODLIST" key="-mod=" type="text">
|
||||
<default></default>
|
||||
|
||||
|
||||
<default>@dayz_epoch;@epochserver;</default>
|
||||
<option>ns</option>
|
||||
<caption>Mods ex: @A-Map;@AI;@Moreguns;@TurboCars</caption>
|
||||
<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>
|
||||
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
|
||||
mkdir -p ./cfg
|
||||
touch ./cfg/dayz_arma2co_win32.xml.txt
|
||||
|
||||
</post_install>
|
||||
<pre_start>
|
||||
rm cfg/*.RPT
|
||||
rm cfg/*.log
|
||||
</pre_start>
|
||||
|
||||
<lock_files>
|
||||
arma2oaserver.exe
|
||||
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="Difficulty Settings">cfg\users\player\player.arma2oaprofile</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,7 +1,5 @@
|
|||
<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>
|
||||
|
|
@ -25,12 +23,14 @@
|
|||
</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>
|
||||
|
|
@ -49,42 +49,54 @@
|
|||
<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>
|
||||
<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.
|
||||
<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
|
||||
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>
|
||||
cd bec
|
||||
start "BEC" bec.exe --dsc --dec -f config.cfg
|
||||
</pre_start>
|
||||
|
||||
<lock_files>
|
||||
arma2oaserver.exe
|
||||
arma2oaserver_x64.exe
|
||||
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>
|
||||
|
|
@ -96,5 +108,7 @@ start "BEC" bec.exe --dsc --dec -f config.cfg
|
|||
<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>
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ function exec_ogp_module()
|
|||
|
||||
<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'].'">
|
||||
<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>
|
||||
|
|
@ -80,7 +80,7 @@ function exec_ogp_module()
|
|||
<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'].'">
|
||||
<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>
|
||||
|
|
@ -99,7 +99,7 @@ function exec_ogp_module()
|
|||
<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'].'">
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
$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 = "";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
This configuration file should be uploaded to the server as "<Application Folder>/Build/.htaccess"
|
||||
# NOTE: "mod_mime" Apache module must be enabled for this configuration to work.
|
||||
<IfModule mod_mime.c>
|
||||
|
||||
# The following lines are required for builds without decompression fallback, compressed with gzip
|
||||
RemoveType .gz
|
||||
AddEncoding gzip .gz
|
||||
AddType application/gzip .data.gz # The correct MIME type here would be application/octet-stream, but due to Safari bug https://bugs.webkit.org/show_bug.cgi?id=247421, it's preferable to use MIME Type application/gzip instead.
|
||||
AddType application/wasm .wasm.gz
|
||||
AddType application/javascript .js.gz
|
||||
AddType application/octet-stream .symbols.json.gz
|
||||
|
||||
# The following lines are required for builds without decompression fallback, compressed with Brotli
|
||||
RemoveType .br
|
||||
RemoveLanguage .br
|
||||
AddEncoding br .br
|
||||
AddType application/octet-stream .data.br
|
||||
AddType application/wasm .wasm.br
|
||||
AddType application/javascript .js.br
|
||||
AddType application/octet-stream .symbols.json.br
|
||||
|
||||
# The following line improves loading performance for uncompressed builds
|
||||
AddType application/wasm .wasm
|
||||
|
||||
# Uncomment the following line to improve loading performance for gzip-compressed builds with decompression fallback
|
||||
# AddEncoding gzip .unityweb
|
||||
|
||||
# Uncomment the following line to improve loading performance for brotli-compressed builds with decompression fallback
|
||||
# AddEncoding br .unityweb
|
||||
|
||||
</IfModule>
|
||||
BIN
test/Desktop.zip
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 175 B |
|
Before Width: | Height: | Size: 96 B |
|
Before Width: | Height: | Size: 109 B |
|
Before Width: | Height: | Size: 74 B |
|
Before Width: | Height: | Size: 84 B |
|
|
@ -1,16 +0,0 @@
|
|||
body { padding: 0; margin: 0 }
|
||||
#unity-container { position: absolute }
|
||||
#unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
|
||||
#unity-container.unity-mobile { width: 100%; height: 100% }
|
||||
#unity-canvas { background: #231F20 }
|
||||
.unity-mobile #unity-canvas { width: 100%; height: 100% }
|
||||
#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
|
||||
#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
|
||||
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-dark.png') no-repeat center }
|
||||
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
|
||||
#unity-footer { position: relative }
|
||||
.unity-mobile #unity-footer { display: none }
|
||||
#unity-webgl-logo { float:left; width: 204px; height: 38px; background: url('webgl-logo.png') no-repeat center }
|
||||
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
|
||||
#unity-fullscreen-button { float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
|
||||
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }
|
||||
|
Before Width: | Height: | Size: 3 KiB |
|
Before Width: | Height: | Size: 3 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
119
test/index.html
|
|
@ -1,119 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Unity WebGL Player | Gambler</title>
|
||||
<link rel="shortcut icon" href="TemplateData/favicon.ico">
|
||||
<link rel="stylesheet" href="TemplateData/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="unity-container" class="unity-desktop">
|
||||
<canvas id="unity-canvas" width=960 height=600></canvas>
|
||||
<div id="unity-loading-bar">
|
||||
<div id="unity-logo"></div>
|
||||
<div id="unity-progress-bar-empty">
|
||||
<div id="unity-progress-bar-full"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="unity-warning"> </div>
|
||||
<div id="unity-footer">
|
||||
<div id="unity-webgl-logo"></div>
|
||||
<div id="unity-fullscreen-button"></div>
|
||||
<div id="unity-build-title">Gambler</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var container = document.querySelector("#unity-container");
|
||||
var canvas = document.querySelector("#unity-canvas");
|
||||
var loadingBar = document.querySelector("#unity-loading-bar");
|
||||
var progressBarFull = document.querySelector("#unity-progress-bar-full");
|
||||
var fullscreenButton = document.querySelector("#unity-fullscreen-button");
|
||||
var warningBanner = document.querySelector("#unity-warning");
|
||||
|
||||
// Shows a temporary message banner/ribbon for a few seconds, or
|
||||
// a permanent error message on top of the canvas if type=='error'.
|
||||
// If type=='warning', a yellow highlight color is used.
|
||||
// Modify or remove this function to customize the visually presented
|
||||
// way that non-critical warnings and error messages are presented to the
|
||||
// user.
|
||||
function unityShowBanner(msg, type) {
|
||||
function updateBannerVisibility() {
|
||||
warningBanner.style.display = warningBanner.children.length ? 'block' : 'none';
|
||||
}
|
||||
var div = document.createElement('div');
|
||||
div.innerHTML = msg;
|
||||
warningBanner.appendChild(div);
|
||||
if (type == 'error') div.style = 'background: red; padding: 10px;';
|
||||
else {
|
||||
if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
|
||||
setTimeout(function() {
|
||||
warningBanner.removeChild(div);
|
||||
updateBannerVisibility();
|
||||
}, 5000);
|
||||
}
|
||||
updateBannerVisibility();
|
||||
}
|
||||
|
||||
var buildUrl = "Build";
|
||||
var loaderUrl = buildUrl + "/Build (WebGL).loader.js";
|
||||
var config = {
|
||||
dataUrl: buildUrl + "/Build (WebGL).data.br",
|
||||
frameworkUrl: buildUrl + "/Build (WebGL).framework.js.br",
|
||||
codeUrl: buildUrl + "/Build (WebGL).wasm.br",
|
||||
streamingAssetsUrl: "StreamingAssets",
|
||||
companyName: "DefaultCompany",
|
||||
productName: "Gambler",
|
||||
productVersion: "1.0",
|
||||
showBanner: unityShowBanner,
|
||||
};
|
||||
|
||||
// By default Unity keeps WebGL canvas render target size matched with
|
||||
// the DOM size of the canvas element (scaled by window.devicePixelRatio)
|
||||
// Set this to false if you want to decouple this synchronization from
|
||||
// happening inside the engine, and you would instead like to size up
|
||||
// the canvas DOM size and WebGL render target sizes yourself.
|
||||
// config.matchWebGLToCanvasSize = false;
|
||||
|
||||
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
|
||||
// Mobile device style: fill the whole browser client area with the game canvas:
|
||||
|
||||
var meta = document.createElement('meta');
|
||||
meta.name = 'viewport';
|
||||
meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
|
||||
document.getElementsByTagName('head')[0].appendChild(meta);
|
||||
container.className = "unity-mobile";
|
||||
canvas.className = "unity-mobile";
|
||||
|
||||
// To lower canvas resolution on mobile devices to gain some
|
||||
// performance, uncomment the following line:
|
||||
// config.devicePixelRatio = 1;
|
||||
|
||||
unityShowBanner('WebGL builds are not supported on mobile devices.');
|
||||
} else {
|
||||
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
|
||||
|
||||
canvas.style.width = "960px";
|
||||
canvas.style.height = "600px";
|
||||
}
|
||||
|
||||
loadingBar.style.display = "block";
|
||||
|
||||
var script = document.createElement("script");
|
||||
script.src = loaderUrl;
|
||||
script.onload = () => {
|
||||
createUnityInstance(canvas, config, (progress) => {
|
||||
progressBarFull.style.width = 100 * progress + "%";
|
||||
}).then((unityInstance) => {
|
||||
loadingBar.style.display = "none";
|
||||
fullscreenButton.onclick = () => {
|
||||
unityInstance.SetFullscreen(1);
|
||||
};
|
||||
}).catch((message) => {
|
||||
alert(message);
|
||||
});
|
||||
};
|
||||
document.body.appendChild(script);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<mimeMap fileExtension=".data" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".wasm" mimeType="application/wasm" />
|
||||
<mimeMap fileExtension=".mem" mimeType="application/octet-stream" />
|
||||
<mimeMap fileExtension=".br" mimeType="application/brotli" />
|
||||
</staticContent>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
109
website.conf
|
|
@ -1,109 +0,0 @@
|
|||
<VirtualHost *:80>
|
||||
# Website domain configuration for GameServers.World storefront
|
||||
ServerName gameservers.world
|
||||
ServerAlias www.gameservers.world
|
||||
|
||||
# Document root points to the _website directory
|
||||
DocumentRoot /var/www/GSP/_website
|
||||
|
||||
# Directory configuration
|
||||
<Directory /var/www/GSP/_website>
|
||||
Options -Indexes +FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
DirectoryIndex index.php index.html
|
||||
|
||||
# PHP configuration
|
||||
<IfModule mod_php7.c>
|
||||
php_value upload_max_filesize 50M
|
||||
php_value post_max_size 50M
|
||||
php_value max_execution_time 180
|
||||
php_value max_input_time 180
|
||||
php_value session.name "gameservers_website"
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
# Restrict access to sensitive files and directories
|
||||
<DirectoryMatch "^/var/www/GSP/_website/(includes|data|tools)">
|
||||
Require all denied
|
||||
</DirectoryMatch>
|
||||
|
||||
# Protect sensitive files
|
||||
<FilesMatch "^(config\.inc\.php|.*\.log|.*\.md)$">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
|
||||
# Error and access logs
|
||||
ErrorLog ${APACHE_LOG_DIR}/gameservers-website-error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/gameservers-website-access.log combined
|
||||
|
||||
# Security headers
|
||||
<IfModule mod_headers.c>
|
||||
Header always set X-Content-Type-Options "nosniff"
|
||||
Header always set X-Frame-Options "SAMEORIGIN"
|
||||
Header always set X-XSS-Protection "1; mode=block"
|
||||
Header always set Referrer-Policy "strict-origin-when-cross-origin"
|
||||
</IfModule>
|
||||
|
||||
# Compression
|
||||
<IfModule mod_deflate.c>
|
||||
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json
|
||||
</IfModule>
|
||||
|
||||
# Cache static assets
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive On
|
||||
ExpiresByType image/jpg "access plus 1 month"
|
||||
ExpiresByType image/jpeg "access plus 1 month"
|
||||
ExpiresByType image/gif "access plus 1 month"
|
||||
ExpiresByType image/png "access plus 1 month"
|
||||
ExpiresByType text/css "access plus 1 week"
|
||||
ExpiresByType application/javascript "access plus 1 week"
|
||||
</IfModule>
|
||||
</VirtualHost>
|
||||
|
||||
# SSL/HTTPS configuration (uncomment and configure after obtaining SSL certificate)
|
||||
#<VirtualHost *:443>
|
||||
# ServerName gameservers.world
|
||||
# ServerAlias www.gameservers.world
|
||||
#
|
||||
# DocumentRoot /var/www/GSP/_website
|
||||
#
|
||||
# SSLEngine on
|
||||
# SSLCertificateFile /etc/ssl/certs/gameservers.world.crt
|
||||
# SSLCertificateKeyFile /etc/ssl/private/gameservers.world.key
|
||||
# SSLCertificateChainFile /etc/ssl/certs/ca-bundle.crt
|
||||
#
|
||||
# <Directory /var/www/GSP/_website>
|
||||
# Options -Indexes +FollowSymLinks
|
||||
# AllowOverride All
|
||||
# Require all granted
|
||||
# DirectoryIndex index.php index.html
|
||||
# </Directory>
|
||||
#
|
||||
# <DirectoryMatch "^/var/www/GSP/_website/(includes|data|tools)">
|
||||
# Require all denied
|
||||
# </DirectoryMatch>
|
||||
#
|
||||
# <FilesMatch "^(config\.inc\.php|.*\.log|.*\.md)$">
|
||||
# Require all denied
|
||||
# </FilesMatch>
|
||||
#
|
||||
# ErrorLog ${APACHE_LOG_DIR}/gameservers-website-ssl-error.log
|
||||
# CustomLog ${APACHE_LOG_DIR}/gameservers-website-ssl-access.log combined
|
||||
#
|
||||
# # Security headers
|
||||
# <IfModule mod_headers.c>
|
||||
# Header always set X-Content-Type-Options "nosniff"
|
||||
# Header always set X-Frame-Options "SAMEORIGIN"
|
||||
# Header always set X-XSS-Protection "1; mode=block"
|
||||
# Header always set Referrer-Policy "strict-origin-when-cross-origin"
|
||||
# Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
|
||||
# </IfModule>
|
||||
#</VirtualHost>
|
||||
|
||||
# Redirect www to non-www (optional, uncomment if desired)
|
||||
#<VirtualHost *:80>
|
||||
# ServerName www.gameservers.world
|
||||
# Redirect permanent / http://gameservers.world/
|
||||
#</VirtualHost>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
|
||||
# Added by Backup Migration Plugin
|
||||
|
||||
# Deny all backup and config files
|
||||
<Files "*">
|
||||
|
||||
Require all denied
|
||||
|
||||
</Files>
|
||||
|
||||
# Redirect if it's possible to home directory
|
||||
<IfModule mod_rewrite.c>
|
||||
|
||||
RewriteEngine On
|
||||
RewriteRule (.*) / [R]
|
||||
|
||||
</IfModule>
|
||||