<?php
// admin/sync_penguji_simple.php

echo "<h1>Sync Penguji - Simple Version</h1>";
echo "File ini bisa diakses!<br>";

// Cek koneksi database sederhana
try {
    $host = 'localhost';
    $dbname = 'soca_osce';
    $username = 'root';
    $password = '';
    
    $pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8", $username, $password);
    echo "Koneksi database: BERHASIL<br>";
    
    // Cek tabel penguji
    $penguji_count = $pdo->query("SELECT COUNT(*) as total FROM penguji")->fetch()['total'];
    echo "Jumlah data penguji: " . $penguji_count . "<br>";
    
    // Cek tabel users penguji
    $users_count = $pdo->query("SELECT COUNT(*) as total FROM users WHERE role = 'penguji'")->fetch()['total'];
    echo "Jumlah users penguji: " . $users_count . "<br>";
    
} catch (PDOException $e) {
    echo "Koneksi database: GAGAL - " . $e->getMessage() . "<br>";
}
?>

<a href="../penguji/dashboard_penguji.php">Test Dashboard Penguji</a>