<?php
require_once 'config.php';
require_once 'includes/Database.php';

$db = new Database();

echo "Mevcut users tablosu durumu:\n";
echo "============================\n";
$users = $db->fetchAll('SELECT * FROM users ORDER BY id');
foreach($users as $user) {
    echo "ID: {$user['id']}, Username: {$user['username']}, Full Name: {$user['full_name']}, Extension: {$user['extension']}, Active: " . ($user['is_active'] ? 'Evet' : 'Hayır') . "\n";
}

echo "\nSeda kayıtlarını kontrol edelim:\n";
echo "=================================\n";
$sedaRecords = $db->fetchAll("SELECT * FROM users WHERE full_name LIKE '%Seda%' OR full_name LIKE '%seda%'");
foreach($sedaRecords as $record) {
    echo "ID: {$record['id']}, Username: {$record['username']}, Full Name: {$record['full_name']}, Extension: {$record['extension']}\n";
}

echo "\nArife kayıtlarını kontrol edelim:\n";
echo "=================================\n";
$arifeRecords = $db->fetchAll("SELECT * FROM users WHERE full_name LIKE '%Arife%' OR full_name LIKE '%arife%'");
if(empty($arifeRecords)) {
    echo "Arife kaydı bulunamadı!\n";
} else {
    foreach($arifeRecords as $record) {
        echo "ID: {$record['id']}, Username: {$record['username']}, Full Name: {$record['full_name']}, Extension: {$record['extension']}\n";
    }
}
?>
