コード例 #1
0
         $post_message = $originalpost['post_smileys'] == 1 ? parsesmileys($originalpost['post_message']) : $originalpost['post_message'];
         $post_message = phpentities(nl2br(parseubb($post_message)));
         echo " title=\"header=[ " . str_replace("]", "]]", str_replace("[", "[[", trimlink($data['thread_subject'], 70))) . "] body=[" . str_replace("]", "]]", str_replace("[", "[[", trimlink($post_message, 150))) . "] delay=[0] fade=[on]\"";
     }
     echo " href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "' title='" . $data['thread_subject'] . "'\n\t\tstyle='text-decoration:underline; font-size:12px;{$threadbold}'>" . trimlink($data['thread_subject'], 40) . "</a> ";
     if ($fb4['latest_post']) {
         echo "&nbsp;<a";
         if ($fb4['latest_popup']) {
             $originalpost = dbarray(dbquery("select * from " . DB_POSTS . " where post_id='" . $data['thread_lastpostid'] . "' order by post_id asc limit 1"));
             $post = trimlink(nl2br(stripinput(parseubb($originalpost['post_message']))), 200);
             echo " title='header=[" . $locale['fb615'] . ":] body=[" . $post . "] delay=[0] fade=[on]'";
         }
         echo " href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&amp;pid=" . $data['thread_lastpostid'] . "#post_" . $data['thread_lastpostid'] . "'" . (!$fb4['latest_popup'] ? " title='" . $locale['fb615'] . "'" : "") . " class='small'>(<b>&raquo;</b>)</a>";
     }
     echo "<br />\n<a href='" . BASEDIR . "profile.php?lookup=" . $data['original_id'] . "' style='font-size:11px;'>" . showLabel($data['original_id'], false, "panel") . "</a><br />\n\t\t<span style='font-size:10px;'>" . $timepassed . "</span>\n\t\t</td>\n";
     echo "<td width='20%' class='" . $row_color . "' style='text-align:right;white-space:nowrap'>\n\t\t" . timePassed($data['thread_lastpost'], false) . "<br />\n\t\tby <a href='" . BASEDIR . "profile.php?lookup=" . $data['thread_lastuser'] . "'>" . showLabel($data['thread_lastuser'], false, "panel") . "</a>";
     if (!$fb4['latest_post']) {
         echo "&nbsp;<a";
         if ($fb4['latest_popup']) {
             $originalpost = dbarray(dbquery("select * from " . DB_POSTS . " where post_id='" . $data['thread_lastpostid'] . "' order by post_id asc limit 1"));
             $post = trimlink(nl2br(stripinput(parseubb($originalpost['post_message']))), 200);
             echo " title='header=[" . ($data['thread_postcount'] - 1 > 0 ? "RE: " : "") . $data['thread_subject'] . "] body=[" . $post . "] delay=[0] fade=[on]'";
         }
         echo " href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&amp;pid=" . $data['thread_lastpostid'] . "#post_" . $data['thread_lastpostid'] . "' title='" . $locale['fb615'] . "'><b>&raquo;&raquo;</b></a>";
     }
     echo "</td>\n";
     echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . $data['thread_views'] . "</td>\n";
     echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . ($data['thread_postcount'] - 1) . "</td>\n";
     echo "</tr>\n";
     $i++;
 }
コード例 #2
0
ファイル: hybrid.php プロジェクト: simplyianm/clububer
 if ($data['post_smileys']) {
     $message = parsesmileys($message);
 }
 echo "<tr>\n<td class='tbl1' colspan='3'>" . timePassed($data['post_datestamp']);
 if ($data['post_edittime'] != "0") {
     $r = dbquery("select * from " . $db_prefix . "fb_posts where post_id='" . $data['post_id'] . "'");
     if (dbrows($r)) {
         $d = dbarray($r);
         $edit_reason = $d['post_editreason'];
     } else {
         $edit_reason = "";
     }
     if (isset($edit_reason) && $edit_reason !== "") {
         echo "<span title='header=[" . $locale['fb502'] . "] body=[{$edit_reason}]'>";
     }
     echo "&nbsp;|&nbsp;" . $locale['508'] . "<a href='../profile.php?lookup=" . $data['post_edituser'] . "'>" . $data['edit_name'] . "</a> " . timePassed($data['post_edittime'], false);
     if (isset($edit_reason)) {
         echo "</span>\n";
     }
 }
 echo "</td></tr>\n";
 echo "<tr>\n<td valign='top' class='tbl2' style='width:108px;padding:8px;' rowspan='3'>\n";
 if ($data['user_avatar'] && file_exists(IMAGES . "avatars/" . $data['user_avatar'])) {
     echo "<img src='" . IMAGES . "avatars/" . $data['user_avatar'] . "' alt='" . $locale['567'] . "' /><br /><br />\n";
 } else {
     if ($fb4['no_avatar']) {
         echo "<img src='" . IMAGES . "noav.gif' alt='" . $locale['567'] . "' /><br /><br />\n";
     }
 }
 echo "<span class='small'>";
 renderMods(true, false);
コード例 #3
0
ファイル: func.php プロジェクト: simplyianm/clububer
 function renderSubforums($forum)
 {
     global $locale, $userdata, $db_prefix, $lastvisited, $fb4;
     $forum_list = "";
     $current_cat = "";
     $result = dbquery("SELECT f.*, f2.forum_name AS forum_cat_name, u.user_id, u.user_name\n\t\tFROM " . DB_FORUMS . " f\n\t\tLEFT JOIN " . DB_FORUMS . " f2 ON f.forum_cat = f2.forum_id\n\t\tLEFT JOIN " . DB_USERS . " u ON f.forum_lastuser = u.user_id\n\t\tLEFT JOIN " . DB_PREFIX . "fb_forums f3 on f3.forum_id=f.forum_id\n\t\tWHERE " . groupaccess('f.forum_access') . " AND f3.forum_parent='" . $forum . "' GROUP BY forum_id ORDER BY f2.forum_order ASC, f.forum_order ASC");
     if (dbrows($result) != 0) {
         $state = "off";
         $boxname = "subforums";
         echo "<!--pre_forum_idx--><table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
         if ($fb4['forum_icons']) {
             echo "<tr>\n<td colspan='6' class='forum-caption' style='padding:7px;'><div style='float:right'>" . panelbutton($state, $boxname) . "</div>\n\n\t\t\t<!--forum_cat_name_cell-->" . $locale['fb553'] . "</td>\n</tr>";
             echo "</table>" . panelstate($state, $boxname) . "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
             echo "<tr>\n<td colspan='3' class='tbl2' width='65%'>" . $locale['401'] . "</td>\n";
         } else {
             echo "<tr>\n<td colspan='6' class='forum-caption' style='padding:7px;'><div style='float:right'>" . panelbutton($state, $boxname) . "</div>\n\n\t\t\t<!--forum_cat_name_cell-->" . $locale['fb553'] . "</td>\n</tr>";
             echo "</table>" . panelstate($state, $boxname) . "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
             echo "<tr>\n<td colspan='2' class='tbl2' width='65%'>" . $locale['401'] . "</td>\n";
         }
         echo "<td class='tbl2' width='35%' style='white-space:nowrap'>" . $locale['404'] . "</td>\n";
         echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['402'] . "</td>\n";
         echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['403'] . "</td>\n";
         echo "</tr>\n";
         while ($data = dbarray($result)) {
             $moderators = "";
             if ($data['forum_moderators']) {
                 $mod_groups = explode(".", $data['forum_moderators']);
                 foreach ($mod_groups as $mod_group) {
                     if ($moderators) {
                         $moderators .= ", ";
                     }
                     $moderators .= $mod_group < 101 ? "<a href='" . BASEDIR . "profile.php?group_id=" . $mod_group . "'>" . getgroupname($mod_group) . "</a>" : getgroupname($mod_group);
                 }
             }
             $forum_match = "\\|" . $data['forum_lastpost'] . "\\|" . $data['forum_id'];
             if ($data['forum_lastpost'] > $lastvisited) {
                 if (iMEMBER && preg_match("({$forum_match}\\.|{$forum_match}\$)", $userdata['user_threads'])) {
                     $fim = "<img src='" . get_image("folder") . "' alt='" . $locale['561'] . "' />";
                 } else {
                     $fim = "<img src='" . get_image("foldernew") . "' alt='" . $locale['560'] . "' />";
                 }
             } else {
                 $fim = "<img src='" . get_image("folder") . "' alt='" . $locale['561'] . "' />";
             }
             echo "<tr>\n";
             echo "<td align='center' width='1%' class='tbl1' style='white-space:nowrap' style='padding:7px;'>{$fim}</td>\n";
             $iconQuery = dbquery("select * from " . $db_prefix . "fb_forums where forum_id='" . $data['forum_id'] . "'");
             if (dbrows($iconQuery)) {
                 $iconData = dbarray($iconQuery);
                 $ficon = $iconData['forum_icon'] !== "" ? $iconData['forum_icon'] : "folder.png";
             } else {
                 $ficon = "folder.png";
             }
             if ($fb4['forum_icons']) {
                 $ficon = "<img src='" . INFUSIONS . "fusionboard4/images/forum_icons/{$ficon}' alt='' />";
                 echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap; padding:7px;'>{$ficon}</td>\n";
             }
             echo "<td class='tbl1' style='padding:5px;width:65%;'><a href='viewforum.php?forum_id=" . $data['forum_id'] . "' style='font-size:12px; text-decoration:underline; font-weight:bold;'>\n\t\t\t<!--forum_name_cell-->" . $data['forum_name'] . "</a><br />\n";
             if ($data['forum_description'] || $moderators) {
                 echo "<span class='small'>" . $data['forum_description'] . ($data['forum_description'] && $moderators ? "<br />\n" : "");
                 echo ($moderators ? "<strong>" . $locale['411'] . "</strong>" . $moderators . "</span>\n" : "</span>\n") . "\n";
             }
             $c_res = dbquery("select * from " . DB_PREFIX . "forums f\n\t\t\tleft join " . DB_PREFIX . "fb_forums f2 on f2.forum_id=f.forum_id\n\t\t\twhere " . groupaccess("f.forum_access") . " AND f2.forum_parent='" . $data['forum_id'] . "'");
             if (dbrows($c_res)) {
                 if ($fb4['subforum_view']) {
                     echo "<br /><span class='small'><strong>" . $locale['fb552'] . "</strong> ";
                     $i = dbrows($c_res);
                     while ($c_data = dbarray($c_res)) {
                         $i--;
                         echo "<a href='" . FORUM . "viewforum.php?forum_id=" . $c_data['forum_id'] . "'>" . $c_data['forum_name'] . "</a>";
                         if ($i > 0) {
                             echo ", ";
                         }
                     }
                     echo "</span>";
                 } else {
                     $counter = 0;
                     $rows = 3;
                     $sfimage1 = file_exists(THEME . "images/folder_open.png") ? THEME . "images/folder_open.png" : INFUSIONS . "fusionboard4/images/folder_open.png";
                     $sfimage2 = file_exists(THEME . "images/subforum.png") ? THEME . "images/subforum.png" : INFUSIONS . "fusionboard4/images/subforum.png";
                     echo "<br /><img src='{$sfimage1}' alt='' style='vertical-align:middle;'> <span class='small' style='font-weight:bold;'>" . $locale['fb552'] . "</span><br />";
                     echo "<table cellspacing='0' cellpadding='0' border='0' width='100%' style='padding-left:10px;'><tr>\n\t\t\t\t\t<td width='50%' class='small' style='padding-left:3px; padding-right:3px; vertical-align:top;'>";
                     while ($c_data = dbarray($c_res)) {
                         if ($counter != 0 && $counter % $rows == 0) {
                             echo "</td><td width='50%' class='small' style='padding-left:3px; padding-right:3px; vertical-align:top;'>\n";
                         }
                         $subforum = is_file(THEME . "images/subforum.png") ? THEME . "images/subforum.png" : INFUSIONS . "fusionboard4/images/subforum.png";
                         echo "<img src='{$sfimage2}' alt='' style='vertical-align:middle;'> \n\t\t\t\t\t\t<a href='" . FORUM . "viewforum.php?forum_id=" . $c_data['forum_id'] . "' class='small'>" . $c_data['forum_name'] . "</a><br />";
                         $counter++;
                     }
                     echo "</td></tr></table>";
                 }
             }
             echo "</td>\n";
             echo "<td class='tbl2' style='white-space:nowrap; padding:5px;width:35%;'>";
             $children = array();
             $child_res = dbquery("select * from " . $db_prefix . "fb_forums f\n\t\t\tleft join " . $db_prefix . "forums f2 on f2.forum_id=f.forum_id\n\t\t\twhere " . groupaccess("f2.forum_access") . " and f.forum_parent='" . $data['forum_id'] . "'");
             if (dbrows($child_res)) {
                 while ($child_data = dbarray($child_res)) {
                     array_push($children, $child_data['forum_id']);
                     findChildren($child_data['forum_id']);
                 }
             }
             if (count($children)) {
                 $where = "";
                 $counter = count($children);
                 foreach ($children as $child) {
                     $where .= "t.forum_id='{$child}' " . ($counter > 1 ? "OR " : "");
                     $counter--;
                 }
                 $childrenForums = dbquery("select * from " . $db_prefix . "threads t\n\t\t\t\tleft join " . $db_prefix . "users u on u.user_id=t.thread_lastuser\n\t\t\t\tleft join " . $db_prefix . "posts p on p.post_id=t.thread_lastpostid\n\t\t\t\twhere ({$where} OR t.forum_id='" . $data['forum_id'] . "') \n\t\t\t\torder by t.thread_lastpost desc limit 1");
                 if (!dbrows($childrenForums)) {
                     echo $locale['405'] . "</td>\n";
                 } else {
                     $childrenData = dbarray($childrenForums);
                     echo "<b><a href='viewthread.php?thread_id=" . $childrenData['thread_id'] . "' style='text-decoration:underline;'>" . trimlink($childrenData['thread_subject'], 30) . "</a></b><br />";
                     echo "" . $locale['406'] . "<a href='" . BASEDIR . "profile.php?lookup=" . $childrenData['thread_lastuser'] . "'>" . showLabel($childrenData['user_id'], false, "index") . "</a><br />\n\t\t\t\t\t<div align='right'>" . timePassed($childrenData['thread_lastpost'], false) . "\n\t\t\t\t\t<a href='" . FORUM . "viewthread.php?thread_id=" . $childrenData['thread_id'] . "&amp;pid=" . $childrenData['thread_lastpostid'] . "#post_" . $childrenData['thread_lastpostid'] . "' title='Go To Last Post'><b>»</b></a></div></td>\n";
                 }
             } else {
                 if ($data['forum_lastpost'] == 0) {
                     echo $locale['405'] . "</td>\n";
                 } else {
                     $threadData = dbarray(dbquery("select * from " . $db_prefix . "threads t\n\t\t\t\t\tleft join " . $db_prefix . "posts p on p.post_id=t.thread_lastpostid\n\t\t\t\t\twhere t.thread_lastpost='" . $data['forum_lastpost'] . "'"));
                     echo "<b><a href='viewthread.php?thread_id=" . $threadData['thread_id'] . "' style='text-decoration:underline;'>" . trimlink($threadData['thread_subject'], 30) . "</a></b><br />";
                     echo "" . $locale['406'] . "<a href='" . BASEDIR . "profile.php?lookup=" . $data['forum_lastuser'] . "' style='text-decoration:underline;'>" . showLabel($data['forum_lastuser'], false, "index") . "</a><br />\n\t\t\t\t\t<div align='right'>" . timePassed($data['forum_lastpost'], false) . "\n\t\t\t\t\t<a href='" . FORUM . "viewthread.php?thread_id=" . $threadData['thread_id'] . "&amp;pid=" . $threadData['thread_lastpostid'] . "#post_" . $threadData['thread_lastpostid'] . "' title='Go To Last Post'><b>»</b></a></div></td>\n";
                 }
             }
             echo "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'>" . $data['forum_threadcount'] . "</td>\n";
             echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $data['forum_postcount'] . "</td>\n";
             echo "</tr>\n";
         }
         echo "</table></div>";
     }
 }
コード例 #4
0
ファイル: groups.php プロジェクト: simplyianm/clububer
     echo "<tr>\n<td class='tbl2' style='font-weight:bold;'>" . $locale['uc251'] . "</td>\n";
     echo "<td class='tbl2' style='font-weight:bold;' width='1%'>" . $locale['uc252'] . "</td>\n";
     echo "<td class='tbl2' style='font-weight:bold;' width='1%'>" . $locale['uc253'] . "</td>\n";
     echo "<td class='tbl2' style='font-weight:bold;white-space:nowrap' width='1%'>" . $locale['uc254'] . "</td>\n";
     echo "<td class='tbl2' style='font-weight:bold; width:150px;'>" . $locale['uc255'] . "</td>\n</tr>\n";
     $result = dbquery("select * from " . DB_PREFIX . "fb_groups fg\n\t\tleft join " . DB_USER_GROUPS . " g on fg.group_id=g.group_id\n\t\torder by fg.group_created desc");
     while ($data = dbarray($result)) {
         $members = dbquery("SELECT * FROM " . DB_USERS . " WHERE user_groups REGEXP('^\\\\.{$data['group_id']}\$|\\\\.{$data['group_id']}\\\\.|\\\\.{$data['group_id']}\$') or user_groups='" . $data['group_id'] . "' ORDER BY user_level DESC, user_name");
         $members = dbrows($members);
         $wallposts = dbcount("(comment_id)", DB_COMMENTS, "comment_type='g' and comment_item_id='" . $data['group_id'] . "'");
         echo "<tr>\n<td class='tbl2' style='padding:7px;'><span style='font-size:13px;'><a href='" . FUSION_SELF . "?section=groups&amp;view=" . $data['group_id'] . "' style='text-decoration:underline;'>" . $data['group_name'] . "</a></span>\n";
         if ($data['group_description']) {
             echo "<br />\n<span class='small'>" . trimlink($data['group_description'], 30) . "</span>\n";
         }
         echo "</td>\n";
         echo "<td class='tbl1' style='white-space:nowrap;padding:7px;'>" . timePassed($data['group_created'], false) . "</td>\n";
         echo "<td class='tbl2' style='text-align:center;padding:7px;'>{$members}</td>\n";
         echo "<td class='tbl1' style='text-align:center;padding:7px;'>{$wallposts}</td>\n";
         echo "<td class='tbl2' style='padding:7px;'>";
         if ($wallposts) {
             $latest = dbarray(dbquery("select c.*, u.* from " . DB_COMMENTS . " c\n\t\t\t\tleft join " . DB_USERS . " u on u.user_id=c.comment_name\n\t\t\t\twhere c.comment_type='g' and c.comment_item_id='" . $data['group_id'] . "' order by c.comment_datestamp desc limit 1"));
             echo timepassed($latest['comment_datestamp']) . "<br />\n";
             echo $locale['uc282'] . "<a href='" . BASEDIR . "profile.php?lookup=" . $latest['user_id'] . "'>" . showLabel($latest['user_id']) . "</a>\n";
         } else {
             echo $locale['uc281'];
         }
         echo "</td>\n</tr>\n";
     }
 } else {
     echo "<tr>\n<td class='tbl1' style='text-align:center;'>" . $locale['uc258'] . "</td>\n</tr>\n";
 }
コード例 #5
0
ファイル: viewforum.php プロジェクト: simplyianm/clububer
     if ($reps > 1) {
         $ctr = 0;
         $ctr2 = 1;
         $pages = "";
         while ($ctr2 <= $reps) {
             $pnum = "<a href='viewthread.php?thread_id=" . $tdata['thread_id'] . "&amp;rowstart={$ctr}'>{$ctr2}</a> ";
             $pages = $pages . $pnum;
             $ctr = $ctr + $posts_per_page;
             $ctr2++;
         }
         $threadsubject .= "&nbsp;<span class='small'>(" . $locale['455'] . trim($pages) . ")</span>";
     }
     echo "<td class='tbl1'>";
     echo $threadsubject;
     echo "<br />\n\t\t<span class='small'><a href='../profile.php?lookup=" . $tdata['thread_author'] . "'>" . showLabel($tdata['thread_author'], false, "index") . "</a></span></td>\n";
     echo "<td class='tbl1' style='white-space:nowrap; text-align:right;'>\n\t\t" . timePassed($tdata['thread_lastpost'], false) . "<br />\n";
     echo "<span class='small'>" . $locale['406'] . "<a href='../profile.php?lookup=" . $tdata['thread_lastuser'] . "'>" . showLabel($tdata['thread_lastuser'], false, "index") . "</a></span></td>\n";
     echo "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'>" . $tdata['thread_views'] . "</td>\n";
     echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . ($tdata['thread_postcount'] - 1) . "</td>\n";
     if (iMOD) {
         echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><input type='checkbox' name='check_mark[]' value='" . $tdata['thread_id'] . "' /></td>\n";
     }
     echo "</tr>\n";
     $counter++;
 }
 $totalThreads = dbcount("(thread_id)", DB_THREADS, "forum_id='" . $_GET['forum_id'] . "' and thread_sticky='0'");
 if (isset($_POST['order_by'])) {
     $_POST['order_by'] = $_POST['order_by'];
 } elseif (isset($_GET['order_by'])) {
     $_POST['order_by'] = $_GET['order_by'];
 } else {
コード例 #6
0
ファイル: usercp.php プロジェクト: simplyianm/clububer
                if (dbrows($forum_res)) {
                    $forum_data = dbarray($forum_res);
                    if ($forum_data['forum_icon']) {
                        $ficon = "<img src='" . INFUSIONS . "fusionboard4/images/forum_icons/" . $forum_data['forum_icon'] . "' alt=''>";
                    } else {
                        $ficon = "<img src='" . INFUSIONS . "fusionboard4/images/forum_icons/folder.png' alt=''>";
                    }
                } else {
                    $ficon = "<img src='" . INFUSIONS . "fusionboard4/images/forum_icons/folder.png' alt=''>";
                }
                echo "<td class='tbl1'>{$ficon}</td>\n";
            }
            echo "<td class='tbl2'><span style='font-size:14px;{$titlebold}'>";
            echo "<a href='" . FORUM . "viewforum.php?forum_id=" . $data['forum_id'] . "' style='text-decoration:underline;'>" . $data['forum_name'] . "</a></span><br />\n";
            echo "<a href='" . FORUM . "postify.php?post=none&amp;forum=off&amp;forum_id=" . $data['forum_id'] . "'>" . $locale['uc156'] . "</a></td>\n";
            echo "<td class='tbl1'><a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "'>" . trimlink(stripslash($data['thread_subject']), 20) . "</a><br />\n";
            echo timePassed($data['thread_lastpost']) . "<br />\n";
            echo "by <a href='" . BASEDIR . "profile.php?lookup=" . $data['lastpost_id'] . "'>" . $data['lastpost_name'] . "</a>\n<div style='text-align:right'>";
            echo "<a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&amp;pid=" . $data['thread_lastpostid'] . "#post_" . $data['thread_lastpostid'] . "' title='" . $locale['fb615'] . "'><b>»»</b></a></div></td>\n";
            echo "<td class='tbl2' style='text-align:center;'>" . number_format($data['threads'] - 1) . "</td>\n";
            echo "<td class='tbl1' style='text-align:center;'>" . number_format($data['posts']) . "</td>\n</tr>\n";
        }
    } else {
        echo "<tr>\n<td class='tbl1'>\n<div align='center'>" . $locale['uc357'] . "</div>\n</td>\n</tr>\n";
    }
}
echo "</table>\n";
/* User CP Sections End */
echo "</td>\n</tr>\n</table>\n";
closetable();
require_once THEMES . "templates/footer.php";
コード例 #7
0
ファイル: index.php プロジェクト: simplyianm/clububer
            $threads = $threads + dbcount("(thread_id)", DB_THREADS, $normalWhere);
            $childrenForums = dbquery("select * from " . $db_prefix . "threads t\n\t\t\tleft join " . $db_prefix . "users u on u.user_id=t.thread_lastuser\n\t\t\tleft join " . $db_prefix . "posts p on p.post_id=t.thread_lastpostid\n\t\t\twhere ({$where} OR t.forum_id='" . $data['forum_id'] . "') \n\t\t\torder by t.thread_lastpost desc limit 1");
            $childrenData = dbarray($childrenForums);
            if (!dbrows($childrenForums) && !$data['forum_lastpost']) {
                echo $locale['405'] . "</td>\n";
            } else {
                echo "<b><a href='viewthread.php?thread_id=" . $childrenData['thread_id'] . "' style='text-decoration:underline;'>" . trimlink($childrenData['thread_subject'], 30) . "</a></b><br />";
                echo "" . $locale['406'] . "<a href='" . BASEDIR . "profile.php?lookup=" . $childrenData['thread_lastuser'] . "'>" . showLabel($childrenData['user_id'], false, "index") . "</a><br />\n\t\t\t\t<div align='right'>" . timePassed($childrenData['thread_lastpost'], false) . "\n\t\t\t\t<a href='" . FORUM . "viewthread.php?thread_id=" . $childrenData['thread_id'] . "&amp;pid=" . $childrenData['thread_lastpostid'] . "#post_" . $childrenData['thread_lastpostid'] . "' title='Go To Last Post'><b>&raquo;</b></a></div></td>\n";
            }
        } else {
            if ($data['forum_lastpost'] == 0) {
                echo $locale['405'] . "</td>\n";
            } else {
                $threadData = dbarray(dbquery("select * from " . $db_prefix . "threads t\n\t\t\t\tleft join " . $db_prefix . "posts p on p.post_id=t.thread_lastpostid\n\t\t\t\tleft join " . DB_USERS . " u on u.user_id=p.post_author\n\t\t\t\twhere t.thread_lastpost='" . $data['forum_lastpost'] . "'"));
                echo "<b><a href='viewthread.php?thread_id=" . $threadData['thread_id'] . "' style='text-decoration:underline;'>" . trimlink($threadData['thread_subject'], 30) . "</a></b><br />";
                echo "" . $locale['406'] . "<a href='" . BASEDIR . "profile.php?lookup=" . $data['forum_lastuser'] . "' style='text-decoration:underline;'>" . showLabel($threadData['user_id'], false, "index") . "</a><br />\n\t\t\t\t<div align='right'>" . timePassed($data['forum_lastpost'], false) . "\n\t\t\t\t<a href='" . FORUM . "viewthread.php?thread_id=" . $threadData['thread_id'] . "&amp;pid=" . $threadData['thread_lastpostid'] . "#post_" . $threadData['thread_lastpostid'] . "' title='Go To Last Post'><b>&raquo;</b></a></div></td>\n";
            }
        }
        echo "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'>" . $threads . "</td>\n";
        echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $posts . "</td>\n";
        echo "</tr>\n";
    }
} else {
    echo "<tr>\n<td colspan='5' class='tbl1'>" . $locale['407'] . "</td>\n</tr>\n";
}
echo "</table></div><!--sub_forum_idx_table-->\n<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='forum'><br />\n";
echo "<img src='" . get_image("foldernew") . "' alt='" . $locale['560'] . "' style='vertical-align:middle;' /> - " . $locale['409'] . "<br />\n";
echo "<img src='" . get_image("folder") . "' alt='" . $locale['561'] . "' style='vertical-align:middle;' /> - " . $locale['410'] . "\n";
echo "</td></tr>\n<tr>\n";
echo "<td align='right' valign='bottom' class='forum'>\n";