├── admin ├── hello.php ├── airlcnt.php ├── psngrcnt.php ├── flightscnt.php ├── amtcnt.php ├── footer.php ├── review.php ├── list_airlines.php ├── all_flights.php ├── pass_list.php ├── login.php ├── header.php ├── flight.php └── index.php ├── helpers ├── hello.php ├── helper.php └── init_conn_db.php ├── includes ├── hello.php ├── logout.inc.php ├── feedback.inc.php ├── login.inc.php ├── reset-request.inc.php ├── pass_detail.inc.php ├── reset-password.inc.php ├── register.inc.php └── payment.inc.php ├── DATABASE FILE ├── hello.db └── ofbsphp.sql ├── README.md ├── reset-pwd.php ├── create-new-pwd.php ├── pay_success.php ├── pass_form.php ├── book_flight.php ├── login.php ├── register.php ├── feedback.php ├── payment.php ├── my_flights.php ├── e_ticket.php ├── ticket.php └── index.php /admin/hello.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /helpers/hello.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /includes/hello.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /DATABASE FILE/hello.db: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /helpers/helper.php: -------------------------------------------------------------------------------- 1 | query($sql); 11 | 12 | echo "$query->num_rows"; 13 | ?> -------------------------------------------------------------------------------- /admin/psngrcnt.php: -------------------------------------------------------------------------------- 1 | query($sql); 11 | 12 | echo "$query->num_rows"; 13 | ?> -------------------------------------------------------------------------------- /admin/flightscnt.php: -------------------------------------------------------------------------------- 1 | query($sql); 11 | 12 | echo "$query->num_rows"; 13 | ?> -------------------------------------------------------------------------------- /helpers/init_conn_db.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flight-Ticket-Booking 2 | The Flight Ticket Booking is a website project creates using HTML,CSS and PHP.
3 | This is the link to the site https://flightticketbooking101.000webhostapp.com/ 4 | 5 |

There are two types of Users.

6 | 1. User
7 | 2. Admin
8 |
9 |

Admin credentials:

10 | 11 | Username : devrev
12 | Password : Devrevprod@2023 13 | 14 | 15 |

Some users credentials:

16 | 17 | Username : tamil
18 | Password : Tamilai@2020
19 | 20 | Username : priyanka
21 | Password : Priyu@2020 22 | 23 | 24 | -------------------------------------------------------------------------------- /admin/footer.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /includes/feedback.inc.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 27 |
28 |
29 |

Reset Password

30 | 34 |
35 |
36 |
37 | 38 |
39 |
40 | 42 |
43 |
44 |
45 | 47 |
48 |
49 |
50 |
51 | alert("Invalid email");'; 55 | } else if($_GET['err'] === 'sqlerr') { 56 | echo ''; 57 | } else if($_GET['mail'] === 'success') { 58 | echo ''; 59 | } else if($_GET['err'] === 'mailerr') { 60 | echo ''; 61 | } 62 | } 63 | ?> 64 | 65 | 66 | -------------------------------------------------------------------------------- /admin/review.php: -------------------------------------------------------------------------------- 1 | 3 | 4 | 42 | 43 |
44 |
45 |

CUSTOMER REVIEWS

46 |
47 | 60 |
61 |

'.$row['email'].'

62 |

63 | 64 | 65 | 66 | 67 | 68 |

69 |

What was your first impression when you entered the website?

70 |

'.$row['q1'].'

71 |

How did you first hear about us?

72 |

'.$row['q2'].'

73 |

Is there anything missing on this page?

74 |

'.$row['q3'].'

75 |
76 |
'; 77 | } ?> 78 |
79 | 80 |
81 | 82 | 83 | -------------------------------------------------------------------------------- /includes/reset-request.inc.php: -------------------------------------------------------------------------------- 1 | IsSMTP(); 47 | $mail->Mailer = "smtp"; 48 | $mail->SMTPDebug = 1; 49 | $mail->SMTPAuth = TRUE; 50 | $mail->SMTPSecure = "tls"; 51 | $mail->Port = 587; 52 | $mail->Host = "smtp.gmail.com"; 53 | $mail->Username = "your_username"; 54 | $mail->Password = "your_password"; 55 | $mail->IsHTML(true); 56 | $mail->SetFrom('test@gmail.com'); 57 | $mail->AddAddress($user_email); 58 | $mail->Subject = "Reset password request for site_name"; 59 | $content = " 60 |

We receieved a password reset request, ignore if you did not issue a request

61 | "; 62 | $content .= '

Your password reset link:
'; 63 | $content .=''.$url.'

'; 64 | 65 | $mail->MsgHTML($content); 66 | $mail->Send(); 67 | header('Location: ../reset-pwd.php?mail=success'); 68 | } 69 | catch(Exception $e) { 70 | // echo $mail->ErrorInfo; 71 | header('Location: ../reset-pwd.php?err=mailerr'); 72 | } 73 | 74 | } else { 75 | header('Location: ../reset-pwd.php?'); 76 | } 77 | 78 | 79 | -------------------------------------------------------------------------------- /create-new-pwd.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 24 | alert("Passwords do not match");'; 28 | } else if($_GET['err'] === 'sqlerr') { 29 | echo ''; 30 | } else if($_GET['pwd'] === 'updated') { 31 | echo ''; 32 | } 33 | exit(); 34 | } 35 | ?> 36 |
37 |
38 |

Reset Password

39 | alert("Could not validate your request")'; 45 | } else { 46 | if(ctype_xdigit($selector) !== false && ctype_xdigit($validator) !== false){ 47 | ?> 48 |
49 | 50 | 51 |
52 |
53 | 54 |
55 |
56 | 61 |
62 |
63 |
64 |
65 | 66 |
67 |
68 | 70 |
71 |
72 |
73 | 75 |
76 |
77 | 81 |
82 |
83 | 84 | -------------------------------------------------------------------------------- /pay_success.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 113 |
114 |
115 |

Payment Successful!

116 | Payment SuccesFul 121 |

Thank you for choosing us

122 |

123 | An automated payment receipt will be sent to your registered email. 124 |

125 |
126 |
127 | 128 | -------------------------------------------------------------------------------- /admin/list_airlines.php: -------------------------------------------------------------------------------- 1 | 2 | 4 | location.href = 'list_airlines.php';"); 19 | exit(); 20 | } 21 | } 22 | ?> 23 | 24 | 54 |
55 | 56 |
57 |

AIRLINES LIST

59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 81 | 82 | 83 | 84 | 91 | 92 | "; 93 | $cnt++; } 94 | ?> 95 | 96 | 97 |
#NameSeatsAction
".$cnt." ".$row['name']."".$row['seats']." 85 |
86 | 87 | 89 |
90 |
98 | 99 |
100 | 101 | 102 |
103 | -------------------------------------------------------------------------------- /includes/pass_detail.inc.php: -------------------------------------------------------------------------------- 1 | (int)date('m')){ 24 | $flag = true; 25 | } else if($date_mnth == (int)date('m')){ 26 | if((int)substr($_POST['date'][$i],8,2) >= (int)date('d')) { 27 | $flag = true; 28 | } 29 | } 30 | if($flag) { 31 | header('Location: ../pass_form.php?error=invdate'); 32 | exit(); 33 | break; 34 | } 35 | } 36 | $stmt = mysqli_stmt_init($conn); 37 | $sql = 'SELECT * FROM Passenger_profile'; 38 | $stmt = mysqli_stmt_init($conn); 39 | if(!mysqli_stmt_prepare($stmt,$sql)) { 40 | header('Location: ../pass_form.php?error=sqlerror'); 41 | exit(); 42 | } else { 43 | mysqli_stmt_bind_param($stmt,'ii',$flight_id,$_SESSION['userId']); 44 | mysqli_stmt_execute($stmt); 45 | $result = mysqli_stmt_get_result($stmt); 46 | $flag = false; 47 | while ($row = mysqli_fetch_assoc($result)) { 48 | $pass_id=$row['passenger_id']; 49 | } 50 | } 51 | if(is_null($pass_id)) { 52 | $pass_id = 0; 53 | $stmt = mysqli_stmt_init($conn); 54 | $sql = 'ALTER TABLE Passenger_profile AUTO_INCREMENT = 1 '; 55 | $stmt = mysqli_stmt_init($conn); 56 | if(!mysqli_stmt_prepare($stmt,$sql)) { 57 | header('Location: ../pass_form.php?error=sqlerror'); 58 | exit(); 59 | } else { 60 | mysqli_stmt_execute($stmt); 61 | } 62 | } 63 | $stmt = mysqli_stmt_init($conn); 64 | $flag = false; 65 | for($i=0;$i<$date_len;$i++) { 66 | $sql = 'INSERT INTO Passenger_profile (user_id,mobile,dob,f_name, 67 | m_name,l_name,flight_id) VALUES (?,?,?,?,?,?,?)'; 68 | if(!mysqli_stmt_prepare($stmt,$sql)) { 69 | header('Location: ../pass_form.php?error=sqlerror'); 70 | exit(); 71 | } else { 72 | mysqli_stmt_bind_param($stmt,'iissssi',$_SESSION['userId'], 73 | $_POST['mobile'][$i],$_POST['date'][$i],$_POST['firstname'][$i], 74 | $_POST['midname'][$i],$_POST['lastname'][$i],$flight_id); 75 | mysqli_stmt_execute($stmt); 76 | $flag = true; 77 | } 78 | } 79 | if($flag) { 80 | $_SESSION['flight_id'] = $flight_id; 81 | $_SESSION['class'] = $_POST['class']; 82 | $_SESSION['passengers'] = $passengers; 83 | $_SESSION['price'] = $_POST['price']; 84 | $_SESSION['type'] = $_POST['type']; 85 | $_SESSION['ret_date'] = $_POST['ret_date']; 86 | $_SESSION['pass_id'] = $pass_id+1; 87 | header('Location: ../payment.php'); 88 | exit(); 89 | } 90 | mysqli_stmt_close($stmt); 91 | mysqli_close($conn); 92 | 93 | } else { 94 | header('Location: ../pass_form.php'); 95 | exit(); 96 | } -------------------------------------------------------------------------------- /includes/reset-password.inc.php: -------------------------------------------------------------------------------- 1 | ='.$curr_date; 14 | $stmt = mysqli_stmt_init($conn); 15 | if(!mysqli_stmt_prepare($stmt,$sql)) { 16 | header('Location: ../create-new-pwd.php?err=sqlerr'); 17 | exit(); 18 | } else { 19 | mysqli_stmt_bind_param($stmt,'s',$selector); 20 | mysqli_stmt_execute($stmt); 21 | $result = mysqli_stmt_get_result($stmt); 22 | if(!$row = mysqli_fetch_assoc($result)) { 23 | header('Location: ../create-new-pwd.php?err=sqlerr'); 24 | exit(); 25 | } else { 26 | $token_bin = hex2bin($validator); 27 | $token_check = password_verify($token_bin,$row['pwd_reset_token']); 28 | if($token_check === false) { 29 | header('Location: ../create-new-pwd.php?err=pwdnotmatch'); 30 | exit(); 31 | } else if($token_check === true) { 32 | $token_email = $row['pwd_reset_email']; 33 | $sql = 'SELECT * FROM Users WHERE email =?'; 34 | $stmt = mysqli_stmt_init($conn); 35 | if(!mysqli_stmt_prepare($stmt,$sql)) { 36 | header('Location: ../create-new-pwd.php?err=sqlerr'); 37 | exit(); 38 | } else { 39 | mysqli_stmt_bind_param($stmt,'s',$token_email); 40 | mysqli_stmt_execute($stmt); 41 | $result = mysqli_stmt_get_result($stmt); 42 | if(!$row = mysqli_fetch_assoc($result)) { 43 | header('Location: ../create-new-pwd.php?err=sqlerr'); 44 | exit(); 45 | } else { 46 | $pwd_hash = password_hash($password,PASSWORD_DEFAULT); 47 | $sql = 'UPDATE Users SET password=? WHERE email=?'; 48 | $stmt = mysqli_stmt_init($conn); 49 | if(!mysqli_stmt_prepare($stmt,$sql)) { 50 | header('Location: ../create-new-pwd.php?err=sqlerr'); 51 | exit(); 52 | } else { 53 | mysqli_stmt_bind_param($stmt,'ss',$pwd_hash,$token_email); 54 | mysqli_stmt_execute($stmt); 55 | 56 | $sql = 'DELETE FROM PwdReset WHERE pwd_reset_email=?'; 57 | $stmt = mysqli_stmt_init($conn); 58 | if(!mysqli_stmt_prepare($stmt,$sql)) { 59 | header('Location: ../create-new-pwd.php?err=sqlerr'); 60 | exit(); 61 | } else { 62 | mysqli_stmt_bind_param($stmt,'s',$token_email); 63 | mysqli_stmt_execute($stmt); 64 | header('Location: ../login.php?pwd=updated'); 65 | } 66 | } 67 | } 68 | } 69 | } 70 | } 71 | } 72 | mysqli_stmt_close($stmt); 73 | mysqli_close($conn); 74 | } else { 75 | header('Location: ../create-new-pwd.php'); 76 | } 77 | -------------------------------------------------------------------------------- /admin/all_flights.php: -------------------------------------------------------------------------------- 1 | 2 | 4 | location.href = 'all_flights.php';"); 19 | exit(); 20 | } 21 | } 22 | ?> 23 | 24 | 54 |
55 | 56 |
57 |

FLIGHT LIST

59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 84 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 101 | 102 | "; 103 | } 104 | ?> 105 | 106 | 107 |
IDArrivalDepartureSourceDestinationAirlineSeatsPriceAction
85 | 86 | ".$row['flight_id']." ".$row['arrivale']."".$row['departure']."".$row['source']."".$row['Destination']."".$row['airline']."".$row['Seats']."$ ".$row['Price']." 95 |
96 | 97 | 99 |
100 |
108 | 109 |
110 | 111 | 112 |
113 | 114 | -------------------------------------------------------------------------------- /admin/pass_list.php: -------------------------------------------------------------------------------- 1 | 2 | 4 | 30 |
31 | 32 |
33 |

Passenger List

35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | "; 97 | } 98 | } 99 | } 100 | $cnt++; } 101 | } 102 | ?> 103 | 104 | 105 |
#First NameMiddle NameLast NameContactD.O.BPaid ByAmount
".$cnt."".$row['f_name']."".$row['m_name']."".$row['l_name']."".$row['mobile']."".$row['dob']."".$row_u['username']."$ ".$row_p['amount']."
106 | 107 |
108 | 109 | 110 |
111 | -------------------------------------------------------------------------------- /includes/register.inc.php: -------------------------------------------------------------------------------- 1 | 0) { 29 | header('Location: ../register.php?error=usernameexists'); 30 | exit(); 31 | } else { 32 | $stmt = mysqli_stmt_init($conn); 33 | if(!mysqli_stmt_prepare($stmt,$email_sql)) { 34 | header('Location: ../register.php?error=sqlerror'); 35 | exit(); 36 | } else { 37 | mysqli_stmt_bind_param($stmt,'s',$email_id); 38 | mysqli_stmt_execute($stmt); 39 | mysqli_stmt_store_result($stmt); 40 | $email_check = mysqli_stmt_num_rows($stmt); 41 | if($email_check > 0) { 42 | header('Location: ../register.php?error=emailexists'); 43 | exit(); 44 | } else { 45 | $sql = 'INSERT INTO Users (username,email,password) VALUES (?,?,?)'; 46 | $stmt = mysqli_stmt_init($conn); 47 | if(!mysqli_stmt_prepare($stmt,$sql)) { 48 | header('Location: ../register.php?error=sqlerror'); 49 | exit(); 50 | } else { 51 | $pwd_hash = password_hash($password, PASSWORD_DEFAULT); 52 | mysqli_stmt_bind_param($stmt,'sss',$username,$email_id,$pwd_hash); 53 | mysqli_stmt_execute($stmt); 54 | 55 | // LOGIN USer 56 | $sql = 'SELECT * FROM Users WHERE username=? OR email=?;'; 57 | $stmt = mysqli_stmt_init($conn); 58 | if(!mysqli_stmt_prepare($stmt,$sql)) { 59 | header('Location: ../index.php?error=sqlerror'); 60 | exit(); 61 | } else { 62 | mysqli_stmt_bind_param($stmt,'ss',$username,$username); 63 | mysqli_stmt_execute($stmt); 64 | $result = mysqli_stmt_get_result($stmt); 65 | if($row = mysqli_fetch_assoc($result)) { 66 | $pwd_check = password_verify($password,$row['password']); 67 | if($pwd_check == false) { 68 | header('Location: ../index.php?error=wrongpwd'); 69 | exit(); 70 | } 71 | else if($pwd_check == true) { 72 | session_start(); 73 | $_SESSION['userId'] = $row['user_id']; 74 | $_SESSION['userUid'] = $row['username']; 75 | $_SESSION['userMail'] = $row['email']; 76 | header('Location: ../index.php?login=success'); 77 | exit(); 78 | } else { 79 | header('Location: ../index.php?error=invalidcred'); 80 | exit(); 81 | } 82 | } 83 | } 84 | } 85 | } 86 | } 87 | } 88 | } 89 | } 90 | mysqli_stmt_close($stmt); 91 | mysqli_close($conn); 92 | } else { 93 | header('Location: ../register.php'); 94 | exit(); 95 | } 96 | -------------------------------------------------------------------------------- /admin/login.php: -------------------------------------------------------------------------------- 1 | 2 | alert('Your password has been reset!!');"; 6 | } 7 | } 8 | ?> 9 | 10 | 75 |
76 | alert("Invalid Credentials")'; 80 | } else if($_GET['error'] === 'wrongpwd') { 81 | echo ''; 82 | } else if($_GET['error'] === 'sqlerror') { 83 | echo""; 84 | } 85 | } 86 | ?> 87 |
88 |
89 | alert('Dest. date/time is less than src.');"; 93 | } else if($_GET['error'] === 'sqlerr') { 94 | echo ""; 95 | } 96 | } 97 | ?> 98 |
99 |
100 |

ADMIN LOGIN

101 | 102 |
104 | 105 |
106 |
107 | 109 |
110 |
111 |
112 | 113 | 115 |
116 |
117 |
118 | 120 |
121 |
122 |
123 | 124 | 126 |
127 |
128 |
129 | 130 | 136 |
137 |
138 |
139 |
140 |
141 |
142 | 143 | 144 | 145 | 163 | -------------------------------------------------------------------------------- /admin/header.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Online Flight Booking 15 | 18 | 19 | 37 | 38 | 39 | 122 | -------------------------------------------------------------------------------- /pass_form.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 55 | alert("Invalid date of birth")'; 59 | } else if($_GET['error'] === 'moblen') { 60 | echo ''; 61 | } else if($_GET['error'] === 'sqlerror') { 62 | echo""; 63 | } 64 | } 65 | ?> 66 | 74 |
75 |
76 |
77 |

PASSENGER DETAILS

78 |
80 | 81 | > 82 | > 83 | > 84 | > 85 | > 86 | > 87 | 90 |
91 |
92 |
93 | 94 | 96 |
97 |
98 |
99 |
100 | 101 | 103 |
104 |
105 | 106 |
107 |
108 | 109 | 111 |
112 |
113 |
114 |
115 |
116 |
117 | 118 | 120 |
121 |
122 |
123 |
124 | 125 | 127 |
128 |
129 |
130 |
'; } ?> 131 |
132 | 138 |
139 | 140 |
141 | 142 | 143 | 157 |
158 | 159 | -------------------------------------------------------------------------------- /book_flight.php: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 39 |
40 | 61 |
62 |

FLIGHTS FROM:
64 | to

65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 108 | 109 | 110 | 111 | 119 | 120 | "; 121 | if(isset($_SESSION['userId']) && $row['status'] === '') { 122 | echo " 138 | "; 139 | } elseif (isset($_SESSION['userId']) && $row['status'] === 'dep') { 140 | echo ""; 141 | } else { 142 | echo ""; 143 | } 144 | echo ' '; 145 | } 146 | ?> 147 | 148 | 149 |
AirlineDepartureArrivalStatusFareBuy
".$row['airline']."".$row['departure']."".$row['arrivale']." 112 |
113 | 117 |
118 |
$ ".$price." 123 |
124 | 125 | 126 | 127 | 128 | 129 | 130 | 136 |
137 |
Not AvailableLogin to continue
150 | 151 |
152 | 153 | 154 |
155 | 156 | -------------------------------------------------------------------------------- /admin/flight.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 70 |
71 |
72 |
73 | alert('Dest. date/time is less than src.');"; 77 | } else if($_GET['error'] === 'sqlerr') { 78 | echo ""; 79 | } else if($_GET['error'] === 'same') { 80 | echo ""; 81 | } 82 | } 83 | ?> 84 |
85 |

ADD FLIGHT DETAILS

86 | 87 |
89 | 90 |
91 |
92 |
DEPARTURE
93 |
94 |
95 | 97 |
98 |
99 | 101 |
102 |
103 | 104 | 105 |
106 |
107 |
ARRIVAL
108 |
109 |
110 | 112 |
113 |
114 | 116 |
117 |
118 | 119 |
120 |
121 | 131 | '; 132 | while ($row = mysqli_fetch_assoc($result)) { 133 | echo ''; 135 | } 136 | ?> 137 | 138 |
139 |
140 | 150 | '; 151 | while ($row = mysqli_fetch_assoc($result)) { 152 | echo ''; 154 | } 155 | ?> 156 | 157 |
158 |
159 | 160 |
161 |
162 |
163 | 164 | 165 |
166 |
167 |
168 |
169 | 170 | 172 |
173 |
174 | 182 | '; 183 | while ($row = mysqli_fetch_assoc($result)) { 184 | echo ''; 186 | } 187 | ?> 188 | 189 |
190 | 191 | 197 |
198 |
199 |
200 |
201 |
202 | 216 | 217 | -------------------------------------------------------------------------------- /login.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | alert('Your password has been reset!!');"; 9 | } 10 | } 11 | ?> 12 | alert("Invalid Credentials")'; 16 | } else if($_GET['error'] === 'wrongpwd') { 17 | echo ''; 18 | } else if($_GET['error'] === 'sqlerror') { 19 | echo""; 20 | } 21 | } 22 | if(isset($_COOKIE['Uname']) && isset($_COOKIE['Upwd'])) { 23 | require 'helpers/init_conn_db.php'; 24 | $email_id = $_POST['user_id']; 25 | $password = $_POST['user_pass']; 26 | $sql = 'SELECT * FROM Users WHERE username=? OR email=?;'; 27 | $stmt = mysqli_stmt_init($conn); 28 | if(!mysqli_stmt_prepare($stmt,$sql)) { 29 | header('Location: views/login.php?error=sqlerror'); 30 | exit(); 31 | } else { 32 | mysqli_stmt_bind_param($stmt,'ss',$_COOKIE['Uname'],$_COOKIE['Uname']); 33 | mysqli_stmt_execute($stmt); 34 | $result = mysqli_stmt_get_result($stmt); 35 | if($row = mysqli_fetch_assoc($result)) { 36 | $pwd_check = password_verify($_COOKIE['Upwd'],$row['password']); 37 | if($pwd_check == false) { 38 | setcookie('Uname', '',time() - 3600); 39 | setcookie('Upwd', '',time() - 3600); 40 | header('Location: views/login.php?error=wrongpwd'); 41 | exit(); 42 | } 43 | else if($pwd_check == true) { 44 | session_start(); 45 | $_SESSION['userId'] = $row['user_id']; 46 | $_SESSION['userUid'] = $row['username']; 47 | $_SESSION['userMail'] = $row['email']; 48 | header('Location: views/index.php?login=success'); 49 | exit(); 50 | } else { 51 | header('Location: views/login.php?error=invalidcred'); 52 | exit(); 53 | } 54 | } 55 | header('Location: views/login.php?error=invalidcred'); 56 | exit(); 57 | } 58 | header('Location: views/login.php?error=invalidcred'); 59 | exit(); 60 | mysqli_stmt_close($stmt); 61 | mysqli_close($conn); 62 | } 63 | ?> 64 | 145 |
146 |
147 |
148 |
149 |
150 |

LOG IN PANEL

151 | 152 |
154 | 155 |
156 |
157 | 159 |
160 |
161 |
162 | 163 | 165 |
166 |
167 |
168 | 170 |
171 |
172 |
173 | 174 | 176 |
177 |
178 | 179 |
180 |
181 | 182 |
183 | Reset Password 185 |
186 |
187 |
188 | 197 |
198 | 204 |
205 |
206 | 207 |
208 |
209 |
210 |
211 |
212 | 213 | 214 | 229 |
230 | 231 | 232 | -------------------------------------------------------------------------------- /register.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 109 | alert("Invalid email")'; 113 | } else if($_GET['error'] === 'pwdnotmatch') { 114 | echo ''; 115 | } else if($_GET['error'] === 'sqlerror') { 116 | echo""; 117 | } else if($_GET['error'] === 'usernameexists') { 118 | echo""; 119 | } else if($_GET['error'] === 'emailexists') { 120 | echo""; 121 | } 122 | } 123 | ?> 124 | 125 |
126 |
127 |
128 | 132 |
133 |
134 |
135 |
136 |

PASSENGER REGISTRATION

137 |
138 |
139 |
140 |
141 |
142 | 144 |
145 |
146 |
147 | 148 | 149 |
150 |
151 |
152 | 154 |
155 |
156 |
157 | 158 | 160 |
161 |
162 |
163 |
164 |
165 | 167 |
168 |
169 |
170 | 171 | 175 |
176 | 177 |
178 |
179 | 181 |
182 |
183 |
184 | 185 | 187 |
188 |
189 |
190 |
191 | 197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 | 208 | 209 | 227 | 228 |
-------------------------------------------------------------------------------- /feedback.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 131 | 132 |
133 | alert("Invalid email")'; 137 | } else if($_GET['error'] === 'sqlerror') { 138 | echo""; 139 | } else if($_GET['error'] === 'success') { 140 | echo""; 141 | } 142 | } 143 | ?> 144 |
145 |

FEEDBACK

146 |
147 |
148 |
149 |
150 |
151 |
152 | 153 | 154 |
155 |
156 |
157 |
158 | 160 | 162 |
163 |
164 | 165 |
166 |
167 | 179 |
180 |
181 | 182 |
183 |
184 | 185 | 187 |
188 |
189 |
190 | 191 |
192 |
193 | 197 | 202 | 208 | 215 | 223 |
224 |
225 |
226 |
227 | 233 |
234 |
235 | 236 |
237 |
238 |
239 |
240 | 241 | 259 |
260 | -------------------------------------------------------------------------------- /payment.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 81 | 82 |
83 | alert('Database error')"; 87 | } else if($_GET['error'] === 'noret') { 88 | echo""; 89 | } else if($_GET['error'] === 'mailerr') { 90 | echo""; 91 | } 92 | } 93 | ?> 94 |
95 |
96 |
97 |

PAY INVOICE

98 |
99 |
100 | 101 |
102 | 103 | 104 | 105 | 106 | 107 |
108 |
109 |
111 | 112 |
113 | 114 | 115 | Enter a valid 12 to 16 digit card number 116 |
117 |
118 |
119 |
120 | 121 | 122 | Enter the expiration date 123 |
124 |
125 |
126 | 127 |
128 |
129 | 130 |
131 |
132 | Enter the 3-digit code on back 133 |
134 |
135 | 138 |
139 |
140 |
141 |
142 |
143 |
144 | 145 |
146 | 147 |
148 |
149 | 155 |
156 | 157 |
158 |
159 |
160 |
161 |
162 |
163 | 164 | 231 | 232 | -------------------------------------------------------------------------------- /my_flights.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 61 |
62 |
63 |

FLIGHT STATUS

64 | 118 |
'; 119 | if($row_f['status'] === 'arr') { 120 | echo ' 121 |
122 |
123 | 125 |
126 |
127 |
128 |
129 |
130 | 132 |
133 |
134 | '; 135 | } else { 136 | echo ' 137 |
138 |
139 | 141 |
142 |
143 |
144 |
145 |
146 | 148 |
149 |
150 | '; 151 | } 152 | echo ' 153 |
154 | 155 |
157 |

'.$row_f['source'].'

158 |

Scheduled Departure:

159 |

'.$date_dep.'

160 |

'.$time_dep.'

161 |
162 |
165 |

'.$row_f['Destination'].'

166 |

Scheduled Arrival:

167 |

'.$date_arr.'

168 |

'.$time_arr.'

169 |
170 |
171 | 175 |
176 |
'; 177 | } 178 | } 179 | } 180 | } 181 | } 182 | } 183 | ?> 184 | 185 | 186 |
187 | 188 | 189 | -------------------------------------------------------------------------------- /e_ticket.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 73 |
74 | 76 |
77 | 78 | 79 | 126 |
127 |
128 |
129 |

130 | Online Flight Booking

131 |
132 |
133 |

'.$class_txt.' CLASS

134 |
135 |
136 |
137 |
138 |
139 |

Airline

140 |

'.$row_f['airline'].'

141 |
142 |
143 |

from

144 |

'.$row_f['source'].'

145 |
146 |
147 |

to

148 |

'.$row_f['Destination'].'

149 |
150 |
151 |
152 |
153 |

Passenger

154 |

155 | '.$row_p['f_name'].' '.$row_p['m_name'].' '.$row_p['l_name'].' 156 |

157 |
158 |
159 |

board time

160 |

12:45

161 |
162 |
163 |
164 |
165 |

departure

166 |

'.$date_dep.'

167 |

'.$time_dep.'

168 |
169 |
170 |

arrival

171 |

'.$date_arr.'

172 |

'.$time_arr.'

173 |
174 |
175 |

gate

176 |

A22

177 |
178 |
179 |

seat

180 |

'.$row['seat_no'].'

181 |
182 |
183 |
184 |
186 |
187 |
188 |

189 | Online Flight Booking

190 |
191 |
192 |
193 |
194 | 196 |
197 |
198 |
199 |

200 |   Thank you for choosing us.

201 | Please be at the gate at boarding time

202 |
203 |
204 |
205 | ' ; 206 | } 207 | } 208 | } 209 | } 210 | } 211 | } 212 | 213 | } ?> 214 | 215 | 216 |
217 | 218 | 219 | 222 | 223 | -------------------------------------------------------------------------------- /includes/payment.inc.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 69 |
70 | 110 |
111 |

E-TICKETS

112 | 113 | 158 |
159 |
160 |
161 |

162 | Online Flight Booking

163 |
164 |
165 |

'.$class_txt.' CLASS

166 |
167 |
168 |
169 |
170 |
171 |

Airline

172 |

'.$row_f['airline'].'

173 |
174 |
175 |

from

176 |

'.$row_f['source'].'

177 |
178 |
179 |

to

180 |

'.$row_f['Destination'].'

181 |
182 |
183 |
184 |
185 |

Passenger

186 |

187 | '.$row_p['f_name'].' '.$row_p['m_name'].' '.$row_p['l_name'].' 188 |

189 |
190 |
191 |

board time

192 |

12:45

193 |
194 |
195 |
196 |
197 |

departure

198 |

'.$date_dep.'

199 |

'.$time_dep.'

200 |
201 |
202 |

arrival

203 |

'.$date_arr.'

204 |

'.$time_arr.'

205 |
206 |
207 |

gate

208 |

A22

209 |
210 |
211 |

seat

212 |

'.$row['seat_no'].'

213 |
214 |
215 |
216 |
218 |
219 |
220 |

221 | Online Flight Booking

222 |
223 |
224 |
225 |
226 | 228 |
229 |
230 |
231 |

232 |   Thank you for choosing us.

233 | Please be at the gate at boarding time

234 |
235 |
236 | 237 |
238 | 264 |
265 |
266 | ' ; 267 | } 268 | } 269 | } 270 | } 271 | } 272 | } 273 | 274 | ?> 275 | 276 | 277 |
278 | 279 | -------------------------------------------------------------------------------- /DATABASE FILE/ofbsphp.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.6.5.2 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: 127.0.0.1 6 | -- Generation Time: Jul 09, 2022 at 06:44 AM 7 | -- Server version: 10.1.21-MariaDB 8 | -- PHP Version: 5.6.30 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET time_zone = "+00:00"; 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8mb4 */; 18 | 19 | -- 20 | -- Database: `ofbsphp` 21 | -- 22 | 23 | -- -------------------------------------------------------- 24 | 25 | -- 26 | -- Table structure for table `admin` 27 | -- 28 | 29 | CREATE TABLE `admin` ( 30 | `admin_id` int(11) NOT NULL, 31 | `admin_uname` varchar(20) NOT NULL, 32 | `admin_email` varchar(50) NOT NULL, 33 | `admin_pwd` varchar(100) NOT NULL 34 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 35 | 36 | -- 37 | -- Dumping data for table `admin` 38 | -- 39 | 40 | INSERT INTO `admin` (`admin_id`, `admin_uname`, `admin_email`, `admin_pwd`) VALUES 41 | (1, 'devrev', 'admin@mail.com', 'tamilselvan'); 42 | 43 | -- -------------------------------------------------------- 44 | 45 | -- 46 | -- Table structure for table `airline` 47 | -- 48 | 49 | CREATE TABLE `airline` ( 50 | `airline_id` int(11) NOT NULL, 51 | `name` varchar(20) NOT NULL, 52 | `seats` int(11) NOT NULL 53 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 54 | 55 | -- 56 | -- Dumping data for table `airline` 57 | -- 58 | 59 | INSERT INTO `airline` (`airline_id`, `name`, `seats`) VALUES 60 | (1, 'Core Airways', 165), 61 | (2, 'Echo Airline', 220), 62 | (3, 'Spark Airways', 125), 63 | (4, 'Peak Airways', 210), 64 | (5, 'Homelander Airways', 185), 65 | (9, 'Blue Airlines', 200), 66 | (10, 'GoldStar Airways', 205), 67 | (11, 'Novar Airways', 158), 68 | (12, 'Aero Airways', 210), 69 | (13, 'Nep Airways', 215), 70 | (14, 'Delta Airlines', 135); 71 | 72 | -- -------------------------------------------------------- 73 | 74 | -- 75 | -- Table structure for table `cities` 76 | -- 77 | 78 | CREATE TABLE `cities` ( 79 | `city` varchar(20) NOT NULL 80 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 81 | 82 | -- 83 | -- Dumping data for table `cities` 84 | -- 85 | 86 | INSERT INTO `cities` (`city`) VALUES 87 | ('San Jose'), 88 | ('Chicago'), 89 | ('Olisphis'), 90 | ('Shiburn'), 91 | ('Weling'), 92 | ('Chiby'), 93 | ('Odonhull'), 94 | ('Hegan'), 95 | ('Oriaridge'), 96 | ('Flerough'), 97 | ('Yleigh'), 98 | ('Oyladnard'), 99 | ('Trerdence'), 100 | ('Zhotrora'), 101 | ('Otiginia'), 102 | ('Plueyby'), 103 | ('Vrexledo'), 104 | ('Ariosey'); 105 | 106 | -- -------------------------------------------------------- 107 | 108 | -- 109 | -- Table structure for table `feedback` 110 | -- 111 | 112 | CREATE TABLE `feedback` ( 113 | `feed_id` int(11) NOT NULL, 114 | `email` varchar(50) NOT NULL, 115 | `q1` varchar(250) NOT NULL, 116 | `q2` varchar(20) NOT NULL, 117 | `q3` varchar(250) NOT NULL, 118 | `rate` int(11) NOT NULL 119 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 120 | 121 | -- -------------------------------------------------------- 122 | 123 | -- 124 | -- Table structure for table `flight` 125 | -- 126 | 127 | CREATE TABLE `flight` ( 128 | `flight_id` int(11) NOT NULL, 129 | `admin_id` int(11) NOT NULL, 130 | `arrivale` datetime NOT NULL, 131 | `departure` datetime NOT NULL, 132 | `Destination` varchar(20) NOT NULL, 133 | `source` varchar(20) NOT NULL, 134 | `airline` varchar(20) NOT NULL, 135 | `Seats` varchar(110) NOT NULL, 136 | `duration` varchar(20) NOT NULL, 137 | `Price` int(11) NOT NULL, 138 | `status` varchar(6) DEFAULT NULL, 139 | `issue` varchar(50) DEFAULT NULL, 140 | `last_seat` varchar(5) DEFAULT '', 141 | `bus_seats` int(11) DEFAULT '20', 142 | `last_bus_seat` varchar(5) DEFAULT '' 143 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 144 | 145 | -- 146 | -- Dumping data for table `flight` 147 | -- 148 | 149 | 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 150 | (1, 1, '2022-06-30 10:03:00', '2022-06-30 09:01:00', 'Chicago', 'San', 'Core Airways', '63', '1', 175, '', '', '21B', 20, ''), 151 | (2, 1, '2022-07-05 11:15:00', '2022-07-05 10:05:00', 'Shiburn', 'Olisphis', 'Core Airways', '61', '1', 185, 'arr', '', '21D', 20, ''), 152 | (3, 1, '2022-07-05 12:13:00', '2022-07-05 10:13:00', 'Weling', 'Olisphis', 'Spark Airways', '123', '2', 205, 'arr', '', '21B', 20, ''), 153 | (4, 1, '2022-07-05 16:30:00', '2022-07-05 15:26:00', 'Weling', 'Shiburn', 'Echo Airline', '220', '1', 155, 'issue', '120', '', 20, ''), 154 | (5, 1, '2022-07-05 15:30:00', '2022-07-05 12:30:00', 'Chiby', 'Shiburn', 'Spark Airways', '125', '3', 326, '', '', '', 20, ''), 155 | (6, 1, '2022-07-05 17:55:00', '2022-07-05 15:30:00', 'Chiby', 'Weling', 'Spark Airways', '125', '2', 285, '', '', '', 20, ''), 156 | (7, 1, '2022-07-05 20:50:00', '2022-07-05 18:50:00', 'Odonhull', 'Chiby', 'Spark Airways', '125', '2', 265, '', '', '', 20, ''), 157 | (8, 1, '2022-07-06 00:55:00', '2022-07-05 17:00:00', 'Oyladnard', 'Odonhull', 'Homelander Airways', '183', '7', 615, 'arr', '', '21B', 20, ''), 158 | (9, 1, '2022-07-05 17:09:00', '2022-07-05 16:05:00', 'Chiby', 'Olisphis', 'Peak Airways', '210', '1', 155, '', '', '', 20, ''), 159 | (10, 1, '2022-07-06 13:10:00', '2022-07-06 11:05:00', 'Hegan', 'Shiburn', 'Core Airways', '165', '2', 200, '', '', '', 20, ''), 160 | (11, 1, '2022-07-05 19:10:00', '2022-07-05 18:05:00', 'Oriaridge', 'Flerough', 'Echo Airline', '220', '1', 165, '', '', '', 20, ''), 161 | (12, 1, '2022-07-05 21:10:00', '2022-07-05 19:05:00', 'Chicago', 'Yleigh', 'Peak Airways', '210', '2', 320, '', '', '', 20, ''), 162 | (13, 1, '2022-07-05 13:50:00', '2022-07-05 12:56:00', 'Olisphis', 'Chicago', 'Core Airways', '165', '1', 110, 'issue', '110', '', 20, ''), 163 | (14, 1, '2022-07-05 11:08:00', '2022-07-05 09:07:00', 'Oyladnard', 'San', 'Spark Airways', '125', '2', 195, 'issue', '120', '', 20, ''), 164 | (15, 1, '2022-07-05 10:10:00', '2022-07-05 08:10:00', 'Weling', 'Chicago', 'Peak Airways', '210', '2', 125, 'issue', '120', '', 20, ''), 165 | (16, 1, '2022-07-05 18:10:00', '2022-07-05 16:09:00', 'Flerough', 'San', 'Homelander Airways', '185', '2', 220, 'dep', '', '', 20, ''), 166 | (17, 1, '2022-07-05 17:10:00', '2022-07-05 16:10:00', 'San', 'Chiby', 'Echo Airline', '220', '1', 125, 'arr', '', '', 20, ''), 167 | (18, 1, '2022-07-05 19:15:00', '2022-07-05 16:12:00', 'San', 'Flerough', 'Core Airways', '165', '3', 275, 'dep', '', '', 20, ''), 168 | (19, 1, '2022-07-05 23:40:00', '2022-07-05 20:31:00', 'Shiburn', 'Oyladnard', 'Aero Airways', '210', '3', 295, '', '', '', 20, ''), 169 | (20, 1, '2022-07-05 23:58:00', '2022-07-05 22:14:00', 'Zhotrora', 'Trerdence', 'Aero Airways', '208', '1', 185, 'dep', '', '21B', 20, ''), 170 | (22, 1, '2022-07-10 21:00:00', '2022-07-10 17:30:00', 'Chicago', 'San', 'Core Airways', '165', '3 hours', 1500, '', '', '', 20, ''); 171 | 172 | -- -------------------------------------------------------- 173 | 174 | -- 175 | -- Table structure for table `passenger_profile` 176 | -- 177 | 178 | CREATE TABLE `passenger_profile` ( 179 | `passenger_id` int(11) NOT NULL, 180 | `user_id` int(11) NOT NULL, 181 | `flight_id` int(11) NOT NULL, 182 | `mobile` varchar(110) NOT NULL, 183 | `dob` datetime NOT NULL, 184 | `f_name` varchar(20) DEFAULT NULL, 185 | `m_name` varchar(20) DEFAULT NULL, 186 | `l_name` varchar(20) DEFAULT NULL 187 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 188 | 189 | -- 190 | -- Dumping data for table `passenger_profile` 191 | -- 192 | 193 | INSERT INTO `passenger_profile` (`passenger_id`, `user_id`, `flight_id`, `mobile`, `dob`, `f_name`, `m_name`, `l_name`) VALUES 194 | (1, 1, 1, '2147483647', '1995-01-01 00:00:00', 'Christine', 'M', 'Moore'), 195 | (2, 2, 3, '2147483647', '1995-02-13 00:00:00', 'Henry', 'l', 'Stuart'), 196 | (3, 3, 2, '2147483647', '1994-06-21 00:00:00', 'Andre', 'J', 'Atkins'), 197 | (4, 4, 2, '2147483647', '1995-05-16 00:00:00', 'James', 'K', 'Harbuck'), 198 | (5, 2, 8, '7854444411', '1995-02-13 00:00:00', 'Henry', 'l', 'Stuart'), 199 | (6, 2, 20, '7412585555', '1995-02-13 00:00:00', 'Henry', 'l', 'Stuart'); 200 | 201 | -- -------------------------------------------------------- 202 | 203 | -- 204 | -- Table structure for table `payment` 205 | -- 206 | 207 | CREATE TABLE `payment` ( 208 | `card_no` varchar(16) NOT NULL, 209 | `user_id` int(11) NOT NULL, 210 | `flight_id` int(11) NOT NULL, 211 | `expire_date` varchar(5) DEFAULT NULL, 212 | `amount` int(11) NOT NULL 213 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 214 | 215 | -- 216 | -- Dumping data for table `payment` 217 | -- 218 | 219 | INSERT INTO `payment` (`card_no`, `user_id`, `flight_id`, `expire_date`, `amount`) VALUES 220 | ('1010555677851111', 4, 2, '10/26', 370), 221 | ('1020445869651011', 2, 20, '12/25', 370), 222 | ('1111888889897778', 2, 3, '12/25', 205), 223 | ('1400565800004478', 2, 8, '12/25', 1230), 224 | ('1458799990001450', 3, 2, '12/25', 185), 225 | ('4204558500014587', 1, 1, '02/25', 350); 226 | 227 | -- -------------------------------------------------------- 228 | 229 | -- 230 | -- Table structure for table `pwdreset` 231 | -- 232 | 233 | CREATE TABLE `pwdreset` ( 234 | `pwd_reset_id` int(11) NOT NULL, 235 | `pwd_reset_email` varchar(50) NOT NULL, 236 | `pwd_reset_selector` varchar(80) NOT NULL, 237 | `pwd_reset_token` varchar(120) NOT NULL, 238 | `pwd_reset_expires` varchar(20) NOT NULL 239 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 240 | 241 | -- -------------------------------------------------------- 242 | 243 | -- 244 | -- Table structure for table `ticket` 245 | -- 246 | 247 | CREATE TABLE `ticket` ( 248 | `ticket_id` int(11) NOT NULL, 249 | `passenger_id` int(11) NOT NULL, 250 | `flight_id` int(11) NOT NULL, 251 | `user_id` int(11) NOT NULL, 252 | `seat_no` varchar(10) NOT NULL, 253 | `cost` int(11) NOT NULL, 254 | `class` varchar(3) NOT NULL 255 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 256 | 257 | -- 258 | -- Dumping data for table `ticket` 259 | -- 260 | 261 | INSERT INTO `ticket` (`ticket_id`, `passenger_id`, `flight_id`, `user_id`, `seat_no`, `cost`, `class`) VALUES 262 | (1, 1, 1, 1, '21A', 350, 'E'), 263 | (2, 2, 3, 2, '21A', 205, 'E'), 264 | (4, 3, 2, 3, '21A', 185, 'E'), 265 | (6, 4, 2, 4, '21C', 370, 'E'), 266 | (8, 5, 8, 2, '21A', 1230, 'E'), 267 | (10, 6, 20, 2, '21A', 370, 'E'); 268 | 269 | -- -------------------------------------------------------- 270 | 271 | -- 272 | -- Table structure for table `users` 273 | -- 274 | 275 | CREATE TABLE `users` ( 276 | `user_id` int(11) NOT NULL, 277 | `username` varchar(20) NOT NULL, 278 | `email` varchar(50) NOT NULL, 279 | `password` varchar(100) NOT NULL 280 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 281 | 282 | -- 283 | -- Dumping data for table `users` 284 | -- 285 | 286 | INSERT INTO `users` (`user_id`, `username`, `email`, `password`) VALUES 287 | (1, 'christine', 'christine@mail.com', '$2y$10$zr.UlaKFEhBdcirNaa03ceV8Y31Jiw5KSFboVYasgZBwxoddtVWwO'), 288 | (2, 'henry', 'henry@mail.com', '$2y$10$zr.UlaKFEhBdcirNaa03ceV8Y31Jiw5KSFboVYasgZBwxoddtVWwO'), 289 | (3, 'andre', 'andre@mail.com', '$2y$10$zr.UlaKFEhBdcirNaa03ceV8Y31Jiw5KSFboVYasgZBwxoddtVWwO'), 290 | (4, 'james', 'james@mail.com', '$2y$10$zr.UlaKFEhBdcirNaa03ceV8Y31Jiw5KSFboVYasgZBwxoddtVWwO'), 291 | (5, 'wakawaka', 'wakawaks@gmail.com', '$2y$10$9rscJPJNoJUIasBidOTSueToKDvfxL8Jcrrx..PdUACRWWQ9ILYim'), 292 | (6, 'darkseid', 'darkseid@gmail.com', '$2y$10$zr.UlaKFEhBdcirNaa03ceV8Y31Jiw5KSFboVYasgZBwxoddtVWwO'); 293 | 294 | -- 295 | -- Indexes for dumped tables 296 | -- 297 | 298 | -- 299 | -- Indexes for table `admin` 300 | -- 301 | ALTER TABLE `admin` 302 | ADD PRIMARY KEY (`admin_id`); 303 | 304 | -- 305 | -- Indexes for table `airline` 306 | -- 307 | ALTER TABLE `airline` 308 | ADD PRIMARY KEY (`airline_id`); 309 | 310 | -- 311 | -- Indexes for table `feedback` 312 | -- 313 | ALTER TABLE `feedback` 314 | ADD PRIMARY KEY (`feed_id`); 315 | 316 | -- 317 | -- Indexes for table `flight` 318 | -- 319 | ALTER TABLE `flight` 320 | ADD PRIMARY KEY (`flight_id`), 321 | ADD KEY `admin_id` (`admin_id`); 322 | 323 | -- 324 | -- Indexes for table `passenger_profile` 325 | -- 326 | ALTER TABLE `passenger_profile` 327 | ADD PRIMARY KEY (`passenger_id`), 328 | ADD KEY `user_id` (`user_id`), 329 | ADD KEY `flight_id` (`flight_id`); 330 | 331 | -- 332 | -- Indexes for table `payment` 333 | -- 334 | ALTER TABLE `payment` 335 | ADD PRIMARY KEY (`card_no`), 336 | ADD KEY `user_id` (`user_id`), 337 | ADD KEY `flight_id` (`flight_id`); 338 | 339 | -- 340 | -- Indexes for table `pwdreset` 341 | -- 342 | ALTER TABLE `pwdreset` 343 | ADD PRIMARY KEY (`pwd_reset_id`); 344 | 345 | -- 346 | -- Indexes for table `ticket` 347 | -- 348 | ALTER TABLE `ticket` 349 | ADD PRIMARY KEY (`ticket_id`), 350 | ADD KEY `user_id` (`user_id`), 351 | ADD KEY `flight_id` (`flight_id`), 352 | ADD KEY `passenger_id` (`passenger_id`); 353 | 354 | -- 355 | -- Indexes for table `users` 356 | -- 357 | ALTER TABLE `users` 358 | ADD PRIMARY KEY (`user_id`); 359 | 360 | -- 361 | -- AUTO_INCREMENT for dumped tables 362 | -- 363 | 364 | -- 365 | -- AUTO_INCREMENT for table `admin` 366 | -- 367 | ALTER TABLE `admin` 368 | MODIFY `admin_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; 369 | -- 370 | -- AUTO_INCREMENT for table `airline` 371 | -- 372 | ALTER TABLE `airline` 373 | MODIFY `airline_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; 374 | -- 375 | -- AUTO_INCREMENT for table `feedback` 376 | -- 377 | ALTER TABLE `feedback` 378 | MODIFY `feed_id` int(11) NOT NULL AUTO_INCREMENT; 379 | -- 380 | -- AUTO_INCREMENT for table `flight` 381 | -- 382 | ALTER TABLE `flight` 383 | MODIFY `flight_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23; 384 | -- 385 | -- AUTO_INCREMENT for table `passenger_profile` 386 | -- 387 | ALTER TABLE `passenger_profile` 388 | MODIFY `passenger_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; 389 | -- 390 | -- AUTO_INCREMENT for table `pwdreset` 391 | -- 392 | ALTER TABLE `pwdreset` 393 | MODIFY `pwd_reset_id` int(11) NOT NULL AUTO_INCREMENT; 394 | -- 395 | -- AUTO_INCREMENT for table `ticket` 396 | -- 397 | ALTER TABLE `ticket` 398 | MODIFY `ticket_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; 399 | -- 400 | -- AUTO_INCREMENT for table `users` 401 | -- 402 | ALTER TABLE `users` 403 | MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; 404 | -- 405 | -- Constraints for dumped tables 406 | -- 407 | 408 | -- 409 | -- Constraints for table `flight` 410 | -- 411 | ALTER TABLE `flight` 412 | ADD CONSTRAINT `flight_ibfk_1` FOREIGN KEY (`admin_id`) REFERENCES `admin` (`admin_id`); 413 | 414 | -- 415 | -- Constraints for table `passenger_profile` 416 | -- 417 | ALTER TABLE `passenger_profile` 418 | ADD CONSTRAINT `passenger_profile_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`), 419 | ADD CONSTRAINT `passenger_profile_ibfk_2` FOREIGN KEY (`flight_id`) REFERENCES `flight` (`flight_id`); 420 | 421 | -- 422 | -- Constraints for table `payment` 423 | -- 424 | ALTER TABLE `payment` 425 | ADD CONSTRAINT `payment_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`), 426 | ADD CONSTRAINT `payment_ibfk_2` FOREIGN KEY (`flight_id`) REFERENCES `flight` (`flight_id`); 427 | 428 | -- 429 | -- Constraints for table `ticket` 430 | -- 431 | ALTER TABLE `ticket` 432 | ADD CONSTRAINT `ticket_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`), 433 | ADD CONSTRAINT `ticket_ibfk_2` FOREIGN KEY (`flight_id`) REFERENCES `flight` (`flight_id`), 434 | ADD CONSTRAINT `ticket_ibfk_3` FOREIGN KEY (`passenger_id`) REFERENCES `passenger_profile` (`passenger_id`) ON DELETE CASCADE; 435 | 436 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 437 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 438 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 439 | -------------------------------------------------------------------------------- /admin/index.php: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 83 |
84 | 85 |
86 | 87 |
88 |
89 |
90 |
91 | Total Passengers 92 |

93 |
94 | 95 |
96 |
97 |
98 |
99 | Amount 100 |

$

101 |
102 | 103 |
104 |
105 |
106 |
107 | Flights 108 |

109 |
110 | 111 |
112 | 113 |
114 |
115 |
116 | Available Airlines 117 |

118 |
119 | 120 |
121 | 122 |
123 | 124 | 125 |
126 |
127 | 138 |

Today's Flights

139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 165 | 166 | '.$row['flight_id'].' 167 | 168 | 169 | 170 | 171 | 172 | 199 | ' ; }} ?> 200 | 201 |
#ArrivalDepartureDestinationSourceAirlinesAction
'.$row['arrivale'].''.$row['departure'].''.$row['Destination'].''.$row['source'].''.$row['airline'].' 173 | 198 |
202 | 203 |
204 |
205 | 206 |
207 |
208 | 219 |

Today's Flight Issues

220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 247 | 248 | '.$row['flight_id'].' 249 | 250 | 251 | 252 | 253 | 254 | 272 | ' ; }} ?> 273 | 274 |
#ArrivalDepartureDestinationSourceAirlineAction
'.$row['arrivale'].''.$row['departure'].''.$row['Destination'].''.$row['source'].''.$row['airline'].' 255 | 271 |
275 | 276 |
277 |
278 | 279 |
280 |
281 | 292 |

Flights Departed Today

293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 320 | 321 | '.$row['flight_id'].' 322 | 323 | 324 | 325 | 326 | 327 | 345 | ' ; }} ?> 346 | 347 |
#ArrivalDepartureDestinationSourceAirlineAction
'.$row['arrivale'].''.$row['departure'].''.$row['Destination'].''.$row['source'].''.$row['airline'].' 328 | 344 |
348 | 349 |
350 |
351 | 352 |
353 |
354 | 365 |

Flights Arrived Today

366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 392 | 393 | '.$row['flight_id'].' 394 | 395 | 396 | 397 | 398 | 399 | ' ; }} ?> 400 | 401 |
#ArrivalDepartureDestinationSourceAirline
'.$row['arrivale'].''.$row['departure'].''.$row['Destination'].''.$row['source'].''.$row['airline'].'
402 | 403 |
404 |
405 |
406 | 407 |
408 | 409 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 5 | 601 | alert("Select different value for departure city and arrival city")'; 605 | } else if($_GET['error'] === 'seldep') { 606 | echo ''; 607 | } else if($_GET['error'] === 'selarr') { 608 | echo""; 609 | } 610 | } 611 | ?> 612 | 613 | 615 | 616 | 617 |
618 |

619 | 621 | Online Flight Booking

622 |
623 |
624 |
    625 |
  • Round Trip
  • 626 |
  • One way
  • 627 |
628 |
629 |
630 |
631 |
632 | 633 |
634 |

From

635 | 642 | '; 643 | while ($row = mysqli_fetch_assoc($result)) { 644 | echo ''; 646 | } 647 | ?> 648 | 649 |
650 |
651 |

To

652 | 659 | '; 660 | while ($row = mysqli_fetch_assoc($result)) { 661 | echo ''; 663 | } 664 | ?> 665 | 666 |
667 |
668 |
669 |
670 |

Depart

671 | 672 |
673 |
674 |

Return

675 | 676 |
677 |
678 |
679 |
680 |

Class

681 | 686 | 687 |
688 |
689 |
690 |
691 |

Passenger

692 |
693 |
694 |
 
695 |
1
696 | 698 |
 
699 |
700 |
701 |
702 |
703 |
704 |
705 | 706 |
707 |
708 |
709 |
710 | 711 |
712 |

From

713 | 720 | '; 721 | while ($row = mysqli_fetch_assoc($result)) { 722 | echo ''; 724 | } 725 | ?> 726 | 727 |
728 |
729 |

To

730 | 737 | '; 738 | while ($row = mysqli_fetch_assoc($result)) { 739 | echo ''; 741 | } 742 | ?> 743 | 744 |
745 |
746 |
747 |
748 |

Depart

749 | 751 |
752 |
753 |
754 |

Class

755 | 760 | 761 |
762 |
763 |
764 |
765 |

Passenger

766 |
767 |
768 |
 
769 |
1
770 | 772 |
 
773 |
774 |
775 |
776 |
777 |
778 |
779 | 780 |
781 |
782 |
783 |
784 |
785 |
786 | 787 | 823 |
824 | 827 | 828 | 829 |
830 |
831 |
832 |
833 |
834 |
835 |
836 | 837 |
838 |
839 |
840 |
841 |
Top Destinations
842 |
843 |

What's on your travel bucket list?

844 |
845 |
846 |
847 |
848 | 849 |
850 |
851 |
852 |
853 |
The Best Prices
854 |
855 |

Visit your favourite places at a reasonable price

856 |
857 |
858 |
859 |
860 | 861 |
862 |
863 |
864 |
865 |
Amazing Services
866 |
867 |

Great interactions begin with knowing your customers wants and needs.

868 |
869 |
870 |
871 |
872 |
873 |
874 |
875 |
876 |
877 |
878 | 879 | 880 |
881 | 890 | 891 | 892 | 893 | 894 | 903 | 918 | 919 | 920 | 935 | --------------------------------------------------------------------------------