-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
123 lines (115 loc) · 5.37 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php include "read.php"; ?>
<?php include "settings.php"; ?>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<title>Temperature Alarms</title>
</head>
<body>
<!-- Header -->
<div class="jumbotron jumbotron-fluid bg-light" style="margin-bottom: 0px; padding-bottom: 5px;">
<h1 style="text-align: center; margin-bottom: 0px;">Temperature Alarms</h1>
</div>
<!-- Navigation -->
<nav class="navbar navbar-expand-md navbar-light bg-light" style="margin-top: 0px;">
<div class="d-flex w-50 order-0">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsingNavbar">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div class="navbar-collapse collapse justify-content-center order-2" id="collapsingNavbar">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link all" href="./index.php">All</a>
</li>
<?php echo menumod(); ?>
<li class="nav-item">
<a class="nav-link settings" href="./admin.php">Settings</a>
</li>
</ul>
</div>
<span class="navbar-text small text-truncate mt-1 w-50 text-right order-1 order-md-last"></span>
</nav>
<!-- Content -->
<div class="container">
<?php echo tempmod($_GET["filter"]); ?>
</div>
<!-- Footer -->
<div class="footer bg-light" style="bottom: 0; width: 100%; text-align: center; margin-top: 10px;">
<p>2018 ©</p>
</div>
<!-- Settings Modal -->
<div class="modal fade" id="settingsModal" tabindex="-1" role="dialog" aria-labelledby="settingsModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="label" style="text-align: center;">Settings</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<?php echo displayLocations(); ?>
<br>
<hr>
<?php echo displayAlarms(); ?>
<br>
<hr>
<br>
<?php echo displayDevices(); ?>
</div>
</div>
</div>
</div>
<!-- Add Device Modal -->
<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="addModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="label" style="text-align: center;">Add Device</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<?php echo renderForm(); ?>
</div>
</div>
</div>
</div>
<!-- Add Alarm Modal -->
<div class="modal fade" id="alarmModal" tabindex="-1" role="dialog" aria-labelledby="alarmModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="label" style="text-align: center;">Add Alarm</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<?php echo renderAlarmForm(); ?>
</div>
</div>
</div>
</div>
<!-- Add Location Modal -->
<div class="modal fade" id="locModal" tabindex="-1" role="dialog" aria-labelledby="locModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="label" style="text-align: center;">Add Location</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<?php echo renderLocForm(); ?>
</div>
</div>
</div>
</div>
</body>