diff --git a/admin.php b/admin.php index db69168..d2cce77 100644 --- a/admin.php +++ b/admin.php @@ -1,43 +1,133 @@ query('SELECT COUNT(*) FROM clubs'); + $count_clubs = $stmt_clubs->fetchColumn(); + + // Count tournaments + $stmt_tournaments = $pdo->query('SELECT COUNT(*) FROM tournaments'); + $count_tournaments = $stmt_tournaments->fetchColumn(); + +} catch (PDOException $e) { + // Handle DB connection error + $count_clubs = 0; + $count_tournaments = 0; + $error_message = "Database error: " . $e->getMessage(); +} ?> - + - Admin Dashboard - PicklePRO - - + Painel Administrativo - PicklePRO + + + + + + - + -
-
-
-
+ +
+
+
+

Painel Administrativo

+
+
+ + +
+ + +
+ +
+
-

Welcome, !

-

This is your admin dashboard. From here, you can manage clubs, tournaments, and users.

- Add New Club +
Clubes
+

+ Ver Clubes +
+
+
+ + +
+
+
+
Torneios
+

+ Ver Torneios +
+
+
+ + +
+
+
+
Configurações
+

+ Acessar
-
+ - + +
+
+

© PicklePRO. Todos os direitos reservados.

+
+
+ + + - + \ No newline at end of file diff --git a/assets/pasted-20251020-234540-8263a818.png b/assets/pasted-20251020-234540-8263a818.png new file mode 100644 index 0000000..954d564 Binary files /dev/null and b/assets/pasted-20251020-234540-8263a818.png differ diff --git a/clubs.php b/clubs.php new file mode 100644 index 0000000..a005606 --- /dev/null +++ b/clubs.php @@ -0,0 +1,120 @@ +query('SELECT id, name, address, phone, email FROM clubs ORDER BY name'); + $clubs = $stmt->fetchAll(PDO::FETCH_ASSOC); +} catch (PDOException $e) { + $error_message = "Database error: " . $e->getMessage(); +} +?> + + + + + + Gerenciar Clubes - PicklePRO + + + + + + + + + + +
+
+

Gerenciar Clubes

+ Cadastrar Novo Clube +
+ + +
+ + +
+
+ +
+

Nenhum clube cadastrado ainda.

+
+ + + + + + + + + + + + + + + + + + + + +
NomeEndereçoTelefoneEmail
+ +
+
+ +
+ + +
+
+

© PicklePRO. Todos os direitos reservados.

+
+
+ + + + + diff --git a/index.php b/index.php index 051f5c3..fc0c99b 100644 --- a/index.php +++ b/index.php @@ -48,14 +48,8 @@ - diff --git a/tournaments.php b/tournaments.php new file mode 100644 index 0000000..5b79478 --- /dev/null +++ b/tournaments.php @@ -0,0 +1,118 @@ +query('SELECT id, name, description, created_at FROM tournaments ORDER BY created_at DESC'); + $tournaments = $stmt->fetchAll(PDO::FETCH_ASSOC); +} catch (PDOException $e) { + $error_message = "Database error: " . $e->getMessage(); +} +?> + + + + + + Gerenciar Torneios - PicklePRO + + + + + + + + + + +
+
+

Gerenciar Torneios

+ Cadastrar Novo Torneio +
+ + +
+ + +
+
+ +
+

Nenhum torneio cadastrado ainda.

+
+ + + + + + + + + + + + + + + + + + +
NomeDescriçãoData de Criação
+ +
+
+ +
+ + +
+
+

© PicklePRO. Todos os direitos reservados.

+
+
+ + + + +