From 3ba44cb90adc62724efb5536e35d66646a37f748 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Mon, 20 Oct 2025 23:30:22 +0000 Subject: [PATCH] 2 --- add_tournament.php | 102 +++++++++++++++++++++++++++++++++++++++++++++ index.php | 27 ++++++++++-- login.php | 35 ++++------------ 3 files changed, 134 insertions(+), 30 deletions(-) create mode 100644 add_tournament.php diff --git a/add_tournament.php b/add_tournament.php new file mode 100644 index 0000000..eb6d016 --- /dev/null +++ b/add_tournament.php @@ -0,0 +1,102 @@ + + + + + + + Adicionar Novo Torneio - PicklePRO + + + + + + +
+
+
+
+
+

Adicionar um Novo Torneio

+
+
+ +
+ + +
+ + +
+
+ + +
+
+ + +
+
+ + Voltar +
+
+
+
+
+
+
+ + + + diff --git a/index.php b/index.php index 0a213ff..051f5c3 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,4 @@ + @@ -46,10 +47,28 @@ + + + -
- Entrar - Cadastrar +
+ + + Olá, + + Sair + + Entrar + Cadastrar +
@@ -158,4 +177,4 @@ - + \ No newline at end of file diff --git a/login.php b/login.php index 4e2c20a..d5340ff 100644 --- a/login.php +++ b/login.php @@ -17,32 +17,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $stmt->execute([$username]); $user = $stmt->fetch(); - // DEBUGGING LINES - echo ""; - // END DEBUGGING LINES - - if ($user && password_verify($password, $user['password'])) { - $_SESSION['user_id'] = $user['id']; - $_SESSION['username'] = $user['username']; - $_SESSION['role'] = $user['role']; - - // Redirect based on role - if ($user['role'] === 'superadmin') { - header('Location: admin.php'); - exit; - } else { - // Redirect to a general user dashboard if needed - header('Location: index.php'); - exit; - } - } else { - $error = 'Invalid username or password.'; - } + getMessage(); }