📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
gorevyapscriptiv2.demodesign.com.tr
/
adminpnl
📝
gorevler.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=login.php'> "; exit(); } ?> <!DOCTYPE html> <html lang="en"> <?php include ('system/inc/header.php'); ?> <!-- ============================================================== --> <!-- Start Page Content here --> <!-- ============================================================== --> <div class="content-page"> <div class="content"> <!-- Start Content--> <div class="container-fluid"> <!-- start page title --> <div class="row"> <div class="col-12"> <div class="page-title-box d-flex align-items-center justify-content-between"> <h4 class="page-title"><?=$site_name;?></h4> <div class="page-title-right"> <ol class="breadcrumb m-0"> <li class="breadcrumb-item"><a href="javascript: void(0);"><?=$username;?></a></li> <li class="breadcrumb-item active">Hoşgeldiniz</li> </ol> </div> </div> </div> </div> <!-- end page title --> <div class="row"> <div class="col-xl-12"> <div class="card-box"> <h4 class="header-title mt-0 mb-3">Tüm Görevler <button data-toggle="modal" data-target="#myModal" class="btn btn-primary"> YENİ EKLE </button> </h4> <div id="myModal" class="modal fade" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Görev Ekle</h4> </div> <div class="modal-body"> <label> Görev Başlık : </label> <input id="gorevbaslik" class="form-control" type="text"> <label> Görev Açıklama : </label> <textarea id="gorevaciklama" class="form-control" type="text"></textarea> <label> Görev Kategorisi : </label> <select class="form-control" id="gorevkategori"> <?php $animals = mysqli_query($connect, "SELECT * FROM kategoriler ORDER BY id DESC"); foreach ($animals as $animall) { echo ' <option value="'.$animall['id'].'">'.$animall['kategoriadi'].'</option> '; } ?> </select> <label> Görev Kontenjan : </label> <input id="gorevkisi" class="form-control" type="text"> <label> Görev Kazanç : </label> <input id="gorevkazanc" class="form-control" type="text"> <label> Görev VIP Kazanç : </label> <input id="gorevvipkazanc" class="form-control" type="text"> <br> <button id="btn-gorev" class="btn btn-primary" style="width:100%"> PAYLAŞ </button> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Kapat</button> </div> </div> </div> </div> <div class="table-responsive"> <table class="table table-hover mb-0"> <thead> <tr> <th>Görev</th> <th>Kategori</th> <th>Kontenjan</th> <th>Kazanç</th> <th>VIP Kazanç</th> <th>Yapan Üyeler</th> <th>Tip</th> <th>İşlem</th> </tr> </thead> <tbody> <?php $query_r = mysqli_query($connect, "SELECT * FROM gorevler ORDER BY id DESC"); if (mysqli_affected_rows($connect)){ $i = 1; while ($fetch_r = mysqli_fetch_array($query_r)){ $katid = $fetch_r['gorevkategori']; $queryKat = mysqli_query($connect, "SELECT * FROM kategoriler WHERE id = $katid"); $fetchKat = mysqli_fetch_array($queryKat); $katad = $fetchKat['kategoriadi']; if($fetch_r['gorevtip'] == 1){ $tipYaz = '<span class="badge badge-pill badge-danger">ADMİN</span>'; } if($fetch_r['gorevtip'] == 2){ $tipYaz = '<span class="badge badge-pill badge-success">ÜYE</span>'; } ?> <tr class="active"> <td><?php echo $fetch_r['gorevbaslik']; ?></td> <td><?php echo $katad; ?></td> <td><?php echo $fetch_r['gorevkisi']; ?>/<?php echo $fetch_r['gorevyapan']; ?></td> <td><?php echo $fetch_r['gorevkazanc']; ?> TL</td> <td><?php echo $fetch_r['gorevvipkazanc']; ?> TL</td> <td><span data-toggle="modal" data-target="#myModalz<?php echo $fetch_r['id']; ?>" class="badge badge-pilll badge-success">YAPANLAR</span></td> <td><?=$tipYaz;?></td> <td> <a href="gorev-detay.php?id=<?php echo $fetch_r['id']; ?>" style="color:white" class="badge badge-pill badge-danger"><i class="far fa-edit"></i> </a> <span id="<?php echo $fetch_r['id']; ?>" class="badge badge-pill badge-danger animalbuysil"><i class="fas fa-trash-alt"></i> </span></td> <div id="myModalz<?php echo $fetch_r['id']; ?>" class="modal fade" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Yapan Üyeler</h4> </div> <div class="modal-body"> <?php $gorevidd = $fetch_r['id']; $animals = mysqli_query($connect, "SELECT * FROM yapilangorevler WHERE gorevid = '$gorevidd'"); foreach ($animals as $animall) { $useridsi = $animall['userid']; $queryYapu = mysqli_query($connect, "SELECT * FROM data_users WHERE id = $useridsi"); $fetchYapu = mysqli_fetch_array($queryYapu); $usernames = $fetchYapu['username']; echo ' <li> '.$usernames.' </li> '; } ?> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> </tr> <?php $i++;} }else{ ?> <tr class="active"> <th scope="row">0</th> <td>Kayıt</td> <td>Yok</td> </tr> <?php } ?> </tbody> </table> </div> </div> </div><!-- end col --> </div> <!-- end row --> </div> <!-- container-fluid --> </div> <!-- content --> <?php include ('system/inc/footer.php'); ?> <script> $('.animalbuysil').click(function(){ id = $(this).attr('id'); swal({ title: "Onaylıyor musun?", text: "Onayladığın takdirde bu görevi tamamen 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/gorevsil.php', success:function(reply) { if (reply == 0) { swal("Tebrikler!", "Görev bilgileri tamamen kaldırıldı", "success"); setTimeout(function(){ location.href = "gorevler.php"; },1000); } if (reply == 1) { swal("Başarısız!", "Üzgünüz sistemsel bir sorun meydana geldi.", "error"); } } }) } }); }) </script> </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