📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
blogscripti.demodesign.com.tr
/
admin
📝
moduller.php
← Geri Dön
<?php include('inc/head.php'); ?> <?php include('inc/header.php'); 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"> <div class="card"> <form action="" method="post"> <div class="card-header header-elements"> <span class="me-2">Sistem Modülleri</span> </div> <div class="table-responsive text-nowrap"> <table class="table"> <thead class="table-dark"> <tr> <th>#</th> <th>Modül Adı</th> <th>Durumu</th> <th>İşlem</th> </tr> </thead> <tbody class="table-border-bottom-0"> <?php $modulcu = $db->query("SELECT * FROM moduller")->fetchAll(PDO::FETCH_ASSOC); foreach ($modulcu as $modul) { ?> <tr> <td><?php echo $modul['id']; ?></td> <td><?php echo $modul['moduladi']; ?></td> <td><?php if($modul['durum'] == 1) { echo '<span class="badge bg-success">Aktif</span>'; } else { echo '<span class="badge bg-danger">Pasif</span>'; }?> </td> <td> <label class="switch switch-square"> <input type="checkbox" name="<?php echo $modul['id']; ?>" value="1" class="switch-input ackapa" <?php if($modul['durum'] == 1){ echo 'checked'; } ?>> <span class="switch-toggle-slider"> <span class="switch-on"> <i class="ti ti-check"></i> </span> <span class="switch-off"> <i class="ti ti-x"></i> </span> </span> </label> </td> </tr> <?php } ?> </tbody> </table> </div> </form> </div> </div> <?php } include('inc/footer.php'); ?> <script> $(document).ready(function() { // Her bir checkbox değiştirildiğinde AJAX isteği göndermek için olay dinleyicisi ekle $('input[type="checkbox"]').change(function() { // Değiştirilen checkbox hakkında bilgi al var checkboxName = $(this).attr('name'); var isChecked = $(this).is(':checked'); if(isChecked){ isChecked = 1; } else { isChecked = 0; } // AJAX isteği gönder $.ajax({ method: 'POST', url: 'islem', data: { checkboxName: checkboxName, isChecked: isChecked }, success: function(response) { console.log(response); } }); }); }); </script>
💾 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