-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadminhome.html
485 lines (441 loc) · 18.7 KB
/
adminhome.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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Dec Divyendh">
<meta name="author" content="Dev Divyendh">
<link rel="icon" type="image/png" href="images/logo.png">
<title>Door Dining - Online Food Ordering</title>
<!-- Slick Slider -->
<link rel="stylesheet" type="text/css" href="vendor/slick/slick.min.css" />
<link rel="stylesheet" type="text/css" href="vendor/slick/slick-theme.min.css" />
<!-- Feather Icon-->
<link href="vendor/icons/feather.css" rel="stylesheet" type="text/css">
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/hstyle.css" rel="stylesheet">
<!-- Sidebar CSS -->
<link href="vendor/sidebar/demo.css" rel="stylesheet">
</head>
<body class="fixed-bottom-bar">
<header class="section-header">
<section class="header-main shadow-sm bg-black">
<div class="container">
<div class="row align-items-center">
<div class="col-1">
<a href="index.html" class="brand-wrap mb-0">
<img alt="#" class="img-fluid" src="images/logo.png">
</a>
<!-- brand-wrap.// -->
</div>
<div class="col-3 d-flex align-items-center m-none">
<div class="dropdown mr-3">
<a class="nav-text dropdown-toggle d-flex align-items-center py-3" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<div><i class="feather-map-pin mr-2 bg-light rounded-pill p-2 icofont-size"></i></div>
<div>
<p class="text-muted mb-0 small">Select Location</p>
Ettimadai Coimbatore...
</div>
</a>
<div class="dropdown-menu p-0 drop-loc" aria-labelledby="navbarDropdown">
<div class="osahan-country">
<div class="search_location bg-primary p-3 text-right">
<div class="input-group rounded shadow-sm overflow-hidden">
<div class="input-group-prepend">
<button class="border-0 btn btn-outline-secondary nav-text bg-card btn-block"><i class="feather-search"></i></button>
</div>
<input type="text" class="shadow-none border-0 form-control" placeholder="Enter Your Location">
</div>
</div>
<div class="p-3 border-bottom">
<a href="home.html" class="text-decoration-none">
<p class="font-weight-bold text-primary m-0"><i class="feather-navigation"></i> Tamil Nadu, India</p>
</a>
</div>
<div class="filter">
<h6 class="px-3 py-3 bg-light pb-1 m-0 border-bottom">Choose your country</h6>
<div class="custom-control border-bottom px-0 custom-radio">
<input type="radio" id="customRadio1" name="location" class="custom-control-input">
<label class="custom-control-label py-3 w-100 px-3" for="customRadio1">Afghanistan</label>
</div>
<div class="custom-control border-bottom px-0 custom-radio">
<input type="radio" id="customRadio2" name="location" class="custom-control-input" checked="">
<label class="custom-control-label py-3 w-100 px-3" for="customRadio2">India</label>
</div>
<div class="custom-control border-bottom px-0 custom-radio">
<input type="radio" id="customRadio3" name="location" class="custom-control-input">
<label class="custom-control-label py-3 w-100 px-3" for="customRadio3">USA</label>
</div>
<div class="custom-control border-bottom px-0 custom-radio">
<input type="radio" id="customRadio4" name="location" class="custom-control-input">
<label class="custom-control-label py-3 w-100 px-3" for="customRadio4">Australia</label>
</div>
<div class="custom-control border-bottom px-0 custom-radio">
<input type="radio" id="customRadio5" name="location" class="custom-control-input">
<label class="custom-control-label py-3 w-100 px-3" for="customRadio5">Japan</label>
</div>
<div class="custom-control px-0 custom-radio">
<input type="radio" id="customRadio6" name="location" class="custom-control-input">
<label class="custom-control-label py-3 w-100 px-3" for="customRadio6">China</label>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- col.// -->
<div class="col-8">
<div class="d-flex align-items-center justify-content-end pr-5">
<!-- search -->
<a href="search.html" class="nav-text widget-header mr-4">
<div class="icon d-flex align-items-center">
<i class="feather-search h6 mr-2 mb-0"></i> <span>Search</span>
</div>
</a>
<!-- offers -->
<a href="offers.html" class="widget-header mr-4 text-white btn bg-primary m-none">
<div class="icon d-flex align-items-center">
<i class="feather-disc h6 mr-2 mb-0"></i> <span>Offers</span>
</div>
</a>
<!-- signin -->
<!-- <a href="login.html" class="widget-header mr-4 nav-text m-none">
<div class="icon d-flex align-items-center">
<i class="feather-user h6 mr-2 mb-0"></i> <span>Sign in</span>
</div>
</a> -->
<!-- my account -->
<div class="dropdown mr-4 m-none">
<a href="#" class="dropdown-toggle nav-text py-3 d-block" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img alt="#" src="img/user2.png" class="img-fluid rounded-circle header-user mr-2 header-user"> My Profile
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="aprofile.html">My account</a>
<a class="dropdown-item" href="faq.html">Delivery support</a>
<a class="dropdown-item" href="contact-us.html">Contant us</a>
<a class="dropdown-item" href="terms.html">Term of use</a>
<a class="dropdown-item" href="privacy.html">Privacy policy</a>
<a class="dropdown-item" href="login.html">Logout</a>
</div>
</div>
<!-- signin -->
<a href="checkout.html" class="widget-header mr-4 nav-text">
<div class="icon d-flex align-items-center">
<i class="feather-shopping-cart h6 mr-2 mb-0"></i> <span>Cart</span>
</div>
</a>
<a class="toggle" href="#">
<span style="color: white;background: white;"></span>
</a>
</div>
<!-- widgets-wrap.// -->
</div>
<!-- col.// -->
</div>
<!-- row.// -->
</div>
<!-- container.// -->
</section>
<!-- header-main .// -->
</header>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple HTML HomePage</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Sriracha&display=swap');
body {
margin: 0;
box-sizing: border-box;
}
/* CSS for header */
.header {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #f5f5f5;
}
.header .logo {
font-size: 25px;
font-family: 'Sriracha', cursive;
color: #000;
text-decoration: none;
margin-left: 30px;
}
.nav-items {
display: flex;
justify-content: space-around;
align-items: center;
background-color: #f5f5f5;
margin-right: 20px;
}
.nav-items a {
text-decoration: none;
color: #000;
padding: 35px 20px;
}
/* CSS for main element */
.intro {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 520px;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.5) 100%), url("https://images.unsplash.com/photo-1587620962725-abab7fe55159?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1031&q=80");
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
.intro h1 {
font-family: sans-serif;
font-size: 60px;
color: #fff;
font-weight: bold;
text-transform: uppercase;
margin: 0;
}
.intro p {
font-size: 20px;
color: #d1d1d1;
text-transform: uppercase;
margin: 20px 0;
}
.intro button {
background-color: #5edaf0;
color: #000;
padding: 10px 25px;
border: none;
border-radius: 5px;
font-size: 20px;
font-weight: bold;
cursor: pointer;
box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.4)
}
.achievements {
display: flex;
justify-content: space-around;
align-items: center;
padding: 40px 80px;
}
.achievements .work {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 0 40px;
}
.achievements .work i {
width: fit-content;
font-size: 50px;
color: #333333;
border-radius: 50%;
border: 2px solid #333333;
padding: 12px;
}
.achievements .work .work-heading {
font-size: 20px;
color: #333333;
text-transform: uppercase;
margin: 10px 0;
}
.achievements .work .work-text {
font-size: 15px;
color: #585858;
margin: 10px 0;
}
.about-me {
display: flex;
justify-content: center;
align-items: center;
padding: 40px 80px;
border-top: 2px solid #eeeeee;
}
.about-me img {
width: 500px;
max-width: 100%;
height: auto;
border-radius: 10px;
}
.about-me-text h2 {
font-size: 30px;
color: #333333;
text-transform: uppercase;
margin: 0;
}
.about-me-text p {
font-size: 15px;
color: #585858;
margin: 10px 0;
}
/* CSS for footer */
.footer {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #302f49;
padding: 40px 80px;
}
.footer .copy {
color: #fff;
}
.bottom-links {
display: flex;
justify-content: space-around;
align-items: center;
padding: 40px 0;
}
.bottom-links .links {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 0 40px;
}
.bottom-links .links span {
font-size: 20px;
color: #fff;
text-transform: uppercase;
margin: 10px 0;
}
.bottom-links .links a {
text-decoration: none;
color: #a1a1a1;
padding: 10px 20px;
}
</style>
</head>
<body>
<header class="header">
<a href="#" class="logo">Admin</a>
<!-- <nav class="nav-items">
<a href="#">Home</a>
<a href="#">About</a>
<a href="#">Contact</a>
</nav> -->
</header>
<main>
<div class="intro">
<h1>Admins at their work</h1>
<br>
<a href="index (4).html"><button id="b1">Want to update your menu?</button> </a>
<br>
<a href="http://127.0.0.1:5002"><button>Analyse Reviews</button></a>
</div>
<div class="about-me">
<div class="about-me-text">
<h2>Admin roles</h2>
<p>admins take adminstration for websites maintance and data updation. </p>
</div>
<img src="https://images.unsplash.com/photo-1596495578065-6e0763fa1178?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=871&q=80" alt="me">
</div>
</main>
<footer class="footer">
<div class="copy">© 2022 Developer</div>
<div class="bottom-links">
<div class="links">
<span>More Info</span>
<a href="#">Home</a>
<a href="#">About</a>
<a href="#">Contact</a>
</div>
<div class="links">
<span>Social Links</span>
<a href="#"><i class="fab fa-facebook"></i></a>
<a href="#"><i class="fab fa-twitter"></i></a>
<a href="#"><i class="fab fa-instagram"></i></a>
</div>
</div>
</footer>
</body>
<script type="module">
// Import the functions you need from the SDKs you need
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.4.0/firebase-app.js";
import { getDatabase, set, ref, update, onValue, get,child } from "https://www.gstatic.com/firebasejs/9.4.0/firebase-database.js";
import { getAuth, createUserWithEmailAndPassword, signInWithEmailAndPassword, onAuthStateChanged, signOut } from "https://www.gstatic.com/firebasejs/9.4.0/firebase-auth.js";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "AIzaSyCan3sUwtdAwRIY3F9LfH-h5UXe5tDC1Ts",
authDomain: "hotel-ordering-system-d60d1.firebaseapp.com",
databaseURL: "https://hotel-ordering-system-d60d1-default-rtdb.firebaseio.com",
projectId: "hotel-ordering-system-d60d1",
storageBucket: "hotel-ordering-system-d60d1.appspot.com",
messagingSenderId: "111728405719",
appId: "1:111728405719:web:b76f8abd3058b913045492"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const database = getDatabase(app);
const auth = getAuth();
const fname = document.getElementById('fname');
const mobile = document.getElementById('mobile');
function profile(){
const user = auth.currentUser;
console.log(user.uid);
}
document.getElementById("profil").onload= function(){
const user = auth.currentUser;
const dbRef = ref(getDatabase());
onAuthStateChanged(auth,(user)=>{
if(user){
console.log(user.email);
get(child(dbRef, `users/${user.uid}`)).then((snapshot) => {
if (snapshot.exists()) {
console.log(snapshot.val());
let fn = new String(snapshot.val().firstname);
let ln = new String(snapshot.val().lastname);
let mob = new String(snapshot.val().mobilenumber);
let em = new String(snapshot.val().email);
let nam = fn.concat(" ", ln);
console.log(fn);
try{
fname.innerHTML = nam.toUpperCase();
mobile.innerHTML = mob;
fname1.innerHTML = fn.toUpperCase();
lname1.innerHTML = ln.toUpperCase();
email1.innerHTML = em;
}catch{
console.log("error");
}
} else {
console.log("No data available");
}
}).catch((error) => {
console.error(error);
});
}
})
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var ins = document.getElementById("insert");
var firName=document.getElementById("exampleInputName1");
var lasname=document.getElementById("exampleInputName2");
var mobnum=document.getElementById("exampleInputNumber1");
var emai=document.getElementById("exampleInputEmail1");
// function InsertData(){
insert.addEventListener('click',(e)=>{
e.preventDefault();
const user = auth.currentUser;
set(ref(database, "users/"+user.uid),{
firstname: firName.value,
lastname: lasname.value,
mobilenumber: mobnum.value,
email: emai.value,
})
.then(()=>{
alert('DataStored Successfully')
})
.catch((error)=>{
alert("Unsuccessful, error"+error)
});
});
//}
//ins.addEventListener('click',InsertData);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
</script>
</html>