📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
blogscripti.demodesign.com.tr
📝
icerik.php
← Geri Dön
<?php ob_start(); include "main-head.php"; include "main-header.php"; $yazikontrolu = $db->prepare("SELECT * FROM blog WHERE seolink=:seolink"); $yazikontrolu->execute(array( 'seolink' => $_GET['icerik'] )); $posttype = $db->query("SELECT * FROM blog WHERE seolink = '{$_GET['icerik']}'")->fetch(PDO::FETCH_ASSOC); if ($yazikontrolu->rowCount() == 0) { header("Location: 404"); exit; } $blogdetay = $db->prepare("SELECT * FROM blog WHERE seolink=:seolink"); $blogdetay->execute(array( 'seolink' => $_GET['icerik'] )); $blogcek = $blogdetay->fetch(PDO::FETCH_ASSOC); if($posttype['tur'] == 'sayfa'){ ?> <section id="content_main" class="clearfix jl_spost"> <div class="container"> <div class="row main_content"> <div class="col-md-12 loop-large-post" > <div class="widget_container content_page"> <!-- start post --> <div class="post-2808 post type-post status-publish format-standard has-post-thumbnail category-business tag-gaming tag-morning tag-relaxing" id="post-2808"> <div class="single_section_content box blog_large_post_style"> <div class="jl_single_style2"> <div class="single_post_entry_content single_bellow_left_align jl_top_single_title jl_top_title_feature"> <h1 class="single_post_title_main"> <?= $blogcek['baslik'] ?> </h1> <span class="single-post-meta-wrapper"> <?php if($_SESSION['email']){ ?> <span class="post-date updated"> <a href="/admin/sayfa?id=<?= $blogcek['id'] ?>" >Düzenle</a></span></span> <?php } ?> </div> <div class="single_content_header jl_single_feature_below"> <div class="image-post-thumb jlsingle-title-above"> <img width="1000" height="668" src="<?= $blogcek['resim'] ?>" class="attachment-disto_justify_feature size-disto_justify_feature wp-post-image" alt=""></div> </div> <?= $blogcek['icerik'] ?> </div> </div> <!-- end post --> <div class="brack_space"></div> </div> </div> </div> </div> </div> </section> <?php } else { $blogdetay = $db->prepare("SELECT * FROM blog WHERE seolink=:seolink"); $blogdetay->execute(array( 'seolink' => $_GET['icerik'] )); $blogcek = $blogdetay->fetch(PDO::FETCH_ASSOC); $yorumsay = $db->prepare("SELECT * FROM blogyorumlar WHERE urunid=:urunid"); $yorumsay->execute(array( 'urunid' => $blogcek['id'] )); $yorumsaycek = $yorumsay->rowCount(); $kategorisorgu = $db->query("SELECT * FROM kategori WHERE id = '$blogcek[kategori]'")->fetch(PDO::FETCH_ASSOC); // Call the hit() function to track hits for the content hit($blogcek['id'], $db); ?> <script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script> <style> .comment-wrap { width: 100%; border-radius: 3px; box-shadow: 0px 18px 54px -30px rgba(0, 0, 0, 0.75); border: 1px solid #eee; background: linear-gradient(-45deg, rgba(255, 255, 255, 1) 0%, rgba(247, 247, 247, 1) 10%); } .comment-add-wrap { display: flex; flex-direction: row; padding: 10px; } .comment-static-wrap { display: flex; justify-content: flex-start; align-items: center; width: 100%; } .comment-user-profile { height: 100%; width: 80px; border-radius: 3px; display: flex; justify-content: space-between; flex-direction: column; align-items: center; margin: 10px 0 10px 0; } .comment-user-picture { height: 50px; width: 50px; background-size: cover; margin-top: 5px; border-radius: 50%; border: 1px solid #eee; } .comment-user-controls { display: flex; flex-direction: column; justify-content: flex-end; margin-bottom: 10px; } .btn { border: 0; padding: 8px; border-radius: 3px; font-size: 12px; outline: none; margin-top: 5px; } .btn:hover { cursor: pointer; } .cancel-btn { background: #f9f9f9; border: 1px solid #ccc; position: relative; } /*Using pseude elements for optimal performance*/ .cancel-btn::before { content: ""; position: absolute; height: 100%; width: 100%; top: 0; left: 0; background: gray; opacity: 0; transition: opacity 200ms ease-out; } .cancel-btn:hover::before { opacity: 0.1; } .comment-btn { background: royalblue; color: white; position: relative; } .comment-btn::before { content: ""; position: absolute; height: 100%; width: 100%; top: 0; left: 0; background: white; opacity: 0; transition: opacity 200ms ease-out; } .comment-btn:hover::before { opacity: 0.1; } .comment-add-textarea { width: 100%; margin: 10px 0 10px 10px; display: flex; flex-direction: column; align-items: center; overflow: hidden; } .comment-area { min-width: 100%; max-width: 100%; max-height: 250px; padding: 10px; min-height: 110px; border-radius: 3px 3px 0 0; border: 1px solid lightgray; border-bottom: 0; background: #eee; outline: none; } .comment-area:focus { background: white; } .comment-tooling-wrap { width: 100%; height: 30px; border-radius: 0 0 3px 3px; background: white; border: 1px solid lightgray; } /*Messages section ---*/ .comment-messages-wrap { height: auto; width: 100%; background: white; margin: 10px 0 0 0; padding: 10px; display: flex; justify-content: center; flex-direction: column; align-items: center; } .comment-label-wrap { height: 30px; width: 100%; display: flex; align-items: center; padding: 10px 0 15px 0; border-bottom: 1px solid royalblue; } .comment-label-text { font-weight: bold; font-size: 14px; color: #3d3d3d; } .comment-messages-list { width: 100%; display: flex; flex-direction: column; overflow-y: auto; } .comment-message-message { position: relative; height: auto; min-height: 80px; width: 100%; background: white; border-bottom: 1px solid lightgray; margin-bottom: 10px; display: flex; padding: 5px; flex-direction: row-reverse; flex-shrink: 0; box-shadow: 0px 18px 54px -30px rgba(0, 0, 0, 0.30); } .comment-message-message::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(15deg, rgba(255, 255, 255, 1) 40%, rgba(198, 194, 255, 0.3) 100%); z-index: 0; opacity: 0; transition: opacity 300ms cubic-bezier(1, .41, .4, .78); } .comment-message-message:hover::before { opacity: 1; } .comment-message-message:last-child { border: 0; box-shadow: none; } .comment-message-profile { width: 80px; display: flex; justify-content: space-between; align-items: flex-start; flex-direction: column; padding: 10px; } .comment-profile-picture { height: 50px; z-index: 2; width: 50px; border-radius: 50%; background-size: cover; } .comment-profile-options { height: 30px; width: 100%; display: flex; align-items: center; z-index: 2; justify-content: center; cursor: pointer; transition: transform 300ms ease-out; } .comment-profile-options:hover { transform: translateY(-5px); } .comment-profile-options:hover::before { transform: translateY(-5px); } .comment-profile-options:hover::after { transform: translateY(-5px); } .comment-options-toggle { height: 4px; width: 4px; background: #606060; position: relative; border-radius: 50%; } .comment-options-toggle::before { content: ""; height: 4px; width: 4px; background: #606060; position: absolute; left: 0; margin-left: 8px; border-radius: 50%; transition: transform 300ms ease-out; } .comment-options-toggle::after { content: ""; height: 4px; width: 4px; background: #606060; position: absolute; right: 0; margin-right: 8px; border-radius: 50%; transition: transform 300ms ease-out; } .comment-message-body { width: 100%; z-index: 2; display: flex; flex-direction: column; } .comment-message-details { height: 30px; width: 100%; display: flex; justify-content: flex-start; align-items: center; } .message-details-sender { padding: 0 10px 0 5px; font-weight: bold; font-size: 14px; } .message-details-time { color: gray; font-size: 12px; } .comment-message-text { width: 100%; padding: 5px; color: #1c1c1c; margin-bottom: 5px; } .like-content { display: inline-block; width: 100%; margin: 40px 0 0; padding: 40px 0 0; font-size: 18px; border-top: 10px dashed #eee; text-align: center; } .like-content span { color: #9d9da4; font-family: monospace; } .like-content .btn-secondary { display: block; margin: 40px auto 0px; text-align: center; background: #ed2553; border-radius: 3px; box-shadow: 0 10px 20px -8px rgb(240, 75, 113); padding: 10px 17px; font-size: 18px; cursor: pointer; border: none; outline: none; color: #ffffff; text-decoration: none; -webkit-transition: 0.3s ease; transition: 0.3s ease; } .like-content .btn-secondary:hover { transform: translateY(-3px); } .like-content .btn-secondary .fa { margin-right: 5px; } .animate-like { animation-name: likeAnimation; animation-iteration-count: 1; animation-fill-mode: forwards; animation-duration: 0.65s; } @keyframes likeAnimation { 0% { transform: scale(30); } 100% { transform: scale(1); } } </style> <section id="content_main" class="clearfix jl_spost"> <div class="container"> <div class="row main_content"> <div class="col-md-8 loop-large-post" id="content"> <div class="widget_container content_page"> <!-- start post --> <div class="post-2808 post type-post status-publish format-standard has-post-thumbnail category-business tag-gaming tag-morning tag-relaxing" id="post-2808"> <div class="single_section_content box blog_large_post_style"> <div class="jl_single_style2"> <div class="single_post_entry_content single_bellow_left_align jl_top_single_title jl_top_title_feature"> <h1 class="single_post_title_main"> <?= $blogcek['baslik'] ?> </h1> <span class="single-post-meta-wrapper"><span class="post-date updated"><i class="fa fa-clock-o"></i><?= $blogcek['olusturmazamani'] ?></span><span class="meta-comment"><i class="fa fa-comment"></i><?php if ($yorumsaycek > 0) { echo $yorumsaycek . ' Yorum'; } else { echo "Yorum Yok"; echo '<script> window.addEventListener("DOMContentLoaded", function() { var respondElement = document.getElementById("respond"); respondElement.style.display = "none"; }); </script>'; } ?> </span><span class="view_options"><i class="fa fa-eye"></i><?php if ($blogcek['hit'] == 0) { echo 'Henüz görüntülenmedi'; } else { echo $blogcek['hit'] . ' Görüntülenme'; } ?> </span> <?php if (isset($_SESSION['email']) && !empty($_SESSION['email'])) { ?> <span class="post-date updated"> <a href="/admin/yazi-duzenle?id=<?= $blogcek['id'] ?>">Düzenle</a> </span> <?php } ?> </div> <div class="single_content_header jl_single_feature_below"> <div class="image-post-thumb jlsingle-title-above"> <img width="1000" height="668" src="<?= $blogcek['resim'] ?>" class="attachment-disto_justify_feature size-disto_justify_feature wp-post-image" alt=""></div> </div> </div> <div class="post_content" style="border-bottom: 1px solid #E2E3E7;"> <?php if ($blogcek['follow'] == '1') { $dom = new DOMDocument(); libxml_use_internal_errors(true); $dom->loadHTML(mb_convert_encoding($blogcek['icerik'], 'HTML-ENTITIES', 'UTF-8')); libxml_clear_errors(); $links = $dom->getElementsByTagName('a'); foreach ($links as $link) { $link->setAttribute('rel', 'dofollow'); } $newHtml = $dom->saveHTML(); if ($icindekiler['durum'] == 1) { $tocContent = generateTableOfContents($newHtml); // Kontrol edilen içindekiler öğesi $dom = new DOMDocument(); $dom->loadHTML($tocContent); $listItems = $dom->getElementsByTagName('li'); if ($listItems->length <= 1) { // İçindekiler öğesi 1 veya daha az ise sadece tabloyu gizle $tocContent = str_replace('table-of-contents', 'table-of-contents hidden', $tocContent); } echo $tocContent; } else { echo $newHtml; } } else { $dom = new DOMDocument(); libxml_use_internal_errors(true); $dom->loadHTML(mb_convert_encoding($blogcek['icerik'], 'HTML-ENTITIES', 'UTF-8')); libxml_clear_errors(); $links = $dom->getElementsByTagName('a'); foreach ($links as $link) { $link->setAttribute('rel', 'nofollow'); } $newHtml = $dom->saveHTML(); if ($icindekiler['durum'] == 1) { $tocContent = generateTableOfContents($newHtml); // Kontrol edilen içindekiler öğesi $dom = new DOMDocument(); $dom->loadHTML($tocContent); $listItems = $dom->getElementsByTagName('li'); if ($listItems->length <= 1) { // İçindekiler öğesi 1 veya daha az ise sadece tabloyu gizle $tocContent = str_replace('table-of-contents', 'table-of-contents hidden', $tocContent); } echo $tocContent; } else { echo $newHtml; } } ?> </div> <?php $sad = $db->query("SELECT COUNT(*) FROM puan WHERE icerik={$blogcek['id']} AND puan = 'sad'")->fetchColumn(); $happy = $db->query("SELECT COUNT(*) FROM puan WHERE icerik={$blogcek['id']} AND puan = 'happy' ")->fetchColumn(); $love = $db->query("SELECT COUNT(*) FROM puan WHERE icerik={$blogcek['id']} AND puan = 'love'")->fetchColumn(); $good = $db->query("SELECT COUNT(*) FROM puan WHERE icerik={$blogcek['id']} AND puan = 'good'")->fetchColumn(); $angry = $db->query("SELECT COUNT(*) FROM puan WHERE icerik={$blogcek['id']} AND puan = 'angry'")->fetchColumn(); ?> <div class="clearfix"></div> <div class="single_tag_share"> <div class="reaksiyon" style=" width: 100%; display: grid; "> <ul class=" feedback" style="margin-bottom: 15px;margin-left: auto;margin-right: auto;" data-id="<?= $blogcek['id'] ?>"> <li class="angry"> <div> <svg class="eye left"> <use xlink:href="#eye"> </svg> <svg class="eye right"> <use xlink:href="#eye"> </svg> <svg class="mouth"> <use xlink:href="#mouth"> </svg> <span style=" position: absolute; bottom: -22px; left: 15px; "><?=$angry?></span> </div> </li> <li class="sad"> <div> <svg class="eye left"> <use xlink:href="#eye"> </svg> <svg class="eye right"> <use xlink:href="#eye"> </svg> <svg class="mouth"> <use xlink:href="#mouth"> </svg> <span style=" position: absolute; bottom: -22px; left: 15px; "><?=$sad?></span> </div> </li> <li class="ok active"> <div> <span style=" position: absolute; bottom: -22px; left: 15px; "><?=$love?></span> </div> </li> <li class="good "> <div> <svg class="eye left"> <use xlink:href="#eye"> </svg> <svg class="eye right"> <use xlink:href="#eye"> </svg> <svg class="mouth"> <use xlink:href="#mouth"> </svg> <span style=" position: absolute; bottom: -22px; left: 15px; "><?=$good?></span> </div> </li> <li class="happy"> <div> <svg class="eye left"> <use xlink:href="#eye"> </svg> <svg class="eye right"> <use xlink:href="#eye"> </svg> <span style=" position: absolute; bottom: -22px; left: 15px; "><?=$happy?></span> </div> </li> </ul> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 7 4" id="eye"> <path d="M1,1 C1.83333333,2.16666667 2.66666667,2.75 3.5,2.75 C4.33333333,2.75 5.16666667,2.16666667 6,1"></path> </symbol> <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 7" id="mouth"> <path d="M1,5.5 C3.66666667,2.5 6.33333333,1 9,1 C11.6666667,1 14.3333333,2.5 17,5.5"></path> </symbol> </svg> </div> <div class="tag-cat" style="padding-bottom: 20px"> <ul class="single_post_tag_layout"> <?php if ($blogcek['etiket']) { $etiketler = explode(",", $blogcek['etiket']); foreach ($etiketler as $etiket) { $etiketadi = $db->query("SELECT * FROM etiket WHERE slug = '$etiket'")->fetch(PDO::FETCH_ASSOC); echo '<li><a href="/etiket/' . $etiketadi['slug'] . '">' . $etiketadi['etiket'] . '</a></li>'; } } ?> </ul> </div> <div id="socialcountplus-2" style="border-top: 1px solid #E2E3E7; padding-top: 10px" class="widget widget_socialcountplus"> <div class="social-count-plus"> <ul class="default"> <ul class="default"> <li class="count-facebook" style="width: 25% !important; padding-top:35px;"><a class="icon" href="https://www.facebook.com/sharer/sharer.php?u=https://<?php echo $_SERVER['SERVER_NAME']; ?><?php echo $_SERVER['REQUEST_URI']; ?>" rel="nofollow noopener noreferrer" target="_blank"></a> </li> <li class="count-twitter" style="width: 25% !important; padding-top:35px;"><a class="icon" href="https://twitter.com/share?url=https://<?php echo $_SERVER['SERVER_NAME']; ?><?php echo $_SERVER['REQUEST_URI']; ?>" rel="nofollow noopener noreferrer" target="_blank"></a> </li> <li class="count-whatsapp" style="width: 25% !important; padding-top:35px;"><a class="icon" href="https://wa.me/?text=https://<?php echo $_SERVER['SERVER_NAME']; ?><?php echo $_SERVER['REQUEST_URI']; ?>" rel="nofollow noopener noreferrer" target="_blank"></a> </li> <li class="count-news" style="width: 25% !important; height; padding-top:35px;"><a class="icon" href="<?php echo $siteayar['news'] ?>" rel="nofollow noopener noreferrer" target="_blank"></a> </li> </ul> </ul> </div> </div> </div> <?php if ($oncekiyazilar['durum'] == 1) { $currentYaziId = $blogcek['id']; // Önceki yazıyı bulmak için $previousQuery = $db->prepare("SELECT * FROM blog WHERE id < :current_id AND tur != 'sayfa' ORDER BY id DESC LIMIT 1"); $previousQuery->bindParam(':current_id', $currentYaziId, PDO::PARAM_INT); $previousQuery->execute(); $previousYazi = $previousQuery->fetch(); // Sonraki yazıyı bulmak için $nextQuery = $db->prepare("SELECT * FROM blog WHERE id > :current_id AND tur != 'sayfa' ORDER BY id ASC LIMIT 1"); $nextQuery->bindParam(':current_id', $currentYaziId, PDO::PARAM_INT); $nextQuery->execute(); $nextYazi = $nextQuery->fetch(); if ($previousYazi) { ?> <div class="postnav_left"> <div class="single_post_arrow_content"> <a href="/<?= $previousYazi['seolink'] ?>" id="prepost"> <?= $previousYazi['baslik'] ?> <span class="jl_post_nav_left"> Önceki Gönderi</span></a> </div> </div> <?php } // Sonraki yazı linki if ($nextYazi) { ?> <div class="postnav_right"> <div class="single_post_arrow_content"> <a href="/<?= $nextYazi['seolink'] ?>" id="nextpost"> <?= $nextYazi['baslik'] ?> <span class="jl_post_nav_left"> Sonraki Gönderi</span></a> </div> </div> <?php } } if ($benzeryazilar['durum'] == 1) { ?> <div class="related-posts"> <h4> Tavsiye ettiğimiz diğer <?php echo $kategorisorgu['name'] ?> Makaleleri </h4> <div class="single_related_post"> <?php $sonyazilar = $db->query("SELECT * FROM blog WHERE tur != 'sayfa' AND kategori = '$kategorisorgu[id]' ORDER by olusturmazamani ASC limit 2")->fetchAll(PDO::FETCH_ASSOC); foreach ($sonyazilar as $yazilar) { $kategorisorgux = $db->query("SELECT * FROM kategori WHERE id = '$yazilar[kategori]'")->fetch(PDO::FETCH_ASSOC); ?> <div class="jl_related_feature_items"> <div class="jl_related_feature_items_in"> <div class="image-post-thumb"> <a href="/<?= $yazilar['seolink'] ?>" class="link_image featured-thumbnail" title="People are enjoy the job that they love"> <img width="780" height="450" src="<?= $yazilar['resim'] ?>" class="attachment-disto_large_feature_image size-disto_large_feature_image wp-post-image" alt=""> <div class="background_over_image"></div> </a> </div> <span class="jl_post_type_icon"><i class="la la-camera"></i></span> <div class="post-entry-content"> <h3 class="jl-post-title"><a href="/<?= $yazilar['seolink'] ?>"> <?= $yazilar['baslik'] ?></a></h3> </div> </div> </div> <?php } ?> <div class="clear_2col_related"></div> </div> </div> <?php } ?> <div id="respond" class="comment-respond"> <div class="comment-messages-list"> <?php $yorumlar = $db->query("SELECT * FROM blogyorumlar WHERE urunid = '$blogcek[id]' AND durum = '1' ORDER BY tarih DESC")->fetchAll(PDO::FETCH_ASSOC); foreach ($yorumlar as $yorum) { ?> <div class="comment-message-message"> <div class="comment-message-body"> <div class="comment-message-details"> <span class="message-details-sender"><?= $yorum['uyeisim'] ?></span> <span class="message-details-time"><?= format_tarih_saat($yorum['tarih']) ?></span> </div> <div class="comment-message-text"> <p> <?= $yorum['yorum'] ?> </p> </div> </div> <div class="comment-message-profile"> <div style="background-image: url(https://secure.gravatar.com/avatar/<?= md5($yorum['email']) ?>?s=50&d=mm&r=g)" class="comment-profile-picture"> </div> </div> </div> <?php } ?> </div> </div> <div id="respond" class="comment-respond"> <?php if (isset($_POST)) { if ($turnstile['durum'] == '0') { $ipAdresi = $_SERVER['REMOTE_ADDR']; // Son gönderim tarihini sorgula $sonGonderimSorgu = $db->prepare("SELECT tarih FROM blogyorum WHERE ip = :ip_adres ORDER BY id DESC LIMIT 1"); $sonGonderimSorgu->bindParam(':ip_adres', $ipAdresi, PDO::PARAM_STR); $sonGonderimSorgu->execute(); $sonGonderim = $sonGonderimSorgu->fetch(); // Son gönderim tarihini kontrol et if ($sonGonderim) { $sonGonderimTarihi = strtotime($sonGonderim['tarih']); $suankiZaman = time(); $gecenSure = $suankiZaman - $sonGonderimTarihi; $beklemeSuresi = 3600; // 1 saat (saniye cinsinden) if ($gecenSure < $beklemeSuresi) { $mesaj = '<div class="alert alert-danger">Yorum göndermek için lütfen ' . ($beklemeSuresi - $gecenSure) . ' saniye bekleyin.</div>'; } } if ($_SERVER['REQUEST_METHOD'] == 'POST') { $isim = $_POST['isim']; $email = $_POST['email']; $yorum = $_POST['comment']; $link = $_POST['link']; $ip = $_SERVER['REMOTE_ADDR']; $yorumekle = $db->prepare("INSERT INTO blogyorumlar SET uyeisim = ?,email = ?, yorum = ?, link = ?, urunid = ?, ip = ?"); $yorumekle->execute(array( $isim, $email, $yorum, $link, $blogcek['id'], $ip )); $mesaj = '<div class="alert alert-success">Yorumunuz gönderildi.</div>'; } } else { if ($_SERVER['REQUEST_METHOD'] == 'POST') { $captcha = $_POST['cf-turnstile-response']; if (!$captcha) { // CAPTCHA yanlış girildiğinde ne olacağını belirtin echo '<h2>Lütfen CAPTCHA formunu kontrol edin.</h2>'; exit; } $secretKey = $siteayar['turnsecret']; $ip = $_SERVER['REMOTE_ADDR']; $url = 'https://challenges.cloudflare.com/turnstile/v0/siteverify'; $data = array( 'secret' => $secretKey, 'response' => $captcha, 'remoteip' => $ip ); $options = array( 'http' => array( 'method' => 'POST', 'header' => 'Content-Type: application/x-www-form-urlencoded', 'content' => http_build_query($data) ) ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); if ($result === false) { // Hata durumunda ne olacağını belirtin echo '<h2>Bir hata oluştu. CAPTCHA doğrulama başarısız.</h2>'; exit; } $response = json_decode($result, true); if (intval($response["success"]) !== 1) { // CAPTCHA doğrulama başarısız olduğunda ne olacağını belirtin echo "<div class='alert alert-danger'>Spam algılandı!</div> "; exit; } else { $ipAdresi = $_SERVER['REMOTE_ADDR']; // Son gönderim tarihini sorgula $sonGonderimSorgu = $db->prepare("SELECT tarih FROM blogyorum WHERE ip = :ip_adres ORDER BY id DESC LIMIT 1"); $sonGonderimSorgu->bindParam(':ip_adres', $ipAdresi, PDO::PARAM_STR); $sonGonderimSorgu->execute(); $sonGonderim = $sonGonderimSorgu->fetch(); // Son gönderim tarihini kontrol et if ($sonGonderim) { $sonGonderimTarihi = strtotime($sonGonderim['tarih']); $suankiZaman = time(); $gecenSure = $suankiZaman - $sonGonderimTarihi; $beklemeSuresi = 3600; // 1 saat (saniye cinsinden) if ($gecenSure < $beklemeSuresi) { $mesaj = '<div class="alert alert-danger">Yorum göndermek için lütfen ' . ($beklemeSuresi - $gecenSure) . ' saniye bekleyin.</div>'; } } $isim = $_POST['isim']; $email = $_POST['email']; $yorum = $_POST['comment']; $link = $_POST['link']; $ip = $_SERVER['REMOTE_ADDR']; $yorumekle = $db->prepare("INSERT INTO blogyorumlar SET uyeisim = ?,email = ?, yorum = ?, link = ?, urunid = ?, ip = ?"); $yorumekle->execute(array( $isim, $email, $yorum, $link, $blogcek['id'], $ip )); $mesaj = '<div class="alert alert-success">Yorumunuz gönderildi.</div>'; } } } } ?> <?php if (isset($mesaj)) { echo $mesaj; } ?> <h3 id="reply-title" class="comment-reply-title">Yorum yazın </h3> <form action="" method="post" id="commentform" class="comment-form"> <p class="comment-notes"><span id="email-notes">E-Posta Adresiniz Paylaşılmayacaktır</span> işaretli alanlar zorunludur <span class="required">*</span> </p> <p class="comment-form-comment"> <textarea class="u-full-width" id="comment" name="comment" cols="45" rows="8" aria-required="true" placeholder="Yorum" required></textarea> </p> <div class="form-fields row"> <span class="comment-form-author col-md-6"> <input id="author" name="isim" type="text" value="" size="30" placeholder="İsim" required> </span> <span class="comment-form-email col-md-6"> <input id="email" name="email" type="text" value="" size="30" placeholder="E-Posta" required> </span> <span class="comment-form-email col-md-6" style="margin-bottom: 15px"> <input id="link" name="link" type="text" value="" size="30" placeholder="Website Linki"> </span> <?php if ($turnstile['durum'] == '1') { ?> <span class="comment-form-email col-md-6" style="margin-top: 15px"> <div class="cf-turnstile" data-sitekey="<?php echo $siteayar['turnsite']; ?>"></div> </span> <?php } ?> </div> <p class="form-submit"> <input name="submit" style="width: 100%" type="submit" id="submit" class="submit" value="Gönder"> </p> </form> </div><!-- #respond --> </div> <!-- end post --> <div class="brack_space"></div> </div> </div> </div> <div class="col-md-4" id="sidebar"> <div id="disto_category_image_widget_register-5" class="widget jellywp_cat_image"> <div class="wrapper_category_image"> <div class="category_image_wrapper_main"> <?php $kategorigetir = $db->query("SELECT * FROM kategori ORDER by name ")->fetchAll(PDO::FETCH_ASSOC); foreach ($kategorigetir as $kategori) { $sql = "SELECT * FROM blog WHERE kategori = '$kategori[id]' ORDER BY id DESC LIMIT 1"; $stmt = $db->prepare($sql); $stmt->execute(); $yazi = $stmt->fetch(PDO::FETCH_ASSOC); $yazisay = $db->query("SELECT * FROM blog WHERE kategori = '$kategori[id]'")->rowCount(); $kategoriyazisay = $db->query("SELECT * FROM blog WHERE kategori = '$kategori[id]'")->rowCount(); if($yazisay > 0 ){ ?> <div class="category_image_bg_image" style="background-image: url('<?= $yazi["resim"] ?>');"> <a class="category_image_link" id="category_color_2" href="/kategori/<?= $kategori['slug'] ?>"><span class="jl_cm_overlay"><span class="jl_cm_name"><?= $kategori['name'] ?></span><span class="jl_cm_count"><?= $yazisay ?></span></span></a> <div class="category_image_bg_overlay" style="background: #ed1c1c;"></div> </div> <?php } } ?> </div> <span class="jl_none_space"></span> </div> </div> <span class="jl_none_space"></span> <div id="disto_recent_post_widget-7" class="widget post_list_widget"> <div class="widget_jl_wrapper"><span class="jl_none_space"></span> <div class="widget-title"> <h2>Son Yazılar</h2> </div> <div> <ul class="feature-post-list recent-post-widget"> <?php $sonyazilar = $db->query("SELECT * FROM blog WHERE tur != 'sayfa' ORDER by olusturmazamani ASC limit 3")->fetchAll(PDO::FETCH_ASSOC); foreach ($sonyazilar as $yazilar) { $kategorisorgux = $db->query("SELECT * FROM kategori WHERE id = '$yazilar[kategori]'")->fetch(PDO::FETCH_ASSOC); ?> <li> <a href="/<?= $yazilar['seolink'] ?>" class="jl_small_format feature-image-link image_post featured-thumbnail" title="Sitting right here waiting for you come to me"> <img width="120" height="120" src="<?= $yazilar['resim'] ?>" class="attachment-disto_small_feature size-disto_small_feature wp-post-image" alt=""> <div class="background_over_image"></div> </a> <div class="item-details"> <h3 class="feature-post-title"><a href="/<?= $yazilar['seolink'] ?>"> <?= $yazilar['baslik'] ?></a></h3> <span class="post-meta meta-main-img auto_image_with_date"> <span class="post-date"><i class="fa fa-clock-o"></i><?= $yazilar['olusturmazamani'] ?></span></span> </div> </li> <?php } ?> </ul> </div> <span class="jl_none_space"></span> </div> </div> <span class="jl_none_space"></span> <div id="disto_recent_large_slider_widgets-5" class="widget jl_widget_slider"> <div class="slider_widget_post jelly_loading_pro"> <?php $gonderiler = $db->query("SELECT * FROM blog WHERE tur != 'sayfa' ORDER by olusturmazamani DESC limit 3")->fetchAll(PDO::FETCH_ASSOC); foreach ($gonderiler as $gonderi) { $kategorisorgu = $db->query("SELECT * FROM kategori WHERE id = '$gonderi[kategori]'")->fetch(PDO::FETCH_ASSOC); ?> <div class="recent_post_large_widget"> <span class="image_grid_header_absolute" style="background-image: url('<?= $gonderi['resim'] ?>')"></span> <a href="/<?= $gonderi['seolink'] ?>" class="link_grid_header_absolute" title="Makeup it really important things to do"></a> <div class="wrap_box_style_main image-post-title"> <h3 class="image-post-title"><a href="/<?= $gonderi['seolink'] ?>"> <?= $gonderi['baslik'] ?></a></h3> <span class="post-date"><i class="fa fa-clock-o"></i><?= $gonderi['olusturmazamani'] ?></span></span> </div> </div> <?php } ?> </div> <span class="jl_none_space"></span> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BlogPosting", "headline": "<?php echo $gonderi->baslik; ?>", "description": "<?php echo $gonderi->seodescription; ?>", "image": "<?php echo $gonderi->resim; ?>", "author": { "@type": "WebPage", "name": "<?php echo $gonderi->seodescription; ?>", "url": "https://<?= $_SERVER['SERVER_NAME'] ?>" }, "publisher": { "@type": "Organization", "name": "<?php echo $siteayar['baslik'] ?>", "logo": { "@type": "ImageObject", "url": "https://<?= $_SERVER['SERVER_NAME'] ?>/<?php echo $siteayar['logo']; ?>" } }, "datePublished": "<?php echo $yazilar->olusturmazamani; ?>", "dateModified": "<?php echo $yazilar->olusturmazamani; ?>" } </script> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "WebPage", "name": "<?php echo $siteayar['baslik'] ?>", "url": "https://<?= $_SERVER['SERVER_NAME'] ?>" } </script> </div> </div> </div> </div> </section> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <script> window.onload = function () { var tocLinks = document.querySelectorAll('.table-of-contents a'); tocLinks.forEach(function (link) { link.addEventListener('click', scrollToSection); }); }; function scrollToSection(event) { event.preventDefault(); var targetId = this.getAttribute('href').substring(1); var targetElement = document.getElementById(targetId); if (targetElement && window.scrollTo) { var offsetTop = targetElement.getBoundingClientRect().top; var scrollTop = window.pageYOffset || document.documentElement.scrollTop; var targetScrollTop = scrollTop + offsetTop - 70; window.scrollTo({top: targetScrollTop, behavior: 'smooth'}); } } document.querySelectorAll('.feedback li').forEach(entry => entry.addEventListener('click', e => { if (!entry.classList.contains('active')) { document.querySelector('.feedback li.active').classList.remove('active'); entry.classList.add('active'); } e.preventDefault(); })); $('.feedback li').click(function() { const feedbackId = $(this).parent().data('id'); const feedbackType = $(this).attr('class'); var input = feedbackType; var reaction = input.replace("active", "").trim(); $.ajax({ type: 'POST', url: 'puan.php', data: {id: feedbackId, type: reaction}, success: function(response) { if(response == 1){ swal("Başarılı!", "Yazıyı puanladınız", "success"); } else { swal("Hata!", "Bu içeiriği daha önce puanlamışsınız!", "error"); } }, error: function(xhr, status, error) { console.error(error); } }); }); </script> <?php schemaekle($blogcek['baslik'], $blogcek['icerik'], $blogcek['resim'], $blogcek['olusturmazamani'], $siteayar['baslik']); } include 'main-footer.php'; ?>
💾 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