📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
gorevyapscripti.demodesign.com.tr
/
adminp
📝
kategoriler.php
← Geri Dön
<?php include ('config.php'); include ('system/inc/sitedata.php'); if (!isset($_SESSION['login'])){ echo " <meta http-equiv='refresh' content='1;URL=index.php'> "; exit(); } ?> <!DOCTYPE html> <html class="loading" lang="en" data-textdirection="ltr"> <!-- BEGIN: Head--> <?php include ('system/inc/header.php'); ?> <!-- BEGIN: Content--> <div class="app-content content "> <div class="content-overlay"></div> <div class="header-navbar-shadow"></div> <div class="content-wrapper container-xxl p-0"> <div class="content-header row"> </div> <div class="content-body"> <!-- Dashboard Ecommerce Starts --> <section id="dashboard-ecommerce"> <div class="card"> <div class="card-body"> <h4 class="text-danger"> KATEGORİLER <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal"> YENİ EKLE </button></h4> <!-- The Modal --> <div class="modal" id="myModal"> <div class="modal-dialog"> <div class="modal-content"> <!-- Modal Header --> <div class="modal-header"> <h4 class="modal-title">Kategori Ekle</h4> <button type="button" class="close" data-dismiss="modal">×</button> </div> <!-- Modal body --> <div class="modal-body"> <form action="system/ajax/kategoriekle.php" method="POST" enctype="multipart/form-data"> <label>Kategori Başlık </label> <input name="kategoriadi" class="form-control"> <label>Görsel</label> <input class="form-control" type="file" name="dosya" /> <br> <button class="btn btn-primary" style="width:100%"> EKLE</button> </form> </div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="table-responsive add-project"> <table class="table card-table table-vcenter text-nowrap"> <thead> <tr> <th>#</th> <th>Kategori</th> <th>Görsel</th> <th>Durum</th> <th>İşlem</th> </tr> </thead> <tbody> <?php $query_r = mysqli_query($connect, "SELECT * FROM kategoriler ORDER BY id DESC"); if (mysqli_affected_rows($connect)){ $i = 1; while ($fetch_r = mysqli_fetch_array($query_r)){ if($fetch_r['durum'] == 1){ $durumA = '<span id="'.$fetch_r['id'].'" class="badge badge-danger katdurump"><i class="fas fa-lock"></i></span>'; }else{ $durumA = '<span id="'.$fetch_r['id'].'" class="badge badge-success katduruma"><i class="fas fa-unlock"></i></span>'; } ?> <tr class="active"> <td><?php echo $fetch_r['id']; ?></td> <td><?php echo $fetch_r['kategoriadi']; ?></td> <td><a href="../system/images/kategoriler/<?php echo $fetch_r['kategorigorsel']; ?>" target="_blank" class="badge badge-warning">GÖR</a></td> <td><?php echo $durumA; ?></td> <td> <span id="<?php echo $fetch_r['id']; ?>" class="badge badge-danger animalcekimiptal"><i class="fas fa-ban"></i></span> <a href="kategori-detay.php?id=<?php echo $fetch_r['id']; ?>" class="badge badge-success animalcekimonay">Düzenle</a> </td> </tr> <?php $i++;} }else{ ?> <tr class="active"> <th scope="row">0</th> <td>No</td> <td>Category</td> <td>Yet</td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> </div> </section> <!-- Dashboard Ecommerce ends --> </div> </div> </div> <?php include ('system/inc/footer.php'); ?> <script> $('.animalcekimiptal').click(function(){ id = $(this).attr('id'); swal({ title: "Onaylıyor musun?", text: "Onayladığın takdirde bu kategoriyi sileceksiniz!", type: "warning", showCancelButton: true, confirmButtonColor: "#DD6B55", confirmButtonText: "Hayır", cancelButtonText: "Evet", closeOnConfirm: true, closeOnCancel: false }, function(isConfirm){ if (!isConfirm) { $.ajax({ type:'POST', data:'id='+id, url:'system/ajax/kategorisil.php', success:function(reply) { if (reply == 0) { swal("Tebrikler!", "Kategori Başarıyla Silindi", "success"); setTimeout(function(){ location.href = "kategoriler.php"; },1000); } if (reply == 1) { swal("Başarısız!", "Üzgünüz sistemsel bir sorun meydana geldi.", "error"); } } }) } }); }) $('.katdurump').click(function(){ id = $(this).attr('id'); swal({ title: "Onaylıyor musun?", text: "Onayladığın takdirde bu kategoriyi pasif hale getireceksiniz!", type: "warning", showCancelButton: true, confirmButtonColor: "#DD6B55", confirmButtonText: "Hayır", cancelButtonText: "Evet", closeOnConfirm: true, closeOnCancel: false }, function(isConfirm){ if (!isConfirm) { $.ajax({ type:'POST', data:'id='+id, url:'system/ajax/katpasif.php', success:function(reply) { if (reply == 0) { swal("Tebrikler!", "Kategori Başarıyla Pasif Hale Getirildi", "success"); setTimeout(function(){ location.href = "kategoriler.php"; },1000); } if (reply == 1) { swal("Başarısız!", "Üzgünüz sistemsel bir sorun meydana geldi.", "error"); } } }) } }); }) $('.katduruma').click(function(){ id = $(this).attr('id'); swal({ title: "Onaylıyor musun?", text: "Onayladığın takdirde bu kategoriyi aktif hale getireceksiniz!", type: "warning", showCancelButton: true, confirmButtonColor: "#DD6B55", confirmButtonText: "Hayır", cancelButtonText: "Evet", closeOnConfirm: true, closeOnCancel: false }, function(isConfirm){ if (!isConfirm) { $.ajax({ type:'POST', data:'id='+id, url:'system/ajax/kataktif.php', success:function(reply) { if (reply == 0) { swal("Tebrikler!", "Kategori Başarıyla Aktif Hale Getirildi", "success"); setTimeout(function(){ location.href = "kategoriler.php"; },1000); } if (reply == 1) { swal("Başarısız!", "Üzgünüz sistemsel bir sorun meydana geldi.", "error"); } } }) } }); }) </script> </body> <!-- END: Body--> </html>
💾 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