Mini Shell Moded By TiGER HeX
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
var
/
www
/
ridazz
/
includes
/
Linux midnightridazz 4.19.0-11-cloud-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64
Upload File :
New :
File
Dir
//var/www/ridazz/includes/forumTopics.php
<table cellpadding="0" cellspacing="0" border="0"> <tr> <td width="140"><br> <div style="comments">Topic Box:</div></td> <td width="10"> </td> </tr> </table> <? //get pagination $offset = ($pgnum-1) * FORUMS_PER_PAGE; $sql = "SELECT COUNT(*) AS total FROM 50mm_forum_topics"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $row = $db->sql_fetchrow($result); $total = $row['total']; $pgnav = ""; if($total>0){ $refurl = $_SERVER['PHP_SELF']."?topicId=".$topic_id; $bnav = get_pagination($total,$pgnum,$refurl,FORUMS_PER_PAGE,1,false); //determine displaying page ? or ? $highpg = $pgnum*FORUMS_PER_PAGE; if($highpg>$total){ $highpg = $total; } $lowpg = $offset+1; $pgnav ="<div>$bnav $lowpg - $highpg of $total Topics</div>"; } $sql ="SELECT t.title, t.topic_id,COUNT(r.topic_id) AS num FROM 50mm_forum_topics t LEFT JOIN 50mm_forum_replies r ON t.topic_id = r.topic_id GROUP BY t.topic_id ORDER BY t.last_reply DESC LIMIT $offset,".FORUMS_PER_PAGE; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } //create topics list $topics ="<div class=\"topics\">\n"; $topics.= $pgnav."<br>"; $topics.="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n"; while($row = $db->sql_fetchrow($result)){ $topics.="<tr>"; $url = append_query("forums.php","topicId",$row['topic_id']); $url = append_query($url,"pgnum",$pgnum); $topics.="<td width=\"160\"><a href=\"".$url."\">".get_trim_string($row['title'],20)."</a></td>\n"; $topics.="<td width=\"10\"> </td>\n"; $topics.="<td>".$row['num']."</td>\n"; $topics.="</tr>\n"; } $topics.="</table>"; $topics.="</div>"; echo $topics; include_once('includes/ads/195x300.php'); ?>