Merge pull request #37 coupon fix

Fix database login error and admin coupon page HTML structure
This commit is contained in:
Frank Harris 2025-10-29 08:06:15 -04:00 committed by GitHub
commit 7e6de96a54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,8 +2,6 @@
// Admin coupon management page - standalone billing module // Admin coupon management page - standalone billing module
require_once(__DIR__ . '/includes/admin_auth.php'); require_once(__DIR__ . '/includes/admin_auth.php');
require_once(__DIR__ . '/includes/config.inc.php'); require_once(__DIR__ . '/includes/config.inc.php');
include(__DIR__ . '/includes/top.php');
include(__DIR__ . '/includes/menu.php');
session_start(); session_start();
if (empty($_SESSION['admin_csrf'])) $_SESSION['admin_csrf'] = bin2hex(random_bytes(16)); if (empty($_SESSION['admin_csrf'])) $_SESSION['admin_csrf'] = bin2hex(random_bytes(16));
@ -123,7 +121,6 @@ if (is_dir($games_dir)) {
// Get all coupons // Get all coupons
$coupons_result = mysqli_query($db, "SELECT * FROM {$table_prefix}billing_coupons ORDER BY created_date DESC"); $coupons_result = mysqli_query($db, "SELECT * FROM {$table_prefix}billing_coupons ORDER BY created_date DESC");
?> ?>
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
@ -178,6 +175,10 @@ $coupons_result = mysqli_query($db, "SELECT * FROM {$table_prefix}billing_coupon
</script> </script>
</head> </head>
<body> <body>
<?php
include(__DIR__ . '/includes/top.php');
include(__DIR__ . '/includes/menu.php');
?>
<div class="container-wide panel"> <div class="container-wide panel">
<h1>Coupon Management</h1> <h1>Coupon Management</h1>