����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 3.138.60.117 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gltevjme/gltechlimited.com/ |
Upload File : |
<?php require_once('header-news.php'); ?> <?php // Preventing the direct access of this page. if(!isset($_REQUEST['slug'])) { header('location: '.BASE_URL); exit; } // Getting the news detailed data from the news id $statement = $pdo->prepare("SELECT t1.news_title, t1.news_slug, t1.news_content, t1.news_date, t1.publisher, t1.photo, t1.category_id, t2.category_id, t2.category_name, t2.category_slug FROM tbl_news t1 JOIN tbl_category t2 ON t1.category_id = t2.category_id WHERE t1.news_slug=?"); $statement->execute(array($_REQUEST['slug'])); $result = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($result as $row) { $news_title = $row['news_title']; $news_content = $row['news_content']; $news_date = $row['news_date']; $publisher = $row['publisher']; $photo = $row['photo']; $category_id = $row['category_id']; $category_slug = $row['category_slug']; $category_name = $row['category_name']; } // Update data for view count for this news page // Getting current view count $statement = $pdo->prepare("SELECT * FROM tbl_news WHERE news_slug=?"); $statement->execute(array($_REQUEST['slug'])); $result = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($result as $row) { $current_total_view = $row['total_view']; } $updated_total_view = $current_total_view+1; // Updating database for view count $statement = $pdo->prepare("UPDATE tbl_news SET total_view=? WHERE news_slug=?"); $statement->execute(array($updated_total_view,$_REQUEST['slug'])); ?> <!-- BANNER-SECTION --> <div class="home-banner-section overflow-hidden"> <div class="banner-container-box"> <div class="container"> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12 mb-md-0 mb-4 text-center"> <div class="about-banner-text" data-aos="fade-up"> <h1 class="text-white about-h1" data-aos="zoom-out-left">Blog - Post</h1> <p class="text-white banner-paragraph" data-aos="zoom-out-right"> <?php echo $news_title; ?></p> <div class="about-btn"> <a href="single-post.html" class="text-decoration-none">Blog <span class="about-text-color"> / <?php echo $news_title; ?></span></a> </div> </div> </div> </div> </div> </div> </div> </div> <!-- header and banner section --> <section class="blog-posts padding-top padding-bottom overflow single-post-blog overflow-hidden"> <div class="container"> <div class="row"> <div class="col-xl-9 col-lg-9"> <div id="blog" class="single-post01 wow slideInLeft" data-aos="fade-up"> <div class="post-item"> <div class="post-item-wrap"> <div class="post-image"> <a href="#"> <img alt="<?php echo $news_title; ?>" src="<?php echo BASE_URL; ?>assets/uploads/<?php echo $photo ?>" /> </a> </div> <div class="post-item-description"> <h2 class="mb-0"><?php echo $news_title; ?></h2> <div class="post-meta"> <span class="post-meta-date color01"> <?php echo $news_date; ?> </span> <!-- <span class="post-meta-comments color01"><a href=""><span></span>33 Comments</a></span> --> </div> <br> <div class="blockquote"> <p> <?php echo $row['news_content_short']; ?> </p> <!-- <small>by <cite>Albert Einstein</cite></small> --> </div> <p> <?php echo $news_content; ?> </p> </div> <div class="post-tags"> <a href="#"><?='Publisher'; ?></a> <a href="#"><?php echo $publisher; ?></a> <!--post-tags--> </div> <!--post-item-wrap--> </div> <!--post-item--> </div> <!--single-post01--> </div> <!--col--> </div> <?php require_once('sidebar.php'); ?> <!--row--> </div> </div> <!--container--> </section> <?php require_once('footer.php'); ?>