-
Notifications
You must be signed in to change notification settings - Fork 1
/
second.html
executable file
·212 lines (183 loc) · 6.04 KB
/
second.html
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!DOCTYPE html>
<html>
<head>
<title>Welcome to the Safety-Security portal</title>
<!-- decleration of jquery-->
<script type="text/javascript" src="jquery/jquery.min.js"></script>
<!-- decleration of css-->
<link rel="stylesheet" href="css/design.css">
<!-- fire base-->
<script src="https://www.gstatic.com/firebasejs/4.3.0/firebase.js"></script>
<!-- check it-->
<!-- decleration of js-->
<style>
#map {
height: 600px;
}
/* Optional: Makes the sample page fill the window. */
html, body {
height: 100;
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div class="alert">Your message has been sent</div>
<div class="heading" >
<H1>SUBMIT//GET SAFETY-SECURITY REPORTS</H1>
</div>
<div class="h1">
<header>
<code style="color: black;"><HERE U CAN SUBMIT ISSUES RELATED TO PLACE IN 1 MIN></code>
</header>
</div>
<div class="h2">
<section>
<code style="color: black;" ><HERE YOU CAN GET A REPORT ABOUT ISSUES FACED BY TOURIST AT THIS PLACE<</code>
</section>
</div>
<form id="form">
<div class="heading">Submit safety and security report</div>
<label for="name">
<span>Name
<span class="name"></span>
</span>
<input type="text" class="input" id="name" name="name" value="" />
</label>
<label for="contact">
<span>how can we contact u
<span class="contact"></span>
</span>
<input type="text" class="input" id="contact" name="contact" value="" />
</label>
<label for="option">
<span>Place</span>
<select name="place" id="dplace">
<option value="Ajmer">Ajmer</option>
<option value="Alwar">Alwar</option>
<option value="Banswara">Banswara</option>
<option value="Baran">Baran</option>
<option value="Bikaner">Bikaner</option>
<option value="Bikaner">Bikaner</option>
<option value="Bhilwara">Bhilwara</option>
<option value="Chittorgarh">Chittorgarh</option>
<option value="Dausa">Dausa</option>
<option value="Dholpur">Dholpur</option>
<option value="other">Other</option>
</select>
</label>
<label for="option"> <!-- to be copied before generate button -->
<span>Regarding</span>
<select name="place" class="safety">
<option value="Stalking">Stalking</option>
<option value="Get Robbed">Get Robbed</option>
<option value="Taking Pictures">Taking Pictures</option>
<option value="Catcall/Whistles">Catcall/Whistles</option>
<option value="Commenting">Commenting</option>
<option value="Indecent Exposure">Indecent Exposure</option>
<option value="Touching Groping">Touching Groping</option>
<option value="Touching Groping">Touching Groping</option>
<option value="Sexual Invites">Sexual Invites</option>
<option value="Rape/ Sexual Assault">Rape/ Sexual Assault</option>
<option value="Poor/no Street lights">Poor/no Street lights</option>
<option value="Chain Snatching">Chain Snatching</option>
<option value="Regional Commenting">Regional Commenting</option>
<option value="other">Other</option>
</select>
</label>
<label for="problem">
<span>Problem Description
<span class="report">*</span>
</span>
<textarea name="problem" class="text" id="problem"></textarea>
</label>
<label>
<span> </span>
<input type="submit" id="write" onclick="myFunction()" value="Submit" />
</label>
<label for="option">
<span>Place</span>
<select name="place" id="rplace">
<option value="Ajmer">Ajmer</option>
<option value="Alwar">Alwar</option>
<option value="Banswara">Banswara</option>
<option value="Baran">Baran</option>
<option value="Bikaner">Bikaner</option>
<option value="Bikaner">Bikaner</option>
<option value="Bhilwara">Bhilwara</option>
<option value="Chittorgarh">Chittorgarh</option>
<option value="Dausa">Dausa</option>
<option value="Dholpur">Dholpur</option>
<option value="other">Other</option>
</select>
</label>
<label>
<span> </span>
<input type="submit" id="read" onclick="myFunction()" value="Generate" />
</label>
<!-- <label for="problem">
<span>ISSUES FACED BY OTHER TOURISTS
<span class="issue">*</span>
</span>
<textarea name="problem" class="text" id="problem"></textarea>
</label>-->
<p>©team Rookie</p>
</form>
<script>
function myFunction() {
document.getElementById("form").reset();
}
</script>
<script src="js/jscript.js"></script>
<script type="text/javascript">
// Initialize Firebase
var config = {
apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
authDomain: "rajhack-187611.firebaseapp.com",
databaseURL: "https://rajhack-187611.firebaseio.com",
projectId: "rajhack-187611",
storageBucket: "rajhack-187611.appspot.com",
messagingSenderId: "746650132768"
};
firebase.initializeApp(config);
var db = firebase.database();
$("#read").on('click', function(){
place = $("#rplace").val();
db.ref('dev/').on('value', function(snap){
console.log(snap.val()[place].problem);
})
})
$("#write").on('click', function () {
var data = {
name: $("#name").val(),
contact: $("#contact").val(),
place: $("#dplace").val(),
option: $(".safety").val(),
problem: $("#problem").val()
}
console.log(data);
db.ref('dev/').child(data.place).set(data);
console.log('saved');
})
// Show alert
/*document.querySelector('.alert').style.display = 'block';
// Hide alert after 3 seconds
setTimeout(function(){
document.querySelector('.alert').style.display = 'none';
},3000);*/
</script>
<div id="map"></div>
<script>
var map;
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: 27.0238, lng: 74.21791},
zoom: 7
});
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=xxxxxxxxx&callback=initMap"
async defer></script>
</body>
</html>