📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
blogscripti.demodesign.com.tr
/
admin
📝
yonetim.php
← Geri Dön
<?php include('inc/head.php'); ?> <?php include('inc/header.php'); $kayitlikullanicisay = $db->query("SELECT * FROM yonetim")->rowCount(); if($kullanici['yetki'] == 0){ echo '<div class="container-xxl container-p-y"> <div class="misc-wrapper"> <h2 class="mb-1 mx-2">Yetkisiz erişim!</h2> <p class="mb-4 mx-2">Yetkiniz olmayan bir sayfaya girmeye çalışıyorsunuz. <br> Site yöneticisi ile iletişime geçin.</p> <a href="index" class="btn btn-primary mb-4">Anasayfa</a> <div class="mt-4"> <img src="assets/img/illustrations/page-misc-you-are-not-authorized.png" alt="page-misc-not-authorized" width="170" class="img-fluid"> </div> </div> </div> </div> '; } else { ?> <div class="container-xxl flex-grow-1 container-p-y"> <?php if($_POST){ $sifre = $_POST['password']; $hashed_password = password_hash($sifre, PASSWORD_DEFAULT); $resim = $_FILES['resim']; if($hashed_password){ $data = [ 'first_name' => $_POST['first_name'], 'last_name' => $_POST['last_name'], 'email' => $_POST['email'], 'password' => $hashed_password, 'yetki' => $_POST['yetki'], ]; } else { $data = [ 'first_name' => $_POST['first_name'], 'last_name' => $_POST['last_name'], 'email' => $_POST['email'], 'yetki' => $_POST['yetki'], ]; } echo veriekle("yonetim", $data,$resim, $db); } ?> <div class="card"> <h5 class="card-header">Kayıtı Kullanıcılar - <button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#kategorimodal">Yeni Ekle</button></h5> <div class="table-responsive text-nowrap"> <table class="table"> <thead class="table-dark"> <tr> <th>#</th> <th>İsim Soyisim</th> <th>Kullanıcı Adı</th> <th>Yetki</th> <th>Kayıt Tarihi</th> <th>İşlem</th> </tr> </thead> <tbody class="table-border-bottom-0"> <?php $kullanicisor=$db->prepare("SELECT * FROM yonetim WHERE id != 1 order by id DESC"); $kullanicisor->execute(); $say=0; while($kullanicicek=$kullanicisor->fetch(PDO::FETCH_ASSOC)) { $say++?> <tr> <td><?php echo $kullanicicek['id']; ?></td> <td><a href="uye-detay?id=<?php echo $kullanicicek['id']; ?>"><?php echo $kullanicicek['first_name'].' '.$kullanicicek['last_name']; ?></a></td> <td><?php echo $kullanicicek['email']; ?></td> <td> <?php if($kullanicicek['yetki'] == 1){ echo "Admin"; }else{ echo "Yazar"; } ?> </td> <td><?php echo format_tarih_saat($kullanicicek['created_at']); ?></td> <td> <a href="uye-detay?id=<?php echo $kullanicicek['id']; ?>"><button class="btn btn-primary btn-sm">Düzenle</button></a> </td> </tr> <?php } ?> </tbody> </table> <div class="modal fade" id="kategorimodal" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-xl modal-simple modal-pricing"> <div class="modal-content p-2 p-md-5"> <div class="modal-body"> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> <!-- Pricing Plans --> <div class=" rounded-top"> <h2 class="text-center mb-2">Yeni Kullanıcı Ekle</h2> <form action="" method="post" enctype="multipart/form-data"> <div class="mb-3 row"> <div class="col-md-12"> <label class="form-label" for="basic-default-fullname"></label> <input type="text" class="form-control" id="basic-default-fullname" name="first_name" placeholder="İsim" /> </div> <div class="col-md-12"> <label class="form-label" for="basic-default-fullname"></label> <input type="text" class="form-control" id="basic-default-fullname" name="last_name" placeholder="Soyisim" /> </div> <div class="col-md-12"> <label class="form-label" for="basic-default-fullname"></label> <input type="text" class="form-control" id="basic-default-fullname" name="email" placeholder="Kullanıcı Adı" /> </div> <div class="col-md-12"> <label class="form-label" for="basic-default-fullname"></label> <input type="text" class="form-control" id="basic-default-fullname" name="password" placeholder="Şifre" /> </div> <div class="col-md-12"> <label class="form-label" for="basic-default-fullname"></label> <select class="form-control" name="yetki"> <option value="1">Admin</option> <option value="2">Yazar</option> </select> </div> </div> <div class="row"> <div class="col-md-12"> <label class="form-label" for="basic-default-fullname"></label> <button style="width: 100%" type="submit" class="btn btn-primary">Ekle</button> </div> </div> </form> </div> <!--/ Pricing Plans --> </div> </div> </div> </div> </div> </div> </div> <?php } include('inc/footer.php'); ?>
💾 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