96 |
97 |
98 |
99 | Users
100 |
101 |
102 |
103 |
104 |
105 |
106 | User Id
107 | First Name
108 | Last Name
109 | Mobile
110 | Email
111 | Reservations
112 | FeedBacks
113 | Delete
115 |
116 |
117 |
118 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
--------------------------------------------------------------------------------
/FrontEnd/adminfeedback.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
Admin Panel
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
Safar.com
29 |
30 |
31 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
89 |
90 |
91 |
92 |
93 |
94 | FeedBacks
95 |
96 |
97 |
98 |
99 |
100 |
101 | Id
102 | User Id
103 | Bus Id
104 | Driver Rating
105 | Service Rating
106 | Overall Rating
107 | Date
108 | Delete
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
--------------------------------------------------------------------------------
/FrontEnd/css/AdminLogin.css:
--------------------------------------------------------------------------------
1 |
2 | @import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400');
3 |
4 | body, html {
5 | font-family: 'Source Sans Pro', sans-serif;
6 | background-color: #1d243d;
7 | padding: 0;
8 | margin: 0;
9 | }
10 |
11 | #particles-js {
12 | position: absolute;
13 | width: 100%;
14 | height: 100%;
15 | }
16 |
17 | .container{
18 | margin: 0;
19 | top: 50px;
20 | left: 50%;
21 | position: absolute;
22 | text-align: center;
23 | transform: translateX(-50%);
24 | background-color: rgb( 33, 41, 66 );
25 | border-radius: 9px;
26 | border-top: 10px solid #79a6fe;
27 | border-bottom: 10px solid #8BD17C;
28 | width: 400px;
29 | height: 500px;
30 | box-shadow: 1px 1px 108.8px 19.2px rgb(25,31,53);
31 | }
32 |
33 | .box h4 {
34 | font-family: 'Source Sans Pro', sans-serif;
35 | color: #5c6bc0;
36 | font-size: 18px;
37 | margin-top:94px;;
38 | }
39 |
40 | .box h4 span {
41 | color: #dfdeee;
42 | font-weight: lighter;
43 | }
44 |
45 | .box h5 {
46 | font-family: 'Source Sans Pro', sans-serif;
47 | font-size: 13px;
48 | color: #a1a4ad;
49 | letter-spacing: 1.5px;
50 | margin-top: -15px;
51 | margin-bottom: 70px;
52 | }
53 |
54 | .box input[type = "text"],.box input[type = "password"] {
55 | display: block;
56 | margin: 20px auto;
57 | background: #262e49;
58 | border: 0;
59 | border-radius: 5px;
60 | padding: 14px 10px;
61 | width: 320px;
62 | outline: none;
63 | color: #d6d6d6;
64 | -webkit-transition: all .2s ease-out;
65 | -moz-transition: all .2s ease-out;
66 | -ms-transition: all .2s ease-out;
67 | -o-transition: all .2s ease-out;
68 | transition: all .2s ease-out;
69 |
70 | }
71 | ::-webkit-input-placeholder {
72 | color: #565f79;
73 | }
74 |
75 | .box input[type = "text"]:focus,.box input[type = "password"]:focus {
76 | border: 1px solid #79A6FE;
77 |
78 | }
79 |
80 | a{
81 | color: #5c7fda;
82 | text-decoration: none;
83 | }
84 |
85 | a:hover {
86 | text-decoration: underline;
87 | }
88 |
89 | label input[type = "checkbox"] {
90 | display: none;
91 | }
92 |
93 |
94 | label span {
95 | height: 13px;
96 | width: 13px;
97 | border: 2px solid #464d64;
98 | border-radius: 2px;
99 | display: inline-block;
100 | position: relative;
101 | cursor: pointer;
102 | left: 7.5%;
103 | }
104 |
105 | .btn1 {
106 | border:0;
107 | background: #7f5feb;
108 | color: #dfdeee;
109 | border-radius: 100px;
110 | width: 340px;
111 | height: 49px;
112 | font-size: 16px;
113 | position: absolute;
114 | top: 79%;
115 | left: 8%;
116 | transition: 0.3s;
117 | cursor: pointer;
118 | }
119 |
120 | .btn1:hover {
121 | background: #5d33e6;
122 | }
123 |
124 | .rmb {
125 | position: absolute;
126 | margin-left: -24%;
127 | margin-top: 0px;
128 | color: #dfdeee;
129 | font-size: 13px;
130 | }
131 |
132 | .forgetpass {
133 | position: relative;
134 | float: right;
135 | right: 28px;
136 | }
137 |
138 | .dnthave{
139 | position: absolute;
140 | top: 92%;
141 | left: 24%;
142 | }
143 |
144 | [type=checkbox]:checked + span:before {
145 | font-family: FontAwesome;
146 | font-size: 16px;
147 | content: "\f00c";
148 | position: absolute;
149 | top: -4px;
150 | color: #896cec;
151 | left: -1px;
152 | width: 13px;
153 | }
154 |
155 | .typcn {
156 | position: absolute;
157 | left: 339px;
158 | top: 282px;
159 | color: #3b476b;
160 | font-size: 22px;
161 | cursor: pointer;
162 | }
163 |
164 | .typcn.active {
165 | color: #7f60eb;
166 | }
167 |
168 | .error {
169 | background: #ff3333;
170 | text-align: center;
171 | width: 337px;
172 | height: 20px;
173 | padding: 2px;
174 | border: 0;
175 | border-radius: 5px;
176 | margin: 10px auto 10px;
177 | position: absolute;
178 | top: 31%;
179 | left: 7.2%;
180 | color: white;
181 | display: none;
182 | }
183 |
184 | #eye{
185 | width: 20px;
186 | margin-top: 5px;
187 | }
188 |
189 | .footer {
190 | position: relative;
191 | left: 0;
192 | bottom: 0;
193 | top: 605px;
194 | width: 100%;
195 | color: #78797d;
196 | font-size: 14px;
197 | text-align: center;
198 | }
199 |
200 | .footer .fa {
201 | color: #7f5feb;;
202 | }
203 |
204 |
--------------------------------------------------------------------------------
/FrontEnd/css/admin.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600&display=swap');
2 | *{
3 | margin: 0;
4 | padding: 0;
5 | box-sizing: border-box;
6 | font-family: 'Poppins', sans-serif;
7 | }
8 |
9 | :root{
10 | /* ===== Colors ===== */
11 | --primary-color: #0E4BF1;
12 | --panel-color: #FFF;
13 | --text-color: #000;
14 | --black-light-color: #707070;
15 | --border-color: #e6e5e5;
16 | --toggle-color: #DDD;
17 | --box1-color: #4DA3FF;
18 | --box2-color: #FFE6AC;
19 | --box3-color: #E7D1FC;
20 | --title-icon-color: #fff;
21 |
22 | /* ====== Transition ====== */
23 | --tran-05: all 0.5s ease;
24 | --tran-03: all 0.3s ease;
25 | --tran-03: all 0.2s ease;
26 | }
27 |
28 | body{
29 | min-height: 100vh;
30 | background-color: var(--primary-color);
31 | }
32 | body.dark{
33 | --primary-color: #3A3B3C;
34 | --panel-color: #242526;
35 | --text-color: #CCC;
36 | --black-light-color: #CCC;
37 | --border-color: #4D4C4C;
38 | --toggle-color: #FFF;
39 | --box1-color: #3A3B3C;
40 | --box2-color: #3A3B3C;
41 | --box3-color: #3A3B3C;
42 | --title-icon-color: #CCC;
43 | }
44 | /* === Custom Scroll Bar CSS === */
45 | ::-webkit-scrollbar {
46 | width: 8px;
47 | }
48 | ::-webkit-scrollbar-track {
49 | background: #f1f1f1;
50 | }
51 | ::-webkit-scrollbar-thumb {
52 | background: var(--primary-color);
53 | border-radius: 12px;
54 | transition: all 0.3s ease;
55 | }
56 |
57 | ::-webkit-scrollbar-thumb:hover {
58 | background: #0b3cc1;
59 | }
60 |
61 | body.dark::-webkit-scrollbar-thumb:hover,
62 | body.dark .activity-data::-webkit-scrollbar-thumb:hover{
63 | background: #3A3B3C;
64 | }
65 |
66 | nav{
67 | position: fixed;
68 | top: 0;
69 | left: 0;
70 | height: 100%;
71 | width: 250px;
72 | padding: 10px 14px;
73 | background-color: var(--panel-color);
74 | border-right: 1px solid var(--border-color);
75 | transition: var(--tran-05);
76 | }
77 | nav.close{
78 | width: 73px;
79 | }
80 | nav .logo-name{
81 | display: flex;
82 | align-items: center;
83 | }
84 | nav .logo-image{
85 | display: flex;
86 | justify-content: center;
87 | min-width: 45px;
88 | }
89 | nav .logo-image img{
90 | width: 40px;
91 | object-fit: cover;
92 | border-radius: 50%;
93 | }
94 |
95 | nav .logo-name .logo_name{
96 | font-size: 22px;
97 | font-weight: 600;
98 | color: var(--text-color);
99 | margin-left: 14px;
100 | transition: var(--tran-05);
101 | }
102 | nav.close .logo_name{
103 | opacity: 0;
104 | pointer-events: none;
105 | }
106 | nav .menu-items{
107 | margin-top: 40px;
108 | height: calc(100% - 90px);
109 | display: flex;
110 | flex-direction: column;
111 | justify-content: space-between;
112 | }
113 | .menu-items li{
114 | list-style: none;
115 | }
116 | .menu-items li a{
117 | display: flex;
118 | align-items: center;
119 | height: 50px;
120 | text-decoration: none;
121 | position: relative;
122 | }
123 | .nav-links li a:hover:before{
124 | content: "";
125 | position: absolute;
126 | left: -7px;
127 | height: 5px;
128 | width: 5px;
129 | border-radius: 50%;
130 | background-color: var(--primary-color);
131 | }
132 | body.dark li a:hover:before{
133 | background-color: var(--text-color);
134 | }
135 | .menu-items li a i{
136 | font-size: 24px;
137 | min-width: 45px;
138 | height: 100%;
139 | display: flex;
140 | align-items: center;
141 | justify-content: center;
142 | color: var(--black-light-color);
143 | }
144 | .menu-items li a .link-name{
145 | font-size: 18px;
146 | font-weight: 400;
147 | color: var(--black-light-color);
148 | transition: var(--tran-05);
149 | }
150 | nav.close li a .link-name{
151 | opacity: 0;
152 | pointer-events: none;
153 | }
154 | .nav-links li a:hover i,
155 | .nav-links li a:hover .link-name{
156 | color: var(--primary-color);
157 | }
158 | body.dark .nav-links li a:hover i,
159 | body.dark .nav-links li a:hover .link-name{
160 | color: var(--text-color);
161 | }
162 | .menu-items .logout-mode{
163 | padding-top: 10px;
164 | border-top: 1px solid var(--border-color);
165 | }
166 | .menu-items .mode{
167 | display: flex;
168 | align-items: center;
169 | white-space: nowrap;
170 | }
171 | .menu-items .mode-toggle{
172 | position: absolute;
173 | right: 14px;
174 | height: 50px;
175 | min-width: 45px;
176 | display: flex;
177 | align-items: center;
178 | justify-content: center;
179 | cursor: pointer;
180 | }
181 | .mode-toggle .switch{
182 | position: relative;
183 | display: inline-block;
184 | height: 22px;
185 | width: 40px;
186 | border-radius: 25px;
187 | background-color: var(--toggle-color);
188 | }
189 | .switch:before{
190 | content: "";
191 | position: absolute;
192 | left: 5px;
193 | top: 50%;
194 | transform: translateY(-50%);
195 | height: 15px;
196 | width: 15px;
197 | background-color: var(--panel-color);
198 | border-radius: 50%;
199 | transition: var(--tran-03);
200 | }
201 | body.dark .switch:before{
202 | left: 20px;
203 | }
204 |
205 | .dashboard{
206 | position: relative;
207 | left: 250px;
208 | background-color: var(--panel-color);
209 | min-height: 100vh;
210 | width: calc(100% - 250px);
211 | padding: 10px 14px;
212 | transition: var(--tran-05);
213 | }
214 | nav.close ~ .dashboard{
215 | left: 73px;
216 | width: calc(100% - 73px);
217 | }
218 | .dashboard .top .sidebar-toggle{
219 | font-size: 26px;
220 | color: var(--text-color);
221 | cursor: pointer;
222 | }
223 | .dash-content .title{
224 | display: flex;
225 | align-items: center;
226 | margin: 60px 0 30px 0;
227 | }
228 | .dash-content .title i{
229 | position: relative;
230 | height: 35px;
231 | width: 35px;
232 | background-color: var(--primary-color);
233 | border-radius: 6px;
234 | color: var(--title-icon-color);
235 | display: flex;
236 | align-items: center;
237 | justify-content: center;
238 | font-size: 24px;
239 | }
240 | .dash-content .title .text{
241 | font-size: 24px;
242 | font-weight: 500;
243 | color: var(--text-color);
244 | margin-left: 10px;
245 | }
246 | .dash-content .boxes{
247 | display: flex;
248 | align-items: center;
249 | justify-content: space-between;
250 | flex-wrap: wrap;
251 | }
252 | .dash-content .boxes .box{
253 | display: flex;
254 | flex-direction: column;
255 | align-items: center;
256 | border-radius: 12px;
257 | width: calc(100% / 3 - 15px);
258 | padding: 15px 20px;
259 | background-color: var(--box1-color);
260 | transition: var(--tran-05);
261 | }
262 |
263 | /* */
264 | .boxes .box i{
265 | font-size: 35px;
266 | color: var(--text-color);
267 | }
268 | .boxes .box .text{
269 | white-space: nowrap;
270 | font-size: 18px;
271 | font-weight: 500;
272 | color: var(--text-color);
273 | }
274 | .boxes .box .number{
275 | font-size: 40px;
276 | font-weight: 500;
277 | color: var(--text-color);
278 | }
279 | .boxes .box.box2{
280 | background-color: var(--box2-color);
281 | }
282 | .boxes .box.box3{
283 | background-color: var(--box3-color);
284 | }
285 |
286 | .dash-content .activity .activity-data{
287 | display: flex;
288 | justify-content: space-between;
289 | align-items: center;
290 | width: 100%;
291 | }
292 | .activity .activity-data{
293 | display: flex;
294 | }
295 | .activity-data .data{
296 | display: flex;
297 | flex-direction: column;
298 | margin: 0 15px;
299 | }
300 | .activity-data .data-title{
301 | font-size: 20px;
302 | font-weight: 500;
303 | color: var(--text-color);
304 | }
305 | .activity-data .data .data-list{
306 | font-size: 18px;
307 | font-weight: 400;
308 | margin-top: 20px;
309 | white-space: nowrap;
310 | color: var(--text-color);
311 | }
312 |
313 | @media (max-width: 1000px) {
314 | nav{
315 | width: 73px;
316 | }
317 | nav.close{
318 | width: 250px;
319 | }
320 | nav .logo_name{
321 | opacity: 0;
322 | pointer-events: none;
323 | }
324 | nav.close .logo_name{
325 | opacity: 1;
326 | pointer-events: auto;
327 | }
328 | nav li a .link-name{
329 | opacity: 0;
330 | pointer-events: none;
331 | }
332 | nav.close li a .link-name{
333 | opacity: 1;
334 | pointer-events: auto;
335 | }
336 | nav ~ .dashboard{
337 | left: 73px;
338 | width: calc(100% - 73px);
339 | }
340 | nav.close ~ .dashboard{
341 | left: 250px;
342 | width: calc(100% - 250px);
343 | }
344 | nav ~ .dashboard .top{
345 | left: 73px;
346 | width: calc(100% - 73px);
347 | }
348 | nav.close ~ .dashboard .top{
349 | left: 250px;
350 | width: calc(100% - 250px);
351 | }
352 | .activity .activity-data{
353 | overflow-X: scroll;
354 | }
355 | }
356 |
357 |
358 | #popupButton{
359 | cursor: pointer;
360 | }
361 |
362 | #overlay {
363 | display: none;
364 | position: fixed;
365 | top: 0;
366 | left: 0;
367 | width: 100%;
368 | height: 100%;
369 | background-color: rgba(0, 0, 0, 0.5);
370 | }
371 |
372 | .popup {
373 | display: none;
374 | position: fixed;
375 | top: 10%;
376 | left: 50%;
377 | transform: translate(-50%, -50%);
378 | padding: 20px;
379 | background-color: #fff;
380 | border-radius: 8px;
381 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
382 | z-index: 999;
383 | }
384 |
385 | .popup p {
386 | margin: 0;
387 | margin-right: 20px;
388 | }
389 |
390 | .close {
391 | position: absolute;
392 | top: 10px;
393 | right: 10px;
394 | cursor: pointer;
395 | font-size: 18px;
396 | }
397 |
398 | @media screen and (max-height: 600px) {
399 | .popup {
400 | top: 40%;
401 | }
402 | #overlay {
403 | justify-content: flex-start;
404 | }
405 | }
406 |
407 |
408 | #signout{
409 | padding: 5px 16px;
410 | font-size: 14px;
411 | line-height: 20px;
412 | white-space: nowrap;
413 | cursor: pointer;
414 | vertical-align: middle;
415 | border: 1px solid;
416 | border-radius: 6px;
417 | margin: 10px 10px 0px 10px;
418 | }
419 |
420 | #signout:hover{
421 | background-color: #a5a5a5;
422 | border: 1px solid black;
423 | }
424 |
425 |
426 | @media (max-width: 400px) {
427 | nav{
428 | width: 0px;
429 | }
430 | nav.close{
431 | width: 73px;
432 | }
433 | nav .logo_name{
434 | opacity: 0;
435 | pointer-events: none;
436 | }
437 | nav.close .logo_name{
438 | opacity: 0;
439 | pointer-events: none;
440 | }
441 | nav li a .link-name{
442 | opacity: 0;
443 | pointer-events: none;
444 | }
445 | nav.close li a .link-name{
446 | opacity: 0;
447 | pointer-events: none;
448 | }
449 | nav ~ .dashboard{
450 | left: 0;
451 | width: 100%;
452 | }
453 | nav.close ~ .dashboard{
454 | left: 73px;
455 | width: calc(100% - 73px);
456 | }
457 | nav ~ .dashboard .top{
458 | left: 0;
459 | width: 100%;
460 | }
461 | nav.close ~ .dashboard .top{
462 | left: 0;
463 | width: 100%;
464 | }
465 | }
--------------------------------------------------------------------------------
/FrontEnd/css/adminUser.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Github2k10/Safar/546d0ce4f040132a8069d30eaf83e43ff8b49d8e/FrontEnd/css/adminUser.css
--------------------------------------------------------------------------------
/FrontEnd/css/button1.css:
--------------------------------------------------------------------------------
1 | .button1 {
2 | font-size: 17px;
3 | padding: 0.5em 2em;
4 | border: transparent;
5 | box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
6 | background: dodgerblue;
7 | color: white;
8 | border-radius: 4px;
9 | }
10 |
11 | .button1:hover {
12 | background: rgb(2, 0, 36);
13 | background: linear-gradient(
14 | 90deg,
15 | rgba(30, 144, 255, 1) 0%,
16 | rgba(0, 212, 255, 1) 100%
17 | );
18 | }
19 |
20 | .button1:active {
21 | transform: translate(0em, 0.2em);
22 | }
23 |
--------------------------------------------------------------------------------
/FrontEnd/css/deletebutton.css:
--------------------------------------------------------------------------------
1 | #btn{
2 | /* border: 1px solid; */
3 | margin: auto;
4 | display: flex;
5 | justify-content: center;
6 | align-items: center;
7 | }
8 |
9 | #btn i{
10 | font-size: 20px;
11 | margin-top: 10px;
12 | }
13 |
14 | #btn i:hover{
15 | transform: scale(1.2);
16 | transition: .7s;
17 | }
--------------------------------------------------------------------------------
/FrontEnd/css/home.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Github2k10/Safar/546d0ce4f040132a8069d30eaf83e43ff8b49d8e/FrontEnd/css/home.css
--------------------------------------------------------------------------------
/FrontEnd/css/input1.css:
--------------------------------------------------------------------------------
1 | .input1 {
2 | max-width: 190px;
3 | background-color: #f5f5f5;
4 | color: #242424;
5 | padding: .15rem .5rem;
6 | min-height: 40px;
7 | border-radius: 4px;
8 | outline: none;
9 | border: none;
10 | line-height: 1.15;
11 | box-shadow: 0px 10px 20px -18px;
12 | }
13 |
14 | .input1:focus {
15 | border-bottom: 2px solid #5b5fc7;
16 | border-radius: 4px 4px 2px 2px;
17 | }
18 |
19 | .input1:hover {
20 | outline: 1px solid lightgrey;
21 | }
--------------------------------------------------------------------------------
/FrontEnd/css/login.css:
--------------------------------------------------------------------------------
1 | @import url("https://fonts.googleapis.com/css?family=Poppins:400,500,600,700&display=swap");
2 |
3 | * {
4 | margin: 0;
5 | padding: 0;
6 | box-sizing: border-box;
7 | font-family: "Poppins", sans-serif;
8 | }
9 |
10 | body {
11 | background: #dfe6e8;
12 | }
13 |
14 | section {
15 | width: 100%;
16 | height: 100vh;
17 | display: flex;
18 | justify-content: center;
19 | align-items: center;
20 | }
21 |
22 | .main {
23 | width: 70%;
24 | height: 80%;
25 | border-radius: 25px;
26 | background: white;
27 | border-radius: 30px;
28 | display: flex;
29 | }
30 |
31 | .bus-img > img {
32 | width: 100%;
33 | height: 100%;
34 | border-radius: 30px;
35 | }
36 |
37 | .wrapper {
38 | overflow: hidden;
39 | max-width: 390px;
40 | background: #fff;
41 | padding: 30px;
42 | border-radius: 30px;
43 | /* box-shadow: 0px 15px 20px rgba(0, 0, 0, 0.1); */
44 | }
45 | .wrapper .title-text {
46 | display: flex;
47 | width: 200%;
48 | }
49 | .wrapper .title {
50 | width: 50%;
51 | font-size: 35px;
52 | font-weight: 600;
53 | text-align: center;
54 | transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
55 | }
56 | .wrapper .slide-controls {
57 | position: relative;
58 | display: flex;
59 | height: 50px;
60 | width: 100%;
61 | overflow: hidden;
62 | margin: 30px 0 10px 0;
63 | justify-content: space-between;
64 | border: 1px solid lightgrey;
65 | border-radius: 15px;
66 | }
67 | .slide-controls .slide {
68 | height: 100%;
69 | width: 100%;
70 | color: #fff;
71 | font-size: 18px;
72 | font-weight: 500;
73 | text-align: center;
74 | line-height: 48px;
75 | cursor: pointer;
76 | z-index: 1;
77 | transition: all 0.6s ease;
78 | }
79 | .slide-controls label.signup {
80 | color: #000;
81 | }
82 | .slide-controls .slider-tab {
83 | position: absolute;
84 | height: 100%;
85 | width: 50%;
86 | left: 0;
87 | z-index: 0;
88 | border-radius: 15px;
89 | background: -webkit-linear-gradient(left, #003366, #004080, #0059b3, #0073e6);
90 | transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
91 | }
92 | input[type="radio"] {
93 | display: none;
94 | }
95 | #signup:checked ~ .slider-tab {
96 | left: 50%;
97 | }
98 | #signup:checked ~ label.signup {
99 | color: #fff;
100 | cursor: default;
101 | user-select: none;
102 | }
103 | #signup:checked ~ label.login {
104 | color: #000;
105 | }
106 | #login:checked ~ label.signup {
107 | color: #000;
108 | }
109 | #login:checked ~ label.login {
110 | cursor: default;
111 | user-select: none;
112 | }
113 | .wrapper .form-container {
114 | width: 100%;
115 | overflow: hidden;
116 | }
117 | .form-container .form-inner {
118 | display: flex;
119 | width: 200%;
120 | }
121 | .form-container .form-inner form {
122 | width: 50%;
123 | transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
124 | }
125 | .form-inner form .field {
126 | height: 50px;
127 | width: 100%;
128 | margin-top: 20px;
129 | }
130 | .form-inner form .field input {
131 | height: 100%;
132 | width: 100%;
133 | outline: none;
134 | padding-left: 15px;
135 | border-radius: 15px;
136 | border: 1px solid lightgrey;
137 | border-bottom-width: 2px;
138 | font-size: 17px;
139 | transition: all 0.3s ease;
140 | }
141 | .form-inner form .field input:focus {
142 | border-color: #1a75ff;
143 | /* box-shadow: inset 0 0 3px #fb6aae; */
144 | }
145 | .form-inner form .field input::placeholder {
146 | color: #999;
147 | transition: all 0.3s ease;
148 | }
149 | form .field input:focus::placeholder {
150 | color: #1a75ff;
151 | }
152 | .form-inner form .pass-link {
153 | margin-top: 5px;
154 | }
155 | .form-inner form .signup-link {
156 | text-align: center;
157 | margin-top: 30px;
158 | }
159 | .form-inner form .pass-link a,
160 | .form-inner form .signup-link a {
161 | color: #1a75ff;
162 | text-decoration: none;
163 | }
164 | .form-inner form .pass-link a:hover,
165 | .form-inner form .signup-link a:hover {
166 | text-decoration: underline;
167 | }
168 | form .btn {
169 | height: 50px;
170 | width: 100%;
171 | border-radius: 15px;
172 | position: relative;
173 | overflow: hidden;
174 | }
175 | form .btn .btn-layer {
176 | height: 100%;
177 | width: 300%;
178 | position: absolute;
179 | left: -100%;
180 | background: -webkit-linear-gradient(
181 | right,
182 | #003366,
183 | #004080,
184 | #0059b3,
185 | #0073e6
186 | );
187 | border-radius: 15px;
188 | transition: all 0.4s ease;
189 | }
190 | form .btn:hover .btn-layer {
191 | left: 0;
192 | }
193 | form .btn input[type="submit"] {
194 | height: 100%;
195 | width: 100%;
196 | z-index: 1;
197 | position: relative;
198 | background: none;
199 | border: none;
200 | color: #fff;
201 | padding-left: 0;
202 | border-radius: 15px;
203 | font-size: 20px;
204 | font-weight: 500;
205 | cursor: pointer;
206 | }
207 |
--------------------------------------------------------------------------------
/FrontEnd/css/pop.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css?family=Lato:400,700');
2 |
3 | h1 {
4 | font-size: 1em;
5 | font-weight: 100;
6 | letter-spacing: 3px;
7 | padding-top: 5px;
8 | color: #FCFCFC;
9 | padding-bottom: 5px;
10 | text-transform: uppercase;
11 | }
12 |
13 | .green {
14 | color: #4ec07d;
15 | }
16 | .red {
17 | color: #e96075;
18 | }
19 |
20 | .alert {
21 | font-weight: 700;
22 | letter-spacing: 5px;
23 | }
24 |
25 | p {
26 | margin-top: -5px;
27 | font-size: 0.7em;
28 | font-weight: 100;
29 | color: #5e5e5e;
30 | letter-spacing: 1px;
31 | }
32 | button, .dot {
33 | cursor: pointer;
34 | }
35 |
36 | .success-box {
37 | position: absolute;
38 | width: 300px;
39 | height: 300px;
40 | left: 50%;
41 | top: 0;
42 | background: linear-gradient(to bottom right, #B0DB7D 40%, #99DBB4 100%);
43 | border-radius: 20px;
44 | box-shadow: 5px 5px 20px rgba(203, 205, 211, 0.1);
45 | perspective: 40px;
46 | transform: translate(-50%, -50%) scale(0.1);
47 | visibility: hidden;
48 | transition: transform 0.4s, top 0.4s;
49 | }
50 |
51 | .open-success{
52 | visibility: visible;
53 | top: 50%;
54 | transform: translate(-50%, -50%) scale(1);
55 | }
56 |
57 | .error-box {
58 | position: absolute;
59 | width: 300px;
60 | height: 300px;
61 | left: 50%;
62 | top: 0;
63 | background: linear-gradient(to bottom left, #EF8D9C 40%, #FFC39E 100%);
64 | border-radius: 20px;
65 | box-shadow: 5px 5px 20px rgba(203, 205, 211, 0.1);
66 | transform: translate(-50%, -50%) scale(0.1);
67 | visibility: hidden;
68 | transition: transform 0.4s, top 0.4s;
69 | }
70 |
71 | .open-error{
72 | visibility: visible;
73 | top: 50%;
74 | transform: translate(-50%, -50%) scale(1);
75 | }
76 |
77 | .dot {
78 | width: 8px;
79 | height: 8px;
80 | background: #FCFCFC;
81 | border-radius: 50%;
82 | position: absolute;
83 | top: 4%;
84 | right: 6%;
85 | }
86 | .dot:hover {
87 | background: #c9c9c9;
88 | }
89 | .two {
90 | right: 12%;
91 | opacity: 0.5;
92 | }
93 | .face {
94 | position: absolute;
95 | width: 22%;
96 | height: 22%;
97 | background: #FCFCFC;
98 | border-radius: 50%;
99 | border: 1px solid #777777;
100 | top: 21%;
101 | left: 37.5%;
102 | z-index: 2;
103 | animation: bounce 1s ease-in infinite;
104 | }
105 | .face2 {
106 | position: absolute;
107 | width: 22%;
108 | height: 22%;
109 | background: #FCFCFC;
110 | border-radius: 50%;
111 | border: 1px solid #777777;
112 | top: 21%;
113 | left: 37.5%;
114 | z-index: 2;
115 | animation: roll 3s ease-in-out infinite;
116 | }
117 | .eye {
118 | position: absolute;
119 | width: 5px;
120 | height: 5px;
121 | background: #777777;
122 | border-radius: 50%;
123 | top: 40%;
124 | left: 20%;
125 | }
126 | .right {
127 | left: 68%;
128 | }
129 | .mouth {
130 | position: absolute;
131 | top: 43%;
132 | left: 41%;
133 | width: 7px;
134 | height: 7px;
135 | border-radius: 50%;
136 | }
137 | .happy {
138 | border: 2px solid;
139 | border-color: transparent #777777 #777777 transparent;
140 | transform: rotate(45deg);
141 | }
142 | .sad {
143 | top: 49%;
144 | border: 2px solid;
145 | border-color: #777777 transparent transparent #777777;
146 | transform: rotate(45deg);
147 | }
148 | .shadow {
149 | position: absolute;
150 | width: 21%;
151 | height: 3%;
152 | opacity: 0.5;
153 | background: #777777;
154 | left: 40%;
155 | top: 43%;
156 | border-radius: 50%;
157 | z-index: 1;
158 | }
159 | .scale {
160 | animation: scale 1s ease-in infinite;
161 | }
162 | .move {
163 | animation: move 3s ease-in-out infinite;
164 | }
165 | .message {
166 | position: absolute;
167 | width: 100%;
168 | text-align: center;
169 | height: 40%;
170 | top: 47%;
171 | }
172 | .button-box {
173 | position: absolute;
174 | background: #FCFCFC;
175 | width: 50%;
176 | height: 15%;
177 | border-radius: 20px;
178 | top: 73%;
179 | left: 25%;
180 | outline: 0;
181 | border: none;
182 | box-shadow: 2px 2px 10px rgba(119, 119, 119, 0.5);
183 | transition: all 0.5s ease-in-out;
184 | }
185 | .button-box:hover {
186 | background: #efefef;
187 | transform: scale(1.05);
188 | transition: all 0.3s ease-in-out;
189 | }
190 | @keyframes bounce {
191 | 50% {
192 | transform: translateY(-10px);
193 | }
194 | }
195 | @keyframes scale {
196 | 50% {
197 | transform: scale(0.9);
198 | }
199 | }
200 | @keyframes roll {
201 | 0% {
202 | transform: rotate(0deg);
203 | left: 25%;
204 | }
205 | 50% {
206 | left: 60%;
207 | transform: rotate(168deg);
208 | }
209 | 100% {
210 | transform: rotate(0deg);
211 | left: 25%;
212 | }
213 | }
214 | @keyframes move {
215 | 0% {
216 | left: 25%;
217 | }
218 | 50% {
219 | left: 60%;
220 | }
221 | 100% {
222 | left: 25%;
223 | }
224 | }
225 |
--------------------------------------------------------------------------------
/FrontEnd/css/table.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600&display=swap');
2 | *{
3 | margin: 0;
4 | padding: 0;
5 | box-sizing: border-box;
6 | font-family: 'Poppins', sans-serif;
7 | }
8 |
9 | table {
10 | border-spacing: 1;
11 | border-collapse: collapse;
12 | border-radius: 10px;
13 | overflow: hidden;
14 | width: 90%;
15 | position: relative;
16 | margin-left: 20px ;
17 | color: var(--text-color);
18 | }
19 |
20 | table * {
21 | position: relative
22 | }
23 |
24 | table td,table th {
25 | padding-left: 8px
26 | }
27 |
28 | table thead tr {
29 | height: 60px;
30 | background: #36304a
31 | }
32 |
33 | table tbody tr {
34 | height: 50px
35 | }
36 |
37 | table tbody tr:last-child {
38 | border: 0
39 | }
40 |
41 | table td,table th {
42 | text-align: left
43 | }
44 |
45 | table td.l,table th.l {
46 | text-align: right
47 | }
48 |
49 | table td.c,table th.c {
50 | text-align: center
51 | }
52 |
53 | table td.r,table th.r {
54 | text-align: center
55 | }
56 |
57 | .table100-head th {
58 | font-family: OpenSans-Regular;
59 | font-size: 18px;
60 | color:aqua;
61 | line-height: 1.2;
62 | font-weight: unset
63 | }
64 |
65 | /* tbody tr:nth-child(even) {
66 | background-color:aqua
67 | } */
68 |
69 | tbody tr {
70 | font-family: OpenSans-Regular;
71 | font-size: 15px;
72 | color:var(--text-color);
73 | line-height: 1.2;
74 | font-weight: unset
75 | }
76 |
77 | .column1 {
78 | width: 120px;
79 | padding-left: 40px
80 | }
81 |
82 | .column2 {
83 | width: 130px
84 | }
85 |
86 | .column3 {
87 | width: 130px
88 | }
89 |
90 | .column4 {
91 | width: 100px;
92 | text-align: right
93 | }
94 |
95 | .column5 {
96 | width: 200px;
97 | text-align: right
98 | }
99 |
100 | .column6 {
101 | width: 100px;
102 | text-align: right
103 | }
104 |
105 | .column7 {
106 | width: 100px;
107 | text-align: right
108 | }
109 |
110 | .column8 {
111 | width: 100px;
112 | text-align: right;
113 | }
--------------------------------------------------------------------------------
/FrontEnd/data/busimg.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Github2k10/Safar/546d0ce4f040132a8069d30eaf83e43ff8b49d8e/FrontEnd/data/busimg.jpeg
--------------------------------------------------------------------------------
/FrontEnd/data/eye.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Github2k10/Safar/546d0ce4f040132a8069d30eaf83e43ff8b49d8e/FrontEnd/data/eye.png
--------------------------------------------------------------------------------
/FrontEnd/data/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Github2k10/Safar/546d0ce4f040132a8069d30eaf83e43ff8b49d8e/FrontEnd/data/logo.png
--------------------------------------------------------------------------------
/FrontEnd/data/trip.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Github2k10/Safar/546d0ce4f040132a8069d30eaf83e43ff8b49d8e/FrontEnd/data/trip.jpg
--------------------------------------------------------------------------------
/FrontEnd/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Home
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/FrontEnd/js/AdminLogin.js:
--------------------------------------------------------------------------------
1 | let pwd = document.getElementById('pwd');
2 | let eye = document.getElementById('eye');
3 |
4 | eye.addEventListener('click',togglePass);
5 |
6 | function togglePass(){
7 |
8 | eye.classList.toggle('active');
9 |
10 | (pwd.type == 'password') ? pwd.type = 'text' : pwd.type = 'password';
11 | }
12 |
13 | document.getElementById("submit").addEventListener("click", checkStuff);
14 |
15 | function checkStuff(event) {
16 | event.preventDefault();
17 | let email = document.form1.email;
18 | let password = document.form1.password;
19 | let msg = document.getElementById('msg');
20 |
21 | if (email.value == "") {
22 | msg.style.display = 'block';
23 | msg.innerHTML = "Please enter your email";
24 | email.focus();
25 | return false;
26 | } else {
27 | msg.innerHTML = "";
28 | }
29 |
30 | if (password.value == "") {
31 | msg.innerHTML = "Please enter your password";
32 | password.focus();
33 | return false;
34 | } else {
35 | msg.innerHTML = "";
36 | }
37 |
38 | let re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
39 | if (!re.test(email.value)) {
40 | msg.innerHTML = "Please enter a valid email";
41 | email.focus();
42 | return false;
43 | } else {
44 | msg.innerHTML = "";
45 | }
46 |
47 | let obj = {
48 | "email": email.value,
49 | "password": password.value
50 | }
51 |
52 | loginAdmin(obj)
53 | }
54 |
55 |
56 |
57 | async function loginAdmin(obj){
58 | try {
59 | const res = await fetch("http://localhost:8080/safar/admin/login",{
60 | method: 'POST',
61 | body: JSON.stringify(obj),
62 | headers: {
63 | "Content-Type": "application/json"
64 | }
65 | });
66 |
67 | const out = await res.json();
68 |
69 | if(res.ok){
70 | setTimeout(function() {
71 | const jsonData = JSON.stringify(out);
72 | localStorage.setItem("adminData", jsonData);
73 | window.location.href = "./admin.html";
74 | }, 500);
75 | }
76 | else{
77 | alert(out.message)
78 | }
79 |
80 |
81 | } catch (error) {
82 | alert(error);
83 | }
84 | }
--------------------------------------------------------------------------------
/FrontEnd/js/admin.js:
--------------------------------------------------------------------------------
1 | // =-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
2 |
3 | fetch('http://localhost:8080/safar/bus/count')
4 | .then(response => response.json())
5 | .then(data => {
6 | document.querySelector("#buses").innerHTML = data
7 | })
8 | .catch(error => {
9 | console.log('Error:', error);
10 | });
11 |
12 |
13 | fetch('http://localhost:8080/safar/user/count')
14 | .then(response => response.json())
15 | .then(data => {
16 | document.querySelector("#users").innerHTML = data
17 | })
18 | .catch(error => {
19 | console.log('Error:', error);
20 | });
21 |
22 |
23 | fetch('http://localhost:8080/safar/reservation/count')
24 | .then(response => response.json())
25 | .then(data => {
26 | document.querySelector("#reservation").innerHTML = data
27 | })
28 | .catch(error => {
29 | console.log('Error:', error);
30 | });
31 |
32 |
33 | fetch('http://localhost:8080/safar/feedback/count')
34 | .then(response => response.json())
35 | .then(data => {
36 | document.querySelector("#feedback").innerHTML = data
37 | })
38 | .catch(error => {
39 | console.log('Error:', error);
40 | });
41 |
42 |
43 | fetch('http://localhost:8080/safar/route/count')
44 | .then(response => response.json())
45 | .then(data => {
46 | document.querySelector("#route").innerHTML = data
47 | })
48 | .catch(error => {
49 | console.log('Error:', error);
50 | });
51 |
52 |
53 | // =-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
54 |
55 | let loginData = JSON.parse(localStorage.getItem("adminData"))
56 | document.querySelector("#admin").innerHTML = loginData.name
57 |
--------------------------------------------------------------------------------
/FrontEnd/js/adminBuses.js:
--------------------------------------------------------------------------------
1 | let loginData = JSON.parse(localStorage.getItem("adminData"))
2 |
3 | fetch(`http://localhost:8080/safar/bus/all`)
4 | .then(response => response.json())
5 | .then(data => {
6 |
7 | console.log(data)
8 |
9 | data.forEach(element => {
10 | document.querySelector(".UserData").innerHTML += `
11 |
12 | ${element.busId}
13 | ${element.busName}
14 | ${element.driverName}
15 | ${element.routeFrom}
16 | ${element.routeTo}
17 | ${element.busJourneyDate}
18 | ${element.departureTime}
19 | ${element.availableSeats}
20 | ${element.fare}
21 |
22 |
23 |
24 |
25 | `
26 | });
27 | })
28 | .catch(error => {
29 | console.log('Error:', error);
30 | });
--------------------------------------------------------------------------------
/FrontEnd/js/adminFeedBack.js:
--------------------------------------------------------------------------------
1 | let loginData = JSON.parse(localStorage.getItem("adminData"))
2 |
3 | fetch(`http://localhost:8080/safar/feedback/all`)
4 | .then(response => response.json())
5 | .then(data => {
6 |
7 | data.forEach(element => {
8 | document.querySelector(".UserData").innerHTML += `
9 |
10 | ${element.feedBackId}
11 | ${element.userId}
12 | ${element.busId}
13 | ${element.driverRating}
14 | ${element.serviceRating}
15 | ${element.overallRating}
16 | ${element.feedbackDateTime.slice(0, 10)}
17 |
18 |
19 |
20 |
21 | `
22 | });
23 | })
24 | .catch(error => {
25 | console.log('Error:', error);
26 | });
--------------------------------------------------------------------------------
/FrontEnd/js/adminLogout.js:
--------------------------------------------------------------------------------
1 | const popupButton = document.getElementById('popupButton');
2 | const popupMessage = document.getElementById('popupMessage');
3 |
4 | popupButton.addEventListener('click', () => {
5 | popupMessage.style.display = 'block';
6 | });
7 |
8 | function closePopup() {
9 | popupMessage.style.display = 'none';
10 | }
11 |
12 |
13 | document.querySelector("#signout").addEventListener("click", logout);
14 |
15 | async function logout(){
16 | try {
17 |
18 | let loginData = JSON.parse(localStorage.getItem("adminData"))
19 |
20 | const res = await fetch(`http://localhost:8080/safar/admin/logout?key=${loginData.aid}`,{
21 | method: 'POST',
22 | headers: {
23 | "Content-Type": "application/json"
24 | }
25 | });
26 |
27 | if(res.ok){
28 | console.log("Logout...");
29 |
30 | setTimeout(function() {
31 | localStorage.removeItem("adminData");
32 | window.location.href = "./AdminLogin.html";
33 | }, 500);
34 | }
35 | else{
36 | alert(out.message)
37 | }
38 |
39 |
40 | } catch (error) {
41 | alert(error);
42 | }
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/FrontEnd/js/adminReservation.js:
--------------------------------------------------------------------------------
1 | let loginData = JSON.parse(localStorage.getItem("adminData"))
2 |
3 | fetch(`http://localhost:8080/safar/reservation/all?key=${loginData.aid}`)
4 | .then(response => response.json())
5 | .then(data => {
6 |
7 | console.log(data)
8 |
9 | data.forEach(element => {
10 | document.querySelector(".UserData").innerHTML += `
11 |
12 | ${element.reservationID}
13 | ${element.source}
14 | ${element.destination}
15 | ${element.status}
16 | ${element.journeyDate}
17 | ${element.date}
18 | ${element.bookedSeat}
19 | ${element.fare}
20 |
21 |
22 |
23 |
24 | `
25 | });
26 | })
27 | .catch(error => {
28 | console.log('Error:', error);
29 | });
--------------------------------------------------------------------------------
/FrontEnd/js/adminRoute.js:
--------------------------------------------------------------------------------
1 | let loginData = JSON.parse(localStorage.getItem("adminData"))
2 |
3 | fetch(`http://localhost:8080/safar/route/all`)
4 | .then(response => response.json())
5 | .then(data => {
6 |
7 | console.log(data)
8 |
9 | data.forEach(element => {
10 | document.querySelector(".UserData").innerHTML += `
11 |
12 | ${element.routeID}
13 | ${element.routeFrom}
14 | ${element.routeTo}
15 | ${element.distance}
16 |
17 |
18 |
19 |
20 | `
21 | });
22 | })
23 | .catch(error => {
24 | console.log('Error:', error);
25 | });
--------------------------------------------------------------------------------
/FrontEnd/js/adminUser.js:
--------------------------------------------------------------------------------
1 | let loginData = JSON.parse(localStorage.getItem("adminData"))
2 |
3 | fetch(`http://localhost:8080/safar/admin/user/all?key=${loginData.aid}`)
4 | .then(response => response.json())
5 | .then(data => {
6 |
7 | console.log(data)
8 |
9 | data.forEach(element => {
10 | document.querySelector(".UserData").innerHTML += `
11 |
12 | ${element.userID}
13 | ${element.firstName}
14 | ${element.lastName}
15 | ${element.mobile}
16 | ${element.email}
17 | ${element.totalReservation}
18 | ${element.totalFeedBack}
19 |
20 |
21 |
22 |
23 | `
24 | });
25 | })
26 | .catch(error => {
27 | console.log('Error:', error);
28 | });
--------------------------------------------------------------------------------
/FrontEnd/js/home.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Github2k10/Safar/546d0ce4f040132a8069d30eaf83e43ff8b49d8e/FrontEnd/js/home.js
--------------------------------------------------------------------------------
/FrontEnd/js/modeToggle.js:
--------------------------------------------------------------------------------
1 | const body = document.querySelector("body"),
2 | modeToggle = body.querySelector(".mode-toggle");
3 | sidebar = body.querySelector("nav");
4 | sidebarToggle = body.querySelector(".sidebar-toggle");
5 |
6 | let getMode = localStorage.getItem("mode");
7 | if(getMode && getMode ==="dark"){
8 | body.classList.toggle("dark");
9 | }
10 |
11 | let getStatus = localStorage.getItem("status");
12 | if(getStatus && getStatus ==="close"){
13 | sidebar.classList.toggle("close");
14 | }
15 |
16 | modeToggle.addEventListener("click", () =>{
17 | body.classList.toggle("dark");
18 | if(body.classList.contains("dark")){
19 | localStorage.setItem("mode", "dark");
20 | }else{
21 | localStorage.setItem("mode", "light");
22 | }
23 | });
24 |
25 | sidebarToggle.addEventListener("click", () => {
26 | sidebar.classList.toggle("close");
27 | if(sidebar.classList.contains("close")){
28 | localStorage.setItem("status", "close");
29 | }else{
30 | localStorage.setItem("status", "open");
31 | }
32 | })
--------------------------------------------------------------------------------
/FrontEnd/js/signup.js:
--------------------------------------------------------------------------------
1 | let email = "abc@gmail.com";
2 | let password = "abc123";
3 |
4 | const loginText = document.querySelector(".title-text .login");
5 | const loginForm = document.querySelector("form.login");
6 | const loginBtn = document.querySelector("label.login");
7 | const signupBtn = document.querySelector("label.signup");
8 | const signupLink = document.querySelector("form .signup-link a");
9 |
10 |
11 | signupBtn.onclick = (()=>{
12 | loginForm.style.marginLeft = "-50%";
13 | loginText.style.marginLeft = "-50%";
14 |
15 | document.querySelector("#loginEmail").value = "";
16 | document.querySelector("#loginPassword").value = "";
17 | });
18 |
19 | loginBtn.onclick = (()=>{
20 | loginForm.style.marginLeft = "0%";
21 | loginText.style.marginLeft = "0%";
22 | });
23 |
24 | signupLink.onclick = (()=>{
25 | signupBtn.click();
26 | return false;
27 | });
28 |
29 | let forms = document.querySelectorAll("form");
30 |
31 | forms[0].addEventListener("submit", login);
32 |
33 | function login(event){
34 | event.preventDefault();
35 | let mail = document.querySelector("#loginEmail");
36 | let pass = document.querySelector("#loginPassword");
37 |
38 | if(mail.value == email && pass.value == password){
39 | document.querySelector("#success").classList.add("open-success");
40 | } else {
41 | document.querySelector("#error").classList.add("open-error");
42 | }
43 | }
44 |
45 | function closeSuccess(){
46 | document.querySelector("#success").classList.remove("open-success");
47 | }
48 |
49 | function closeError(){
50 | document.querySelector("#error").classList.remove("open-error");
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/FrontEnd/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Safar.com
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
Login Form
24 |
Signup Form
25 |
26 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
83 |
84 |
Success! yay, everything is working.
85 |
continue
86 |
87 |
88 |
89 |
90 |
91 |
96 |
97 |
Error! oh no, something went wrong.
98 |
try again
99 |
100 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## SAFAR :- BUS RESERVATION MANAGEMENT PORTAL
4 |
5 | The bus reservation system portal is a web-based application that enables users to book bus tickets online. The system will allow users book available buses based on their source and destination cities, reserve the seats, and make payments securely. The system will also provide a UI based dashboard for admin to manage their bus related operations.
6 |
7 |
8 | ## Features
9 |
10 | * User and Admin authentication & validation with session uuid.
11 |
12 | #### Admin Features:
13 |
14 | - Administrator Role of the entire application
15 | - Only registered admins with valid session token can add/update/delete route and bus from main database
16 | - Admin can access the details of different users and reservations.
17 | #### User Features:
18 | - Registering themselves with application, and logging in to get the valid session token
19 | - Viewing list of available buses and booking a reservation
20 | - Only logged in user can access his reservations, profile updation and other features.
21 |
22 |
23 |
24 | ## ER Diagrm
25 |
26 |
27 |
28 |
29 | ## Flow Chart
30 |
31 |
32 | ## Modules
33 |
34 | * Login, Logout Module
35 | * Admin Module
36 | * User Module
37 | * Route Module
38 | * Bus Module
39 | * Reservation Module
40 | * Feedback Module
41 |
42 | ## 🏷️ Tech Stack Used :-
43 | * Java
44 | * Spring Framework
45 | * Spring Boot
46 | * Spring Data JPA
47 | * Hibernate
48 | * MySQL
49 | * HTML
50 | * CSS
51 | * JavaScript
52 |
53 | ## Installation & Run
54 |
55 | * Before running the API server, you should update the database config inside the [application.properties](https://github.com/AbhayKumarVishwakarma/few-houses-4121/blob/main/Bus%20Reservation%20System%20Portal/Backend/bus_reservation/src/main/resources/application.properties) file.
56 | * Update the port number, username and password as per your local database config.
57 |
58 | ```
59 | #db specific properties
60 | spring.datasource.url=jdbc:mysql://localhost:3306/busdb
61 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
62 | spring.datasource.username=root
63 | spring.datasource.password=root
64 |
65 | #ORM s/w specific properties
66 | spring.jpa.hibernate.ddl-auto=update
67 | spring.jpa.show-sql=true
68 |
69 | ```
70 |
71 | ## API Root Endpoint
72 |
73 | `https://localhost:8080/`
74 |
75 | `http://localhost:8080/swagger-ui/index.html`
76 |
77 |
--------------------------------------------------------------------------------