-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome.php
More file actions
159 lines (143 loc) · 4.39 KB
/
home.php
File metadata and controls
159 lines (143 loc) · 4.39 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
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
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Emergency system for Malta's pyrotechnics industry">
<meta name="keywords" content="Malta, Pyrotechnics, Malta Emergency system">
<meta name="author" content="Tafadzwa Munyurwa">
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/home.css">
<link rel="stylesheet" type="text/css" href="css/shared.css">
<link rel="stylesheet" type="text/css" href="css/map_edits.css">
<script src="js/commonFuncions.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAkmiq2h0mAJufmug8-nBPzstefg1IRQIQ&sensor=false"></script>
<title>Malta Pyro - Home</title>
<script>
var i = sessionStorage.getItem("hasrun");
if ( typeof (Storage) !== "undefined") {
if (i == null) {
sessionStorage.setItem("hasrun", "first");
i = sessionStorage.getItem("hasrun");
}
if (navigator.geolocation) {
if (i == "first")
navigator.geolocation.getCurrentPosition(geo_success, geo_fail);
} else {
alert("Your browser does not support Geolocation!");
}
} else {
document.getElementById("map_error").innerHTML = "Sorry, your browser does not support web storage. As a result you will not be able to have the weather report!";
}
function geo_success(pos) {
var lat = pos.coords.latitude;
var lon = pos.coords.longitude;
sessionStorage.geo_lat = lat;
sessionStorage.geo_lon = lon;
if (i == "first") {
window.location.reload();
sessionStorage["hasrun"] = "morethanOnce";
i = sessionStorage.getItem("hasrun");
}
}
function geo_fail(error) {
switch(error.code) {
case error.TIMEOUT:
showError("A timeout occured! Please try again!");
break;
case error.POSITION_UNAVAILABLE:
showError('We can\'t detect your location. Sorry!');
break;
case error.PERMISSION_DENIED:
showError('Please allow geolocation access for this to work.');
break;
case error.UNKNOWN_ERROR:
showError('An unknown error occured!');
break;
}
}
function showError(msg) {
document.getElementById("map_error").innerHTML = msg;
}
</script>
</head>
<body>
<div id="wrapper">
<div id="map_canvas"></div>
<p id="map_error">
</p>
<div class="lightbox" id="lightbox_back">
</div>
<div class="lightbox" id="lightbox_main">
<div id="lightbbox_left">
<input class="text_inputs" id="lat" placeholder="Latitude" type="number" required="true"/>
<input class="text_inputs" id="lon" placeholder="Longitude" type="number" required="true"/>
<input class="text_inputs" id="siteName" placeholder="Name" required="true"/>
</div>
<div id="lightbbox_right">
<textarea id="siteDesc" type="text" placeholder="Site decription..." required="true"></textarea>
</div>
<div id="lightbbox_bottom1">
<p class="checkbox_inputs">
Pyro Station
<input id="pyroStation" type="checkbox"/>
</p>
<p class="checkbox_inputs">
Emergancy Station
<input id="emergStation" type="checkbox"/>
</p>
</div>
<div id="lightbbox_bottom2">
<p class="sve_button" id="save">
Save
</p>
<p class="sve_button" id="cancle">
Cancle
</p>
</div>
</div>
<div class="roundbotom_top" id="header_wrapper"></div>
<header class="roundbotom_top">
<div id="top_options_info">
<div class="top_options_info_children" id="user_info">
<img src="" alt="profpic" />
<p>
First:
</p>
<p>
Last:
</p>
<p style="color: blue; cursor: pointer;">
More...
</p>
</div>
<div class="top_options_info_children" id="alerts">
</div>
<div class="top_options_info_children" id="search">
<div id="search_container">
<input id="search_box" type="text" placeholder="Enter search text here..." />
<p class="button" id="search_button">
Search
</p>
</div>
</div>
</div>
<div class="roundbotom_top" id="menu">
<p id="_add">
Add
</p>
<p id="_edit">
Edit
</p>
<p id="_delete">
Delete
</p>
<p id="_more">
More..
</p>
</div>
</header>
</div>
</body>
<script src="js/map_functions.js"></script>
<script src="js/buttons.js"></script>
</html>