From 1ea68738264c8086375f5142309ac0f52005337c Mon Sep 17 00:00:00 2001 From: Catalin Novgorodschi <1140613+Shadowss@users.noreply.github.com> Date: Thu, 30 Apr 2026 08:55:00 +0300 Subject: [PATCH] Winner check on register Winner check on register --- GameEngine/Account.php | 7 +++++++ GameEngine/Lang/en.php | 1 + anmelden.php | 1 + login.php | 4 ++-- notification/index.php | 4 ++-- winner.php | 40 +++++++++++++++++++--------------------- 6 files changed, 32 insertions(+), 25 deletions(-) diff --git a/GameEngine/Account.php b/GameEngine/Account.php index 0f320645..cd93ddc4 100755 --- a/GameEngine/Account.php +++ b/GameEngine/Account.php @@ -62,6 +62,13 @@ class Account { private function Signup() { global $database,$form,$mailer,$generator,$session; + + // ==================== VERIFICARE WINNER ==================== + $sql = mysqli_query($database->dblink, "SELECT 1 FROM " . TB_PREFIX . "fdata WHERE f99 = '100' AND f99t = '40' LIMIT 1"); + $winner = mysqli_fetch_row($sql); + if ($winner) { + $form->addError("winner", WINNER_ERROR); + } if(!isset($_POST['name']) || trim($_POST['name']) == "") { $form->addError("name",USRNM_EMPTY); } diff --git a/GameEngine/Lang/en.php b/GameEngine/Lang/en.php index 829ddab0..a9ce4574 100755 --- a/GameEngine/Lang/en.php +++ b/GameEngine/Lang/en.php @@ -57,6 +57,7 @@ define('PW_INSECURE', '(Password insecure. Please choose a more secure one.)'); define('EMAIL_EMPTY', '(Email Empty)'); define('EMAIL_INVALID', '(Invalid email address)'); define('EMAIL_TAKEN', '(Email is already in use)'); +define('WINNER_ERROR', '