Mini Shell Moded By TiGER HeX
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
mnt
/
volume_sfo2_01
/
50mmla
/
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
/mnt/volume_sfo2_01/50mmla/includes/forumThreads.php
<? if($topic_id != 0){ //get topic title $sql = "SELECT t.title,t.entry_time,u.username,u.user_id,t.body,t.image FROM 50mm_forum_topics t,50mm_users u WHERE t.topic_id = '$topic_id' AND u.user_id=t.user_id"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $thread ="<div class=\"threads\">\n"; if($db->sql_numrows($result) > 0){ $row = $db->sql_fetchrow($result); $unix = get_unix_time($row['entry_time']); $date = date("m.j.y - g:i a",$unix); $thread.= "<div class=\"title\">".$row['title']."</div>"; $thread.= "<a href=\"#bottom\"><img src=\"images/bottom_pg.gif\"border=0></a> Thread started by <a href=\"viewProfile.php?userId=".$row['user_id']."\">".$row['username']."</a> at $date<br><br>"; if(!empty($row['image'])){ $image_info = @getimagesize(ROOT_DIR.FORUM_LIMG_DIR.$row['image']); $js = "popImage('".urlencode(FORUM_LIMG_DIR.$row['image'])."','".$image_info[0]."','".$image_info[1]."');"; $thread.="<img src=\"".FORUM_SIMG_DIR.$row['image']."\" border=\"0\" hspace=\"10\" align=\"right\" style=\"cursor:pointer;\" onClick=\"".$js."\">"; } $thread.=$row['body']; } $thread.="<br clear=\"all\"><br>"; $thread.="<div style=\"background-color:#000000;line-height:1px;font-size:1px;\" height=\"1\"> </div><br>\n"; echo $thread; $sql = "SELECT r.body,r.image,r.entry_time,u.username,u.user_id FROM 50mm_forum_replies r,50mm_users u WHERE r.topic_id = '$topic_id' AND u.user_id=r.user_id ORDER BY r.entry_time ASC"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $thread = ""; if($db->sql_numrows($result) > 0){ while($row = $db->sql_fetchrow($result)){ $thread.="<div>\n"; $unix = get_unix_time($row['entry_time']); $date = date("m.j.y - g:i a",$unix); if(!empty($row['image'])){ $image_info = @getimagesize(ROOT_DIR.FORUM_LIMG_DIR.$row['image']); $js = "popImage('".urlencode(FORUM_LIMG_DIR.$row['image'])."','".$image_info[0]."','".$image_info[1]."');"; $thread.="<img src=\"".FORUM_SIMG_DIR.$row['image']."\" border=\"0\" hspace=\"10\" align=\"right\" style=\"cursor:pointer;\" onClick=\"".$js."\">"; } $thread.=$row['body']."<br><br>\n"; $thread.="<a href=\"viewProfile.php?userId=".$row['user_id']."\" target=\"_top\">".$row['username']."</a><br>\n"; $thread.=$date."<br><br>\n"; $reply_url = append_query("forumReply.php","topicId",$topic_id); $reply_url = append_query($reply_url,"pgnum",$pgnum); $thread.="<a href=\"".$reply_url."\">reply</a><br><br>\n"; $thread.="</div>\n"; $thread.="<br clear=\"all\"><br>"; $thread.="<div style=\"background-color:#000000;line-height:1px;font-size:1px;\" height=\"1\"> </div><br>\n"; } $thread.="<a name=\"bottom\"></a></div>\n"; echo $thread; }else{ $reply_url = append_query("forumReply.php","topicId",$topic_id); $reply_url = append_query($reply_url,"pgnum",$pgnum); echo "<a href=\"".$reply_url."\">reply</a><br><br><br>\n"; } } ?>