<?php
ob_start();
session_start();
$pageTitle = 'alliwan : ADMIN LOGIN';
include '../set/connect.php';
include 'assets/includes/functions/function.php';
include 'assets/includes/template/header.php';
?>
<?php
if(isset($_SESSION['user_liwwan_admin_2023930']) AND ($_SESSION['type'] == "manager_session_alliwan") ){
header('Location:dashboard.php');
exit;
}
?>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$username = $_POST['username'];
$password = $_POST['password'];
$msg='';
// check If The User Exist IN Database
$stmt1 = $conn->prepare("SELECT adminid, password, username, fullname FROM royaladmin WHERE active = 1 AND username =?");
/*manager login*/
$stmt1->bindValue(1,$username,PDO::PARAM_STR);
$stmt1->execute();
$data = $stmt1->fetch(PDO::FETCH_ASSOC);
$user= $data['username'];
$hashpass= $data['password'];
$veryfi= password_verify($password, $hashpass);
if ($veryfi){
$_SESSION['user_liwwan_admin_2023930'] = $username; //register session name
$_SESSION['uid'] = $data['adminid'];
$_SESSION['type'] = "manager_session_alliwan";
$_SESSION['name'] = $data['fullname'];
header('location: dashboard.php'); //redirect to dashboard page
exit();
}else{$msg = " خطأ : إسم المستخدم أو الباسوورد غير صحيح";}
}
?>
<!-- Sing in Form -->
<section class="sign-in">
<div class="container">
<div class="signin-content">
<div class="row">
<div class="col-2"></div>
<div class="col-lg-5">
<h4 class="form-title text-center text-dark fw-bold">تسجيل الدخول</h4>
<hr class="my-custom-login-hr rounded-pill">
<?php if(!empty($msg)) {
echo '<hr>' . '<div class="bg-danger text-light py-2 px-1 rounded text-center fw-bold">';
echo $msg . '<br>';
echo '</div>' . '<hr>'; }?>
<div class="signin-form m-auto py-5 px-3">
<form method="POST" class="register-form" id="login-form">
<div class="form-group">
<label for="username"><i class="zmdi zmdi-account material-icons-name"></i></label>
<input type="text" name="username" id="username" placeholder="إسم المستخدم"/>
</div>
<div class="form-group">
<label for="password"><i class="zmdi zmdi-lock"></i></label>
<input type="password" name="password" id="password" placeholder="كلمة المرور"/>
</div>
<div class="form-group form-button">
<input type="submit" name="signin" id="signin" class="form-submit" value="دخول"/>
</div>
</form>
</div>
</div>
<div class="col-lg-3 sign-in-div ">
<div class="signin-image m-auto">
<img src="images/logo2.jpg" alt="singin" class="img-fluid m-auto mx-4">
<p class="s_co_name fw-bold text-center w-75 mt-5 m-auto rounded py-2"> Alliwan </p>
</div>
</div>
<div class="col-2"></div>
</div>
</div>
</div>
</section>
<?php
ob_end_flush();| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| assets | Folder | 0755 |
|
|
| images | Folder | 0755 |
|
|
| ac_citycalc.php | File | 15.27 KB | 0644 |
|
| ac_edit_admin.php | File | 2.67 KB | 0644 |
|
| ac_edit_admininfo.php | File | 4.36 KB | 0644 |
|
| ac_edit_imgs.php | File | 34.27 KB | 0644 |
|
| ac_edit_pr.php | File | 10.72 KB | 0644 |
|
| ac_projects.php | File | 5.24 KB | 0644 |
|
| ac_workshops.php | File | 18.62 KB | 0644 |
|
| add_admin.php | File | 4.32 KB | 0644 |
|
| add_customer_template.php | File | 11.1 KB | 0644 |
|
| add_project.php | File | 17.22 KB | 0644 |
|
| add_workshop.php | File | 5.15 KB | 0644 |
|
| admins.php | File | 4.81 KB | 0644 |
|
| citycalc.php | File | 5.01 KB | 0644 |
|
| cons_orders.php | File | 4.51 KB | 0644 |
|
| custommer_templates.php | File | 4.59 KB | 0644 |
|
| dashboard.php | File | 4.11 KB | 0644 |
|
| edit_cus_template.php | File | 11.74 KB | 0644 |
|
| editadminpassword.php | File | 5.17 KB | 0644 |
|
| error_log | File | 309.84 KB | 0644 |
|
| imgs.php | File | 18.17 KB | 0644 |
|
| index.php | File | 3.19 KB | 0644 |
|
| init.php | File | 183 B | 0644 |
|
| logout.php | File | 186 B | 0644 |
|
| newsletter.php | File | 3.13 KB | 0644 |
|
| projects.php | File | 13.89 KB | 0644 |
|
| projects_card.php | File | 13.29 KB | 0644 |
|
| show.php | File | 8.81 KB | 0644 |
|
| workshop_details.php | File | 12.08 KB | 0644 |
|
| workshops.php | File | 4.63 KB | 0644 |
|