-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlock_order.php
48 lines (44 loc) · 1.26 KB
/
lock_order.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
<?php
require_once("config/config.php");
require_once("config/db_cnx.php");
header('Content-Type: text/html; charset=utf-8');
session_start();
if($_SESSION["user"]["id"] == "1") {
ini_set("display_errors", 1);
error_reporting(E_ALL | E_STRICT);
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
}
ob_start();
if(isset($_SESSION["user"])) {
// Page Content comes here
$dn = $_GET["dn"];
$owner = $_GET["owner"];
$update_lock = "UPDATE deliverys SET locked='1' WHERE delivery_number = '$dn'";
$query = $mysqli->query($update_lock);
echo 'Bestellung gesperrt';
echo '<meta http-equiv="refresh" content="3; URL=overview.php?dn='. $dn .'&owner='.$owner.'" />' . "\n";
?>
<head>
<link rel="stylesheet" href="config/style.css">
</head>
<body>
</body>
<?php
// Page Content ends here
} else {
echo 'Session abgelaufen. Bitte neu <a href="index.php">einloggen</a>';
}
$mysqli->close();
$html = ob_get_clean();
// Specify configuration
$config = array(
'indent' => '2',
'output-xhtml' => true,
'wrap' => 200);
// Tidy
$tidy = new tidy;
$tidy->parseString($html, $config, 'utf8');
$tidy->cleanRepair();
// Output
echo $tidy;
?>