- Make all dashboard cards clickable (13 cards total) for better UX - Fix logout confirmation for kaur level with robust jQuery handler - Download all external libraries locally for offline capability: * Ionicons CSS + fonts * Cropper.js v1.5.13 (CSS + JS) * Chart.js v3.9.1 (fixed chart display) * jscanify library * Google Fonts - Source Sans Pro (CSS + TTF) * OpenCV.js v4.7.0 (8.75MB) - Update all CDN references to local paths in index.php and login.php - Add vendor directory exception to .gitignore - Improve session destruction in logout.php - Add console debugging for chart initialization
38 lines
823 B
PHP
38 lines
823 B
PHP
<?php
|
|
// Turn off error reporting to prevent warnings
|
|
error_reporting(0);
|
|
|
|
// Prevent any output
|
|
ob_start();
|
|
|
|
// Start session if not already started
|
|
if (session_status() === PHP_SESSION_NONE) {
|
|
@session_start();
|
|
}
|
|
|
|
// Clear session data
|
|
$_SESSION = [];
|
|
|
|
// Delete session cookie
|
|
if (ini_get("session.use_cookies")) {
|
|
$params = session_get_cookie_params();
|
|
setcookie(session_name(), '', time() - 3600,
|
|
$params["path"], $params["domain"],
|
|
$params["secure"], $params["httponly"]
|
|
);
|
|
}
|
|
|
|
// Destroy session if active
|
|
if (session_status() === PHP_SESSION_ACTIVE) {
|
|
@session_destroy();
|
|
}
|
|
|
|
// Clear output buffer
|
|
ob_end_clean();
|
|
|
|
// Set headers
|
|
header("Cache-Control: no-cache, no-store, must-revalidate");
|
|
header("Pragma: no-cache");
|
|
header("Expires: 0");
|
|
header("Location: login.php");
|
|
exit(); |