-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.php
89 lines (85 loc) · 2.28 KB
/
index.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
84
85
86
87
88
89
<?php
session_start();
$request = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
if($request!='/function'){
// header is for each page
// body
include_once 'tempelates/userHeader.php';
}
// echo $request;
switch ($request) {
//israa
case '/':
require __DIR__.'/pages/login.php';
break;
case '/forgetpassword':
require __DIR__.'/pages/forgetpassword.php';
break;
case '/changePassword':
require __DIR__.'/pages/changePassword.php';
break;
//Motaz
case '/orders':
require __DIR__.'/pages/myOrders.php';
break;
case '/cancelOrder':
require __DIR__.'/controllers/cancelOrder.php';
break;
case '/actions':
require __DIR__.'/controllers/actions.php';
break;
case '/deleteUser':
require __DIR__.'/controllers/deleteUser.php';
break;
case '/generateMyOrders':
require __DIR__.'/controllers/generateMyOrders.php';
break;
//Khaled - Alaa
case '/home':
require __DIR__.'/pages/userHomePage.php';
break;
//Nouran
case '/admin-addproduct':
require __DIR__.'/pages/addProducts.php';
break;
//Israa
case '/admin-adduser':
require __DIR__.'/pages/addUser.php';
break;
//Shawkat
case '/admin-checks':
require __DIR__.'/pages/checks.php';
break;
//Alaa
//khaled
case '/admin-manual':
require __DIR__.'/pages/adminOrder.php';
break;
//nouran
case '/admin-products':
require __DIR__.'/pages/adminProducts.php';
break;
//Israa
case '/admin-users':
require __DIR__.'/pages/adminUsers.php';
break;
case '/function':
require __DIR__.'/controllers/functions.php';
break;
case '/logout':
require __DIR__.'/pages/logOut.php';
break;
case '/admin':
require __DIR__.'/pages/adminHome.php';
break;
case '/update-product':
require __DIR__.'/pages/update_product.php';
break;
case '/delete_product':
require __DIR__.'/pages/delete_product.php';
break;
default:
require __DIR__.'/pages/404.php';
break;
}
include 'tempelates/footer.php';