-
Notifications
You must be signed in to change notification settings - Fork 0
/
rea.php
executable file
·83 lines (57 loc) · 2.76 KB
/
rea.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
81
82
83
<?php
require_once(__DIR__ . "/autoload/session.autoload.php");
require_once(__DIR__ . "/autoload/checkconnected.autoload.php");
require_once(__DIR__ . "/class/Network.class.php");
require_once(__DIR__ . "/class/Reassort.class.php");
require_once(__DIR__ . "/autoload/produitType.autoload.php");
if(!isset($_GET['date']) || !isset($_GET['magasin'])){header("location:/");}
$Reassort = new Reassort();
?>
<!DOCTYPE html>
<html>
<head>
<?php require_once(__DIR__ . "/template/headcode.template.php"); ?>
</head>
<body>
<?php include(__DIR__ . "/template/header.template.php"); ?>
<div class="container sub-body">
<div class="controls margin-top-1">
<div class="row-fluid">
<div class="span9 well">
<legend>Fiche Réassort du <?php echo $_GET['date']; ?> sur <?php echo $_GET['magasin'] ?></legend>
<?php
echo '<div class="item-type-reassort">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>type</th>
<th>Pourcentage</th>
<th>#</th>
</tr>
</thead>
<tbody>
';
$types = getProduitsTypes();
foreach ($types as $key => $value) {
$Reassort->setType($value);
$Reassort->setMagasin($_GET['magasin']);
$Reassort->setDate($_GET['date']);
echo '<tr>';
echo '<td>' . $value . '</td>';
echo '<td>' . $Reassort->getReaPercent() . ' %</td>';
echo '<td><a href="http://services.librairielabourse.fr/reports/product?date=' . $_GET['date'] . '&magasin=' . htmlspecialchars($_GET['magasin']) . '&rea=REASSORTI&type=' . $value . '" target="_blank"><button class="btn">Consulter les REASSORTIS</button></a></td>';
echo '<td><a href="http://services.librairielabourse.fr/reports/product?date=' . $_GET['date'] . '&magasin=' . htmlspecialchars($_GET['magasin']) . '&rea=NON%20REA&type=' . $value . '" target="_blank"><button class="btn">Consulter les NON REASSORTIS</button></a></td>';
echo '</tr>';
}
echo ' </tbody>
</table>
</div>';
?>
</div>
<?php include(__DIR__ . "/template/network.template.php"); ?>
</div>
</div>
</div>
<?php include(__DIR__ . "/template/footer.template.php"); ?>
</body>
</html>