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/trending.php
               <div class="trending">
                  <h3>Trending</h3>
                  <ul class="trending-post">
                  <?php 
                $trending = $conn->query("SELECT p.*,c.category from post_list p inner join category_list c on c.id = p.category_id where status = 1 AND date_published >= DATE_SUB(NOW(), INTERVAL 1 YEAR) ORDER BY p.views DESC LIMIT 4");
	               $counter=1;
	                while($row=$trending->fetch_assoc()):
	                  ?>
	                 <li>
                    <a href="./index.php?page=read_news&c=<?php echo md5($row['id']) ?>">
                        <span class="number"><?php //echo $counter; ?></span>
                        <h3><?php echo ucwords($row['title']) ?></h3>
                        <span class="author">Mkazuzu</span>
                      </a>
                    </li>

	             <?php  
                  $counter++;    
	                endwhile;
	            ?>
                    
                    
                  </ul>
                </div>