📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
falscripti.demodesign.com.tr
/
ns-admin
📝
kullaniciduzenle.php
← Geri Dön
<?php if (isset($_GET['id'])) { $id = htmlspecialchars($_GET['id'], ENT_QUOTES, 'UTF-8'); $sql = "SELECT id, uid, email, ad, soyad, kredi FROM kullanici WHERE id=?"; $stmt = $conn->prepare($sql); $stmt->bind_param("i", $id); $stmt->execute(); if ($stmt->error) { echo "Error: " . $stmt->error; } else { $stmt->bind_result($id, $uid, $email, $ad, $soyad, $kredi); if ($stmt->fetch()) { $ad_soyad = $ad . ' ' . $soyad; } else { echo "Kayıt bulunamadı."; } $stmt->close(); } } else { echo '<div style=" min-width: 250px; margin-left: -125px; background-color: #333; color: #fff; text-align: center; border-radius: 2px; padding: 16px; position: fixed; z-index: 1; left: 50%; bottom: 30px; ">HATA ID YOK!</div>'; } if ($_SERVER["REQUEST_METHOD"] == "POST") { $id = htmlspecialchars($_GET['id'], ENT_QUOTES, 'UTF-8'); $ad = htmlspecialchars($_POST['ad'], ENT_QUOTES, 'UTF-8'); $soyad = htmlspecialchars($_POST['soyad'], ENT_QUOTES, 'UTF-8'); $email = htmlspecialchars($_POST['email'], ENT_QUOTES, 'UTF-8'); $kredi = htmlspecialchars($_POST['kredi'], ENT_QUOTES, 'UTF-8'); $sql = "UPDATE kullanici SET ad = ?, soyad = ?, email = ?, kredi = ? WHERE id = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("ssssi", $ad, $soyad, $email, $kredi, $id); if ($stmt->execute()) { echo '<div style=" min-width: 250px; margin-left: -125px; background-color: #333; color: #fff; text-align: center; border-radius: 2px; padding: 16px; position: fixed; z-index: 1; left: 50%; bottom: 30px; ">Kullanıcı Güncellendi!</div>'; } else { echo "Hata: " . $stmt->error; } $stmt->close(); } $conn->close(); ?> <div class="main-content group-data-[sidebar-size=sm]:ml-[70px]"> <div class="page-content dark:bg-zinc-700"> <div class="container-fluid px-[0.625rem]"> <div class="grid grid-cols-1 pb-6"> <div class="md:flex items-center justify-between px-[2px]"> <h4 class="text-[18px] font-medium text-gray-800 mb-sm-0 grow dark:text-gray-100 mb-2 md:mb-0"> Kullanıcıyı Düzenle </h4> <nav class="flex" aria-label="Breadcrumb"> <ol class="inline-flex items-center space-x-1 ltr:md:space-x-3 rtl:md:space-x-0"> <li class="inline-flex items-center"> <a href="#" class="inline-flex items-center text-sm text-gray-800 hover:text-gray-900 dark:text-zinc-100 dark:hover:text-white"> <i class="fas fa-users mr-2"></i>Kullanıcılar </a> </li> <li> <div class="flex items-center rtl:mr-2"> <i class="font-semibold text-gray-600 align-middle far fa-angle-right text-13 rtl:rotate-180 dark:text-zinc-100"></i> <a href="#" class="text-sm font-medium text-gray-500 ltr:ml-2 rtl:mr-2 hover:text-gray-900 ltr:md:ml-2 rtl:md:mr-2 dark:text-gray-100 dark:hover:text-white">Kullanıcı Düzenle</a> </div> </li> </ol> </nav> </div> </div> <div class="grid grid-cols-1"> <div class="card dark:bg-zinc-800 dark:border-zinc-600 shadow-lg rounded-lg"> <div class="card-body border-b border-gray-100 dark:border-zinc-600"> <h6 class="mb-1 text-gray-700 text-15 dark:text-gray-100">Yeni Kullanıcı Bilgileri</h6> </div> <form action="" method="post" style="padding: 20px"> <div class="mb-3"> <label class="form-label text-gray-700 dark:text-gray-100" for="ad">Ad</label> <input type="text" class="w-full placeholder:text-13 text-13 py-1.5 rounded border-gray-100 focus:border focus:border-violet-50 focus:ring focus:ring-violet-500/20 dark:bg-zinc-700/50 dark:border-zinc-600 dark:placeholder:text-zinc-100 placeholder:text-gray-800 dark:text-zinc-100" name="ad" value="<?php echo $ad; ?>" aria-label="Ad" required /> </div> <div class="mb-3"> <label class="form-label text-gray-700 dark:text-gray-100" for="soyad">Soyad</label> <input type="text" class="w-full placeholder:text-13 text-13 py-1.5 rounded border-gray-100 focus:border focus:border-violet-50 focus:ring focus:ring-violet-500/20 dark:bg-zinc-700/50 dark:border-zinc-600 dark:placeholder:text-zinc-100 placeholder:text-gray-800 dark:text-zinc-100" name="soyad" value="<?php echo $soyad; ?>" aria-label="Soyad" required /> </div> <div class="mb-3"> <label class="form-label text-gray-700 dark:text-gray-100" for="email">E-mail</label> <input type="email" class="w-full placeholder:text-13 text-13 py-1.5 rounded border-gray-100 focus:border focus:border-violet-50 focus:ring focus:ring-violet-500/20 dark:bg-zinc-700/50 dark:border-zinc-600 dark:placeholder:text-zinc-100 placeholder:text-gray-800 dark:text-zinc-100" name="email" value="<?php echo $email; ?>" aria-label="Email" required /> </div> <div class="mb-3"> <label class="form-label text-gray-700 dark:text-gray-100" for="kredi">Kredi</label> <input type="number" class="w-full placeholder:text-13 text-13 py-1.5 rounded border-gray-100 focus:border focus:border-violet-50 focus:ring focus:ring-violet-500/20 dark:bg-zinc-700/50 dark:border-zinc-600 dark:placeholder:text-zinc-100 placeholder:text-gray-800 dark:text-zinc-100" name="kredi" value="<?php echo $kredi; ?>" aria-label="Kredi" required /> </div> <button type="submit" class="btn bg-violet-500 hover:bg-violet-700 text-white font-medium py-2 px-4 rounded">Kaydet</button> </form> </div> </div> <footer class="absolute bottom-0 left-0 right-0 px-5 py-5 bg-white border-t footer border-gray-50 dark:bg-zinc-700 dark:border-zinc-600 dark:text-gray-200"> <div class="grid grid-cols-2 text-gray-500 dark:text-zinc-100"> <div class="grow"> © <script> document.write(new Date().getFullYear()); </script> Minia </div> <div class="hidden md:inline-block text-end">Design & Develop by <a href="#" class="underline text-violet-500">Themesbrand</a></div> </div> </footer> </div> </div> </div>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula