diff --git a/contactUs.php b/contactUs.php new file mode 100644 index 0000000..ec3e3c7 --- /dev/null +++ b/contactUs.php @@ -0,0 +1,365 @@ + + + + + + Contact Us + + + + + +
+ Logo +

Contact Us

+ +
+ +
+
+

Get in Touch

+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+ +
+ +
+ +
+

Contact Information

+

Address: 1234 Street Name, City, Country

+

Phone: +123 456 7890

+

Email: info@example.com

+

Office Hours: Monday to Friday, 9am - 5pm

+
+
+ + + + + diff --git a/db_connect.php b/db_connect.php index b9b3bcb..2819688 100644 --- a/db_connect.php +++ b/db_connect.php @@ -1,3 +1,14 @@ - -$conn= new mysqli('localhost','root','','evaluation_db')or die("Could not connect to mysql".mysqli_error($con)); + +getMessage()); +} diff --git a/login.php b/login.php index 3ece376..6f81cc6 100644 --- a/login.php +++ b/login.php @@ -2,21 +2,45 @@ query("SELECT * FROM system_settings")->fetch_array(); foreach ($system as $k => $v) { $_SESSION['system'][$k] = $v; } -// } + ob_end_flush(); -?> -prepare("SELECT * FROM `users` WHERE `email` = ?"); + $stmt->bind_param('s', $email); + $stmt->execute(); + $result = $stmt->get_result(); + if ($result->num_rows > 0) { + $data = $result->fetch_assoc(); + if (password_verify($password, $data['password'])) { + foreach ($data as $k => $v) { + if ($k != 'password') { + $_SESSION[$k] = $v; + } + } + $_SESSION['msg']['success'] = "You have logged in successfully."; + header('location: ./'); + exit; + } else { + $error = "Incorrect Email or Password"; + } + } else { + $error = "Incorrect Email or Password"; + } +} ?> @@ -24,36 +48,42 @@ .login-logo { text-align: center; margin-bottom: 20px; - /* Adjust as needed */ } - .login-logo img { width: 200px; - /* Set the width as per your requirements */ height: auto; - /* This maintains the image's aspect ratio */ + } + .message-error { + color: red; + } + .message-success { + color: green; } -

COER AQMS

- - -
- - - + - diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..6218305 --- /dev/null +++ b/logout.php @@ -0,0 +1,4 @@ +prepare("SELECT * FROM `users` where md5(`id`) = ?"); + $stmt->bind_param('s', $uid); + $stmt->execute(); + $result = $stmt->get_result(); + if($result->num_rows > 0){ + $data = $result->fetch_assoc(); + $password = password_hash($new_password, PASSWORD_DEFAULT); + $update = $conn->query("UPDATE `users` set `password` = '{$password}'"); + if($update){ + $_SESSION['msg']['success'] = "New Password has been saved successfully."; + header('location:login.php'); + exit; + }else{ + $error = 'Password has failed to update.'; + } + }else{ + $error = "User is registered on this website."; + } + } +} +?> + + + + +

Reset Password

+
+
+
Please Fill all the required fields
+ +
+ + +
+ +
+ +
+
+ + " autofocus required="required"> +
+
+ + " required="required"> +
+ +
+
+ + diff --git a/reset_mail-template.php b/reset_mail-template.php new file mode 100644 index 0000000..de020cd --- /dev/null +++ b/reset_mail-template.php @@ -0,0 +1,265 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+ + + +
+
+
+ + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+
+ + + +
+
+
+ + + +
+
+
+ +
+
+
+ + +
+
+
+ + + +
+ + + + +