📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
gorevyapscripti.demodesign.com.tr
/
adminp
📝
marketalim.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"> MARKET ve ALIMLAR<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal"> YENİ ÜRÜN 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">Ürün Ekle</h4> <button type="button" class="close" data-dismiss="modal">×</button> </div> <!-- Modal body --> <div class="modal-body"> <form action="system/ajax/urunekle.php" method="POST" enctype="multipart/form-data"> <label>Ürün Adı </label> <input name="urunadi" class="form-control"> <label>Ürün Fiyatı </label> <input name="urunfiyat" 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> <!-- Modal footer --> <div class="modal-footer"> <button type="button" class="btn btn-danger" data-dismiss="modal">Kapat</button> </div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <table class="table table-hover"> <thead class="text-warning"> <th>Ürün Adı</th> <th>Fiyat</th> <th>Görsel</th> <th>İşlem</th> </thead> <tbody> <?php $query_r = mysqli_query($connect, "SELECT * FROM market"); if (mysqli_affected_rows($connect)){ $i = 1; while ($fetch_r = mysqli_fetch_array($query_r)){ ?> <tr class="active"> <td><?php echo $fetch_r['urunadi']; ?></td> <td><?php echo $fetch_r['urunfiyat']; ?></td> <td><a href="../system/images/urunler/<?php echo $fetch_r['urungorsel']; ?>" target="blank" class="badge badge-primary">GÖR</a></td> <td> <span id="<?php echo $fetch_r['id']; ?>" class="badge badge-danger animalcekimiptal"><i class="fas fa-ban"></i></span> </td> </tr> <?php $i++;} }else{ ?> <tr class="active"> <th scope="row">0</th> <td>No</td> <td>Referrals</td> <td>Yet</td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="card"> <div class="card-body"> <h4 class="text-danger"> MARKET ALIMLARI</h4> <div class="row"> <div class="col-md-12"> <table class="table table-hover"> <thead class="text-warning"> <th>Üye</th> <th>Ürün</th> <th>Fiyat</th> <th>Tarih</th> <th>Durum</th> <th>İşlem</th> </thead> <tbody> <?php $query_r = mysqli_query($connect, "SELECT * FROM marketalim"); if (mysqli_affected_rows($connect)){ $i = 1; while ($fetch_r = mysqli_fetch_array($query_r)){ if($fetch_r['durum'] == 0){ $durumYaz = '<span class="badge badge-primary ">BEKLEMEDE</span>'; } if($fetch_r['durum'] == 1){ $durumYaz = '<span class="badge badge-success ">ONAYLI</span>'; } if($fetch_r['durum'] == 2){ $durumYaz = '<span class="badge badge-danger ">İPTAL EDİLDİ</span>'; } ?> <tr class="active"> <td><?php echo $fetch_r['email']; ?></td> <td><?php echo $fetch_r['urunadi']; ?></td> <td><?php echo $fetch_r['fiyat']; ?>TL</td> <td><?php echo $fetch_r['tarih']; ?></td> <td><?php echo $durumYaz; ?></td> <td> <span id="<?php echo $fetch_r['id']; ?>" class="badge badge-success animalonay"><i class="far fa-thumbs-up"></i></span> <span id="<?php echo $fetch_r['id']; ?>" class="badge badge-danger animaliptal"><i class="fas fa-ban"></i></span> </td> </tr> <?php $i++;} }else{ ?> <tr class="active"> <th scope="row">0</th> <td>No</td> <td>Referrals</td> <td>Yet</td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </section> <!-- Dashboard Ecommerce ends --> </div> </div> </div> <?php include ('system/inc/footer.php'); ?> <script> $('.animalonay').click(function(){ id = $(this).attr('id'); swal({ title: "Onaylıyor musun?", text: "Onayladığın takdirde bu alımı onaylayacaksınız!", 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/marketonay.php', success:function(reply) { if (reply == 0) { swal("Tebrikler!", "Market Talebi Onaylandı", "success"); setTimeout(function(){ location.href = "marketalim.php"; },1000); } if (reply == 1) { swal("Başarısız!", "Üzgünüz sistemsel bir sorun meydana geldi.", "error"); } } }) } }); }) </script> <script> $('.animaliptal').click(function(){ id = $(this).attr('id'); swal({ title: "Onaylıyor musun?", text: "Onayladığın takdirde bu alımı iptal edeceksiniz!", 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/marketiptal.php', success:function(reply) { if (reply == 0) { swal("Tebrikler!", "Market Talebi İptal Edildi ve Bakiyesi Eklendi", "success"); setTimeout(function(){ location.href = "marketalim.php"; },1000); } if (reply == 1) { swal("Başarısız!", "Üzgünüz sistemsel bir sorun meydana geldi.", "error"); } } }) } }); }) </script> <script> $('.animalcekimiptal').click(function(){ id = $(this).attr('id'); swal({ title: "Onaylıyor musun?", text: "Onayladığın takdirde bu ürünü 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/urunsil.php', success:function(reply) { if (reply == 0) { swal("Tebrikler!", "Ürün Başarıyla Silindi", "success"); setTimeout(function(){ location.href = "marketalim.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