-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
28 lines (23 loc) · 893 Bytes
/
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
<?php
require_once("config.php");
require_once("helpers.php");
if(isset($_GET["params"])){
switch ($_GET["params"]){
//API
case "users" : users($conn); break;
case "addCard" : addCard($conn, $_POST); break;
case "enter" : enter($conn, (isset($_POST["rfid"]))?$_POST["rfid"]:NULL); break;
case "create_user" : create_user($conn, $_POST); break;
case "withoutCard" : withoutCard($conn); break;
//Pages
case "register" : page("register.html"); break;
case "list" : page("listWO.php", $conn); break;
case "history" : page("history.php", $conn); break;
case "links" : page("links.html"); break;
case "stat" : page("stat.php", $conn); break;
case "userslist": page("userslist.php", $conn); break;
case "profile" : page("profile.php", $conn); break;
default : error(404, $conn, "page not found in index switch");
}
}else{page("welcome.html");}
?>