prepare("SELECT * FROM users WHERE token = ?"); $CheckAccount->execute([$GET_SESSION_TOKEN]); $CheckAccountCount = $CheckAccount->rowCount(); if ($CheckAccountCount !== 1) { exit('no'); } while ($CheckData = $CheckAccount->fetch()) { $access = $CheckData['access_level']; } if ($access == "0") { header('Location: /anasayfa.php'); exit(); } include "include/side.php"; if ($_POST) { $content = trim($_POST['username']); $expire = trim($_POST['expire']); $access = trim($_POST['access_level']); date_default_timezone_set('Europe/Istanbul'); $DateTimeNow = date('d.m.y H:i:s'); if (empty($content) || empty($expire) || empty($access)) { echo ''; } else { // Generate a secure token $Result = bin2hex(random_bytes(16)); $CheckTokenCount = $db->prepare("SELECT * FROM users WHERE token = ?"); $CheckTokenCount->execute([$Result]); $TokenCount = $CheckTokenCount->rowCount(); if ($TokenCount === 1) { echo ''; } else { $sql = "INSERT INTO users (username, token, access_level, expire_date) VALUES (?, ?, ?, ?)"; $stmt = $db->prepare($sql); $stmt->execute([$content, $Result, $access, $expire]); echo ''; } } } ?>
Kullanıcı Oluştur


Hesap Süresi Bitiş Tarihi :

Hesap Yetkisi :