diff --git a/air.jpg b/air.jpg new file mode 100644 index 0000000..9f6eba4 Binary files /dev/null and b/air.jpg differ diff --git a/authenticate.php b/authenticate.php new file mode 100644 index 0000000..a358cc1 --- /dev/null +++ b/authenticate.php @@ -0,0 +1,53 @@ +prepare('SELECT id, password FROM accounts WHERE username = ?')) { + // Bind parameters (s = string, i = int, b = blob, etc), in our case the username is a string so we use "s" + $stmt->bind_param('s', $_POST['username']); + $stmt->execute(); + // Store the result so we can check if the account exists in the database. + $stmt->store_result(); + if ($stmt->num_rows > 0) { + $stmt->bind_result($id, $password); + $stmt->fetch(); + // Account exists, now we verify the password. + // Note: remember to use password_hash in your registration file to store the hashed passwords. + if (password_verify($_POST['password'], $password)) { + // Verification success! User has logged-in! + // Create sessions, so we know the user is logged in, they basically act like cookies but remember the data on the server. + session_regenerate_id(); + $_SESSION['loggedin'] = TRUE; + $_SESSION['name'] = $_POST['username']; + $_SESSION['id'] = $id; + header('Location: home.php'); + } else { + // Incorrect password + echo 'Incorrect username and/or password!'; + } + } else { + // Incorrect username + echo 'Incorrect username and/or password!'; + } + + $stmt->close(); +} +?> + diff --git a/display.php b/display.php new file mode 100644 index 0000000..a5aad25 --- /dev/null +++ b/display.php @@ -0,0 +1,88 @@ + + + +
+ + + +Sno. | +Maintenance Type | +Engineer Assigned | +Flight Hours | +Flight Number | +Maintenance Schedule Date | +Options | +'.$id.' | +'.$name.' | +'.$engg.' | +'.$fhr.' | +'.$fno.' | +'.$date.' | ++ + + | + '; + + } +} + +?> + + +
---|
Welcome to ABC Air Official Website!
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.
Aeronautical Engineer ; ID : 100002
+
Aerospace Engineer ; ID : 100003
+
Astronautical Engineer ; ID : 100004
+
Avionics Engineer ; ID : 100005
+
Mechanical Engineer ; ID : 100006
Airframe 1 Log Details :
+Flight Hours : | +400 - 600 Hours | +
Maintanence Date : | +=$mt1?> | +
Assigned Engineer : | +=$eng1?> | +
Airframe 2 Log Details :
+Flight Hours | +400 - 600 Hours | +
Maintanence Date : | +=$mt2?> | +
Assigned Engineer : | +=$eng2?> | +
Airframe 3 Log Details :
+Flight Hours | +600 - 700 Hours | +
Maintanence Date : | +=$mt3?> | +
Assigned Engineer : | +=$eng3?> | +
Airframe 4 Log Details :
+Flight Hours | +700 - 800 Hours | +
Maintanence Date : | +=$mt4?> | +
Assigned Engineer : | +=$eng4?> | +
Airframe 5 Log Details :
+Flight Hours | +750 - 900 Hours | +
Maintanence Date : | +=$mt5?> | +
Assigned Engineer : | +=$eng5?> | +