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/updates.php
<?php
              $news = $conn->query("SELECT p.*,c.category from post_list p inner join category_list c on c.id = p.category_id where p.category_id = 6 order by unix_timestamp(date_published) desc LIMIT 4");
              if($news->num_rows > 0):
                while($row = $news->fetch_assoc()):
                  // Format date_published to display only the date part (YYYY-MM-DD)
                  $date_published = date('F j, Y', strtotime($row['date_published']));

                  $trans = get_html_translation_table(HTML_ENTITIES,ENT_QUOTES);
                    unset($trans["\""], $trans["<"], $trans[">"], $trans["<h2"]);
                    $desc = strtr(html_entity_decode($row['content']),$trans);
                    $desc=str_replace(array("<li>","</li>"), array("",", "), $desc);
                
            ?>
             <!--START DISPLAYING NEWS-->    
             <div class="col-lg-3 text-center ">
            <a href="#" ><img src="assets/uploads/content_images/<?php echo $row['cover_img'] ?>" alt="" class="img-fluid recent-match-img mb-4"></a>
            </div>            
            <?php    endwhile;     endif;?>