diff --git a/README.md b/README.md index 68789d1..be3f883 100644 --- a/README.md +++ b/README.md @@ -1 +1,20 @@ -# ABC_Air_Secure_Design \ No newline at end of file +# Airline Maintenance System +ABC Air is a small aircraft service company that carry out the aircraft maintenance for the civil operators. The +company records the total number of flying hours for each aircraft, servicing time, man-hours of the engineers +and related maintenance + +Our online system has the following features:- + + Create records for a new air frame + Log Flight hours for an air frame + Log scheduled maintenance for an air frame + Maintain a list of engineers + Assign maintenance tasks to engineers. + + +Note: Only Admin access can make + + +This project was implemented using HTML & CSS for the front-end and PHP for the back-end. The database was created and updated using MySQL. + + diff --git a/add_aircraft_details.php b/add_aircraft_details.php new file mode 100644 index 0000000..afbc71b --- /dev/null +++ b/add_aircraft_details.php @@ -0,0 +1,95 @@ + + + + + Add aircraft Details for Maintenance + + + + + + + +

+ ABC aircraft maintenance +

+
+ +
+
+

ENTER THE AIRCRAFT DETAILS for

+ The Flight Schedule has been successfully added. +
+
"; + } + else if(isset($_GET['msg']) && $_GET['msg']=='failed') + { + echo "*Invalid Flight Schedule Details, please enter again. +
+
"; + } + ?> + + + + + + + +
Aircraft Number
+ +
+
+ + + + + + + + + +
Arrival of aircraft Datecompletion maintenance Date
+ +
+
+ + + + + + + +
Jet ID
+ +
+
+ +
+ + + \ No newline at end of file diff --git a/add_aircraft_details_form_handler.php b/add_aircraft_details_form_handler.php new file mode 100644 index 0000000..d64f4e2 --- /dev/null +++ b/add_aircraft_details_form_handler.php @@ -0,0 +1,170 @@ + + + + Add Aircraft Schedule Details + + + "; + foreach($data_missing as $missing) + { + echo $missing ."
"; + } + } + } + else + { + echo "Submit request not received"; + } + ?> + + \ No newline at end of file diff --git a/add_jet_details.php b/add_jet_details.php new file mode 100644 index 0000000..e0cc384 --- /dev/null +++ b/add_jet_details.php @@ -0,0 +1,85 @@ + + + + + Add Aircrafts Details + + + + + + + +

+ AADITH AIRLINES +

+
+ +
+
+

ENTER THE AIRCRAFTS DETAILS

+
+ The Aircraft has been successfully added. +

"; + } + else if(isset($_GET['msg']) && $_GET['msg']=='failed') + { + echo "*Jet ID already exists, please enter a new Jet ID. +

"; + } + ?> + + + + + + + +
Enter a valid Jet ID
+
+ + + + + + + +
Enter the Jet Type/Model
+
+ + + + + + + +
Enter the total capacity of the Jet
+
+
+ +
+
+ + \ No newline at end of file diff --git a/add_jet_details_form_handler.php b/add_jet_details_form_handler.php new file mode 100644 index 0000000..f8fba51 --- /dev/null +++ b/add_jet_details_form_handler.php @@ -0,0 +1,84 @@ + + + + Add Aircraft Details + + + "; + // mysqli_stmt_bind_result($stmt,$cnt); + // mysqli_stmt_fetch($stmt); + // echo $cnt; + mysqli_stmt_close($stmt); + mysqli_close($dbc); + /* + $response=@mysqli_query($dbc,$query); + */ + if($affected_rows==1) + { + echo "Successfully Submitted"; + header("location: add_jet_details.php?msg=success"); + } + else + { + echo "Submit Error"; + echo mysqli_error(); + header("location: add_jet_details.php?msg=failed"); + } + } + else + { + echo "The following data fields were empty!
"; + foreach($data_missing as $missing) + { + echo $missing ."
"; + } + } + } + else + { + echo "Submit request not received"; + } + ?> + + \ No newline at end of file diff --git a/add_ticket_details_form_handler.php b/add_ticket_details_form_handler.php new file mode 100644 index 0000000..5d894ef --- /dev/null +++ b/add_ticket_details_form_handler.php @@ -0,0 +1,148 @@ + + + + Add Ticket Details + + + '; + // mysqli_stmt_bind_result($stmt,$cnt); + // mysqli_stmt_fetch($stmt); + // echo $cnt; + /* + $response=@mysqli_query($dbc,$query); + */ + if($affected_rows==1) + { + echo "Successfully Submitted
"; + } + else + { + echo "Submit Error"; + echo mysqli_error(); + } + + for($i=1;$i<=$no_of_pass;$i++) + { + echo "frequent_flier_no=".$_POST['pass_ff_id'][$i-1].'
'; + if($_POST['pass_ff_id'][$i-1]=='') + $_POST['pass_ff_id'][$i-1]=NULL; + else + { + $query="SELECT count(*) from Customer c, Frequent_Flier_Details f WHERE c.name=? and f.frequent_flier_no=? and c.customer_id=f.customer_id"; + $stmt=mysqli_prepare($dbc,$query); + mysqli_stmt_bind_param($stmt,"ss",$_POST['pass_name'][$i-1],$_POST['pass_ff_id'][$i-1]); + mysqli_stmt_execute($stmt); + $affected_rows=mysqli_stmt_affected_rows($stmt); + mysqli_stmt_bind_result($stmt,$cnt); + mysqli_stmt_fetch($stmt); + echo "cnt=".$cnt."
"; + mysqli_stmt_close($stmt); + + if($cnt==1) + { + $query="UPDATE Frequent_Flier_Details SET mileage=mileage+? where frequent_flier_no=?"; + $stmt=mysqli_prepare($dbc,$query); + mysqli_stmt_bind_param($stmt,"is",$ff_mileage,$_POST['pass_ff_id'][$i-1]); + mysqli_stmt_execute($stmt); + $affected_rows=mysqli_stmt_affected_rows($stmt); + echo $affected_rows.'
'; + mysqli_stmt_close($stmt); + } + } + + $query="INSERT INTO Passengers (passenger_id,pnr,name,age,gender,meal_choice,frequent_flier_no) VALUES (?,?,?,?,?,?,?)"; + $stmt=mysqli_prepare($dbc,$query); + + if($_POST['pass_meal'][$i-1]=='yes') + $total_no_of_meals++; + mysqli_stmt_bind_param($stmt,"ississs",$i,$pnr,$_POST['pass_name'][$i-1],$_POST['pass_age'][$i-1],$_POST['pass_gender'][$i-1],$_POST['pass_meal'][$i-1],$_POST['pass_ff_id'][$i-1]); + mysqli_stmt_execute($stmt); + $affected_rows=mysqli_stmt_affected_rows($stmt); + echo 'Passenger added '.$affected_rows.'
'; + // mysqli_stmt_bind_result($stmt,$cnt); + // mysqli_stmt_fetch($stmt); + // echo $cnt; + } + $_SESSION['total_no_of_meals']=$total_no_of_meals; + mysqli_stmt_close($stmt); + mysqli_close($dbc); + + header("location: payment_details.php"); + +// else +// { +// echo "Submit Error"; +// echo mysqli_error(); +// } +// } +// else +// { +// echo "The following data fields were empty!
"; +// foreach($data_missing as $missing) +// { +// echo $missing ."
"; +// } +// } +// } + } + else + { + echo "Submit request not received"; + } + ?> + + \ No newline at end of file diff --git a/admin_homepage.php b/admin_homepage.php new file mode 100644 index 0000000..53d3bc6 --- /dev/null +++ b/admin_homepage.php @@ -0,0 +1,46 @@ + + + + + Welcome Administrator + + + + + + +

+ ABC aircraft Maintenance

+
+ +
+

Welcome Administrator!

+ + + + + + + + + + + + + + + + +
View List of aircraft booked for maintenance +
Add aircraft for scheduled maintenance +
Delete Aircraft Scheduled for mainetenance +
Add Aircrafts Details +
+ + \ No newline at end of file diff --git a/admin_ticket_message.php b/admin_ticket_message.php new file mode 100644 index 0000000..000a42b --- /dev/null +++ b/admin_ticket_message.php @@ -0,0 +1,26 @@ + + + + + View Available Flights + + + + + + +

+ AADITH AIRLINES +

+
+ +
+

Oops! You need to login with a Customer Account to Book Tickets

+ + \ No newline at end of file diff --git a/admin_view_booked_tickets.php b/admin_view_booked_tickets.php new file mode 100644 index 0000000..9e5b141 --- /dev/null +++ b/admin_view_booked_tickets.php @@ -0,0 +1,62 @@ + + + + + View Aircraft Scheduled for Maintenance + + + + + + + +

+ ABC Airlines +

+
+ +
+
+

View Aircraft Scheduled for Maintenance

+
+ + + + + + + + + +
Enter the Aircraft No.Enter the Date for maintenance
+
+
+ +
+
+ + \ No newline at end of file diff --git a/admin_view_booked_tickets_form_handler.php b/admin_view_booked_tickets_form_handler.php new file mode 100644 index 0000000..879ba32 --- /dev/null +++ b/admin_view_booked_tickets_form_handler.php @@ -0,0 +1,121 @@ + + + + + View Aircraft Scheduled for Maintenance + + + + + + + +

+ ABC AIRLINES +

+
+ +
+

LIST OF Aircraft Scheduled for Maintenance

+ No booked aircraft information is available!"; + } + else + { + echo " + + + "; + while(mysqli_stmt_fetch($stmt)) { + echo " + + + + + + + "; + } + echo "
PNRDate of ReservationClass
".$pnr."".$date_of_reservation."".$class."".$no_of_passengers."".$payment_id."".$customer_id."

"; + } + mysqli_stmt_close($stmt); + mysqli_close($dbc); + // else + // { + // echo "Submit Error"; + // echo mysqli_error(); + // } + } + else + { + echo "The following data fields were empty!
"; + foreach($data_missing as $missing) + { + echo $missing ."
"; + } + } + } + else + { + echo "Submit request not received"; + } + ?> + + \ No newline at end of file diff --git a/cancel_booked_tickets.php b/cancel_booked_tickets.php new file mode 100644 index 0000000..c0dbea9 --- /dev/null +++ b/cancel_booked_tickets.php @@ -0,0 +1,67 @@ + + + + + Cancel Booked Tickets + + + + + + + +

+ AADITH AIRLINES +

+
+ +
+
+

CANCEL BOOKED TICKETS

+ *Invalid PNR, please enter PNR again +
+
"; + } + ?> + + + + + + + +
Enter the PNR
+
+ +
+ + + \ No newline at end of file diff --git a/delete_flight_details.php b/delete_flight_details.php new file mode 100644 index 0000000..cb32fac --- /dev/null +++ b/delete_flight_details.php @@ -0,0 +1,76 @@ + + + + + Delete Flight Schedule Details + + + + + + + +

+ ABC aircraft management +

+
+ +
+
+

ENTER THE FLIGHT SCHEDULE TO BE DELETED

+
+ The Flight Schedule has been successfully deleted. +
+
"; + } + else if(isset($_GET['msg']) && $_GET['msg']=='failed') + { + echo "*Invalid Flight No./Departure Date, please enter again. +
+
"; + } + ?> + + + + + + + + + +
Enter a valid Flight No.Enter the Departure Date
+
+
+ +
+
+ + \ No newline at end of file diff --git a/delete_flight_details_form_handler.php b/delete_flight_details_form_handler.php new file mode 100644 index 0000000..f45c1c2 --- /dev/null +++ b/delete_flight_details_form_handler.php @@ -0,0 +1,74 @@ + + + + Delete Flight Schedule Details + + + "; + // mysqli_stmt_bind_result($stmt,$cnt); + // mysqli_stmt_fetch($stmt); + // echo $cnt; + mysqli_stmt_close($stmt); + mysqli_close($dbc); + /* + $response=@mysqli_query($dbc,$query); + */ + if($affected_rows==1) + { + echo "Successfully Deleted"; + header("location: delete_flight_details.php?msg=success"); + } + else + { + echo "Submit Error"; + echo mysqli_error(); + header("location: delete_flight_details.php?msg=failed"); + } + } + else + { + echo "The following data fields were empty!
"; + foreach($data_missing as $missing) + { + echo $missing ."
"; + } + } + } + else + { + echo "Delete request not received"; + } + ?> + + \ No newline at end of file diff --git a/flightcheck.php b/flightcheck.php new file mode 100644 index 0000000..26c4217 --- /dev/null +++ b/flightcheck.php @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + +
"; + +
+
+
+
+ + + +
+ Airport Authority Of India
+ Flight Running on [ From : To : ] +
+ +
+
+
+ ______________________________________________________________________ +
+ + + + + + + + +    Jet ID: + + + + + + + + + + + +
   + + + + + + + + + +
+ "; + echo"
"; + } + ?> +
Flight +
From                 +
Arrival Date Price Economy Class Price Business class
+
+
+
+ +
+
Check other Date
+ + + + + + + + + + + \ No newline at end of file diff --git a/flightlist.php b/flightlist.php new file mode 100644 index 0000000..aa1b157 --- /dev/null +++ b/flightlist.php @@ -0,0 +1,121 @@ +'; + echo 'alert("No Flight")'; + echo ''; + } +if($res0) + { + $_SESSION['user']=$id; + header('location:flightcheck.php'); + } + else + { + + echo ''; + } + + + + if($res1) + { + $_SESSION['user']=$id; + header('location:flightcheck.php'); + } + else + { + + echo ''; + } + } + else + { + echo ''; + + } +} +?> + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+
+ + + + +
+
+


+
+
+
+
+ +
+ +
+
+
+ + + +
+ + diff --git a/home_page.php b/home_page.php new file mode 100644 index 0000000..f3704c5 --- /dev/null +++ b/home_page.php @@ -0,0 +1,63 @@ + + + + + Welcome to ABC Airlines + + + + + + +

+ ABC Aircraft Maintenance +

+
+ +
+
+
ABC Aircraft Maintenance !
+ +
+ + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..f103a7a --- /dev/null +++ b/index.html @@ -0,0 +1,67 @@ + + + + + + + + + + + +
+
+
+
+ Home    +Login   +Sign Up   +Contact us   +About Us   + + + +
+ + + +
+ +
+
+
+

News & Announcements

+
+ + +

How to Schedule Maintenance for Aircraft


+

Step 1: Login
+Step 2: Then Login with your Admin credetials (ie. Username and password).
+Step 3: Enter Details of the Aircraft
+Step 4: Select the Lead engineer (if available).
+ + +


+ +
+ more news... + +
+ +
+

About ABC Airline

+

ABC airline is a company that provides aircraft maintenance services for the top aircraft company. ABC Airlines utilize aircraft to supply these services, and may form partnerships or alliances with other airlines for codeshare agreements.

+
+ +
+
2019 All Right Reserved. Airline [ Give credit to author ]
+
+
+ + + + + + + + \ No newline at end of file diff --git a/login_handler.php b/login_handler.php new file mode 100644 index 0000000..bc7af8f --- /dev/null +++ b/login_handler.php @@ -0,0 +1,118 @@ + + + Login Handler + + + "; + $_SESSION['login_user']=$user_name; + echo $_SESSION['login_user']." is logged in"; + header("location: customer_homepage.php"); + } + else + { + echo "Login Error"; + session_destroy(); + header('location:login_page.php?msg=failed'); + } + } + else if($user_type=='Administrator') + { + require_once('Database Connection file/mysqli_connect.php'); + $query="SELECT count(*) FROM Admin where admin_id=? and pwd=?"; + $stmt=mysqli_prepare($dbc,$query); + mysqli_stmt_bind_param($stmt,"ss",$user_name,$pass_word); + mysqli_stmt_execute($stmt); + mysqli_stmt_bind_result($stmt,$cnt); + mysqli_stmt_fetch($stmt); + //echo $cnt; + mysqli_stmt_close($stmt); + mysqli_close($dbc); + /*$affected_rows=mysqli_stmt_affected_rows($stmt); + $response=@mysqli_query($dbc,$query); + echo $affected_rows; + */ + if($cnt==1) + { + echo "Logged in
"; + $_SESSION['login_user']=$user_name; + echo $_SESSION['login_user']." is logged in"; + header('location:admin_homepage.php'); + } + else + { + echo "Login Error"; + session_destroy(); + header('location:login_page.php?msg=failed'); + } + } + } + else + { + echo "The following data fields were empty
"; + foreach($data_missing as $missing) + { + echo $missing ."
"; + } + } + } + else + { + echo "Submit request not received"; + } + ?> + + \ No newline at end of file diff --git a/login_page.php b/login_page.php new file mode 100644 index 0000000..aea156c --- /dev/null +++ b/login_page.php @@ -0,0 +1,66 @@ + + + + + Account Login + + + + + + + +

+ ABC Aircraft Maintenance

+
+ +
+
+
+
+
+
+ Login Details:- + Username:
+

+ Password:
+

+ User Type:
+ Customer Administrator +
+ + Invalid Username/Password +

"; + } + ?> + +
+
+ Create New User Account? +
+ + \ No newline at end of file diff --git a/logout_handler.php b/logout_handler.php new file mode 100644 index 0000000..a089a7d --- /dev/null +++ b/logout_handler.php @@ -0,0 +1,12 @@ + + + Logout Handler + + + + + \ No newline at end of file diff --git a/new_user_form_handler.php b/new_user_form_handler.php new file mode 100644 index 0000000..f621d4a --- /dev/null +++ b/new_user_form_handler.php @@ -0,0 +1,102 @@ + + + Add New User + + + "; + // mysqli_stmt_bind_result($stmt,$cnt); + // mysqli_stmt_fetch($stmt); + // echo $cnt; + mysqli_stmt_close($stmt); + mysqli_close($dbc); + /* + $response=@mysqli_query($dbc,$query); + */ + if($affected_rows==1) + { + header('location:user_reg_success.php'); + } + else + { + echo "Submit Error"; + echo mysqli_error(); + } + } + else + { + echo "The following data fields were empty!
"; + foreach($data_missing as $missing) + { + echo $missing ."
"; + } + } + } + else + { + echo "Submit request not received"; + } + ?> + + \ No newline at end of file diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..de64372 --- /dev/null +++ b/styles.css @@ -0,0 +1,130 @@ +.page + { + width:auto; + height:auto; + border=style:groove; + + + } + + + +.headerpart + { + width:auto; + height:200px; + border=style:groove; + background-color:rgb(12,100,198); + background-image:url('images/maxxx.jpg'); + background-repeat:no-repeat; + + } + + +.linkspart +{ + width:auto; + height:30px; + margin-top:5px; + background-color:rgb(12,100,198); + border=style:groove; + +} + + +.linkspart a +{ + color:rgb(245,246,251); + text-decoration:none; + +} + +.linkspart a:hover +{ + background-color:rgb(245,246,251); + color:rgb(12,100,198); + +} + + +.bodypart +{ + width:1325px; + height:600px; + border-style:groove; + margin-top:5px; + + +} + + +.bodypart .imagepart +{ + width:650px; + height:270px; + border-style:groove; + background-image:url('images/maxxxx.jpg'); + background-repeat:no-repeat; + display:inline-block; + + +} + +.bodypart .newspart h2 +{ + color:green; + margin-left:180px; +} + + +.bodypart .newspart +{ + + width:650px; + height:520px; + border-style:groove; + float:right; + + +} + + + +.bodypart .newspart .news +{ + + width:600px; + height:400px + + + +} + + + +.bodypart .newspart .news h4 +{ +color:blue; + +} + + +.bodypart h3 +{ +color:blue; +text-align:center; + +} + + +.footerpart +{ + width:auto; + height:30px; + margin-top:5px; + background-color:rgb(12,100,198); + border=style:groove; + +} + + diff --git a/user_reg_success.php b/user_reg_success.php new file mode 100644 index 0000000..c05146a --- /dev/null +++ b/user_reg_success.php @@ -0,0 +1,40 @@ + + + + Create New User Account + + + + + + + +

+ AADITH AIRLINES +

+
+ +
+
+

New user successfully registered! Login into your account to Schedule maintenance.

+ + \ No newline at end of file diff --git a/view_flights_form_handler.php b/view_flights_form_handler.php new file mode 100644 index 0000000..4bf7785 --- /dev/null +++ b/view_flights_form_handler.php @@ -0,0 +1,213 @@ + + + + + View Available Flights + + + + + + + +

+ AADITH AIRLINES +

+
+ +
+

AVAILABLE FLIGHTS

+ =? ORDER BY departure_time"; + $stmt=mysqli_prepare($dbc,$query); + mysqli_stmt_bind_param($stmt,"sssi",$origin,$destination,$dep_date,$no_of_pass); + mysqli_stmt_execute($stmt); + mysqli_stmt_bind_result($stmt,$flight_no,$from_city,$to_city,$departure_date,$departure_time,$arrival_date,$arrival_time,$price_economy); + mysqli_stmt_store_result($stmt); + if(mysqli_stmt_num_rows($stmt)==0) + { + echo "

No flights are available !

"; + } + else + { + echo "
"; + echo " + + + + + + + + + "; + while(mysqli_stmt_fetch($stmt)) { + echo " + + + + + + + + + + "; + } + echo "
Flight No.OriginDestinationDeparture DateDeparture TimeArrival DateArrival TimePrice(Economy)Select
".$flight_no."".$from_city."".$to_city."".$departure_date."".$departure_time."".$arrival_date."".$arrival_time."₹ ".$price_economy."

"; + echo ""; + echo "
"; + } + } + else if($class="business") + { + $query="SELECT flight_no,from_city,to_city,departure_date,departure_time,arrival_date,arrival_time,price_business FROM Flight_Details where from_city=? and to_city=? and departure_date=? and seats_business>=? ORDER BY departure_time"; + $stmt=mysqli_prepare($dbc,$query); + mysqli_stmt_bind_param($stmt,"sssi",$origin,$destination,$dep_date,$no_of_pass); + mysqli_stmt_execute($stmt); + mysqli_stmt_bind_result($stmt,$flight_no,$from_city,$to_city,$departure_date,$departure_time,$arrival_date,$arrival_time,$price_business); + mysqli_stmt_store_result($stmt); + if(mysqli_stmt_num_rows($stmt)==0) + { + echo "

No flights are available !

"; + } + else + { + echo "
"; + echo " + + + + + + + + + "; + while(mysqli_stmt_fetch($stmt)) { + echo " + + + + + + + + + + "; + } + echo "
Flight No.OriginDestinationDeparture DateDeparture TimeArrival DateArrival TimePrice(Business)Select
".$flight_no."".$from_city."".$to_city."".$departure_date."".$departure_time."".$arrival_date."".$arrival_time."₹ ".$price_business."

"; + echo ""; + echo "
"; + } + } + mysqli_stmt_close($stmt); + mysqli_close($dbc); + // else + // { + // echo "Submit Error"; + // echo mysqli_error(); + // } + } + else + { + echo "The following data fields were empty!
"; + foreach($data_missing as $missing) + { + echo $missing ."
"; + } + } + } + else + { + echo "Search request not received"; + } + ?> + + \ No newline at end of file