-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.html
331 lines (252 loc) · 12.7 KB
/
search.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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
<!DOCTYPE html>
<!--
Copyright (c) 2012-2016 Adobe Systems Incorporated. All rights reserved.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
<!-- This is a wide open CSP declaration. To lock this down for production, see below. -->
<meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline'; style-src 'self' 'unsafe-inline'; media-src *" />
<!-- Good default declaration:
* gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
* https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
* Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
* Enable inline JS: add 'unsafe-inline' to default-src
* Enable eval(): add 'unsafe-eval' to default-src
* Create your own at http://cspisawesome.com
-->
<!-- <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: 'unsafe-inline' https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *" /> -->
<!-- Path to Materialize Library CSS-->
<link rel="stylesheet" href="css/materialize.min.css">
<!-- Path to Font Awesome icons-->
<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Path to Login custom's CSS-->
<link rel="stylesheet" href="css/">
<title>gothere</title>
<style>
.card {box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none;}
.card-panel{box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none;}
.nav-wrapper .input-field input[type=search]{
height: 60px;
}
.nav-wrapper input[type=search]:focus {
position: fixed;
top: 0;
left: 0;
width: 100%;
}
.input-field label {
max-height: 67px;
}
.nav-wrapper input[type=search]:focus .label-icon.active{
position: fixed;
left: 100%;background-color: none;
}.nav-wrapper input[type=search]:focus .closed{
position: fixed;
right: 10px;background-color: none;
}
</style>
</head>
<body class="blue-grey lighten-4" id="profile">
<div class="navbar-fixed">
<nav class="nav-extended blue-grey darken-3">
<div class="nav-wrapper">
<a href="#" class="brand-logo">Search</a>
<ul class="left"><a href="#" data-activates="slide-out" class="button-collapse"><i class="fa fa-bars"></i></a></ul>
<!--<ul class="left "><a href="#"><i class="fa fa-search"></i></a></ul>-->
<ul class="right "><a href="#"><i class="fa fa-bell"></i></a></ul>
</div>
<div class="nav-content">
<ul class="tabs tabs-transparent">
<li class="tab" id=""><a class="active" href="#test1">People</a></li>
<li class="tab" ><a id="a" href="#test2">Events</a></li>
<!--<li class="tab"><a href="#test3">Places</a></li>-->
</ul>
</div>
</nav>
</div><br><br><br>
<div style="width:95%; height:auto;margin:auto;">
<div id="test1" class="col s12">
<div><form>
<div class="input-field">
<input type="search" name="searchPeople" id="searchPeople">
<label class="label-icon" for="search"><i class="fa fa-search"></i></label>
</div>
</form></div>
<div id="list"></div>
</div>
<div id="test2" class="col s12">
<div><form>
<div class="input-field">
<input type="search" name="searchEvents" id="searchEvents">
<label class="label-icon" for="search"><i class="fa fa-search"></i></label>
</div>
</form></div>
<div id="list2"></div>
</div>
<div id="test3" class="col s12" ></div>
<div id="test4" class="col s12"></div>
</div>
<ul id="slide-out" class="side-nav">
<li><div class="user-view">
<div class="background">
<script>
var gender = document.getElementById('g');
if (gender == "male"){
document.write('<img src="img/avatar/images%20(6).jpg" height="200px" width="100%" id="pc">');
}else{
document.write('<img src="img/avatar/images%20(5).jpg" height="200px" width="100%" id="pc">');
}
</script>
</div>
<script>
var gender = document.getElementById('g');
if (gender == "male"){
document.write('<a href="#!user"><img class="circle" src="img/avatar/images%20(8).jpg" height="70px" width="auto" id="pp"></a>');
}else{
document.write('<a href="#!user"><img class="circle" src="img/avatar/images%20(7).jpg" height="70px" width="auto" id="pp"></a>');
}
</script>
<a href="#!name"><span class="white-text name" id="u">username</span></a>
<a href="#!email"><span class="white-text email" id="e">[email protected]</span></a>
</div></li>
<li><a class="waves-effect" href="index.html"><i class="fa fa-home blue-grey-text"></i>Home</a></li>
<li><a class="waves-effect" href="profile.html"><i class="fa fa-user blue-grey-text"></i>Account</a></li>
<li><a class="waves-effect" href="search.html"><i class="fa fa-search blue-grey-text"></i>Search</a></li>
<li><div class="divider"></div></li>
<!--<li><a class="subheader">Menu</a></li>-->
<li><a class="waves-effect" href="create.html"><i class="fa fa-pencil blue-grey-text"></i>create</a></li>
<li><a class="waves-effect" href="friends.html"><i class="fa fa-users blue-grey-text"></i>Friends</a></li>
<li><a class="waves-effect" href="nearby.html"><i class="fa fa-compass blue-grey-text"></i>Nearby</a></li>
<li><a class="waves-effect" href="schedule.html"><i class="fa fa-calendar blue-grey-text"></i>Schedule</a></li>
<li><a class="waves-effect" href="settings.html"><i class="fa fa-gears blue-grey-text"></i>Settings</a></li>
<li><div class="divider"></div></li>
<li><a class="waves-effect" onclick="logout()" href="#"><i class="fa fa-sign-out blue-grey-text"></i>Log Out</a></li>
</ul>
<!-- Path to jQuery Library-->
<script src="js/jquery-3.2.1.min.js"></script>
<!-- Path to Materilize Library (javaScript)-->
<script src="js/materialize.min.js"></script>
<!-- Path to Tinymce Editor Library -->
<script src="tinymce/tinymce.min.js"></script>
<script>
$(window).on("load",function(){
// if( typeof window.localStorage.getItem("login") !== 'undefined' && window.localStorage.getItem("login") != 1) {
// window.location.href="login.html";
// }else {
/*$.ajax({
type: 'get',
url: 'http://gothere.000webhostapp.com/check_status.php',
dataType: 'html',
success: function (response) {
if (response == "ok") {
}else {
window.location.href="login.html";
}
}
}); */
});
$(document).ready(function(){
// Initialize collapse button
$('.button-collapse').sideNav({
menuWidth: 300, // Default is 300
edge: 'left', // Choose the horizontal origin
closeOnClick: true, // Closes side-nav on <a> clicks, useful for Angular/Meteor
draggable: true, // Choose whether you can drag to open on touch screens,
onOpen: function(el) { /* Do Stuff*/ }, // A function to be called when sideNav is opened
onClose: function(el) { /* Do Stuff*/ }, // A function to be called when sideNav is closed
}
);
$("#searchPeople").keyup(function(){
var txt = $(this).val();
if(txt != "") {
$.ajax({
url: "search_people.php",
method: "post",
data: {search:txt},
dataType: "html",
success: function(data) {
$('#list').html(data);
}
});
}else {
$('#list').html('');
}
});
$("#searchEvents").keyup(function(){
var txt = $(this).val();
if(txt != "") {
$.ajax({
url: "search_events.php",
method: "post",
data: {search:txt},
dataType: "html",
success: function(data) {
$('#list2').html(data);
}
});
}else {
$('#list2').html('');
}
});
});
function getprofile() {
var uname = $("#uname").val();
$.ajax({
method: "post",
//url: 'http://gothere.000webhostapp.com/logout.php',
url: 'viewprofile.php',
data: {uname:uname},
dataType: "html",
success: function(data) {
$('#profile').html(data);
}
});
}
function getevents() {
var ename = $("#ename").val();
$.ajax({
method: "post",
//url: 'http://gothere.000webhostapp.com/logout.php',
url: 'viewevent.php',
data: {ename:ename},
dataType: "html",
success: function(data) {
$('#profile').html(data);
}
});
}
function logout() {
$.ajax({
type: 'get',
//url: 'http://gothere.000webhostapp.com/logout.php',
url: 'logout.php',
success: function (response) {
if (response == "success") {
window.location.href="login.html";
}else{
alert("You were not logged out");
}
}
});
}
</script>
</body>
</html>