📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
b2be-ticaretscripti.demodesign.com.tr
/
boss
/
pages
📝
siteayarlari.php
← Geri Dön
<?php $id = "1"; $sayfam = $ozy->query("select * from siteayarlari where id=$id")->fetch(PDO::FETCH_ASSOC); if (isset($_POST['guncelle'])) { $siteadi = $_POST['siteadi']; $sitekey = $_POST['sitekey']; $sitedesc = $_POST['sitedesc']; $google = $_POST['google']; $yandex = $_POST['yandex']; $reklam = $_POST['reklam']; $ssldurum = $_POST['ssldurum']; $bakimdurum = $_POST['bakimdurum']; $bakim = $_POST['bakim']; $tel = $_POST['tel']; $ceptel = $_POST['ceptel']; $whatsapp = $_POST['whatsapp']; $email = $_POST['email']; $adres = $_POST['adres']; $facebook = $_POST['facebook']; $twitter = $_POST['twitter']; $pinterest = $_POST['pinterest']; $linkedin = $_POST['linkedin']; $instagram = $_POST['instagram']; $youtube = $_POST['youtube']; $googleplus = $_POST['googleplus']; $copy = $_POST['copy']; $maps = $_POST['maps']; $tema = $sayfam["tema"]; $t4 = $_POST['t4']; $t5 = $_POST['t5']; $t6 = " "; $t7 = " "; $t8 = " "; $siteurl = $_POST['siteurl']; $dtitle = $_POST['dtitle']; $reskonum = $_FILES['logo']['tmp_name']; $resad = $_FILES['logo']['name']; $restip = $_FILES['logo']['type']; $uzanti = substr($resad, -5, 5); $resimadi = md5(rand(100, 999999) . md5(md5(md5($resad)))) . $uzanti; $yol = "../resimler/siteayarlari"; $favkonum = $_FILES['favicon']['tmp_name']; $favad = $_FILES['favicon']['name']; $favtip = $_FILES['favicon']['type']; $favuzanti = substr($favad, -5, 5); $favyeniad = md5(rand(100, 999999) . md5(md5(md5($favad)))) . $favuzanti; $favyol = "../resimler/siteayarlari"; $temakonumv1 = $_FILES['t1']['tmp_name']; $temaadv1 = $_FILES['t1']['name']; $tematipv1 = $_FILES['t1']['type']; $tuzanti1 = substr($temaadv1, -5, 5); $t1 = md5(rand(100, 999999) . md5(md5(md5($temaadv1)))) . $tuzanti1; $temav1yol = "../resimler/siteayarlari"; $temakonumv2 = $_FILES['t2']['tmp_name']; $temaadv2 = $_FILES['t2']['name']; $tematipv2 = $_FILES['t2']['type']; $tuzanti2 = substr($temaadv2, -5, 5); $t2 = md5(rand(100, 999999) . md5(md5(md5($temaadv2)))) . $tuzanti2; $temav2yol = "../resimler/siteayarlari"; $temakonumv3 = $_FILES['t3']['tmp_name']; $temaadv3 = $_FILES['t3']['name']; $tematipv3 = $_FILES['t3']['type']; $tuzanti3 = substr($temaadv3, -5, 5); $t3 = md5(rand(100, 999999) . md5(md5(md5($temaadv3)))) . $tuzanti3; $temav3yol = "../resimler/siteayarlari"; $temakonumv4 = $_FILES['anabanner']['tmp_name']; $temaadv4 = $_FILES['anabanner']['name']; $tematipv4 = $_FILES['anabanner']['type']; $tuzanti4 = substr($temaadv4, -5, 5); $anabanner = md5(rand(100, 999999) . md5(md5(md5($temaadv4)))) . $tuzanti4; $temav4yol = "../resimler/siteayarlari"; if (!empty($_FILES['t1']['name'])) { if ($tematipv1 != 'image/jpeg' && $tematipv1 != 'image/png' && $tuzanti1 != '.jpg' && $tuzanti1 != '.png' && $tuzanti1 != '.jpeg') { echo '<script type="text/javascript">$(document).ready(function(){toastr["error"]("Lütfen ! Jpg ve Png uzantılı resim yükleyiniz ....", "Başarısız");});</script>'; } else { $temav1 = move_uploaded_file($temakonumv1, $temav1yol . '/' . $t1); $temav1 = $ozy->prepare("update siteayarlari set t1=? where id='1'"); $temav1->execute([$t1]); } } if (!empty($_FILES['t2']['name'])) { if ($tematipv2 != 'image/jpeg' && $tematipv2 != 'image/png' && $tuzanti2 != '.jpg' && $tuzanti2 != '.png' && $tuzanti2 != '.jpeg') { echo '<script type="text/javascript">$(document).ready(function(){toastr["error"]("Lütfen ! Jpg ve Png uzantılı resim yükleyiniz ....", "Başarısız");});</script>'; } else { $temav2 = move_uploaded_file($temakonumv2, $temav2yol . '/' . $t2); $temav2 = $ozy->prepare("update siteayarlari set t2=? where id='1'"); $temav2->execute([$t2]); } } if (!empty($_FILES['t3']['name'])) { if ($tematipv3 != 'image/jpeg' && $tematipv3 != 'image/png' && $tuzanti3 != '.jpg' && $tuzanti3 != '.png' && $tuzanti3 != '.jpeg') { echo '<script type="text/javascript">$(document).ready(function(){toastr["error"]("Lütfen ! Jpg ve Png uzantılı resim yükleyiniz ....", "Başarısız");});</script>'; } else { $temav2 = move_uploaded_file($temakonumv3, $temav3yol . '/' . $t3); $temav2 = $ozy->prepare("update siteayarlari set t3=? where id='1'"); $temav2->execute([$t3]); } } if (!empty($_FILES['anabanner']['name'])) { if ($tematipv4 != 'image/jpeg' && $tematipv4 != 'image/png' && $tuzanti4 != '.jpg' && $tuzanti4 != '.png' && $tuzanti4 != '.jpeg') { echo '<script type="text/javascript">$(document).ready(function(){toastr["error"]("Lütfen ! Jpg ve Png uzantılı resim yükleyiniz ....", "Başarısız");});</script>'; } else { $temav4 = move_uploaded_file($temakonumv4, $temav4yol . '/' . $anabanner); $temav4 = $ozy->prepare("update siteayarlari set anabanner=? where id='1'"); $temav4->execute([$anabanner]); } } if (!empty($_FILES['favicon']['name'])) { if ($favtip != 'image/jpeg' && $favtip != 'image/png' && $favuzanti != '.jpg' && $favuzanti != '.png' && $favuzanti != '.jpeg') { echo '<script type="text/javascript">$(document).ready(function(){toastr["error"]("Lütfen ! Jpg ve Png uzantılı resim yükleyiniz ....", "Başarısız");});</script>'; } else { if (is_uploaded_file($favkonum)) { if (move_uploaded_file($favkonum, $favyol . '/' . $favyeniad)) { $favekle = move_uploaded_file($favkonum, $favyol . '/' . $favyeniad); $favekle = $ozy->prepare("update siteayarlari set favicon=? where id='1'"); $favekle->execute([$favyeniad]); } else { echo "Failed to move the file!"; echo "Check if the directory exists and has proper permissions."; } } else { echo "No valid file uploaded."; } } } if (!empty($_FILES['logo']['name'])) { if ($restip != 'image/jpeg' && $restip != 'image/png' && $uzanti != '.jpg' && $uzanti != '.png' && $uzanti != '.jpeg') { echo '<script type="text/javascript">$(document).ready(function(){toastr["error"]("Lütfen ! Jpg ve Png uzantılı resim yükleyiniz ....", "Başarısız");});</script>'; } else { $id = "1"; $ekle = move_uploaded_file($reskonum, $yol . '/' . $resimadi); $stmt = $ozy->prepare( "UPDATE siteayarlari SET siteadi = ?, sitekey = ?, sitedesc = ?, logo = ?, google = ?, yandex = ?, reklam = ?, ssldurum = ?, bakimdurum = ?, bakim = ?, tel = ?, ceptel = ?, whatsapp = ?, email = ?, adres = ?, facebook = ?, twitter = ?, pinterest = ?, linkedin = ?, instagram = ?, youtube = ?, googleplus = ?, maps = ?, copy = ?, tema = ?, t4 = ?, t5 = ?, t6 = ?, t7 = ?, t8 = ?, siteurl = ?, dtitle = ? WHERE id = ?" ); $result2 = $stmt->execute([ $siteadi, $sitekey, $sitedesc, $resimadi, $google, $yandex, $reklam, $ssldurum, $bakimdurum, $bakim, $tel, $ceptel, $whatsapp, $email, $adres, $facebook, $twitter, $pinterest, $linkedin, $instagram, $youtube, $googleplus, $maps, $copy, $tema, $t4, $t5, $t6, $t7, $t8, $siteurl, $dtitle, $id, ]); if ($result2) { echo '<script type="text/javascript">$(document).ready(function(){toastr["success"]("Başarıyla veriyi güncellediniz.", "Başarılı");});</script>'; echo '<meta http-equiv="refresh" content="1; url=siteayarlari">'; } else { echo '<script type="text/javascript">$(document).ready(function(){toastr["error"]("Üzgünüm bir hata oluştu :(", "Başarısız");});</script>'; } } } else { $id = "1"; $stmt = $ozy->prepare( "UPDATE siteayarlari SET siteadi = ?, sitekey = ?, sitedesc = ?, google = ?, yandex = ?, reklam = ?, ssldurum = ?, bakimdurum = ?, bakim = ?, tel = ?, ceptel = ?, whatsapp = ?, email = ?, adres = ?, facebook = ?, twitter = ?, pinterest = ?, linkedin = ?, instagram = ?, youtube = ?, googleplus = ?, maps = ?, copy = ?, tema = ?, t4 = ?, t5 = ?, t6 = ?, t7 = ?, t8 = ?, siteurl = ?, dtitle = ? WHERE id = ?" ); $result2 = $stmt->execute([ $siteadi, $sitekey, $sitedesc, $google, $yandex, $reklam, $ssldurum, $bakimdurum, $bakim, $tel, $ceptel, $whatsapp, $email, $adres, $facebook, $twitter, $pinterest, $linkedin, $instagram, $youtube, $googleplus, $maps, $copy, $tema, $t4, $t5, $t6, $t7, $t8, $siteurl, $dtitle, $id, ]); if ($result2) { echo '<script type="text/javascript">$(document).ready(function(){toastr["success"]("Başarıyla veriyi güncellediniz.", "Başarılı");});</script>'; echo '<meta http-equiv="refresh" content="1; url=siteayarlari">'; } else { echo '<script type="text/javascript">$(document).ready(function(){toastr["error"]("Üzgünüm bir hata oluştu :(", "Başarısız");});</script>'; } $anadizin = $_SERVER['DOCUMENT_ROOT'] . '/robots.txt'; $rdosya = fopen($anadizin, 'w+'); //dosya oluşturma işlemi //dosya içine ne yazmak istiyorsanız buraya yazın. $değer fwrite($rdosya, $t4); fclose($rdosya); } } ?> <div class="container-fluid"> <div class="row page-title"> <div class="col-sm-6"> <h3>Genel Site Ayarları</h3> </div> <div class="col-sm-6"> <nav> <ol class="breadcrumb justify-content-sm-end align-items-center"> <li class="breadcrumb-item"> <a href="/boss/anasayfa.php"> <svg class="svg-color"> <use href="datas/svg/iconly-sprite.svg#Home"></use> </svg> </a> </li> <li class="breadcrumb-item active">Genel Site Ayarları</li> </ol> </nav> </div> </div> </div> <div class="container-fluid ecommerce-dashboard"> <div class="row"> <div class="col-12"> <div class="card m-b-30"> <div class="card-body"> <form class="form-horizontal theme-form" action="" method="POST" enctype="multipart/form-data"> <ul class="nav nav-pills nav-primary d-flex" id="pills-tab" role="tablist"> <li class="nav-item flex-grow-1 text-center" role="presentation"> <a class="nav-link active" id="pills-home-tab" data-bs-toggle="pill" href="#pills-home" role="tab" aria-controls="pills-home" aria-selected="true">Genel Site Ayarları</a> </li> <li class="nav-item flex-grow-1 text-center" role="presentation"> <a class="nav-link" id="pills-profile-tab" data-bs-toggle="pill" href="#pills-profile" role="tab" aria-controls="pills-profile" aria-selected="false" tabindex="-1">Tema Ayarları</a> </li> <li class="nav-item flex-grow-1 text-center" role="presentation"> <a class="nav-link" id="pills-messages-tab" data-bs-toggle="pill" href="#pills-messages" role="tab" aria-controls="pills-messages" aria-selected="false" tabindex="-1">İletişim Ayarları</a> </li> <li class="nav-item flex-grow-1 text-center" role="presentation"> <a class="nav-link" id="pills-messagess-tab" data-bs-toggle="pill" href="#pills-messagess" role="tab" aria-controls="pills-messagess" aria-selected="false" tabindex="-1">Sosyal Medya Ayarları</a> </li> </ul> <div class="tab-content" id="pills-tabContent" style="margin-block-start: 50px;"> <div class="tab-pane fade active show" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab"> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">Site URL Adresiniz</label> <div class="col-sm-10"> <input class="form-control" type="text" name="siteurl" value="<?php echo $sayfam["siteurl"]; ?>"> </div> </div> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">Site Değişen Title</label> <div class="col-sm-10"> <input class="form-control" type="text" name="dtitle" value="<?php echo $sayfam["dtitle"]; ?>"> </div> </div> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">Site Adı</label> <div class="col-sm-10"> <input class="form-control" type="text" name="siteadi" value="<?php echo $sayfam["siteadi"]; ?>"> </div> </div> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">Katalog URL</label> <div class="col-sm-10"> <input class="form-control" type="text" name="t5" value="<?php echo $sayfam["t5"]; ?>"> </div> </div> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">Site Özel Keyword</label> <div class="col-sm-10"> <input class="form-control" type="text" data-role="tagsinput" name="sitekey" value="<?php echo $sayfam["sitekey"]; ?>"> </div> </div> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">Site Özel Açıklaması</label> <div class="col-sm-10"> <textarea id="textarea" class="form-control" rows="6" name="sitedesc"><?php echo $sayfam["sitedesc"]; ?></textarea> </div> </div> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">Bakım Modu</label> <div class="col-sm-10"> <input type="checkbox" <?php if ($sayfam["bakimdurum"] == "1") { ?> checked="" <?php } ?> value="1" data-toggle="toggle" data-onstyle="primary" data-offstyle="secondary" name="bakimdurum"> </div> </div> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">Bakım Modu Metni</label> <div class="col-sm-10"> <textarea id="summernote" rows="6" name="bakim"><?php echo $sayfam["bakim"]; ?></textarea> </div> </div> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">Google Analytics Kodu</label> <div class="col-sm-10"> <textarea id="textarea" class="form-control" rows="6" name="google"><?php echo $sayfam["google"]; ?></textarea> </div> </div> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">Yandex Kodu</label> <div class="col-sm-10"> <textarea id="textarea" class="form-control" rows="6" name="yandex"><?php echo $sayfam["yandex"]; ?></textarea> </div> </div> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">Reklam Kodu</label> <div class="col-sm-10"> <textarea id="textarea" class="form-control" rows="6" name="reklam"><?php echo $sayfam["reklam"]; ?></textarea> </div> </div> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">Robots.txt Kodu</label> <div class="col-sm-10"> <textarea id="textarea" class="form-control" rows="8" name="t4"><?php echo $sayfam["t4"]; ?></textarea> </div> </div> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">Google Maps Kodu</label> <div class="col-sm-10"> <textarea id="textarea" class="form-control" rows="6" name="maps"><?php echo $sayfam["maps"]; ?></textarea> </div> </div> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">Copyright Metni</label> <div class="col-sm-10"> <input class="form-control" type="text" name="copy" value="<?php echo $sayfam["copy"]; ?>"> </div> </div> </div> <div class="tab-pane fade" id="pills-profile" role="tabpanel" aria-labelledby="pills-profile-tab"> <div class="row"> <div class="col-12 col-md-6"> <div class="form-group row"> <label for="example-text-input" class="col-sm-3 form-label">Site Favicon</label> <div class="col-sm-9"> <div class="controls"> <div class="fileupload fileupload-new" data-provides="fileupload"> <div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; line-height: 20px;"></div> <div class="fileupload-new thumbnail fileupload-preview thumbnail" style="width: 200px; height: 150px;"> <img src="../resimler/siteayarlari/<?php echo $sayfam["favicon"]; ?>" style="width: 200px; height: 200px;" alt="" /> </div> <div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; line-height: 20px;"></div> <div> <span class="btn btn-default btn-file" style="border: 1px solid #ebeef0;"> <span class="fileupload-new"><i class="fa fa-paper-clip"></i> Resim Seç</span> <span class="fileupload-exists"><i class="fa fa-undo"></i> Değiştir</span> <input name="favicon" type="file" class="default" /> </span> <a href="#" class="btn btn-outline-primary waves-effect waves-light" data-dismiss="fileupload"><i class="fa fa-trash"></i> Sil</a> </div> </div> </div> </div> </div> </div> <div class="col-12 col-md-6"> <div class="form-group row"> <label for="example-text-input" class="col-sm-3 form-label">Site Logosu</label> <div class="col-sm-9"> <div class="controls"> <div class="fileupload fileupload-new" data-provides="fileupload"> <div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; line-height: 20px;"></div> <div class="fileupload-new thumbnail fileupload-preview thumbnail" style="width: 200px; height: 150px;"> <img src="../resimler/siteayarlari/<?php echo $sayfam["logo"]; ?>" style="width: 200px; height: 200px;" alt="" /> </div> <div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; line-height: 20px;"></div> <div> <span class="btn btn-default btn-file" style="border: 1px solid #ebeef0;"> <span class="fileupload-new"><i class="fa fa-paper-clip"></i> Resim Seç</span> <span class="fileupload-exists"><i class="fa fa-undo"></i> Değiştir</span> <input name="logo" type="file" class="default" /> </span> <a href="#" class="btn btn-outline-primary waves-effect waves-light" data-dismiss="fileupload"><i class="fa fa-trash"></i> Sil</a> </div> </div> </div> </div> </div> </div> </div> </div> <div class="tab-pane fade" id="pills-messages" role="tabpanel" aria-labelledby="pills-messages-tab"> <div class="form-group row mb-3"> <label for="example-tel-input" class="col-sm-2 form-label">Telefon Numaranız</label> <div class="col-sm-10"> <input class="form-control" type="tel" value="<?php echo $sayfam["tel"]; ?>" id="example-tel-input" name="tel"> </div> </div> <div class="form-group row mb-3"> <label for="example-tel-input" class="col-sm-2 form-label">Gsm Numaranız</label> <div class="col-sm-10"> <input class="form-control" type="tel" value="<?php echo $sayfam["ceptel"]; ?>" id="example-tel-input" name="ceptel"> </div> </div> <div class="form-group row mb-3"> <label for="example-tel-input" class="col-sm-2 form-label">WhatsApp Numaranız</label> <div class="col-sm-10"> <input class="form-control" type="tel" value="<?php echo $sayfam["whatsapp"]; ?>" id="example-tel-input" name="whatsapp"> </div> </div> <div class="form-group row mb-3"> <label for="example-tel-input" class="col-sm-2 form-label">Email Adresiniz</label> <div class="col-sm-10"> <input class="form-control" type="text" value="<?php echo $sayfam["email"]; ?>" name="email"> </div> </div> <div class="form-group row mb-3"> <label for="example-text-input" class="col-sm-2 form-label">İletişim Adresi</label> <div class="col-sm-10"> <textarea id="textarea" class="form-control" rows="6" name="adres"><?php echo $sayfam["adres"]; ?></textarea> </div> </div> </div> <div class="tab-pane fade" id="pills-messagess" role="tabpanel" aria-labelledby="pills-messagess-tab"> <div class="form-group mb-3"> <div class="input-group"> <span class="input-group-text"><i class="icofont icofont-facebook"></i></span> <input class="form-control" name="facebook" value="<?php echo $sayfam["facebook"]; ?>" type="text"> </div> </div> <div class="form-group mb-3"> <div class="input-group"> <span class="input-group-text"><i class="icofont icofont-twitter"></i></span> <input class="form-control" name="twitter" value="<?php echo $sayfam["twitter"]; ?>" type="text"> </div> </div> <div class="form-group mb-3"> <div class="input-group"> <span class="input-group-text"><i class="icofont icofont-instagram"></i></span> <input class="form-control" name="instagram" value="<?php echo $sayfam["instagram"]; ?>" type="text"> </div> </div> <div class="form-group mb-3"> <div class="input-group"> <span class="input-group-text"><i class="icofont icofont-google-plus"></i></span> <input class="form-control" name="googleplus" value="<?php echo $sayfam["googleplus"]; ?>" type="text"> </div> </div> <div class="form-group mb-3"> <div class="input-group"> <span class="input-group-text"><i class="icofont-youtube-play"></i></span> <input class="form-control" name="youtube" value="<?php echo $sayfam["youtube"]; ?>" type="text"> </div> </div> </div> </div> <button type="submit" name="guncelle" class="btn btn-warning btn-lg btn-block waves-effect waves-light" style="width: 100%; margin-block-start: 15px;">Güncelle</button> </form> </div> </div> </div> </div> </div>
💾 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