HEX
Server: LiteSpeed
System: Linux premium313.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User: wekawqug (1662)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/wekawqug/ndondocup.sisihub.co.tz/read_news.php
<?php 
session_start();
include 'admin/db_connect.php' ;
// Update the view count in the database
$conn->query("UPDATE post_list P SET views = views + 1 WHERE md5(p.id) = '{$_GET['c']}'");

$qry = $conn->query("SELECT p.*,c.category FROM post_list p inner join category_list c on c.id = p.category_id where md5(p.id) = '{$_GET['c']}'")->fetch_array();
foreach($qry as $k =>$v){
	$$k = $v;
}
?>


    <section class="single-post-content" style="margin-top:100px">
      <div class="container">
        <div class="row">
          <div class="col-md-9 post-content">

            <!-- ======= Single Post Content ======= -->
            <div class="single-post">
              <div class="post-meta"><span class="date"><?php echo ucwords($category) ?></span> <span class="mx-1">&bullet;</span> <span><?php echo date("F d,Y", strtotime($date_published)) ?></span></div>
              <h1 class="mb-5"><?php echo ucwords($title) ?></h1>
              <p><span class="firstcharacter"></span></p>

              <figure class="my-4" style ="display:flex;justify-content: center; align-items: center;flex-direction: column;">
                <img  src="assets/uploads/content_images/<?php echo $cover_img ?>" alt="" class="img-fluid" style="width:620px; align:center;">
                <figcaption> </figcaption>
              </figure>
              <?php echo html_entity_decode($content) ?>
            </div><!-- End Single Post Content -->
            </div>

            
          <div class="col-md-3">
            <?php include 'sidebar.php' ?>

          </div>
        </div>
      </div>
    </section>