-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconta.html
161 lines (150 loc) · 6.36 KB
/
conta.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>La Paz Sports - Conta</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
</head>
<body>
<header>
<div class="container">
<div class="logo">
<a href="index.html"><img src="lapaz.png"></a>
</div>
<nav>
<ul class="nav-links">
<li class="aba-nav"><a href="lapazmenu.html">Futebol</a></li>
<li class="aba-nav"><a href="lapaznba.html">NBA</a></li>
<li class="aba-nav"><a href="lapaznfl.html">NFL</a></li>
<li class="aba-nav"><a href="lapazufc.html">UFC</a></li>
<li class="aba-nav"><a href="lapaztenis.html">Tênis</a></li>
<li class="aba-nav"><a href="lapazvolei.html">Volei</a></li>
<li class="aba-nav"><a href="lapazbaseball.html">Baseball</a></li>
<li class="aba-nav"><a href="lapazf1.html">F1</a></li>
</ul>
</nav>
</div>
</header>
<nav class="menu-lateral">
<div class="btn-expandir">
<i class="bi bi-list" id="btn-exp"></i>
</div>
<ul>
<li class="item-menu" data-icon="bi-house-exclamation">
<a href="index.html">
<span class="icon"><i class="bi bi-house-exclamation"></i></span>
<span class="txt-link">Menu</span>
</a>
</li>
<li class="item-menu" data-icon="bi-people">
<a href="equipe.html">
<span class="icon"><i class="bi bi-people"></i></span>
<span class="txt-link">Equipe</span>
</a>
</li>
<li class="item-menu" data-icon="bi-heart">
<a href="parceiros.html">
<span class="icon"><i class="bi bi-heart"></i></span>
<span class="txt-link">Parceiros</span>
</a>
</li>
<li class="item-menu" data-icon="bi-calendar">
<a href="calendario.html">
<span class="icon"><i class="bi bi-calendar"></i></span>
<span class="txt-link">Calendário</span>
</a>
</li>
<li class="item-menu ativo" data-icon="bi-person">
<a href="#">
<span class="icon"><i class="bi bi-person"></i></span>
<span class="txt-link">Conta</span>
</a>
</li>
<hr>
<br>
<li class="item-menu">
<a href="https://www.instagram.com/lapaz_sports?igsh=dnljanFoaTl0ZGhl">
<span class="icon"><i class="bi bi-instagram"></i></span>
<span class="txt-link"></span>
</a>
</li>
<li class="item-menu">
<a href="https://www.x.com">
<span class="icon"><i class="bi bi-twitter-x"></i></span>
<span class="txt-link"></span>
</a>
<li class="item-menu">
<a href="https://www.tiktok.com">
<span class="icon"><i class="bi bi-tiktok"></i></span>
<span class="txt-link"></span>
</a>
</li>
</ul>
</nav>
<div class="container-conta">
<div class="login-conta-div">
<img src="lapaz.png">
<h1>Login</h1>
</div>
<form id="login-form" method="post" action="login.php">
<div class="form-group">
<label for="username">Usuário:</label>
<input type="text" id="username" name="username" required>
</div>
<div class="form-group">
<label for="password">Senha:</label>
<input type="password" id="password" name="password" required>
</div>
<div class="form-group">
<label for="profile-pic">Foto de Perfil:</label>
<input type="file" id="profile-pic" name="profile-pic" accept="image/*">
</div>
<button type="submit">Entrar</button>
<p class="error" id="login-error"></p>
</form>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
const loginForm = document.getElementById("login-form");
const loginError = document.getElementById("login-error");
loginForm.addEventListener("submit", function(event) {
event.preventDefault();
const username = document.getElementById("username").value;
const password = document.getElementById("password").value;
// Simulação de validação no cliente
if (username === "" || password === "") {
loginError.textContent = "Por favor, preencha todos os campos.";
} else {
loginError.textContent = "";
// Envie a solicitação de login para o servidor
fetch("login.php", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ username: username, password: password })
})
.then(response => response.json())
.then(data => {
if (data.success) {
// Se o login for bem-sucedido, redirecione para a página de dashboard
window.location.href = "dashboard.php";
} else {
// Se o login falhar, exiba uma mensagem de erro
loginError.textContent = data.message;
}
})
.catch(error => {
console.error("Erro ao efetuar login:", error);
loginError.textContent = "Ocorreu um erro ao efetuar login. Por favor, tente novamente mais tarde.";
});
}
});
});
</script>
<script src="menu.js"></script>
<script src="darkmode.js"></script>
</body>
</html>