-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·198 lines (194 loc) · 4.84 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!DOCTYPE html>
<html language="en">
<head>
<meta charset="utf-8">
<link href="iPhone.css" rel="stylesheet">
</head>
<body>
<button onclick="navhistory()">Back</button>
<div class="phone">
<div id="index" class="screen">
<br>
<div class="left">
Lås hoveddør:
</div>
<div class="right">
<div class="onoff hand" style="background-color: green;">Åben</div>
</div>
<div class="hand link" page="subindex" style="margin-top:50px;">Menu</div>
<div class="hand link" page="settings">Indstillinger</div>
<div class="hand link" func="displayKeyChain" page="keychain">Nøglebundt</div>
<div class="hand link" func="displayKeys" page="keys">Profil</div>
</div>
<div id="subindex" class="screen hide">
<table>
<tr>
<td class="hand lockall">Lås alle</td>
<td class="hand unlockall" page="unlockall">Åben alle</td>
<td class="link hand" func="displayWork" page="work">Arbejde</td>
</tr>
<tr>
<td class="link hand" func="displayKeys" page="keys">Profil</td>
<td class="link hand" func="displayHome" page="home">Hjemmet</td>
<td class="link hand" func="displayFree" page="free">Fritid</td>
</tr>
<tr>
<td class="link hand" func="displayLocked" page="locked">Låste</td>
<td class="link hand" func="displayUnlocked" page="unlocked">Ulåste</td>
<td class="hand" style="font-size: 70px; font-family: bold;"><font color="green">+</font></td>
</tr>
<tr>
</tr>
</table>
</div>
<div id="settings" class="screen hide">
<div class="left">
Autolås døre
</div>
<div class="right">
<div class="onsettingsoff hand" style="background-color: green;">Til</div>
</div>
<div class="left">
Tidspunkt
</div>
<div class="right">
<input type="time" style="top: -5px;">
</div>
<div class="left">
Reserver batteri
</div>
<div class="right">
<input type="number" placeholder="minutter" style="top: -10px;" min="2">
</div>
<div class="hand save" style="width: 232px; position: absolute; height: 20px; text-align: center; margin: auto; left: 0px; right: 0px; clear: both; top: 92%; border-radius: 6px" oplysning="Dine indstillinger blev gemt!">Gem</div>
</div>
<div id="work" class="screen hide">
work
</div>
<div id="home" class="screen hide">
Home
</div>
<div id="free" class="screen hide">
Free
</div>
<div id="keys" class="screen hide">
Keys
</div>
<div id="locked" class="screen hide">
locked
</div>
<div id="unlocked" class="screen hide">
unlock
</div>
<div id="profil" class="screen hide">
din profil
</div>
<div id="keychain" class="screen hide">
din profil
</div>
<div class="home-button link hand" page="index">
<div class="inner-home">
</div>
</div>
</div>
<div class="messagebox hide">
<div class="messageboxmessage">
Alt gik fint
</div>
</div>
<div class="loginscreen screen">
<div class="loginmessage">
<div>
Login med sikkerhedsnøgle:<br>
<input class="pass" type="password"></input>
<br>
<button id="confirm">login</button>
</div>
</div>
</div>
</body>
<script>
var keys = [{
person: "Mig",
key: "95713512"}];
var doorsHome = [{
name: "hoveddør",
locked: true},
{
name: "bagdør",
locked: true
}];
var doorsWork = [
{
name: "hoveddør",
locked: true
}];
var doorsFree = [
{
name: "Bil",
locked: true
},
{
name: "Cykel",
locked: false
}]
</script>
<script src="jquery.js"></script>
<script>
$(document).ready(function(){$('.pass').focus()})
$('.phone').children().on('swiperight', function() {
$('.link:last').trigger('mousedown')
})
$('#confirm').on('click', function()
{
if($('.pass').val() != "")
{
$('#confirm').remove();
$('.pass').remove();
$('.loginmessage').remove()
$('.loginscreen').remove()
}
})
$('.pass').keydown(function(e){
if(e.keyCode ==13) {$('#confirm').trigger('click')}})
$(document).keydown(function(e)
{
if (e.keyCode == 37)
{
navhistory();
}
})
// detect right swipe:
var xStart;
$(document).mousedown(function(e)
{
xStart = e.pageX;
})
$(document).mouseup(function(e)
{
if (xStart != undefined)
{
len = e.pageX - xStart
if(len > 35 && len < 100)
{
navhistory();
}
}
})
</script>
<script src="linker.js"></script>
<script src="onoff.js"></script>
<script src="save.js"></script>
<script src="messagebox.js"></script>
<script src="lockall.js"></script>
<script src="displayWork.js"></script>
<script src="displayHome.js"></script>
<script src="displayFree.js"></script>
<script src="displayLocked.js"></script>
<script src="displayUnlocked.js"></script>
<script src="maindoor.js"></script>
<script src="keys.js"></script>
<script src="remove.js"></script>
<script src="unlockall.js"></script>
<script src="displaykeychain.js"></script>
</html>