![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/.cursor-server/data/User/History/-2b6a25e1/ |
<?php
session_start();
// Check if user is admin
if (!isset($_SESSION['user_id']) || !isset($_SESSION['is_admin']) || !$_SESSION['is_admin']) {
echo "<h1>❌ Not Admin</h1>";
echo "<p>You need to be logged in as admin to test this.</p>";
echo "<p>Session data:</p>";
echo "<pre>";
print_r($_SESSION);
echo "</pre>";
exit;
}
echo "<h1>✅ Admin Access Confirmed</h1>";
echo "<p>User ID: " . $_SESSION['user_id'] . "</p>";
echo "<p>Admin: " . ($_SESSION['is_admin'] ? 'Yes' : 'No') . "</p>";
// Test security intelligence functions
echo "<h2>Testing Security Intelligence</h2>";
try {
require_once 'config/database.php';
require_once 'includes/security_tracking.php';
require_once 'admin_includes/security_intelligence.php';
echo "<p style='color: green;'>✅ All required files loaded</p>";
// Test getSecurityStats function
if (function_exists('getSecurityStats')) {
echo "<p style='color: green;'>✅ getSecurityStats function exists</p>";
$stats = getSecurityStats();
echo "<h3>Security Stats:</h3>";
echo "<pre>";
print_r($stats);
echo "</pre>";
} else {
echo "<p style='color: red;'>❌ getSecurityStats function missing</p>";
}
// Test getRecentSecurityEvents function
if (function_exists('getRecentSecurityEvents')) {
echo "<p style='color: green;'>✅ getRecentSecurityEvents function exists</p>";
$events = getRecentSecurityEvents(5);
echo "<h3>Recent Security Events:</h3>";
echo "<pre>";
print_r($events);
echo "</pre>";
} else {
echo "<p style='color: red;'>❌ getRecentSecurityEvents function missing</p>";
}
} catch (Exception $e) {
echo "<p style='color: red;'>❌ Error: " . $e->getMessage() . "</p>";
}
echo "<h2>Next Steps:</h2>";
echo "<p><a href='admin.php?tab=security'>Test Security Overview</a></p>";
echo "<p><a href='admin.php?tab=security-detailed'>Test Detailed Security</a></p>";
?>