-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
106 lines (90 loc) · 1.87 KB
/
index.php
File metadata and controls
106 lines (90 loc) · 1.87 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
<?php
require_once('functions_base.php');
require_once('functions_add.php');
require_once('functions_borrow.php');
require_once('functions_show.php');
require_once('functions_book.php');
session_start();
connect_db();
global $errors;
if (!isset($errors)) {
$errors = array();
}
$page="pealeht";
if (isset($_GET['page']) && $_GET['page']!=""){
$page = htmlspecialchars($_GET['page']);
}
if (isset($_GET['id']) && $_GET['id']!=""){
$id = htmlspecialchars($_GET['id']);
}
include_once('views/header.php');
switch($page){
case "login":
login();
break;
case "start":
show_start_page();
break;
case "add":
add_book();
break;
case "search":
do_search();
break;
case "category":
show_category();
break;
case "book":
if (isset($id)){
show_book_page($id);
break;
}
show_start_page();
break;
case "modify":
if (isset($id)){
modify_book_page($id);
break;
}
show_start_page();
break;
case "apply":
if (isset($id)){
apply_book_changes($id);
break;
}
show_start_page();
break;
case "infra":
show_infrastructure_page();
break;
case "borrow":
borrow_book();
break;
case "return":
return_book();
break;
case "add_room":
add_room_form();
break;
case "add_bookcase":
add_bookcase_form();
break;
case "add_shelf":
add_shelf_form();
break;
case "add_category":
add_category_form();
break;
case "add_system":
add_system_form();
break;
case "logout":
logout();
break;
default:
show_start_page();
break;
}
include_once('views/footer.php');
?>