-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviewDevices.php
More file actions
54 lines (51 loc) · 1.62 KB
/
Copy pathviewDevices.php
File metadata and controls
54 lines (51 loc) · 1.62 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
<!DOCTYPE html>
<html>
<body>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<?php include 'top-nav.php';?>
<?php include 'sidebar.php';?>
<?php
//Get classes for use and database info
require_once 'conf/dbInfo.php';
require_once 'lib/DataBroker.php';
require_once 'lib/Device.php';
require_once 'lib/HTMLParser.php';
require_once 'lib/authentication.php';
$broker = new DataBroker($servername, $username, $password, $dbname);
$URL = "edit.php"
//print rows and add edit option
?>
<div>
<div id="main" class="col-xs-6">
<h1>Devices</h1>
<h2>Lights</h2>
<?php
//iterate through light array and build hyperlink
echo HTMLParser::printDevices($broker->getAllLights(), $URL)
?>
<h2>Dimming Lights</h2>
<?php
//iterate through light array and build hyperlink
echo HTMLParser::printDevices($broker->getAllDimmingLights(), $URL)
?>
<h2>Colored Lights</h2>
<?php
//iterate through light array and build hyperlink
echo HTMLParser::printDevices($broker->getAllColoredLights(), $URL)
?>
<h2>Switches</h2>
<?php
echo HTMLParser::printDevices($broker->getAllSwitches(), $URL)
?>
<h2>Thermostats</h2>
<?php
echo HTMLParser::printDevices($broker->getAllThermostats(), $URL)
?>
</div>
</div>
</body>
</html>