📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
qrmenuv2.demodesign.com.tr
/
admin
/
controller
📝
icerik-ayarlari.php
← Geri Dön
<?php $theme = $settings["theme"]; if (isset($_POST['editpage'])) { $duzenle=$db->prepare("UPDATE fields SET title=:title, subtitle=:subtitle, edit_date=:edit_date WHERE type='page'"); $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' => "page" )); $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='page'"); $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['editblogs'])) { $duzenle=$db->prepare("UPDATE fields SET title=:title, subtitle=:subtitle, edit_date=:edit_date WHERE type='blogs'"); $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' => "blogs" )); $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='blogs'"); $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['editblog'])) { $duzenle=$db->prepare("UPDATE fields SET title=:title, subtitle=:subtitle, edit_date=:edit_date WHERE type='blog'"); $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' => "blog" )); $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='blog'"); $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('icerik-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