-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatas.php
266 lines (231 loc) · 8.23 KB
/
atas.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
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
<?php
session_start();
include "config.php";
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags must come first in the head; any other head content must come after these tags -->
<meta name="description" content="">
<meta name="author" content="">
<title><?=$title?></title>
<!-- load stlye dari 23 -->
<link rel="stylesheet" type="text/css" href="css/w3.css"/>
<link rel="stylesheet" type="text/css" href="css/warna.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- load bootsrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="js/bootstrap.min.js"></script>
<!-- load jquery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- load pannellum -->
<script src="js/pannellum.js"></script>
<link rel="stylesheet" href="css/pannellum.css">
<style>
/** lain lain **/
html, body {
height: 100%;
width: 100%;
}
google-map {
height: 700px;
width: 100%;
}
#map {
height: 100%;
}
.limitTampil {
display: none;
}
/* style auto komlit */
.kostkost {
width: 120%;
}
.tt-menu {
background-color: #FFFFFF;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 8px;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
margin-top: 12px;
padding: 8px 0;
}
.tt-suggestion {
text-align: left;
font-size: 22px; /* Set suggestion dropdown font size */
padding: 3px 20px;
}
.tt-suggestion:hover {
cursor: pointer;
background-color: #0097CF;
color: #FFFFFF;
}
.tt-suggestion p {
margin: 0;
}
/* auto komplit sampai sini */
.warna-1 {
background-color: #001a75;
color: white;
}
/*membuat rating*/
.checked {
color: orange;
}
</style>
</head>
<body>
<!-- membuat bar -->
<div class="w3-top">
<div class="w3-bar w3-xlarge w3-theme-d4">
<button href="javascript:void(0)" onclick="myFunction()" class="w3-hide-large w3-hide-medium w3-bar-item w3-button w3-hover-theme">
<b><i class="fa fa-bars" aria-hidden="true"></i></b>
</button>
<div class="w3-bar-item"><b>KOS-Q</b>
</div>
<button onclick="location.href='index.php'" class="w3-hide-small w3-bar-item w3-button w3-hover-theme <?=$home?>">
<b><i class="fa fa-home" aria-hidden="true"></i></b>
</button>
<button onclick="location.href='banding.php'" class="w3-hide-small w3-bar-item w3-button w3-hover-theme <?=$aktifBanding?>">
<b>BANDINGKAN</b>
</button>
<!-- tombol login -->
<?php if(isset($_SESSION['userBiasa']) && isset($_SESSION['pass'])) {
$yhb = mysql_query("SELECT * FROM userBiasa WHERE userBiasa = '$_SESSION[userBiasa]'");
$nmf = mysql_fetch_array($yhb);
$hash = md5(strtolower(trim($nmf['email'])));
$size = 200;
$gravatar = "http://www.gravatar.com/avatar/" . $hash . "?s=" . $size;
?>
<!-- tulisan login waktu besar sama sedang -->
<div class="w3-dropdown-click w3-hover-theme w3-right w3-hide-small">
<button onclick="fungsiDropdown()" class="w3-button">
<i class="fa fa-user-circle-o" aria-hidden="true"></i> <?=$nmf['userBiasa']?>
</button>
<div id="dropdown" class="w3-dropdown-content w3-border w3-bar-block w3-medium" style="right:0">
<div class="w3-row w3-padding">
<div class="w3-row w3-center">
<img src="<?=$gravatar?>" class="w3-margin-bottom w3-circle w3-image w3-center" width="100px">
<div class="w3-medium w3-margin-bottom">
<?=$nmf['depan']?>
<?=$nmf['belakang']?>
</div>
</div>
<button onclick="location.href='profile.php'" class="w3-button w3-green">
<i class="fa fa-user" aria-hidden="true"></i> Profile
</button>
<button onclick="location.href='logout.php'" class="w3-button w3-red">
<i class="fa fa-sign-out" aria-hidden="true"></i> Logout
</button>
</div>
</div>
</div>
<!-- tanda login waktu kecil -->
<button onclick="location.href='profile.php'" class="w3-hide-large w3-hide-medium w3-bar-item w3-button w3-hover-theme w3-right">
<b><i class="fa fa-user-circle-o" aria-hidden="true"></i></b>
</button>
<?php } else { ?>
<button onclick="document.getElementById('formulir').style.display='block'" class="w3-hover-theme w3-bar-item w3-right w3-button w3-hide-small">
<i class="fa fa-sign-in" aria-hidden="true"></i> Login
</button>
<?php } ?>
</div>
<div id="demo" class="w3-bar-block w3-theme-d4 w3-hide w3-hide-large w3-hide-medium">
<button onclick="location.href='index.php'" class="w3-bar-item w3-button w3-hover-theme">
<i class="fa fa-home" aria-hidden="true"></i> Home
</button>
<button onclick="location.href='banding.php'" class="w3-bar-item w3-button">
<i class="fa fa-exchange" aria-hidden="true"></i> Bandingkan
</button>
<?php if(isset($_SESSION['userBiasa']) && isset($_SESSION['pass'])) { ?>
<button onclick="location.href='logout.php'" class="w3-bar-item w3-button">
<i class="fa fa-sign-out" aria-hidden="true"></i> Keluar
</button>
<?php } else { ?>
<button onclick="document.getElementById('formulir').style.display='block'" class="w3-bar-item w3-button">
<i class="fa fa-sign-in" aria-hidden="true"></i> Masuk
</button>
<?php
}
?>
</div>
</div>
<!-- form login -->
<div id="formulir" class="w3-modal" style="align: center;">
<div class="w3-modal-content w3-card-4 w3-animate-zoom" style="max-width:600px">
<div class="w3-center"><br>
<span onclick="document.getElementById('formulir').style.display='none'" class="w3-button w3-xlarge w3-transparent w3-display-topright" title="Close Modal">×</span>
<div class="w3-xxlarge"><b>LOGIN USER KOS-Q</b></div>
</div>
<div class="w3-container">
<form id="formLogin">
<fieldset style="border-style:hidden">
<div class="w3-section">
<label><b>Username</b></label>
<input class="w3-input w3-border w3-margin-bottom" type="text" name="user" id="user"/>
<label><b>Password</b></label>
<input class="w3-input w3-border w3-margin-bottom" type="password" name="pass" id="pass"/>
</div>
</fieldset>
</form>
</div>
<div id="warningLogin"></div>
<div id="gagalLogin"></div>
<div class="w3-container w3-border-top w3-padding-16 w3-light-grey">
<a charset="w3-large" onclick="location.href='daftarAkun.php'" style="cursor: pointer;">Belum punya akun?daftar disini</a>
<button type="submit" id="login" name="login" class="w3-right w3-button w3-theme-dark w3-hover-theme">LOGIN</button>
</div>
</div>
</div>
<script>
function myFunction() {
var x = document.getElementById("demo");
if (x.className.indexOf("w3-show") == -1) {
x.className += " w3-show";
} else {
x.className = x.className.replace(" w3-show", "");
}
}
function fungsiDropdown() {
var x = document.getElementById("dropdown");
if (x.className.indexOf("w3-show") == -1) {
x.className += " w3-show";
} else {
x.className = x.className.replace(" w3-show", "");
}
}
$(function() {
$("button#login").click(function(){
$.ajax({
type: "POST",
url: "prosesLogin.php",
data: $('form#formLogin').serialize(),
success: function(msg){
$("#warningLogin").html(msg);
document.getElementById('formulir').style.display=('block');
},
error: function(){
$("#gagalLogin").html("<div class='w3-bar w3-red w3-center w3-padding'><b>GAGAL LOGIN!</b></div>");
}
});
});
$("#formLogin input").keydown(function(e) {
if (e.keyCode == 13) {
$.ajax({
type: "POST",
url: "prosesLogin.php",
data: $('form#formLogin').serialize(),
success: function(msg){
$("#warningLogin").html(msg);
document.getElementById('formulir').style.display=('block');
},
error: function(){
$("#gagalLogin").html("<div class='w3-bar w3-red w3-center w3-padding'><b>GAGAL LOGIN!</b></div>");
}
});
}
})
});
</script>