Announcements

Spam Blaster Implemented
by NetriX - 6 months ago
The New PHP-Fusion USA
by NetriX - 10 months ago

Official Announcements

View Thread

Who is here? 1 guest(s)
 Print Thread
[PANEL] Top 5 Downloads
KasteR
There are 2 spots with hard-coded text, in English.
  • Panel Title (Top 5 Weblinks) on line 3
  • Empty result from query (No downloads have been created yet.) on line 11

Download source  Code
<?php
$result = dbquery(
   "SELECT td.*,tdc.* FROM ".$db_prefix."downloads td
   INNER JOIN ".$db_prefix."download_cats tdc ON td.download_cat=tdc.download_cat_id
   WHERE ".groupaccess('download_cat_access')." ORDER BY download_count DESC LIMIT 5"
);
openside('Top 5 Downloads');
if (dbrows($result)) {
   echo '<ol>';
      while($data = dbarray($result)) {
         echo '<li><a href="'.BASEDIR.'downloads.php?cat_id='.$data['download_cat'].'&download_id='.$data['download_id'].'" alt="'.$data['download_title'].'" title="'.$data['download_title'].'">'.trimlink($data['download_title'], 23)."</a>&nbsp;&#40;".$data['download_count']."&#41;".'</li>';
      }
   echo '</ol>';
} else {
   echo "<div style='text-align:center'>No downloads have been created yet.</div>\n";
}
closeside();
?>


 
Advertisement
Jump to Forum:

Similar Threads

Thread Forum Replies Last Post
Donate Panel [7.02.XX] Code Snippets 13 09-11-2017 22:23
users online panel Addon Requests 2 01-02-2017 09:46
downloads.php remove version, comments, ratings General Chat 4 09-04-2016 00:52
[Themes] Blog-e how to add panel [7.02.XX] Themes 5 07-10-2016 02:04
Include Custom Login Panel General Chat 1 05-17-2015 07:39