-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.php
69 lines (36 loc) · 1.36 KB
/
main.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
<?php
session_start();
if (!isset($_SESSION['logged_in'])) {
echo "sign in first!";
header('Location: login.php');
exit();
}
include("config/dbconfig.php");
$login = $_SESSION['user_login'];
$sql = "SELECT sensor_name, sensor_id, is_owner FROM sensors WHERE user_login='$login'";
$sqlResult = $conn->query($sql);
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap demo</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body>
<?php require("components/header_logged_in.php"); ?>
<div class="content ">
<div style="height: 100px;"></div>
<?php
include "components/comp_main.php";
?>
</div>
<?php include("components/footer.php"); ?>
<!-- <footer class="footer">
Footer
</footer> -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous"></script>
</body>
</html>