-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresi-admin.php
More file actions
49 lines (31 loc) · 1.14 KB
/
Copy pathresi-admin.php
File metadata and controls
49 lines (31 loc) · 1.14 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
<?php
session_start();
require "include/config.inc.php";
require "include/db.inc.php";
require "include/template2.inc.php";
$body = new Template("resi-admin");
$sideBar = new Template("side-bar");
$mysqli = DB::getInstance();
$statement = $mysqli->prepare(
"SELECT reso.id, codice, data_richiesta, reso.stato, motivazione, codice_ordine
FROM reso
JOIN ordine ON reso.ordine = ordine.id
ORDER BY data_richiesta DESC
");
$statement->execute();
$result = $statement->get_result();
if($result->num_rows > 0 ){
for($i = 0; $i < $result->num_rows; $i++){
$row = $result->fetch_assoc();
$body->setContent("id", $row['id']);
$body->setContent("codice", $row['codice']);
$body->setContent("data", $row['data_richiesta']);
$body->setContent("stato", $row['stato']);
$body->setContent("motivo", $row['motivazione']);
$body->setContent("ordine", $row['codice_ordine']);
}
}
$body->setContent("sideBar", $sideBar->get());
$body->close();
// echo print_r($_SESSION);
?>