<?php
// ajax/refresh_session.php
session_start();
include '../config/security_config.php';

header('Content-Type: application/json');

if (isset($_SESSION['user_id'])) {
    $_SESSION['last_activity'] = time();
    echo json_encode(['success' => true, 'message' => 'Session refreshed']);
} else {
    echo json_encode(['success' => false, 'message' => 'No active session']);
}
?>