<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

echo "Testing class.admin.php loading...<br><br>";

// Check PHP syntax
echo "1. Checking PHP syntax:<br>";
exec('php -l class.admin.php 2>&1', $output, $return);
foreach ($output as $line) {
    echo htmlspecialchars($line) . "<br>";
}
echo "<br>";

// Try to load the file
echo "2. Attempting to load class.admin.php:<br>";
try {
    require_once 'class.admin.php';
    echo "<span style='color:green;'>SUCCESS - File loaded!</span><br>";
    
    // Check if USER class exists
    if (class_exists('USER')) {
        echo "<span style='color:green;'>USER class exists!</span><br>";
    } else {
        echo "<span style='color:red;'>USER class NOT found!</span><br>";
    }
} catch (Throwable $e) {
    echo "<span style='color:red;'>ERROR: " . $e->getMessage() . "</span><br>";
    echo "File: " . $e->getFile() . "<br>";
    echo "Line: " . $e->getLine() . "<br>";
}
?>
