update logout
This commit is contained in:
parent
a566b2e187
commit
9047a96f1a
@ -111,7 +111,8 @@ render_head(
|
||||
<ul class="dropdown-menu dropdown-menu-end shadow-sm">
|
||||
<li><a class="dropdown-item" href="<?= h(app_url('admin.php', ['page' => 'profile'])) ?>"><?= h(t('Platform Profile', 'ملف المنصة')) ?></a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" href="<?= h(app_url('index.php')) ?>"><?= h(t('Exit Admin', 'خروج من الإدارة')) ?></a></li>
|
||||
<li><a class="dropdown-item" href="<?= h(app_url('index.php')) ?>"><?= h(t('View Site', 'عرض الموقع')) ?></a></li>
|
||||
<li><a class="dropdown-item text-danger" href="<?= h(app_url('logout.php')) ?>"><?= h(t('Logout', 'تسجيل خروج')) ?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
12
logout.php
12
logout.php
@ -4,5 +4,13 @@ require_once __DIR__ . '/includes/auth.php';
|
||||
session_unset();
|
||||
session_destroy();
|
||||
|
||||
header('Location: login.php');
|
||||
exit;
|
||||
if (ini_get("session.use_cookies")) {
|
||||
$params = session_get_cookie_params();
|
||||
setcookie(session_name(), '', time() - 42000,
|
||||
$params["path"], $params["domain"],
|
||||
$params["secure"], $params["httponly"]
|
||||
);
|
||||
}
|
||||
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
Loading…
x
Reference in New Issue
Block a user