<?php
// setup_root.php
// BU DOSYAYI ÇALIŞTIRIP SİLİN!
require 'config/db.php';
$kadi = 'ramsaroot';
$sifre = 'Ts593978**'; // İlk şifreniz
$hash = password_hash($sifre, PASSWORD_DEFAULT);
$sql = "INSERT INTO kullanicilar (kullanici_adi, sifre_hash, ad, soyad, rol, ise_giris_tarihi, durum) VALUES (?, ?, 'Sistem', 'Yöneticisi', 'root', CURDATE(), 1)";
$stmt = $pdo->prepare($sql);
try {
$stmt->execute([$kadi, $hash]);
echo "Root kullanıcısı oluşturuldu!<br>Kullanıcı Adı: root<br>Şifre: 123456<br><br>Lütfen bu dosyayı silin!";
} catch (PDOException $e) {
echo "Hata: " . $e->getMessage();
}
?>