-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprodutoUnLog.php
More file actions
379 lines (322 loc) · 15 KB
/
Copy pathprodutoUnLog.php
File metadata and controls
379 lines (322 loc) · 15 KB
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<?php
include_once('src/php/conexao.php');
function exibirProdutos($conn, $classe) {
$stmt = $conn->prepare("SELECT * FROM produtos WHERE classe LIKE ?");
$searchTerm = '%' . $classe . '%';
$stmt->bind_param("s", $searchTerm);
$stmt->execute();
return $stmt->get_result();
}
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="src/css/index-produto.css">
<link rel="stylesheet" href="src/css/style-produtos.css">
<link rel="stylesheet" href="src/css/responsividade/responsivo.css">
<link rel="shortcut icon" href="src/imagem/icones/escudo.png" type="image/x-icon">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://fonts.cdnfonts.com/css/milestone-one" rel="stylesheet">
<link href="https://fonts.cdnfonts.com/css/codygoon" rel="stylesheet">
<title>Vanguard | Produtos</title>
</head>
<body>
<header class="cabecalho">
<div class="logo">
<img src="src/imagem/logos/VanguardLogo - titulo.png" alt="Logo da Vanguard" />
</div>
<button id="OpenMenu">☰</button>
<nav id="menu">
<button id="CloseMenu">X</button>
<ul class="menu">
<li><a href="index.html">Página inicial</a></li>
<li><a href="equipe.html">Sobre nós</a></li>
<li class="contato">Solicite um teste: <br><strong>(42) 984276920</strong></li>
<li><a href="formulario.php">Cadastre-se</a></li>
<li><a href="login.html">Login</a></li>
</ul>
</nav>
</header>
<main class="home">
<div id="carouselExampleCaptions" class="carousel slide">
<div class="carousel-indicators">
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="0" class="active"
aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="1"
aria-label="Slide 2"></button>
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="2"
aria-label="Slide 3"></button>
</div>
<div class="carousel-inner">
<div class="carousel-item active">
<a href="#sistema">
<img src="src/imagem/produtos/3.png" class="d-block w-100" alt="Slide 1">
</a>
</div>
<div class="carousel-item">
<a href="#ferramentas">
<img src="src/imagem/produtos/2.png" class="d-block w-100" alt="Slide 2">
</a>
</div>
<div class="carousel-item">
<a href="#protecao">
<img src="src/imagem/produtos/1.png" class="d-block w-100" alt="Slide 3">
</a>
</div>
</div>
</div>
</main>
<section class="compre-ja">
<div class="guias">
<?php
$produto_id = isset($_GET['produto_id']) ? $_GET['produto_id'] : null;
if ($produto_id) {
$query = $conn->prepare("SELECT * FROM guias_instalacao WHERE produto_id = ?");
$query->bind_param("i", $produto_id);
$query->execute();
$result = $query->get_result();
if ($result->num_rows > 0) {
while ($guia = $result->fetch_assoc()) {
echo "<h2>{$guia['titulo']}</h2>";
echo "<p>{$guia['conteudo']}</p>";
}
} else {
echo "<p>Nenhum guia de instalação disponível para este produto.</p>";
}
}
?>
</div>
<h1 class="titulo">Faça você mesmo!</h1>
<p class="text">Utilize nossas distribuições de sistemas e ferramentas!</p>
<div class="produtos">
<h1 class="titulo" id="sistema">Sistemas Operacionais</h1>
<?php
$select_sistema = exibirProdutos($conn, 'sistem');
if ($select_sistema->num_rows > 0) {
echo '<div class="grid-container" style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;">';
while ($row = $select_sistema->fetch_assoc()) {
?>
<div class="card" style="background:black; color:#fff; padding: 20px; text-align:center;">
<img src="src/imagem/produtos/<?php echo $row['imagem']; ?>" class="card-img-top" style="height:130px; width:100%; object-fit: contain; margin-bottom: 15px;">
<div class="card-body">
<h5 class="card-title"><?php echo $row['nome_produto']; ?></h5>
<p class="card-text"><?php echo $row['classe']; ?></p>
<p class="card-text descricao"><?php echo $row['descricao']; ?></p>
<button class="btn btn-secondary btn-leia-mais" onclick="toggleDescricao(this)">Ler mais</button>
<a href="login.html">
<button class="btn btn-primary btn-customizado assinar-btn">Logue ou crie uma conta e baixe</button>
</a>
</div>
</div>
<?php
}
echo '</div>';
} else {
echo '<p>Nenhum produto encontrado na categoria Sistemas Operacionais.</p>';
}
?>
</div>
<div class="produtos">
<h1 class="titulo" id="ferramentas">Ferramentas</h1>
<?php
$select_ferramentas = exibirProdutos($conn, 'ferramentas');
if ($select_ferramentas->num_rows > 0) {
echo '<div class="grid-container" style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;">';
while ($row = $select_ferramentas->fetch_assoc()) {
?>
<div class="card" style="background:black; color:#fff; padding: 20px; text-align:center;">
<img src="src/imagem/produtos/<?php echo $row['imagem']; ?>" class="card-img-top" style="height:130px; width:100%; object-fit: contain; margin-bottom: 15px;">
<div class="card-body">
<h5 class="card-title"><?php echo $row['nome_produto']; ?></h5>
<p class="card-text"><?php echo $row['classe']; ?></p>
<p class="card-text descricao"><?php echo $row['descricao']; ?></p>
<button class="btn btn-secondary btn-leia-mais" onclick="toggleDescricao(this)">Ler mais</button>
<a href="login.html">
<button class="btn btn-primary btn-customizado assinar-btn">Logue ou crie uma conta e baixe</button>
</a>
</div>
</div>
<?php
}
echo '</div>';
} else {
echo '<p>Nenhum produto encontrado na categoria Ferramentas.</p>';
}
?>
</div>
<div class="produtos">
<h1 class="titulo" id="protecao">Proteção</h1>
<?php
$select_protecao = exibirProdutos($conn, 'protecao');
if ($select_protecao->num_rows > 0) {
echo '<div class="grid-container" style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;">';
while ($row = $select_protecao->fetch_assoc()) {
?>
<div class="card" style="background:black; color:#fff; padding: 20px; text-align:center;">
<img src="src/imagem/produtos/<?php echo $row['imagem']; ?>" class="card-img-top" style="height:130px; width:100%; object-fit: contain; margin-bottom: 15px;">
<div class="card-body">
<h5 class="card-title"><?php echo $row['nome_produto']; ?></h5>
<p class="card-text"><?php echo $row['classe']; ?></p>
<p class="card-text descricao"><?php echo $row['descricao']; ?></p>
<button class="btn btn-secondary btn-leia-mais" onclick="toggleDescricao(this)">Ler mais</button>
<a href="login.html">
<button class="btn btn-primary btn-customizado assinar-btn">Logue ou crie uma conta e baixe</button>
</a>
</div>
</div>
<?php
}
echo '</div>';
} else {
echo '<p>Nenhum produto encontrado na categoria Proteção.</p>';
}
?>
</div>
</section>
<!-- Fundo escuro -->
<div class="overlay" style="display: none;"></div>
<div id="confirmPlan" class="plan" style="display: none;">
<div class="plan-content">
<h2>Veja nossos planos</h2>
<p>Escolha um de nossos planos para assinar</p>
<!-- Exibição de planos -->
<div id="confirmPlan" class="plan" style="display: none;">
<div class="plan-content">
<h2>Veja nossos planos</h2>
<p>Escolha um de nossos planos para assinar</p>
<div class="plan-options">
<?php
$query = "SELECT * FROM plano";
$result = $conn->query($query);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
echo '<div class="plan-item">';
echo '<h4>' . $row['nome_plano'] . '</h4>';
echo '<p>Preço: R$ ' . number_format($row['preco_plano'], 2, ',', '.') . '</p>';
echo '<p>Sobre: ' . $row['descricao'] . '</p>';
echo '<a class="btn btn-primary selectPlanBtn" href="checkout.php?plano_id=' . $row['plano_id'] . '">Selecionar</a>';
echo '</div>';
}
}
?>
</div>
<button type="button" id="cancelBtn" class="btn btn-danger">Cancelar</button>
</div>
</div>
<footer class="roda-pe">
<img src="src/imagem/logos/VanguardLogo-Escuro.png" alt="logo da Vanguard" class="logo">
<h5 class="subtitulo">
Nos acompanhe pelas redes sociais
</h5>
<div class="social_media">
<a href="facebook link" id="facebook" title="Facebook" target="_blank"><img
src="src/imagem/icones/Facebook.png" alt="botão do perfil do facebook da Vanguard"></a>
<a href="instagram link" id="instagram" title="Instagram" target="_blank"><img
src="src/imagem/icones/instagram.png" alt="botão do perfil do instagram da Vanguard"></a>
<a href="discord" title="discord" id="discord" target="_blank"><img src="src/imagem/icones/discord.png"
alt="botão do chat do discord da Vanguard "></a>
<a href="linkedin" title="linkedin" id="linkedin" target="_blank"><img src="src/imagem/icones/linkedin.png"
alt="botão do perfil do linkedin da Vanguard"></a>
<a href="telegram" title="telegram" id="telegram" target="_blank"><img src="src/imagem/icones/telegram.png"
alt="botão do chat do telegram da Vanguard"></a>
</div>
<div class="opcoes">
<div class="lista">
<a href="equipe.html">
<h6>
A equipe
</h6>
</a>
<hr />
<h6>Entre em contato: <br><strong>(42) 984276920 </strong></h6>
</a>
<hr />
<a
href="malito:g3hunterbugs@gmail.com?subject=Mensagem para Vanguard de um cliente&body=Preciso de ajuda">
<h6>
Suporte
</h6>
</a>
</div>
</div>
</div>
<p id="copyright">
Direitos Autorais Reservados à Vanguard™
</p>
</footer>
</body>
<script src="src/js/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
<script src="src/js/botoes.js"></script>
<script>
function mostrarMensagem() {
const confirmacaoDiv = document.getElementById('confirmacaoDiv');
confirmacaoDiv.style.display = 'block';
// Ocultar a mensagem após 10 segundos
setTimeout(() => {
confirmacaoDiv.style.display = 'none';
}, 10000);
}
</script>
<script>
function toggleDescricao(button) {
const descricao = button.previousElementSibling;
if (descricao.classList.contains('expandido')) {
descricao.classList.remove('expandido');
button.textContent = 'Ler mais';
} else {
descricao.classList.add('expandido');
button.textContent = 'Ler menos';
}
}
</script>
<script>
function mostrarMensagem() {
document.getElementById("confirmacaoDiv").style.display = "block";
setTimeout(() => {
document.getElementById("confirmacaoDiv").style.display = "none";
}, 10000);
}
</script>
<script>
function mostrarMensagem() {
document.getElementById('overlay').style.display = 'block';
document.getElementById('confirmacaoDiv').style.display = 'block';
}
function fecharDiv() {
document.getElementById('overlay').style.display = 'none';
document.getElementById('confirmacaoDiv').style.display = 'none';
}
function verManual() {
alert('Direcionando para o manual!');
// Aqui você pode adicionar a lógica para redirecionar para o manual
}
</script>
<script>
// Seleciona o botão de download e a div de agradecimento
document.getElementById("downloadButton").addEventListener("click", function(event) {
event.preventDefault(); // Impede o download imediato
// Exibe a div de agradecimento e o overlay
document.getElementById("confirmacaoDiv").style.display = "block";
document.getElementById("overlay").style.display = "block";
// Aguarda um momento antes de iniciar o download
setTimeout(function() {
window.location.href = "Arquivo-simulando-instalação.bat";
}, 1000); // Inicia o download após 1 segundo
});
// Função para fechar a div de agradecimento
function fecharDiv() {
document.getElementById("confirmacaoDiv").style.display = "none";
document.getElementById("overlay").style.display = "none";
}
// Função para visualizar o manual
function verManual() {
window.open("manual.php", "_blank");
}
</script>
<script src="src/js/showPlan.js"></script>
</html>