-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnormal.php
More file actions
executable file
·51 lines (41 loc) · 1.42 KB
/
normal.php
File metadata and controls
executable file
·51 lines (41 loc) · 1.42 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Lights</title>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<link rel="apple-touch-icon" href="msc_icon.png" />
<style type="text/css" media="screen">@import "iui/iui.css";</style>
<script type="application/x-javascript" src="iui/iui.js"></script>
</head>
<body>
<?php
include 'functions.php';
$lightlist = array(11,12,13,14,15);
# Let's add a quick check whether the downlights should be full-brightness
$full = FALSE; # We default to half-brightness
$fulldl = $_GET['fulldl'];
if(isset ($fulldl)) $full = TRUE; #we only care if fulldl exists; value doesn't matter
foreach($lightlist as $id) {
oneOnBright($id);
}
oneOn(17);
oneOn(20);
# Let's build the fulldl conditional into multiple calls (button-presses).
if(isOn(23) && getBri(23) != 254) $full = TRUE;
# Downlights
for($id = 22; $id <=25; $id++) {
oneOn($id);
setCT($id, $ctWarm);
if($full) setLevel($id, 254); # DLs full-brightness?
else setLevel($id, 127);
}
# Ironically, turn off the TV backlights if they're on. This will have no effect if we're streaming.
oneOff(28);
oneOff(29);
oneOff(39);
if(strpos($_SERVER['HTTP_USER_AGENT'], 'WebKit')) header('Location: ' . $_SERVER['normal.php']);
?>
</body>
</html>