Edit login.php via Editor

This commit is contained in:
Flatlogic Bot 2026-02-27 18:24:16 +00:00
parent 2900795488
commit e70adf8720

View File

@ -7,6 +7,10 @@ if (isLoggedIn()) {
$error = ''; $error = '';
// Fetch charity settings
$stmt = db()->query("SELECT * FROM charity_settings WHERE id = 1");
$charity = $stmt->fetch();
if ($_SERVER['REQUEST_METHOD'] === 'POST') { if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$username = trim($_POST['username'] ?? ''); $username = trim($_POST['username'] ?? '');
$password = $_POST['password'] ?? ''; $password = $_POST['password'] ?? '';
@ -33,10 +37,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
<div class="row justify-content-center align-items-center" style="min-height: 80vh;"> <div class="row justify-content-center align-items-center" style="min-height: 80vh;">
<div class="col-md-4"> <div class="col-md-4">
<div class="card p-4"> <div class="card p-4 shadow-sm border-0">
<div class="text-center mb-4"> <div class="text-center mb-4">
<h3 class="fw-bold">تسجيل الدخول</h3> <?php if ($charity['charity_logo']): ?>
<p class="text-muted">بريد الجمعية الخيرية</p> <img src="<?= htmlspecialchars($charity['charity_logo']) ?>" alt="Logo" class="mb-3" style="max-height: 100px;">
<?php endif; ?>
<h3 class="fw-bold"><?= htmlspecialchars($charity['charity_name'] ?? 'تسجيل الدخول') ?></h3>
<p class="text-muted">نظام المراسلات</p>
</div> </div>
<?php if ($error): ?> <?php if ($error): ?>
@ -48,12 +55,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
<label for="username" class="form-label">اسم المستخدم</label> <label for="username" class="form-label">اسم المستخدم</label>
<input type="text" class="form-control" id="username" name="username" required autocomplete="username"> <input type="text" class="form-control" id="username" name="username" required autocomplete="username">
</div> </div>
<div class="mb-4"> <div class="mb-3">
<label for="password" class="form-label">كلمة المرور</label> <div class="d-flex justify-content-between">
<label for="password" class="form-label">كلمة المرور</label>
<a href="forgot_password.php" class="text-decoration-none small text-primary">نسيت كلمة المرور؟</a>
</div>
<input type="password" class="form-control" id="password" name="password" required autocomplete="current-password"> <input type="password" class="form-control" id="password" name="password" required autocomplete="current-password">
</div> </div>
<div class="d-grid"> <div class="d-grid mt-4">
<button type="submit" class="btn btn-primary btn-lg">دخول</button> <button type="submit" class="btn btn-dark btn-lg">دخول</button>
</div> </div>
</form> </form>
</div> </div>