Download code _ PHP and MySQL-Based Online Flight Booking Management System
PHP and MySQL-Based Online Flight Booking Management System
Introduction
This project is titled Online Flight Booking Management System and is a web-based application developed using PHP for the back end and MySQL as the database. The system enables flight ticketing agencies or businesses to allow clients to book flights online without physically visiting their offices. It features a user-friendly interface designed with the Bootstrap Framework and includes essential functionalities for efficient flight management.
How Does the Online Flight Booking Management System Work?
The system consists of two modules: Management/Admin Panel and Client-Side/Passengers Panel. Both require login credentials to access their respective features.
- Client-Side: Users must register by filling in the required fields on the registration form. They can search and book flights by selecting departure and return dates, seat type (Economy/Business Class), and the number of tickets. Payments can be made using Visa, Credit, or MasterCard. After booking, users can view, manage, and print their tickets or check updates on their flights.
- Admin Panel: Administrators manage airlines, flights, and flight statuses. They can mark flights as departed, arrived, or issue resolved, ensuring efficient operations.
Technologies Used
The system is developed using the following technologies:
- HTML
- CSS
- JavaScript
- PHP
- MySQL
- Bootstrap Framework
Features and Functionalities
Admin Panel:
✔ Data Summary
✔ Airlines Management
✔ Flight Management
✔ Add Flight Issue
✔ Mark Flight as Departed/Arrived
✔ Update Flight Issues
Client-Side:
✔ Login and Registration
✔ Search f or One-Way or Round-Trip Flights
✔ Book Multiple Flight Tickets
✔ Make Payments
✔ View and Cancel Booked Flights
✔ Print Flight Tickets
✔ Send Feedback
How to Run the System?
Requirements:
- Install a local web server (e.g., XAMPP).
- Download the provided source code zip file.
Installation Steps:
- Enable the GD Library in php.ini.
- Start Apache and MySQL in the XAMPP Control Panel.
- Extract the downloaded source code and place it in the XAMPP htdocs directory.
- Open phpMyAdmin in a browser.
- Create a new database named ofbms_db.
- Import the provided ofbms_db.sql file located in the database folder.
- Open the system in a browser (http://localhost/ofbms/).
Admin Default Login Credentials:
- Username: admin
- Password: admin123
index 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 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 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 |
<?php include_once 'helpers/helper.php'; ?> <?php subview('header.php'); require 'helpers/init_conn_db.php'; ?> <style> /*-- Author: W3layouts Author URL: http://w3layouts.com License: Creative Commons Attribution 3.0 Unported License URL: http://creativecommons.org/licenses/by/3.0/ --*/ footer { /* position: absolute; */ bottom: 0; width: 100%; height: 2.5rem; /* Footer height */ } form.logout_form { background: transparent; padding: 10px !important; } body { /* background:url('assets/images/bg2.jpg') no-repeat 0px 0px; background-size: cover; font-family: 'Open Sans', sans-serif; background-attachment: fixed; background-position: center; */ /**background: #bdc3c7; /* fallback for old browsers */ /*background: -webkit-linear-gradient(to right, #2c3e50, #bdc3c7); /* Chrome 10-25, Safari 5.1-6 */ /*background: linear-gradient(to right, #2c3e50, #bdc3c7); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ } h1,h2,h3,h4,h5,h6{ font-family: 'Montserrat', sans-serif; } h5. { margin-top: 10px; } @font-face { font-family: 'product sans'; src: url('assets/css/Product Sans Bold.ttf'); } h1{ font-family :'product sans' !important; color:cornflowerblue ; font-size:50px; margin-top:50px; text-align:center; } .main-agileinfo{ margin:50px auto; width:50%; } /*--SAP--*/ .sap_tabs{ clear:both; padding: 0; border: 1px solid #c6c6c6; box-shadow: 0px 1px 5px #00000057; } .tab_box{ background:#fd926d; padding: 2em; } .top1{ margin-top: 2%; } .resp-tabs-list { list-style: none; padding: 15px 0px; margin: 0 auto; text-align: center; /* background: rgb(33, 150, 243); */ background: #41bef4; } .resp-tab-item { font-size: 1.1em; font-weight: 500; cursor: pointer; display: inline-block; margin: 0; text-align: center; list-style: none; outline: none; -webkit-transition: all 0.3s; -moz-transition: all 0.3s; -ms-transition: all 0.3s; -o-transition: all 0.3s; transition: all 0.3s; text-transform: uppercase; margin: 0 1.2em 0; color:#5d5757; padding:7px 15px; } .resp-tab-active { color:#fff; } .resp-tabs-container { padding: 0px; clear: left; } h2.resp-accordion { cursor: pointer; padding: 5px; display: none; } .resp-tab-content { display: none; } .resp-content-active, .resp-accordion-active { display: block; } form { /* background:rgba(3, 3, 3, 0.57); */ padding: 25px; } h3 { font-size: 16px; /* color:rgb(255, 255, 255); */ margin-bottom: 7px; } .from,.to,.date,.depart,.return{ width:48%; float:left; } .from,.to,.date{ margin-bottom:40px; } .from,.date,.depart{ margin-right:4%; } input[type="text"]{ padding:10px; width:93%; float:left; } input#datepicker,input#datepicker1,input#datepicker2,input#datepicker3 { width: 85%; margin-bottom:10px; } select#w3_country1 { padding: 10px; float:left; } label.checkbox { display: inline-block; } .checkbox { position: relative; font-size: 0.95em; font-weight: normal; color:#dedede; padding: 0em 0.5em 0em 2em; } .checkbox i { position: absolute; bottom: 1px; left: 2px; display: block; width: 18px; height: 18px; outline: none; background: #fff; border: 1px solid #6A67CE; } .checkbox i { font-size: 20px; font-weight: 400; color: #999; font-style: normal; } .checkbox input:checked + i:after { opacity: 1; } .checkbox input + i:after { position: absolute; opacity: 0; transition: opacity 0.1s; -o-transition: opacity 0.1s; -ms-transition: opacity 0.1s; -moz-transition: opacity 0.1s; -webkit-transition: opacity 0.1s; } .checkbox input + i:after { content: ''; background: url("assets/images/tick.png") no-repeat 5px 5px; top: -1px; left: -1px; width: 15px; height: 15px; font: normal 12px/16px FontAwesome; text-align: center; } input[type="checkbox"]{ opacity:0; margin:0; display:none; } .quantity-select .entry.value-minus { margin-left: 0; } .value-minus, .value-plus { height: 40px; line-height: 24px; width: 40px; margin-right: 3px; display: inline-block; cursor: pointer; position: relative; font-size: 18px; color: #fff; text-align: center; -webkit-user-select: none; -moz-user-select: none; border: 1px solid #b2b2b2; vertical-align: bottom; background:#818181; } .value { cursor: default; width: 40px; height:33px; color: #000; line-height: 24px; border: 1px solid #E5E5E5; background-color: #fff; text-align: center; display: inline-block; margin-right: 3px; padding-top:7px; } .quantity-select .entry.value-minus:hover, .quantity-select .entry.value-plus:hover { background:rgba(0, 0, 0, 0.6);; } .value-minus, .value-plus { height: 40px; line-height: 24px; width: 40px; margin-right: 3px; display: inline-block; cursor: pointer; position: relative; font-size: 18px; text-align: center; -webkit-user-select: none; -moz-user-select: none; border: 1px solid #b2b2b2; vertical-align: bottom; } .quantity-select .entry.value-minus:before, .quantity-select .entry.value-plus:before { content: ""; width: 13px; height: 2px; background: #fff; left: 50%; margin-left: -7px; top: 50%; margin-top: -0.5px; position: absolute; } .quantity-select .entry.value-plus:after { content: ""; height: 13px; width: 2px; background: #fff; left: 50%; margin-left: -1.4px; top: 50%; margin-top: -6.2px; position: absolute; } .numofppl,.adults,.child{ width:50%; float:left; } .class{ width:48%; float:left; } input[type="submit"] { font-size: 18px; color: #fff; background:#4caf50; border: none; outline: none; padding: 10px 20px; margin-top: 50px; cursor:pointer; transition: 0.5s all ease; -webkit-transition: 0.5s all ease; -moz-transition: 0.5s all ease; -o-transition: 0.5s all ease; -ms-transition: 0.5s all ease; } input[type="submit"]:hover { background:#212121; color:#fff; } /*-- load-more --*/ ul#myList{ margin-bottom:2em; } #myList li{ display:none; list-style-type:none; } #loadMore,#showLess { display: inline-block; cursor: pointer; padding: 7px 20px; background: #fff; font-size: 14px; color: #fff; transition: 0.5s all ease; -webkit-transition: 0.5s all ease; -moz-transition: 0.5s all ease; -o-transition: 0.5s all ease; -ms-transition: 0.5s all ease; background: rgb(33, 150, 243); } #loadMore:hover { background:#212121; color:#fff; } .spcl{ position:relative; } .ui-datepicker {width:16.2%; padding: 0 0em 0; } .ui-datepicker .ui-datepicker-header { position: relative; padding: .56em 0; background:rgb(33, 150, 243);; text-transform: uppercase; } form.blackbg{ background:rgba(3, 3, 3, 0.57); } /*-- //load-more --*/ .footer-w3l { margin: 50px 0 15px 0; } .footer-w3l p{ font-size:14px; text-align:center; color:#000; line-height:27px; } .footer-w3l p a{ color:#000; } .footer-w3l p a:hover{ text-decoration:underline; } /*-- responsive --*/ @media (max-width:1440px){ .checkbox { font-size: 0.9em; } } @media (max-width:1366px){ .main-agileinfo { width: 53%; } } @media (max-width:1280px){ .main-agileinfo { width: 57%; } } @media (max-width:1080px){ h1 { color: #fff; font-size: 47px; } .main-agileinfo { width: 68%; } } @media (max-width:1024px){ .main-agileinfo { width: 71%; } } @media (max-width:991px){ .from, .to, .date, .depart, .return { width: 49%; float: left; } .from, .date, .depart { margin-right: 2%; } } @media (max-width:966px){ .main-agileinfo { width: 73%; } } @media (max-width:900px){ .checkbox { font-size: 0.82em; } } @media (max-width:800px){ .main-agileinfo { width: 81%; } } @media (max-width:768px){ .main-agileinfo { width: 85%; } .checkbox i { width: 15px; height: 15px; } .checkbox input + i:after { top: -3px; left: -3px; } } @media (max-width:736px){ .main-agileinfo { width: 88%; margin:40px auto; } h1 { color: #fff; font-size: 43px; margin-top:40px; } input[type="text"] { padding: 10px; width: 90%; float: left; } input#datepicker, input#datepicker1, input#datepicker2, input#datepicker3 { width: 79%; } .value-minus, .value-plus { height: 30px; width: 30px; } .value { width: 33px; height: 25px; padding-top: 6px; } } @media (max-width:667px){ .numofppl { width: 60%; } .roundtrip .date { width: 68%; float:left; } .roundtrip .class{ width:30%; float:left; } .oneway .depart,.multicity .depart{ width: 68%; } } @media (max-width:600px){ select#w3_country1 { width: 100%; } } @media (max-width:568px){ h1 { font-size: 40px; } .resp-tab-item { padding: 7px 13px; margin: 0 1em 0; } .numofppl { width: 70%; } } @media (max-width:480px){ .resp-tab-item { padding: 7px 7px; margin: 0 0.7em 0; } input[type="text"] { padding: 10px; width: 86%; float: left; } .roundtrip .date { width: 100%; float: left; } input#datepicker, input#datepicker1, input#datepicker2, input#datepicker3 { width: 86%; } .roundtrip .class{ width: 100%; float: left; margin-bottom:40px; } .numofppl { width: 80%; } .oneway .depart, .multicity .depart { width: 100%; } } @media (max-width:414px){ h1 { font-size: 35px; margin-top:30px; } .resp-tab-item { padding: 7px 7px; margin: 0 0.5em 0; font-size: 15px; } .numofppl { width: 100%; } } @media (max-width:384px){ h1 { font-size: 32px; } h3 { font-size: 15px; } .from, .to, .date, .depart, .return { width: 100%; float: left; margin-bottom:25px; } .date{ margin-bottom:0; } .resp-tab-item { padding: 7px 7px; margin: 0 0em 0; font-size: 15px; } .class { width: 100%; float: left; margin-bottom: 40px; } input[type="text"] { padding: 10px; width: 91.5%; } input#datepicker, input#datepicker1, input#datepicker2, input#datepicker3 { width: 91.5%; } } @media (max-width:320px){ h1 { font-size: 26px; margin-top:25px; } form{ padding:15px; } .resp-tab-item { padding: 7px 5px; margin: 0 0em 0; font-size: 14px; } .adults, .child { width: 100%; float: left; } .adults{ margin-bottom:25px; } } @font-face { font-family: 'product sans'; src: url('assets/css/Product Sans Bold.ttf'); } h1 { font-family: 'product sans'; /* font-style: italic; */ font-size: 40px !important; } </style> <?php if(isset($_GET['error'])) { if($_GET['error'] === 'sameval') { echo '<script>alert("Select different value for departure city and arrival city")</script>'; } else if($_GET['error'] === 'seldep') { echo '<script>alert("Select Departure city")</script>'; } else if($_GET['error'] === 'selarr') { echo"<script>alert('Select Arrival city')</script>"; } } ?> <link rel="stylesheet" type="text/css" href="styles%2c_bootstrap4%2c_bootstrap.min.css%2bplugins%2c_font-awesome-4.7.0%2c_css%2c_font-awesome.min.css%2bplugins%2c_OwlCarousel2-2.2.1%2c_owl.carousel.css%2bplugins%2c_OwlCarousel2-2.2.1%2c_owl" /> <meta name="keywords" content="Flight Ticket Booking Widget Responsive, Login Form Web Template, Flat Pricing Tables, Flat Drop-Downs, Sign-Up Web Templates, Flat Web Templates, Login Sign-up Responsive Web Template, Smartphone Compatible Web Template, Free Web Designs for Nokia, Samsung, LG, Sony Ericsson, Motorola Web Design" /> <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } ;</script> <div class="main-agileinfo"> <h1 class=" brand mt-2"> <img src="assets/images/plane-logo.png" height="105px" width="105px" alt=""> Online Flight Booking</h1> <div class="sap_tabs"> <div id="horizontalTab"> <ul class="resp-tabs-list"> <li class="resp-tab-item"><span>Round Trip</span></li> <li class="resp-tab-item"><span>One way</span></li> </ul> <div class="clearfix"> </div> <div class="resp-tabs-container"> <div class="tab-1 resp-tab-content roundtrip"> <form action="book_flight.php" method="post"> <input type="hidden" name="type" value="round"> <div class="from"> <h3 >From</h3> <?php $sql = 'SELECT * FROM Cities '; $stmt = mysqli_stmt_init($conn); mysqli_stmt_prepare($stmt,$sql); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); echo '<select class="" name="dep_city" id="w3_country1"> <option value="0" selected disabled >Departure</option>'; while ($row = mysqli_fetch_assoc($result)) { echo "<option value='{$row['city']}'>{$row['city']}</option>"; } ?> </select> </div> <div class="to"> <h3 >To</h3> <?php $sql = 'SELECT * FROM Cities '; $stmt = mysqli_stmt_init($conn); mysqli_stmt_prepare($stmt,$sql); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); echo '<select value="0" name="arr_city" id="w3_country1"> <option selected disabled>Arrival</option>'; while ($row = mysqli_fetch_assoc($result)) { echo "<option value='{$row['city']}'>{$row['city']}</option>"; } ?> </select> </div> <div class="clear"></div> <div class="date"> <div class="depart"> <h3 >Depart</h3> <input class="form-control" name="dep_date" type="date" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'mm/dd/yyyy';}" required=""> </div> <div class="return"> <h3 >Return</h3> <input class="form-control" name="ret_date" type="date" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'mm/dd/yyyy';}" required=""> </div> <div class="clear"></div> </div> <div class="class"> <h3 >Class</h3> <select id="w3_country1" name="f_class" onchange="change_country(this.value)" class="frm-field required"> <option value="E">Economy</option> <option value="B">Business</option> </select> </div> <div class="clear"></div> <div class="numofppl"> <div class="adults"> <h3 >Passenger</h3> <div class="quantity"> <div class="quantity-select"> <div class="entry value-minus text-dark"> </div> <div class="entry value"><span>1</span></div> <input type="hidden" name="passengers" class="input_val" value="1"> <div class="entry value-plus text-dark active"> </div> </div> </div> </div> <div class="clear"></div> </div> <div class="clear"></div> <input type="submit" value="Search Flights" name="search_but"> </form> </div> <div class="tab-1 resp-tab-content oneway"> <form action="book_flight.php" method="post"> <input type="hidden" name="type" value="one"> <div class="from"> <h3 >From</h3> <?php $sql = 'SELECT * FROM Cities '; $stmt = mysqli_stmt_init($conn); mysqli_stmt_prepare($stmt,$sql); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); echo '<select value="0" name="dep_city" id="w3_country1"> <option selected disabled>Departure</option>'; while ($row = mysqli_fetch_assoc($result)) { echo "<option value='{$row['city']}'>{$row['city']}</option>"; } ?> </select> </div> <div class="to"> <h3>To</h3> <?php $sql = 'SELECT * FROM Cities '; $stmt = mysqli_stmt_init($conn); mysqli_stmt_prepare($stmt,$sql); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); echo '<select value="0" name="arr_city" id="w3_country1"> <option selected disabled>Arrival</option>'; while ($row = mysqli_fetch_assoc($result)) { echo "<option value='{$row['city']}'>{$row['city']}</option>"; } ?> </select> </div> <div class="clear"></div> <div class="date"> <div class="depart"> <h3 >Depart</h3> <input name="dep_date" type="date" class="form-control" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'mm/dd/yyyy';}" required=""> </div> </div> <div class="class"> <h3 >Class</h3> <select id="w3_country1" name="f_class" onchange="change_country(this.value)" class="frm-field required"> <option value="E">Economy</option> <option value="B">Business</option> </select> </div> <div class="clear"></div> <div class="numofppl"> <div class="adults"> <h3 >Passenger</h3> <div class="quantity"> <div class="quantity-select"> <div class="entry value-minus text-dark"> </div> <div class="entry value"><span>1</span></div> <input type="hidden" name="passengers" class="input_val" value="1"> <div class="entry value-plus text-dark active"> </div> </div> </div> </div> <div class="clear"></div> </div> <div class="clear"></div> <input type="submit" value="Search Flights" name="search_but"> </form> </div> </div> </div> </div> </div> </div> <style> .intro{width:100%;background:#fff;z-index:1} .intro_background{top:-128px;left:0;width:100%;height:20px;background-repeat:no-repeat;background-size:cover;background-position:center center} .intro_container{width:100%;border-bottom:solid 2px #e4e6e8;padding-top:142px;padding-bottom:121px} .intro_icon{width:70px;height:71px} .intro_icon img{max-width:100%} .intro_content{padding-left:28px} .intro_title{font-family:'Oswald',sans-serif;font-size:18px;color:#181818;font-weight:400} .destinations{width:100%;background:#fff;padding-top:115px;padding-bottom:116px} div.card { -webkit-transition: 0.4s ease; transition: 0.4s ease; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); } .col-lg-6:hover div.card { -webkit-transform: scale(1.08); transform: scale(0.89); } /* .card { width: 100%; height:200px; border-top-left-radius:2px; border-top-right-radius:2px; display:block; overflow: hidden; } */ .card img{ width: 100%; height: 370px; object-fit:cover; transition: all .25s ease; } </style> <div class="conatiner-fluid p-4" style="background-color: whitesmoke;margin-top:150px;"> <!-- <h2 class="text-center mb-3 mt-3 display-4" style="font-style: normal;font-size:80px;">Main Attractions In India</h2> <div class="row p-5 pb-0"> --> <!-- <div class="conatiner-fluid p-4" style="background-color: whitesmoke;margin-top:150px;"> --> </div> <footer class="mt-5"> <em><h5 class="text-dark text-center p-0 brand mt-2"> <img src="assets/images/plane-logo.png" height="40px" width="40px" alt=""> </h5></em> <div class=" text-center">© <?php echo date('Y')?> - Online Flight Booking<br><br></div> <!-- <p>----------</p> --> </footer> <?php subview('footer.php'); ?> <script src="assets/js/easyResponsiveTabs.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $('#horizontalTab').easyResponsiveTabs({ type: 'default', width: 'auto', fit: true }); }); </script> <script> $('.value-plus').on('click', function(){ var divUpd = $(this).parent().find('.value'), newVal = parseInt(divUpd.text(), 10)+1; divUpd.text(newVal); $('.input_val').val(newVal); }); $('.value-minus').on('click', function(){ var divUpd = $(this).parent().find('.value'), newVal = parseInt(divUpd.text(), 10)-1; if(newVal>=1) { divUpd.text(newVal); $('.input_val').val(newVal); } }); </script> <!--//quantity--> <!--load more--> <script> $(document).ready(function () { size_li = $("#myList li").size(); x=1; $('#myList li:lt('+x+')').show(); $('#loadMore').click(function () { x= (x+1 <= size_li) ? x+1 : size_li; $('#myList li:lt('+x+')').show(); }); $('#showLess').click(function () { x=(x-1<0) ? 1 : x-1; $('#myList li').not(':lt('+x+')').hide(); }); }); </script> |
ofbms_db SQL
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 |
-- phpMyAdmin SQL Dump -- version 5.1.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 21, 2022 at 09:53 AM -- Server version: 10.4.24-MariaDB -- PHP Version: 8.1.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; -- -- Database: `ofbms_db` -- -- -------------------------------------------------------- -- -- Table structure for table `admin` -- CREATE TABLE `admin` ( `admin_id` int(11) NOT NULL, `admin_uname` varchar(20) NOT NULL, `admin_email` varchar(50) NOT NULL, `admin_pwd` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `admin` -- INSERT INTO `admin` (`admin_id`, `admin_uname`, `admin_email`, `admin_pwd`) VALUES (1, 'admin', 'admin@mail.com', '$2y$10$AFMhdlwEaWjjBzoCfdq62uNQqopNGW4vk8GXrDBNGKPAgB0mON0TC'); -- -------------------------------------------------------- -- -- Table structure for table `airline` -- CREATE TABLE `airline` ( `airline_id` int(11) NOT NULL, `name` varchar(20) NOT NULL, `seats` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `airline` -- INSERT INTO `airline` (`airline_id`, `name`, `seats`) VALUES (1, 'AirAsia', 200), (2, 'Philippine Airline', 350), (3, 'Cebu Pacific', 180); -- -------------------------------------------------------- -- -- Table structure for table `cities` -- CREATE TABLE `cities` ( `city` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `cities` -- INSERT INTO `cities` (`city`) VALUES ('Metro Manila'), ('Pampanga'), ('Cebu'), ('Iloilo'), ('Bacolod'); -- -------------------------------------------------------- -- -- Table structure for table `feedback` -- CREATE TABLE `feedback` ( `feed_id` int(11) NOT NULL, `email` varchar(50) NOT NULL, `q1` varchar(250) NOT NULL, `q2` varchar(20) NOT NULL, `q3` varchar(250) NOT NULL, `rate` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `flight` -- CREATE TABLE `flight` ( `flight_id` int(11) NOT NULL, `admin_id` int(11) NOT NULL, `arrivale` datetime NOT NULL, `departure` datetime NOT NULL, `Destination` varchar(20) NOT NULL, `source` varchar(20) NOT NULL, `airline` varchar(20) NOT NULL, `Seats` varchar(110) NOT NULL, `duration` varchar(20) NOT NULL, `Price` int(11) NOT NULL, `status` varchar(6) DEFAULT NULL, `issue` varchar(50) DEFAULT NULL, `last_seat` varchar(5) DEFAULT '', `bus_seats` int(11) DEFAULT 20, `last_bus_seat` varchar(5) DEFAULT '' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `flight` -- INSERT INTO `flight` (`flight_id`, `admin_id`, `arrivale`, `departure`, `Destination`, `source`, `airline`, `Seats`, `duration`, `Price`, `status`, `issue`, `last_seat`, `bus_seats`, `last_bus_seat`) VALUES (1, 1, '2022-11-22 07:00:00', '2022-11-22 06:00:00', 'Bacolod', 'Metro Manila', 'Philippine Airline', '350', '1 Hour', 4500, '', '', '', 20, ''), (2, 1, '2022-11-22 08:30:00', '2022-11-22 07:30:00', 'Bacolod', 'Metro Manila', 'Cebu Pacific', '171', '1 Hour', 3500, '', '', '22C', 20, ''), (3, 1, '2022-11-21 16:00:00', '2022-11-21 15:00:00', 'Metro Manila', 'Bacolod', 'Philippine Airline', '350', '1 Hour', 4800, '', 'solved', '', 20, ''), (4, 1, '2022-11-21 15:30:00', '2022-11-21 14:30:00', 'Pampanga', 'Bacolod', 'AirAsia', '195', '1 Hour', 3800, 'arr', '', '21E', 20, ''), (5, 1, '2022-11-21 17:00:00', '2022-11-21 16:00:00', 'Bacolod', 'Pampanga', 'AirAsia', '192', '1 Hour', 2500, 'issue', '60', '22B', 20, ''), (7, 1, '2022-11-22 19:00:00', '2022-11-22 18:00:00', 'Bacolod', 'Metro Manila', 'Philippine Airline', '350', '1 Hour', 3800, '', '', '', 20, ''); -- -------------------------------------------------------- -- -- Table structure for table `passenger_profile` -- CREATE TABLE `passenger_profile` ( `passenger_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `flight_id` int(11) NOT NULL, `mobile` varchar(110) NOT NULL, `dob` datetime NOT NULL, `f_name` varchar(20) DEFAULT NULL, `m_name` varchar(20) DEFAULT NULL, `l_name` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `passenger_profile` -- INSERT INTO `passenger_profile` (`passenger_id`, `user_id`, `flight_id`, `mobile`, `dob`, `f_name`, `m_name`, `l_name`) VALUES (1, 5, 5, '9123564789', '1997-06-23 00:00:00', 'Mark', 'D', 'Cooper'), (2, 5, 2, '9123654789', '1997-06-23 00:00:00', 'Mark', 'D', 'Cooper'), (4, 5, 2, '9123564879', '1997-10-14 00:00:00', 'Jane ', 'C', 'Cooper'), (5, 5, 2, '9654123897', '1990-07-15 00:00:00', 'Mike', 'C', 'Williams'); -- -------------------------------------------------------- -- -- Table structure for table `payment` -- CREATE TABLE `payment` ( `card_no` varchar(16) NOT NULL, `user_id` int(11) NOT NULL, `flight_id` int(11) NOT NULL, `expire_date` varchar(5) DEFAULT NULL, `amount` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `payment` -- INSERT INTO `payment` (`card_no`, `user_id`, `flight_id`, `expire_date`, `amount`) VALUES ('1234321211112222', 5, 5, '06/27', 2500), ('1234654456455', 5, 2, '06/27', 3500), ('4616182753905953', 5, 2, '06/27', 3500), ('4616182753905953', 5, 2, '06/27', 3500), ('4616182753905953', 5, 2, '06/27', 3500), ('4616182753905953', 5, 2, '06/27', 3500), ('4616182753905953', 5, 2, '06/27', 3500), ('111112333311', 5, 2, '01/25', 3500); -- -------------------------------------------------------- -- -- Table structure for table `pwdreset` -- CREATE TABLE `pwdreset` ( `pwd_reset_id` int(11) NOT NULL, `pwd_reset_email` varchar(50) NOT NULL, `pwd_reset_selector` varchar(80) NOT NULL, `pwd_reset_token` varchar(120) NOT NULL, `pwd_reset_expires` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `ticket` -- CREATE TABLE `ticket` ( `ticket_id` int(11) NOT NULL, `passenger_id` int(11) NOT NULL, `flight_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `seat_no` varchar(10) NOT NULL, `cost` int(11) NOT NULL, `class` varchar(3) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ticket` -- INSERT INTO `ticket` (`ticket_id`, `passenger_id`, `flight_id`, `user_id`, `seat_no`, `cost`, `class`) VALUES (1, 1, 5, 5, '22A', 2500, 'E'), (3, 1, 2, 5, '21A', 3500, 'E'), (9, 3, 2, 5, '22B', 3500, 'E'), (10, 5, 2, 5, '22C', 3500, 'E'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `user_id` int(11) NOT NULL, `username` varchar(20) NOT NULL, `email` varchar(50) NOT NULL, `password` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `users` -- INSERT INTO `users` (`user_id`, `username`, `email`, `password`) VALUES (1, 'christine', 'christine@mail.com', '$2y$10$KRXGkY.dxYjD8FLZclW/Tu04wl76lD7IA4Z3nAsxtpdZxHNbYo4ZW'), (2, 'henry', 'henry@mail.com', '$2y$10$KRXGkY.dxYjD8FLZclW/Tu04wl76lD7IA4Z3nAsxtpdZxHNbYo4ZW'), (3, 'andre', 'andre@mail.com', '$2y$10$KRXGkY.dxYjD8FLZclW/Tu04wl76lD7IA4Z3nAsxtpdZxHNbYo4ZW'), (4, 'james', 'james@mail.com', '$2y$10$KRXGkY.dxYjD8FLZclW/Tu04wl76lD7IA4Z3nAsxtpdZxHNbYo4ZW'), (5, 'mcooper', 'mcooper@mail.com', '$2y$10$.FUiqi1YNqPBTxstbratouNEux7TsPPZ8/YOrV.Bd2JbVFD95G1nS'); -- -- Indexes for dumped tables -- -- -- Indexes for table `admin` -- ALTER TABLE `admin` ADD PRIMARY KEY (`admin_id`); -- -- Indexes for table `airline` -- ALTER TABLE `airline` ADD PRIMARY KEY (`airline_id`); -- -- Indexes for table `feedback` -- ALTER TABLE `feedback` ADD PRIMARY KEY (`feed_id`); -- -- Indexes for table `flight` -- ALTER TABLE `flight` ADD PRIMARY KEY (`flight_id`), ADD KEY `admin_id` (`admin_id`); -- -- Indexes for table `passenger_profile` -- ALTER TABLE `passenger_profile` ADD PRIMARY KEY (`passenger_id`), ADD KEY `user_id` (`user_id`), ADD KEY `flight_id` (`flight_id`); -- -- Indexes for table `payment` -- ALTER TABLE `payment` ADD KEY `user_id` (`user_id`), ADD KEY `flight_id` (`flight_id`); -- -- Indexes for table `pwdreset` -- ALTER TABLE `pwdreset` ADD PRIMARY KEY (`pwd_reset_id`); -- -- Indexes for table `ticket` -- ALTER TABLE `ticket` ADD PRIMARY KEY (`ticket_id`), ADD KEY `user_id` (`user_id`), ADD KEY `flight_id` (`flight_id`), ADD KEY `passenger_id` (`passenger_id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`user_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `admin` -- ALTER TABLE `admin` MODIFY `admin_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `airline` -- ALTER TABLE `airline` MODIFY `airline_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `feedback` -- ALTER TABLE `feedback` MODIFY `feed_id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `flight` -- ALTER TABLE `flight` MODIFY `flight_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `passenger_profile` -- ALTER TABLE `passenger_profile` MODIFY `passenger_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `pwdreset` -- ALTER TABLE `pwdreset` MODIFY `pwd_reset_id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `ticket` -- ALTER TABLE `ticket` MODIFY `ticket_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- Constraints for dumped tables -- -- -- Constraints for table `flight` -- ALTER TABLE `flight` ADD CONSTRAINT `flight_ibfk_1` FOREIGN KEY (`admin_id`) REFERENCES `admin` (`admin_id`); -- -- Constraints for table `passenger_profile` -- ALTER TABLE `passenger_profile` ADD CONSTRAINT `passenger_profile_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `passenger_profile_ibfk_2` FOREIGN KEY (`flight_id`) REFERENCES `flight` (`flight_id`) ON DELETE NO ACTION ON UPDATE NO ACTION; -- -- Constraints for table `payment` -- ALTER TABLE `payment` ADD CONSTRAINT `payment_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`), ADD CONSTRAINT `payment_ibfk_2` FOREIGN KEY (`flight_id`) REFERENCES `flight` (`flight_id`); -- -- Constraints for table `ticket` -- ALTER TABLE `ticket` ADD CONSTRAINT `ticket_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `ticket_ibfk_2` FOREIGN KEY (`flight_id`) REFERENCES `flight` (`flight_id`) ON DELETE NO ACTION ON UPDATE NO ACTION; COMMIT; |