📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
qrmenuv2.demodesign.com.tr
/
admin
/
controller
📝
urun-ayarlari.php
← Geri Dön
<?php $theme = $settings["theme"]; if (isset($_POST['editproducts'])) { $duzenle=$db->prepare("UPDATE fields SET title=:title, subtitle=:subtitle, home=:home, subhome=:subhome, edit_date=:edit_date WHERE type='products'"); $update=$duzenle->execute(array( 'title' => $_POST['title'], 'subtitle' => $_POST['subtitle'], 'home' => $_POST['home'], 'subhome' => $_POST['subhome'], 'edit_date' => $date )); if ($update) { $success = 'İşlem başarıyla gerçekleşti.'; } else { $error = 'Bir hata oluştu.'; } if($_FILES['background']["size"] > 0) { $sor=$db->prepare("SELECT * FROM fields where type=:type"); $sor->execute(array( 'type' => "products" )); $cek=$sor->fetch(PDO::FETCH_ASSOC); $sil=$cek['background']; $image = new Upload($_FILES['background']); $upload= PATH . "/public/{$theme}/images/background/"; $s1=rand(1000,3200); $s2=rand(1000,3200); $s3=rand(1000,3200); $s4=rand(1000,3200); $names=$s1.$s2.$s3.$s4; $name=$image->file_new_name_body = $names; $uzantiss=$image->file_src_name; $uzantis=ext($uzantiss); $uzanti=$image->image_convert = $uzantis; $image->Process($upload); $image->allowed = array ('image/*'); $image="images/background/".$name.".".$uzanti; $duzenle=$db->prepare("UPDATE fields SET background=:background, title=:title, subtitle=:subtitle, home=:home, subhome=:subhome, edit_date=:edit_date WHERE type='products'"); $update=$duzenle->execute(array( 'background' => $image, 'title' => $_POST['title'], 'subtitle' => $_POST['subtitle'], 'home' => $_POST['home'], 'subhome' => $_POST['subhome'], 'edit_date' => $date )); if ($update) { $sil= PATH . "/public/{$theme}/{$sil}"; @unlink("$sil"); $success = 'İşlem başarıyla gerçekleşti.'; } else { $error = 'Bir hata oluştu.'; } } } if (isset($_POST['editproduct'])) { $duzenle=$db->prepare("UPDATE fields SET title=:title, subtitle=:subtitle, edit_date=:edit_date WHERE type='product'"); $update=$duzenle->execute(array( 'title' => $_POST['title'], 'subtitle' => $_POST['subtitle'], 'edit_date' => $date )); if ($update) { $success = 'İşlem başarıyla gerçekleşti.'; } else { $error = 'Bir hata oluştu.'; } if($_FILES['background']["size"] > 0) { $sor=$db->prepare("SELECT * FROM fields where type=:type"); $sor->execute(array( 'type' => "product" )); $cek=$sor->fetch(PDO::FETCH_ASSOC); $sil=$cek['background']; $image = new Upload($_FILES['background']); $upload= PATH . "/public/{$theme}/images/background/"; $s1=rand(1000,3200); $s2=rand(1000,3200); $s3=rand(1000,3200); $s4=rand(1000,3200); $names=$s1.$s2.$s3.$s4; $name=$image->file_new_name_body = $names; $uzantiss=$image->file_src_name; $uzantis=ext($uzantiss); $uzanti=$image->image_convert = $uzantis; $image->Process($upload); $image->allowed = array ('image/*'); $image="images/background/".$name.".".$uzanti; $duzenle=$db->prepare("UPDATE fields SET background=:background, title=:title, subtitle=:subtitle, edit_date=:edit_date WHERE type='product'"); $update=$duzenle->execute(array( 'background' => $image, 'title' => $_POST['title'], 'subtitle' => $_POST['subtitle'], 'edit_date' => $date )); if ($update) { $sil= PATH . "/public/{$theme}/{$sil}"; @unlink("$sil"); $success = 'İşlem başarıyla gerçekleşti.'; } else { $error = 'Bir hata oluştu.'; } } } if (isset($_POST['editcategory'])) { $duzenle=$db->prepare("UPDATE fields SET title=:title, subtitle=:subtitle, edit_date=:edit_date WHERE type='category'"); $update=$duzenle->execute(array( 'title' => $_POST['title'], 'subtitle' => $_POST['subtitle'], 'edit_date' => $date )); if ($update) { $success = 'İşlem başarıyla gerçekleşti.'; } else { $error = 'Bir hata oluştu.'; } if($_FILES['background']["size"] > 0) { $sor=$db->prepare("SELECT * FROM fields where type=:type"); $sor->execute(array( 'type' => "category" )); $cek=$sor->fetch(PDO::FETCH_ASSOC); $sil=$cek['background']; $image = new Upload($_FILES['background']); $upload= PATH . "/public/{$theme}/images/background/"; $s1=rand(1000,3200); $s2=rand(1000,3200); $s3=rand(1000,3200); $s4=rand(1000,3200); $names=$s1.$s2.$s3.$s4; $name=$image->file_new_name_body = $names; $uzantiss=$image->file_src_name; $uzantis=ext($uzantiss); $uzanti=$image->image_convert = $uzantis; $image->Process($upload); $image->allowed = array ('image/*'); $image="images/background/".$name.".".$uzanti; $duzenle=$db->prepare("UPDATE fields SET background=:background, title=:title, subtitle=:subtitle, edit_date=:edit_date WHERE type='category'"); $update=$duzenle->execute(array( 'background' => $image, 'title' => $_POST['title'], 'subtitle' => $_POST['subtitle'], 'edit_date' => $date )); if ($update) { $sil= PATH . "/public/{$theme}/{$sil}"; @unlink("$sil"); $success = 'İşlem başarıyla gerçekleşti.'; } else { $error = 'Bir hata oluştu.'; } } } require admin_view('urun-ayarlari');
💾 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