📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv3.demodesign.com.tr
/
yonetim
📝
toplurunler.php
← Geri Dön
<?php if (isset($_POST['topluguncelle'])) { $tbak = implode(",",$_POST["tbak"]); if($_POST['t1']=='on'){ if($_POST['a1']=='1'){ $kstok = $_POST['b1']; $okey = $DB->exec("UPDATE urunler SET stok=stok+'$kstok' where urunid in($tbak)"); if ($okey) { $not = ' <div class="alert alert-warning"> <button class="close" data-dismiss="alert"><i class="pci-cross pci-circle"></i></button> <strong>İşlem Başarılı</strong> </div>' ; } } else { $kstok = $_POST['b1']; $okey = $DB->exec("UPDATE urunler SET stok=stok-'$kstok' where urunid in($tbak)"); if ($okey) { $not = ' <div class="alert alert-warning"> <button class="close" data-dismiss="alert"><i class="pci-cross pci-circle"></i></button> <strong>İşlem Başarılı</strong> </div>' ; } } } else { $kstok = $son['stok']; } if($_POST['t4']=='on'){ if($_POST['a4']=='0'){ $iurunfiyat = $_POST['b4']; $okey = $DB->exec("UPDATE urunler SET ifiyat=ifiyat+((ifiyat*'$iurunfiyat')/100) where urunid in($tbak)"); if ($okey) { $not = ' <div class="alert alert-warning"> <button class="close" data-dismiss="alert"><i class="pci-cross pci-circle"></i></button> <strong>İşlem Başarılı</strong> </div>' ; } } elseif($_POST['a4']=='1'){ $iurunfiyat = $_POST['b4']; $okey = $DB->exec("UPDATE urunler SET ifiyat=ifiyat-((ifiyat*'$iurunfiyat')/100) where urunid in($tbak)"); if ($okey) { $not = ' <div class="alert alert-warning"> <button class="close" data-dismiss="alert"><i class="pci-cross pci-circle"></i></button> <strong>İşlem Başarılı</strong> </div>' ; } } elseif($_POST['a4']=='2'){ $iurunfiyat = $_POST['b4']; $okey = $DB->exec("UPDATE urunler SET ifiyat=ifiyat+'$iurunfiyat' where urunid in($tbak)"); if ($okey) { $not = ' <div class="alert alert-warning"> <button class="close" data-dismiss="alert"><i class="pci-cross pci-circle"></i></button> <strong>İşlem Başarılı</strong> </div>' ; } } elseif($_POST['a4']=='3'){ $iurunfiyat = $_POST['b4']; $okey = $DB->exec("UPDATE urunler SET ifiyat=ifiyat-'$iurunfiyat' where urunid in($tbak)"); if ($okey) { $not = ' <div class="alert alert-warning"> <button class="close" data-dismiss="alert"><i class="pci-cross pci-circle"></i></button> <strong>İşlem Başarılı</strong> </div>' ; } } else { $ifiyat = $son['ifiyat']; } } if($_POST['t2']=='on'){ if($_POST['a2']=='0'){ $urunfiyat = $_POST['b2']; $okey = $DB->exec("UPDATE urunler SET urunFiyati=urunFiyati+((urunFiyati*'$urunfiyat')/100) where urunid in($tbak)"); if ($okey) { $not = ' <div class="alert alert-warning"> <button class="close" data-dismiss="alert"><i class="pci-cross pci-circle"></i></button> <strong>İşlem Başarılı</strong> </div>' ; } } elseif($_POST['a2']=='1'){ $urunfiyat = $_POST['b2']; $okey = $DB->exec("UPDATE urunler SET urunFiyati=urunFiyati-((urunFiyati*'$urunfiyat')/100) where urunid in($tbak)"); if ($okey) { $not = ' <div class="alert alert-warning"> <button class="close" data-dismiss="alert"><i class="pci-cross pci-circle"></i></button> <strong>İşlem Başarılı</strong> </div>' ; } } elseif($_POST['a2']=='2'){ $urunfiyat = $_POST['b2']; $okey = $DB->exec("UPDATE urunler SET urunFiyati=urunFiyati+'$urunfiyat' where urunid in($tbak)"); if ($okey) { $not = ' <div class="alert alert-warning"> <button class="close" data-dismiss="alert"><i class="pci-cross pci-circle"></i></button> <strong>İşlem Başarılı</strong> </div>' ; } } elseif($_POST['a2']=='3'){ $urunfiyat = $_POST['b2']; $okey = $DB->exec("UPDATE urunler SET urunFiyati=urunFiyati-'$urunfiyat' where urunid in($tbak)"); if ($okey) { $not = ' <div class="alert alert-warning"> <button class="close" data-dismiss="alert"><i class="pci-cross pci-circle"></i></button> <strong>İşlem Başarılı</strong> </div>' ; } } else { $urunfiyat = $son['urunFiyati']; } } if($_POST['t5']=='on'){ $seom = $_POST['b5']; $keyim = $_POST['b6']; $sdurum = "1"; $okey = $DB->exec("UPDATE urunler SET sseo='$seom', skey='$keyim', sdurum='1' where urunid in($tbak)"); if ($okey) { $not = ' <div class="alert alert-warning"> <button class="close" data-dismiss="alert"><i class="pci-cross pci-circle"></i></button> <strong>İşlem Başarılı</strong> </div>' ; } } else { $seom = $son['sseo']; } if($_POST['t6']=='on'){ $durum = "0"; $okey = $DB->exec("UPDATE urunler SET durum='$durum' where stok<='0' and urunid in($tbak)"); if ($okey) { $not = ' <div class="alert alert-warning"> <button class="close" data-dismiss="alert"><i class="pci-cross pci-circle"></i></button> <strong>İşlem Başarılı</strong> </div>' ; } } else { $durum = $son['sseo']; } } ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Toplu Ürün Güncelleme </h1> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="index.html"><i class="fa fa-home"></i> Anasayfa</a></li> <li class="breadcrumb-item active">Toplu Ürün Güncelleme</li> </ol> <?=$not?> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-12"> <div class="box box-solid bg-dark"> <!-- /.box-header --> <div class="box-body"> <form action="" method="POST"> <?php $duy = $DB->query("select * from urunler where durum='1' order by urunid desc")->fetchAll(PDO::FETCH_ASSOC); foreach($duy as $dirilis){?> <input type="hidden" name="tbak[]" value="<?php echo $dirilis['urunid']?>" checked> <?php } ?> <div class="form-group"> <div class="col-md-6"> <h5 style="position: absolute;"><input name="t1" type="checkbox"> STOK :</h5> <input name="b1" style="width:90%;margin-left: 90px;height: 40px;margin-top: 10px;" type="text" class="form-control" placeholder="Stok Adedi"> <select name="a1" style="width:90%;margin-left: 550px;height: 40px;margin-top: -40px;" class="form-control"> <option value="1">ARTTIR</option> <option value="0">AZALT</option> </select> </div> </div> <div class="form-group"> <div class="col-md-6"> <h5 style="position: absolute;"><input name="t2" type="checkbox"> NORMAL </br> FİYATI :</h5> <input name="b2" style="width:90%;margin-left: 90px;height: 40px;margin-top: 10px;" type="text" class="form-control" placeholder=""> <select name="a2" style="width:90%;margin-left: 550px;height: 40px;margin-top: -40px;" class="form-control"> <option value="0">YÜZDE ARTTIR</option> <option value="1">YÜZDE AZALT</option> <option value="2">NORMAL ARTTIR</option> <option value="3">NORMAL AZALT</option> </select> </div> </div> <div class="form-group"> <div class="col-md-6"> <h5 style="position: absolute;"><input name="t4" type="checkbox"> İNDİRİMLİ </br> FİYATI :</h5> <input name="b4" style="width:90%;margin-left: 90px;height: 40px;margin-top: 10px;" type="text" class="form-control" placeholder=""> <select name="a4" style="width:90%;margin-left: 550px;height: 40px;margin-top: -40px;" class="form-control"> <option value="0">YÜZDE ARTTIR</option> <option value="1">YÜZDE AZALT</option> <option value="2">NORMAL ARTTIR</option> <option value="3">NORMAL AZALT</option> </select> </div> </div> <div class="form-group"> <div class="col-md-12"> <h5 style="position: absolute;"><input name="t6" type="checkbox">TÜKENEN ÜRÜNLERİ GİZLE</h5> </br></br> <h5 style="position: absolute;"><input name="t5" type="checkbox"> SEO DURUMU :</h5> </br></br> <input style="width:110%;height: 40px;margin-top: 10px;" name="b6" type="text" class="form-control" placeholder="Ürün Açıklamaları"> <input style="width:110%;margin-left: 190px;height: 40px;margin-top: 10px;" name="b5" type="text" class="form-control" data-role="tagsinput"> </select> </div> </div> <button style="width: 98%;font-size: 16px;font-weight: 500;height: 50px;" class="btn btn-app bg-green" name="topluguncelle" type="submit">GÜNCELLE</button> </form> </div> <!-- /.box-body --> </div> <!-- /.box --> </div> <!-- /.col --> </div> <!-- /.row --> </section> <!-- /.content --> </div> <!-- /.content-wrapper -->
💾 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