Changes to be committed:

modified:   modules/billing/admin.php
	modified:   modules/billing/cart.php
	modified:   modules/billing/css/header.css
	renamed:    modules/billing/includes/config.inc.php -> modules/billing/includes/config.inc.php.orig
	modified:   modules/billing/includes/menu.php
	modified:   modules/billing/order.php
	modified:   modules/billing/privacy.php
	modified:   modules/billing/serverlist.php
	modified:   modules/billing/tos.php
This commit is contained in:
Frank Harris 2025-10-23 19:25:29 -04:00
parent f0405e5998
commit 426b32b747
9 changed files with 195 additions and 85 deletions

View file

@ -22,9 +22,9 @@ function h($s){ return htmlspecialchars((string)$s, ENT_QUOTES, 'UTF-8'); }
<p>Welcome to the admin area. From here you can manage servers, payments, and site settings.</p>
<div style="display:flex;gap:12px;flex-wrap:wrap;margin-top:12px;">
<a class="btn-primary" href="adminserverlist.php">Manage Servers & Services</a>
<a class="btn-primary" href="./invoices.php">Invoice History</a>
<a class="btn-primary" href="admin_config.php">Edit Site Config</a>
<a class="gsw-btn" href="adminserverlist.php">Manage Servers & Services</a>
<a class="gsw-btn" href="./invoices.php">Invoice History</a>
<a class="gsw-btn" href="admin_config.php">Edit Site Config</a>
</div>
<hr>

View file

@ -322,11 +322,11 @@ if ($db){
// Use the previously resolved $is_admin (computed once above)
$is_free = ((float)$row['price'] == 0.0);
?>
<?php if ($is_admin || $is_free): ?>
<?php if ($is_admin || $is_free): ?>
<td>
<form method="post" action="" class="inline-form">
<input type="hidden" name="create_free_for" value="<?php echo (int)$row['order_id']; ?>">
<button type="submit" class="btn-primary"><?php echo $is_admin ? 'Create (Free)' : 'Claim (Free)'; ?></button>
<button type="submit" class="gsw-btn"><?php echo $is_admin ? 'Create (Free)' : 'Claim (Free)'; ?></button>
</form>
<?php if ($is_admin): ?>
<div style="font-size:11px;color:#666;margin-top:4px;">Admin: force-create a paid record for testing.</div>

View file

@ -3,18 +3,20 @@
.gsw-top .gsw-site-name{font-weight:700;font-size:1.1rem;color:#333}
@media(max-width:480px){.gsw-top{padding:10px}.gsw-top img{height:32px}.gsw-top .gsw-site-name{font-size:1rem}}
.gsw-header{display:flex;justify-content:space-between;align-items:center;padding:12px 20px;background:#0b3b6f;backdrop-filter:blur(6px);margin-bottom:18px;box-shadow:0 2px 6px rgba(0,0,0,0.18);}
.gsw-header-left{display:flex;align-items:center;font-weight:700;font-size:1.1rem;color:#fff;}
.gsw-logo{height:36px;width:auto;margin-right:10px;display:block}
.gsw-logo-link{display:flex;align-items:center;gap:8px;color:#fff;text-decoration:none}
.gsw-header{display:flex;flex-direction:column;align-items:stretch;padding:0;background:transparent;margin-bottom:18px;}
.gsw-header-top{display:flex;justify-content:space-between;align-items:center;padding:12px 20px;background:#0b3b6f;backdrop-filter:blur(6px);box-shadow:0 2px 6px rgba(0,0,0,0.18);}
.gsw-header-left{display:flex;align-items:center;font-weight:700;font-size:1.4rem;color:#fff;padding-left:8px;}
.gsw-logo{height:48px;width:auto;margin-right:12px;display:block}
.gsw-logo-link{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none}
.gsw-header-left a{color:#fff;text-decoration:none;}
.gsw-header-nav{display:flex;gap:18px;align-items:center;}
.gsw-nav-link{color:#fff;text-decoration:none;font-size:0.95rem;transition:opacity 0.2s;}
.gsw-nav-link:hover{opacity:0.85;text-decoration:underline;}
.gsw-header-right{display:flex;gap:12px;align-items:center;}
.gsw-user-info{color:#fff;font-size:0.95rem;}
.gsw-header-btn{padding:8px 16px;background:#fff;color:#0b3b6f;border-radius:6px;text-decoration:none;font-weight:600;transition:transform 0.2s;}
.gsw-header-btn:hover{transform:translateY(-2px);}
.gsw-header-bottom{display:flex;justify-content:center;padding:10px 20px;background:#0b3b6f;}
.gsw-header-nav{display:flex;gap:22px;align-items:center;}
.gsw-nav-link{color:#fff;text-decoration:none;font-size:0.98rem;transition:opacity 0.2s;padding:6px 8px;border-radius:6px;}
.gsw-nav-link:hover{opacity:0.9;text-decoration:underline;background:rgba(255,255,255,0.03);}
.gsw-header-right{display:flex;gap:12px;align-items:center;padding-right:8px;}
.gsw-user-info{color:#fff;font-size:0.95rem;margin-right:8px;}
.gsw-header-btn{padding:10px 18px;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;border-radius:8px;text-decoration:none;font-weight:700;transition:transform 0.2s;border:none;display:inline-block;}
.gsw-header-btn:hover{transform:translateY(-2px);}
@media(max-width:768px){
.gsw-header{flex-direction:column;gap:12px;}
.gsw-header-nav{flex-wrap:wrap;justify-content:center;}
@ -25,8 +27,8 @@
.gsw-banner img{max-width:100%;height:auto;display:inline-block}
/* Footer styles */
footer.gsw-footer{background:#000;color:#fff;padding:18px 12px;text-align:center;margin-top:28px}
footer.gsw-footer a{color:#4aa3ff;text-decoration:none}
footer.gsw-footer{background:#0b3b6f;color:#fff;padding:18px 12px;text-align:center;margin-top:28px}
footer.gsw-footer a{color:#cfe6ff;text-decoration:none}
footer.gsw-footer a:hover{text-decoration:underline}
/* Page color scheme: prefer dark text on light backgrounds by default */
@ -56,7 +58,10 @@ input, textarea, select, button { color: #fff; background: #11141f; border: 1px
.center{text-align:center}
.pad-40{padding:40px}
.btn-danger{background:#ef4444;color:#fff;border:none;padding:6px 10px;border-radius:6px}
.btn-primary{background:#06b6d4;color:#fff;border:none;padding:6px 10px;border-radius:6px}
.btn-primary{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;border:none;padding:8px 14px;border-radius:8px;font-weight:700}
.gsw-btn{display:inline-block;padding:12px 24px;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:white;text-decoration:none;border-radius:8px;font-weight:600;transition:transform 0.2s;}
.gsw-btn:hover{transform:translateY(-2px)}
.gsw-btn-secondary{display:inline-block;padding:10px 16px;background:rgba(255,255,255,0.06);color:#fff;text-decoration:none;border-radius:8px;border:1px solid rgba(255,255,255,0.06);}
.float-left{float:left}
.clearfix::after{content:"";display:table;clear:both}
.table-compact th,.table-compact td{padding:0.5rem}

View file

@ -9,7 +9,7 @@
###############################################
$db_host="localhost";
$db_user="localuser";
$db_pass="Pkloyn7yvpht!";
$db_pass="password123";
$db_name="panel";
$table_prefix="ogp_";
$db_type="mysql";

View file

@ -58,58 +58,54 @@ if ($is_logged_in) {
<link rel="stylesheet" href="css/header.css">
<div class="gsw-header">
<div class="gsw-header-left">
<a href="index.php" class="gsw-logo-link">
<img src="images/logo-sm.png" alt="GameServers.World" class="gsw-logo">
<span class="gsw-site-name">GameServers.World</span>
</a>
<div class="gsw-header-top">
<div class="gsw-header-left">
<a href="index.php" class="gsw-logo-link">
<img src="images/logo-sm.png" alt="GameServers.World" class="gsw-logo">
<span class="gsw-site-name">GameServers.World</span>
</a>
</div>
<div class="gsw-header-right">
<?php if ($is_logged_in): ?>
<span class="gsw-user-info">Welcome, <?php echo $username; ?>!</span>
<?php endif; ?>
<?php
// Build a safe absolute return_to under this site so logout redirects stay within this module
$current = $_SERVER['REQUEST_URI'] ?? '/';
$return_to_param = $current;
?>
<?php if ($is_logged_in): ?>
<a href="logout.php?return_to=<?php echo urlencode($return_to_param); ?>" class="gsw-header-btn">Logout</a>
<?php else: ?>
<a href="login.php" class="gsw-header-btn">Login</a>
<?php endif; ?>
</div>
</div>
<nav class="gsw-header-nav">
<a href="index.php" class="gsw-nav-link">Home</a>
<a href="serverlist.php" class="gsw-nav-link">Game Servers</a>
<?php if ($is_logged_in): ?>
<a href="my_servers.php" class="gsw-nav-link">My Servers</a>
<?php endif; ?>
<?php if ($is_logged_in): ?>
<a href="cart.php" class="gsw-nav-link">Cart
<?php
// show cart badge if helper available
$cart_count = 0;
if (file_exists(__DIR__ . '/cart_helper.php')) {
include_once __DIR__ . '/cart_helper.php';
if (function_exists('get_cart_count')) {
$cart_count = (int) get_cart_count();
}
}
if ($cart_count > 0) {
echo ' <span class="cart-badge">' . intval($cart_count) . '</span>';
}
?>
</a>
<?php endif; ?>
<?php if (basename($_SERVER['PHP_SELF']) === 'login.php'): ?>
<a href="register.php" class="gsw-nav-link">Register</a>
<?php endif; ?>
<?php if ($is_logged_in && $is_admin): ?>
<a href="admin.php" class="gsw-nav-link">Admin</a>
<?php endif; ?>
<a href="http://panel.iaregamer.com" class="gsw-nav-link" target="_blank">Panel Login</a>
</nav>
<div class="gsw-header-right">
<?php if ($is_logged_in): ?>
<span class="gsw-user-info">Welcome, <?php echo $username; ?>!</span>
<?php
// Build a safe absolute return_to under this site so logout redirects stay in _website
$script = $_SERVER['SCRIPT_NAME'] ?? '';
$pos = strpos($script, '/_website');
$siteRoot = $pos !== false ? substr($script, 0, $pos + strlen('/_website')) : rtrim(dirname($script), '/\\');
$current = $_SERVER['REQUEST_URI'] ?? $siteRoot . '/index.php';
// Ensure current is absolute and under site root; urlencode only when embedding in URL
$return_to_param = $current;
?>
<a href="logout.php?return_to=<?php echo urlencode($return_to_param); ?>" class="gsw-header-btn">Logout</a>
<?php else: ?>
<a href="login.php" class="gsw-header-btn">Login</a>
<?php endif; ?>
<div class="gsw-header-bottom">
<nav class="gsw-header-nav">
<a href="index.php" class="gsw-nav-link">Home</a>
<a href="serverlist.php" class="gsw-nav-link">Game Servers</a>
<?php if ($is_logged_in): ?>
<a href="my_servers.php" class="gsw-nav-link">My Servers</a>
<a href="cart.php" class="gsw-nav-link">Cart
<?php
$cart_count = 0;
if (file_exists(__DIR__ . '/cart_helper.php')) {
include_once __DIR__ . '/cart_helper.php';
if (function_exists('get_cart_count')) $cart_count = (int) get_cart_count();
}
if ($cart_count > 0) echo ' <span class="cart-badge">' . intval($cart_count) . '</span>';
?>
</a>
<?php endif; ?>
<?php if (basename($_SERVER['PHP_SELF']) === 'login.php'): ?>
<a href="register.php" class="gsw-nav-link">Register</a>
<?php endif; ?>
<?php if ($is_logged_in && $is_admin): ?>
<a href="admin.php" class="gsw-nav-link">Admin</a>
<?php endif; ?>
<a href="http://panel.iaregamer.com" class="gsw-nav-link" target="_blank">Panel Login</a>
</nav>
</div>
</div>

View file

@ -278,19 +278,25 @@ if ($row['price_monthly'] == 0.0) {
</td>
</tr>
<tr>
<td align="left" colspan="2">
<input name="service_id" type="hidden" value="<?php echo $row['service_id'];?>"/>
<?php if ($available_server): ?>
<button type="submit" name="add_to_cart" class="btn-primary">Add to Cart</button>
<tr>
<td align="left" colspan="2">
<input name="service_id" type="hidden" value="<?php echo $row['service_id'];?>"/>
<?php
// Only show Add to Cart when logged in
$is_logged_in = (isset($_SESSION['website_user_id']) && !empty($_SESSION['website_user_id'])) || (isset($_SESSION['website_username']) && !empty($_SESSION['website_username']));
?>
<?php if ($available_server && $is_logged_in): ?>
<button type="submit" name="add_to_cart" class="gsw-btn">Add to Cart</button>
<?php elseif ($available_server && !$is_logged_in): ?>
<div style="padding:12px;background:rgba(255,255,255,0.03);border-radius:8px;color:#fff;">Please <a href="login.php" style="color:#cfe6ff;text-decoration:underline;">login</a> to order</div>
<?php endif; ?>
</form>
</td>
</tr>
</form>
</td>
</tr>
<tr>
<td align="left" colspan="2">
<form action ="serverlist.php" method="POST">
<button class="btn-secondary">Back to List</button>
<button class="gsw-btn-secondary">Back to List</button>
</form>
</td>
</tr>

View file

@ -1,6 +1,48 @@
<?php include(__DIR__ . '/includes/top.php'); include(__DIR__ . '/includes/menu.php'); ?>
<div class="container-wide pad-40">
<h1>Privacy</h1>
<p>This is the privacy page placeholder.</p>
<p>
Last updated: 2025/10/23
What we collect
- Basic account info (name, email), billing-related details, and server usage info (like IPs and logs for security/diagnostics).
Why we collect it
- To create and run your servers, process payments, fight fraud/abuse, and send renewal or service emails.
What we dont do
- We do NOT sell your personal information. Ever.
Who sees your data
- Only our team and trusted providers that help us run the service (e.g., payment processors, hosting, email). They only get whats needed to do their job.
Cookies & analytics
- We use simple cookies for login sessions and basic analytics to improve the service.
Security
- We take reasonable steps to protect data. No system is perfect, so keep strong passwords and dont share them.
Retention
- We keep data only as long as needed for the service, operations, or legal requirements. You can ask us to delete your account.
Your choices
- You can request a copy of your data, ask us to correct it, or delete it. Contact {PRIVACY_EMAIL}.
Legal requests
- We only share info if required by law or to prevent harm/abuse.
Minors
- Our services are for users 13+ (or your local equivalent). Parents/guardians—contact us if you need help with a minors account.
Updates
- If we change this policy, well update the date above. Keep using the service only if you agree with the updates.
Contact
- Privacy questions?
</p>
</div>
<?php include(__DIR__ . '/includes/footer.php'); ?>

View file

@ -59,7 +59,7 @@ include(__DIR__ . '/includes/menu.php');
?>
<br>
<a href="order.php?service_id=<?php echo urlencode($row['service_id']); ?>" class="gsw-btn" style="display:inline-block;padding:12px 24px;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:white;text-decoration:none;border-radius:8px;font-weight:600;transition:transform 0.2s;">Order Now</a>
<a href="order.php?service_id=<?php echo urlencode($row['service_id']); ?>" class="gsw-btn">Order Now</a>
</div>
<?php else: ?>
<!-- Single service detail view -->
@ -102,7 +102,17 @@ include(__DIR__ . '/includes/menu.php');
</tr>
<!-- Add other form fields as needed -->
<tr>
<td colspan="2"><input type="submit" value="Add to Cart"></td>
<td colspan="2">
<?php
// Only show Add to Cart when the user is logged in
$is_logged_in = (isset($_SESSION['website_user_id']) && !empty($_SESSION['website_user_id'])) || (isset($_SESSION['website_username']) && !empty($_SESSION['website_username']));
if ($is_logged_in):
?>
<button type="submit" class="gsw-btn">Add to Cart</button>
<?php else: ?>
<div style="padding:12px;background:rgba(255,255,255,0.03);border-radius:8px;color:#fff;">Please <a href="login.php" style="color:#cfe6ff;text-decoration:underline;">login</a> to order</div>
<?php endif; ?>
</td>
</tr>
</table>
</form>

View file

@ -1,6 +1,57 @@
<?php include(__DIR__ . '/includes/top.php'); include(__DIR__ . '/includes/menu.php'); ?>
<div class="container-wide pad-40">
<h1>Terms of Service</h1>
<p>This is the terms of service placeholder.</p>
<p>
Last updated: 2025/10/23
Who we are
- We host game servers. Thats it. We try hard to keep them fast, stable, and easy to use.
What youre buying
- Youre renting server time and resources for your games and mods.
- Well do our best to keep your server online and help you when something breaks.
Refunds & downtime
- First month: Ask for a refund anytime in the first 30 days—full refund, no questions asked.
- After that: If your server has downtime, tell us. Well credit or refund a fair, pro-rated amount for the time affected.
Billing & renewals
- No automatic billing. No surprise charges.
- You must log in to renew. Well email you when your service is coming due.
What we expect from you
- Use your server for legal, non-abusive stuff. No DDoS, malware, crypto mining, harassment, or anything illegal.
- Respect game/mod licenses and EULAs. Youre responsible for the content you upload and run.
- Keep your passwords safe. Youre responsible for activity on your account.
Backups & data
- We do our best, but backups are not guaranteed. Keep your own copies of anything important.
Fair use
- Dont hog shared resources in ways that ruin performance for others. We may throttle or move a server to keep things stable.
Support
- We provide best-effort support via {SUPPORT_EMAIL or PORTAL}. Share logs or details so we can help faster.
Service changes
- We may update software, move you to a better node, or make tweaks to improve reliability.
Suspension
- We can suspend or terminate a service that breaks these rules or harms the network. Well try to contact you first unless its urgent.
Liability (kept simple)
- Technology breaks sometimes. Well make it right with refunds/credits, but were not responsible for indirect losses.
Updates to this page
- If we change these terms, well update the date above. Keep using the service only if you agree with the updates.
Contact
- Questions or issues?
</p>
</div>
<?php include(__DIR__ . '/includes/footer.php'); ?>