-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.php
60 lines (50 loc) · 1.2 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
<?php
if(!isset($_SESSION)) {
session_start();
};
require_once('database/products.php');
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" />
<title>MeboHile</title>
</head>
<body>
<body>
<?php require 'views/menu.php' ?>
<div class="container">
<?php
$request = '';
if (isset($_SERVER['PATH_INFO'])) {
$request = $_SERVER['PATH_INFO'];
}
switch ($request) {
case '/finalizar':
require 'views/checkout.php';
break;
case '/pronto':
require 'views/done.php';
break;
case '/carrinho' :
require 'views/card.php';
break;
case '/produtos':
require 'views/products.php';
break;
case '':
case '/':
require 'views/home.php';
break;
default:
http_response_code(404);
require 'views/404.php';
break;
}
?>
<?php require 'views/footer.php' ?>
</body>
</html>