-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduto-a.php
80 lines (75 loc) · 3.04 KB
/
produto-a.php
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
<?php
session_start();
if(empty($_SESSION)){
echo "<script language='javascript' type='text/javascript'>alert('Faça o login no sistema.');window.location.href='login.php';</script>";
}
?>
<?php
include("produto-c.php");
$Produtos = selectIdProduto($_POST["idProduto"]);
//Modelo
include("modelo-c.php");
$Modelos = selectIdModelo($_POST["idModelo"]);
$grupoModelo = selectTodosModelos();
?>
<html lang="pt-BR">
<head>
<title>Alterar - Produto</title>
<?php
include("tmpl/head.php");
?>
</head>
<body>
<!--includes-->
<?php
include("tmpl/header.php");
include("tmpl/footer.php");
?>
<!--form-->
<div class="container h-100">
<div class="row h-100 justify-content-center align-items-center">
<form name="dadosProduto" action="produto-c.php" method="POST">
<h3>Alterar - Produto</h3>
<table class="table">
<tbody>
<tr>
<td>Código Produto</td>
<td><input type="text" name="idProduto" value="<?=$Produtos["idProduto"]?>" size="20" disabled="true" /></td>
</tr>
<tr>
<td>Modelo</td>
<td>
<select name="idModelo">
<?php
foreach ($grupoModelo as $Modelos)
echo '<option name=" '.$Modelos['idModelo'].' " value=" ' . $Modelos['idModelo'] . '"> ' . $Modelos['nomeModelo'] . ' </option>';
?>
</select>
</td>
</tr>
<tr>
<td>Nome Produto</td>
<td><input type="text" name="nomeProduto" value="<?=$Produtos["nomeProduto"]?>" /></td>
</tr>
<tr>
<td>Serial Produto</td>
<td><input type="text" name="serialProduto" value="<?=$Produtos["serialProduto"]?>" /></td>
</tr>
<tr>
<td>Data de Entrada</td>
<td><input type="text" name="dataEntradaProduto" value="<?=$Produtos["dataEntradaProduto"]?>" /></td>
</tr>
<tr>
<td>
<input type="hidden" name="acao" value="Alterar" />
<input type="hidden" name="idProduto" value="<?=$Produtos["idProduto"]?>" />
</td>
<td><input type="submit" name="enviar" value="Alterar" onclick="alert('Cadastro alterado com sucesso.');"/></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</body>
</html>