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(); }