D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
skyconb
/
newsyacine
/
Filename :
authenticate.php
back
Copy
<?php session_start(); // يجب أن تبدأ الجلسات دائمًا في البداية // *** بيانات الدخول (قم بتغييرها فوراً!) *** $admin_password = '22512890'; $input_password = $_POST['password'] ?? ''; // جلب كلمة المرور المدخلة // التحقق من كلمة المرور if (hash('sha256', $input_password) === hash('sha256', $admin_password)) { // إذا كانت صحيحة، قم بإنشاء متغير جلسة يثبت تسجيل الدخول $_SESSION['admin_logged_in'] = true; // التوجيه إلى لوحة الإدارة header("Location: admin.php"); exit(); } else { // إذا كانت غير صحيحة، أعده إلى صفحة تسجيل الدخول مع رسالة خطأ $_SESSION['error_message'] = "كلمة المرور غير صحيحة."; header("Location: login.php"); exit(); } ?>