-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckProducts.php
44 lines (35 loc) · 1.44 KB
/
checkProducts.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
<?php include 'header.php'; ?>
<style type="text/css">
p{ display:none;}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="javascript/checkDocuments.js"></script>
<?php
$db = new PDO('sqlite:database/documents.db');
$products = $db->query('SELECT * FROM Product');
$data = $products->fetchAll();
echo '<div id="conteudo">';
echo '<div class="texto">';
echo '<h1> Produtos: </h1><br>';
foreach ($data as $row)
{
$path = 'showProduct.php?ProductCode=' . $row['ProductCode'];
echo '<a href=' . $path . '> ';
echo '<h3 class="btab"></td><td>' . '- ' . $row['ProductCode'] . '</h3></a>';
echo '<div class="btab"><table border="1"> <tr><td>' . '<b>Descrição: </b>' . $row['ProductDescription'] . '</td></tr></table><br></div>';
echo '<div class="hiddenText"><table border="1"> <tr><td><b>Preço Unitário: </b></td><td>' . $row['UnitPrice'] . '</tr></td>';
echo '<tr><td><b>Unidade de medida: </b></td><td>' . $row['UnitOfMeasure'] . '</tr></td></table>';
echo '</div>';
echo '<h4 class="mostrar"> Ver mais </h4><br>';
}
?>
</div>
<div id="pesquisas" class="texto">
<form action="showProduct.php" method="get" style="width: 300px">
Pesquisar Produtos ou Serviços por Código: <br>
<input type = "number" name = "ProductCode" maxlength = "30" />
<input type="submit"/>
</form><br>
</div>
</div>
</body>