-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
111 lines (100 loc) · 2.96 KB
/
index.php
File metadata and controls
111 lines (100 loc) · 2.96 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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
#error_reporting(0);
error_reporting(E_ALL);
/* Config */
$config["alternatives_visible"] = 3;
/* Config */
include dirname(__FILE__) . '/lib/Database.php';
include dirname(__FILE__) . '/lib/Order.php';
include dirname(__FILE__) . '/lib/OrderProxy.php';
include dirname(__FILE__) . '/lib/Pizza.php';
include dirname(__FILE__) . '/lib/ProxyPizza.php';
include dirname(__FILE__) . '/lib/PizzaService.php';
include dirname(__FILE__) . '/lib/helper.class.php';
include dirname(__FILE__) . '/lib/Bon.php';
$notemplate = false;
header("Content-Type: text/html; charset=utf-8");
/*
* Todo: switch, if constructs are to slow
*/
if (key_exists("action", $_GET)) {
if ($_GET["action"] == "admin") {
include 'actions/admin/index.php';
}
else if ($_GET["action"] == "newservice") {
include 'actions/admin/newService.php';
}
else if ($_GET["action"] == "newpizza") {
include 'actions/admin/newPizza.php';
}
else if ($_GET["action"] == "order") {
include 'actions/order/index.php';
}
else if ($_GET["action"] == "preorder") {
include 'actions/preorder/index.php';
}
else if ($_GET["action"] == "print") {
include 'actions/print/index.php';
}
else if ($_GET["action"] == "printorder") {
include 'actions/order/printOrder.php';
$notemplate = true;
}
}
else if (key_exists("action", $_POST)) {
$notemplate = true;
if ($_POST["action"] == "saveservice") {
include 'actions/admin/saveService.php';
}
else if ($_POST["action"] == "savepizza") {
include 'actions/admin/savePizza.php';
}
else if ($_POST["action"] == "saveproxypizza") {
include 'actions/admin/saveProxyPizza.php';
}
else if ($_POST["action"] == "deleteservice") {
include 'actions/admin/deleteService.php';
}
else if ($_POST["action"] == "deletepizza") {
include 'actions/admin/deletePizza.php';
}
else if ($_POST["action"] == "deleteproxypizza") {
include 'actions/admin/deleteProxyPizza.php';
}
else if ($_POST["action"] == "deleteorder") {
include 'actions/admin/deleteOrder.php';
}
else if ($_POST["action"] == "deleteorderproxy") {
include 'actions/order/deleteOrderProxy.php';
}
else if ($_POST["action"] == "updateorderproxy") {
include 'actions/home/updateOrderProxy.php';
}
else if ($_POST["action"] == "executeorder") {
include 'actions/order/saveOrder.php';
}
else if ($_POST["action"] == "markasordered") {
include 'actions/order/markAsOrdered.php';
}
else if ($_POST["action"] == "setservicestatus") {
include 'actions/admin/setServiceStatus.php';
}
else if ($_POST["action"] == "markaspayed") {
include 'actions/preorder/markAsPayed.php';
}
else if ($_POST["action"] == "deletepreorder") {
include 'actions/preorder/deletePreOrder.php';
}
else if ($_POST["action"] == "printfile") {
include 'actions/print/printfile.php';
}
}
else {
//home
include 'actions/home/index.php';
}
//globales template
if (!$notemplate) {
include 'templates/template.php';
}
?>