public function get_mood_message() { // whether any user has reacted to this post $locale = fusion_get_locale("", FORUM_ADMIN_LOCALE); $locale += fusion_get_locale("", FORUM_LOCALE); $last_datestamp = array(); $mood_description = array(); $mood_cache = $this->cache_mood(); $response_query = "SELECT pn.*, u.user_id, u.user_name, u.user_avatar, u.user_status\n FROM " . DB_POST_NOTIFY . " pn\n LEFT JOIN " . DB_USERS . " u ON pn.notify_sender = u.user_id\n WHERE post_id='" . $this->post_id . "' GROUP BY pn.notify_mood_id ORDER BY pn.notify_mood_id ASC, pn.post_id ASC"; $response_result = dbquery($response_query); if (dbrows($response_result)) { while ($m_data = dbarray($response_result)) { $user_output = "<a class='mood_sender' href='" . FUSION_REQUEST . "#post_" . $this->post_id . "'>\n" . profile_link($m_data['user_id'], $m_data['user_name'], $m_data['user_status'], "", FALSE) . "</a>"; if (fusion_get_userdata('user_id') == $m_data['notify_sender']) { $user_output = $locale['you']; } $reply_sender[$m_data['notify_mood_id']][] = $user_output; // The pairing errors are when `notify_mood_id` is illegally inserted or deleted // To code fallback on empty $last_datestamp[$m_data['notify_mood_id']] = $m_data['notify_datestamp']; $icon = isset($mood_cache[$m_data['notify_mood_id']]['mood_icon']) ? $mood_cache[$m_data['notify_mood_id']]['mood_icon'] : "fa fa-question fa-fw"; $mood_icon[$m_data['notify_mood_id']] = "<i class='{$icon}'></i>"; $description = isset($mood_cache[$m_data['notify_mood_id']]['mood_description']) ? $mood_cache[$m_data['notify_mood_id']]['mood_description'] : $locale['forum_0529']; $mood_description[$m_data['notify_mood_id']] = $description; } $output_message = ""; foreach ($mood_description as $mood_id => $mood_output) { $senders = implode(", ", $reply_sender[$mood_id]); $output_message .= sprintf($locale['forum_0528'], $mood_icon[$mood_id], $senders, $mood_output, timer($last_datestamp[$mood_id])) . "\n <br/>"; } return (string) $output_message; } }
function show_blacklist($data) { global $locale; echo "<div class='alert alert-info display-none' id='ignore-message'></div>\n"; if (is_array($data) && count($data) > 0) { foreach ($data as $id) { $result = dbquery("SELECT user_id, user_name, user_status, user_avatar FROM " . DB_USERS . " WHERE user_id='{$id}' ORDER BY user_id ASC"); if (dbrows($result) > 0) { while ($data = dbarray($result)) { echo "<div id='" . $data['user_id'] . "-user-list' class='panel panel-default'>\n<div class='panel-body'>\n"; echo "<button type='button' value='" . $data['user_id'] . "' class='unblock pull-right m-t-5 btn btn-sm btn-primary'>" . $locale['uf_blacklist_001'] . "</button>\n"; echo "<div class='pull-left m-r-10'>" . display_avatar($data, '50px') . "</div>\n"; echo "<div class='clearfix'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "<br/>\n"; echo "<span class='text-lighter'>" . $locale['uf_blacklist_002'] . "</span>\n"; echo "</div>\n"; echo "</div>\n</div>\n"; } } } } add_to_jquery("\n\t\$('.unblock').bind('click', function(e) {\n\tvar user_id = \$(this).val();\n\t\$.ajax({\n\t\ttype: 'POST',\n\t\turl: '" . INCLUDES . "user_fields/user_blacklist.ajax.php',\n\t\tdata: { user_id : user_id },\n\t\tdataType: 'html',\n\t\tsuccess: function(data) {\n\t\t\talert(data);\n\t\t\t\$('#'+user_id+'-user-list').addClass('display-none');\n\t\t\t\$('#ignore-message').html(data).removeClass('display-none');\n\t\t},\n\t\terror: function() {\n\t\t\talert('" . $locale['uf_blacklist_desc'] . "');\n\t\t}\n\t\t});\n\t});\n\t"); }
opentable($locale['global_056']); $result = dbquery("SELECT tn.thread_id FROM " . DB_THREAD_NOTIFY . " tn\n\tINNER JOIN " . DB_THREADS . " tt ON tn.thread_id = tt.thread_id\n\tINNER JOIN " . DB_FORUMS . " tf ON tt.forum_id = tf.forum_id\n\tWHERE tn.notify_user="******" AND " . groupaccess('forum_access') . " AND tt.thread_hidden='0'"); $rows = dbrows($result); if ($rows) { $result = dbquery("\n\t\tSELECT tf.forum_access, tn.thread_id, tn.notify_datestamp, tn.notify_user,\n\t\ttt.thread_subject, tt.forum_id, tt.thread_lastpost, tt.thread_lastuser, tt.thread_postcount,\n\t\ttu.user_id AS user_id1, tu.user_name AS user_name1, tu.user_status AS user_status1, \n\t\ttu2.user_id AS user_id2, tu2.user_name AS user_name2, tu2.user_status AS user_status2\n\t\tFROM " . DB_THREAD_NOTIFY . " tn\n\t\tINNER JOIN " . DB_THREADS . " tt ON tn.thread_id = tt.thread_id\n\t\tINNER JOIN " . DB_FORUMS . " tf ON tt.forum_id = tf.forum_id\n\t\tLEFT JOIN " . DB_USERS . " tu ON tt.thread_author = tu.user_id\n\t\tLEFT JOIN " . DB_USERS . " tu2 ON tt.thread_lastuser = tu2.user_id\n\t\tINNER JOIN " . DB_POSTS . " tp ON tt.thread_id = tp.thread_id\n\t\tWHERE tn.notify_user="******" AND " . groupaccess('forum_access') . " AND tt.thread_hidden='0'\n\t\tGROUP BY tn.thread_id\n\t\tORDER BY tn.notify_datestamp DESC\n\t\tLIMIT " . $_GET['rowstart'] . ",10\n\t"); echo "<table class='tbl-border' cellpadding='0' cellspacing='1' width='100%'>\n<tr>\n"; echo "<td class='tbl2'><strong>" . $locale['global_044'] . "</strong></td>\n"; echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_050'] . "</strong></td>\n"; echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_047'] . "</strong></td>\n"; echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_046'] . "</strong></td>\n"; echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_057'] . "</strong></td>\n"; echo "</tr>\n"; $i = 0; while ($data = dbarray($result)) { $row_color = $i % 2 == 0 ? "tbl1" : "tbl2"; echo "<tr>\n<td class='" . $row_color . "'><a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "'>" . $data['thread_subject'] . "</a></td>\n"; echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . profile_link($data['user_id1'], $data['user_name1'], $data['user_status1']) . "</td>\n"; echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . profile_link($data['user_id2'], $data['user_name2'], $data['user_status2']) . "<br />\n\t\t" . showdate("forumdate", $data['thread_lastpost']) . "</td>\n"; echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . ($data['thread_postcount'] - 1) . "</td>\n"; echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'><a href='" . FUSION_SELF . "?delete=" . $data['thread_id'] . "' onclick=\"return confirm('" . $locale['global_060'] . "');\">" . $locale['global_058'] . "</a></td>\n"; echo "</tr>\n"; $i++; } echo "</table>\n"; closetable(); echo "<div align='center' style='margin-top:5px;'>" . makePageNav($_GET['rowstart'], 10, $rows, 3, FUSION_SELF . "?") . "</div>\n"; } else { echo "<div style='text-align:center;'>" . $locale['global_059'] . "</div>\n"; closetable(); } require_once THEMES . "templates/footer.php";
if ($settings['comments_enabled'] == "0" || $settings['ratings_enabled'] == "0") { $sys = ""; if ($settings['comments_enabled'] == "0" && $settings['ratings_enabled'] == "0") { $sys = $locale['663']; } elseif ($settings['comments_enabled'] == "0") { $sys = $locale['661']; } else { $sys = $locale['662']; } echo "<tr>\n<td colspan='2' class='tbl1' style='font-weight:bold;text-align:left; color:black !important; background-color:#FFDBDB;'>"; echo "<span style='color:red;font-weight:bold;margin-right:5px;'>*</span>" . sprintf($locale['660'], $sys); echo "</td>\n</tr>"; } echo "<tr>\n"; echo "<td align='center' colspan='2' class='tbl1'>\n"; echo $locale['641'] . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "<br /><br />\n"; echo $locale['642'] . "<br />\n"; echo "<input type='submit' name='publish' value='" . $locale['643'] . "' class='button' />\n"; echo "<input type='submit' name='delete' value='" . $locale['644'] . "' class='button' />\n"; echo "</td>\n</tr>\n</table>\n</form>\n"; echo "<script language='JavaScript' type='text/javascript'>\n"; echo "/* <![CDATA[ */\n"; echo "jQuery(document).ready(function() {\n"; echo "jQuery('#shortdesc_display').show();\n"; echo "jQuery('#calc_upload').click(\n"; echo "function() {\n"; echo "if (jQuery('#calc_upload').attr('checked')) {\n"; echo "jQuery('#download_filesize').attr('readonly', 'readonly');\n"; echo "jQuery('#download_filesize').val('');\n"; echo "jQuery('#calc_upload').attr('checked', 'checked');\n"; echo "} else {\n";
function articleposter($info, $sep = "", $class = "") { global $locale, $settings; $res = ""; $link_class = $class ? " class='{$class}' " : ""; $res = THEME_BULLET . " " . $locale['global_070'] . "<span " . $link_class . ">" . profile_link($info['user_id'], $info['user_name'], $info['user_status']) . "</span>\n"; $res .= $locale['global_071'] . showdate("newsdate", $info['article_date']); $res .= $info['article_allow_comments'] && $settings['comments_enabled'] == "1" ? $sep . "\n" : "\n"; return "<!--article_poster-->" . $res; }
$result = dbquery("SELECT fp.post_message, fp.post_datestamp, fp.post_edittime, fp.post_author, fp.post_edituser,\n fu.user_name AS user_name, fu.user_status AS user_status, fe.user_name AS edit_name, fe.user_status AS edit_status,\n ft.thread_subject, ff.forum_access\n FROM " . DB_FORUM_THREADS . " ft\n INNER JOIN " . DB_FORUM_POSTS . " fp ON ft.thread_id = fp.thread_id\n INNER JOIN " . DB_FORUMS . " ff ON ff.forum_id = ft.forum_id\n INNER JOIN " . DB_USERS . " fu ON fu.user_id = fp.post_author\n LEFT JOIN " . DB_USERS . " fe ON fe.user_id = fp.post_edituser\n WHERE ft.thread_id=" . $_GET['item_id'] . "\n ORDER BY fp.post_datestamp\n LIMIT " . $_GET['rowstart'] . ",{$posts_per_page}"); $res = FALSE; $i = 0; if (dbrows($result)) { while ($data = dbarray($result)) { if (checkgroup($data['forum_access'])) { $res = TRUE; if ($i == 0) { echo $locale['500'] . " <strong>" . $settings['sitename'] . " :: " . $data['thread_subject'] . "</strong><hr /><br />\n"; } echo "<div style='margin-left:20px'>\n"; echo "<div style='float:left'>" . $locale['501'] . profile_link($data['post_author'], $data['user_name'], $data['user_status']) . $locale['502'] . showdate("forumdate", $data['post_datestamp']) . "</div><div style='float:right'>#" . ($i + 1) . "</div><div style='float:none;clear:both'></div><hr />\n"; echo nl2br(parseubb(parsesmileys($data['post_message']))); if ($data['edit_name'] != '') { echo "<div style='margin-left:20px'>\n<hr />\n"; echo $locale['503'] . profile_link($data['post_edituser'], $data['edit_name'], $data['edit_status']) . $locale['502'] . showdate("forumdate", $data['post_edittime']); echo "</div>\n"; } echo "</div>\n"; echo "<br />\n"; $i++; } } } if (!$res) { redirect($settings['opening_page']); } } break; case "T": if ($settings['enable_terms'] == 1) {
/** * News Item Page Template * @param $info */ function render_news_item($info) { global $aidlink; $locale = fusion_get_locale(); $news_settings = get_settings('news'); $data = $info['news_item']; add_to_head("<link rel='stylesheet' href='" . INFUSIONS . "news/templates/css/news.css' type='text/css'>"); add_to_head("<link rel='stylesheet' href='" . INCLUDES . "jquery/colorbox/colorbox.css' type='text/css' media='screen' />"); add_to_head("<script type='text/javascript' src='" . INCLUDES . "jquery/colorbox/jquery.colorbox.js'></script>"); add_to_footer('<script type="text/javascript"> $(document).ready(function() { $(".news-image-overlay").colorbox({ transition: "elasic", height:"100%", width:"100%", maxWidth:"98%", maxHeight:"98%", scrolling:false, overlayClose:true, close:false, photo:true, onComplete: function(result) { $("#colorbox").live("click", function(){ $(this).unbind("click"); $.fn.colorbox.close(); }); }, onLoad: function () { } }); }); </script>'); opentable($locale['news_0004']); echo render_breadcrumbs(); echo "<!--news_pre_readmore-->"; echo "<article class='news-item' style='display:block; width:100%; overflow:hidden;'>\n"; echo "<h2 class='text-center'>" . $data['news_subject'] . "</h2>\n"; echo "<div class='news_news text-dark m-t-20 m-b-20'>\n"; if ($data['news_image_src']) { echo "<a class='" . $data['news_ialign'] . " news-image-overlay' href='" . $data['news_image_src'] . "'>\n <img class='img-responsive' src='" . $data['news_image_src'] . "' alt='" . $data['news_subject'] . "' style='padding:5px; max-height:" . $news_settings['news_photo_h'] . "px; overflow:hidden;' /></a>"; } elseif (!empty($data['news_image']) && !empty($data['news_cat_image_src'])) { echo "<a class='" . $data['news_ialign'] . "' href='" . INFUSIONS . "news/news.php?cat_id=" . $data['news_cat_id'] . "'>\n <img class='img-responsive' src='" . IMAGES_NC . $data['news_cat_image_src'] . "' style='padding:5px; max-height:" . $news_settings['news_photo_h'] . "px; alt='" . $data['news_cat_name'] . "' />\n </a>"; } echo $data['news_news']; echo "</div>\n"; echo "<div class='news_extended text-dark m-t-20 m-b-20'>" . $data['news_extended'] . "</div>\n"; echo "<div style='clear:both;'></div>\n"; echo "<div class='well m-t-5 text-center'>\n"; echo "<span class='news-action m-r-10'><i class='fa fa-user'></i>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</span>\n"; echo "<span class='news-action m-r-10'><i class='fa fa-calendar'></i>" . showdate("newsdate", $data['news_datestamp']) . "</span>\n"; echo "<span class='news-action'><i class='fa fa-eye'></i><span class='text-dark m-r-10'>" . number_format($data['news_reads']) . "</span>\n</span>"; echo $data['news_allow_comments'] ? display_comments($data['news_comments'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#comments") : ''; echo $data['news_allow_ratings'] ? "<span class='m-r-10'>" . display_ratings($data['news_sum_rating'], $data['news_count_votes'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#ratings") . " </span>" : ''; echo "<a class='m-r-10' title='" . $locale['news_0002'] . "' href='" . BASEDIR . "print.php?type=N&item_id=" . $data['news_id'] . "'><i class='fa fa-print'></i></a>"; echo iADMIN && checkrights("N") ? "<a title='" . $locale['news_0003'] . "' href='" . INFUSIONS . "news/news_admin.php" . $aidlink . "&action=edit&section=news_form&news_id=" . $data['news_id'] . "' title='" . $locale['news_0003'] . "' />" . $locale['news_0003'] . "</a>\n" : ""; echo "</div>"; echo "<!--news_sub_readmore-->"; echo !isset($_GET['readmore']) && $data['news_ext'] == "y" ? "<div class='m-t-20'>\n<a href='" . INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "' class='button'>" . $locale['news_0001'] . "</a>\n</div>\n" : ""; if ($data['page_count'] > 0) { echo "<div class='text-center m-t-10'>\n" . makepagenav($_GET['rowstart'], 1, $data['page_count'], 3, INFUSIONS . "news/news.php?readmore=" . $_GET['readmore'] . "&") . "\n</div>\n"; } if ($data['news_allow_comments']) { echo "<hr />" . showcomments("N", DB_NEWS, "news_id", $_GET['readmore'], INFUSIONS . "news/news.php?readmore=" . $_GET['readmore']) . "\n"; } if ($data['news_allow_ratings']) { echo "<hr />" . showratings("N", $_GET['readmore'], INFUSIONS . "news/news.php?readmore=" . $_GET['readmore']) . "\n"; } echo "</article>\n"; closetable(); }
$list = isset($_GET['bp_id']) && isnum($_GET['bp_id']) ? $_GET['bp_id'] : 0; opentable('Blog'); echo '<a href="/blog/liste.php">Mine blogindlæg</a> :: <a href="/blog/liste.php?list=newest">Nyeste blogindlæg</a> :: <a href="/blog/liste.php?list=blogs">Brugere med blogindlæg</a> :: <a href="/blog/skriv.php">Skriv nyt blogindlæg</a><br />'; if (isnum($list)) { $bloglist = dbquery('SELECT bp.*, u.user_avatar, u.user_id, u.user_name, u.user_blog, u.user_status FROM ' . DB_PREFIX . 'blogposts AS bp INNER JOIN ' . DB_PREFIX . 'users AS u ON u.user_id = bp.bp_author WHERE bp.bp_id = ' . $list); } echo '<table style="width: 100%;" class="tbl-border forum_thread_table">'; if ($blogarr = dbarray($bloglist)) { echo ' <tr> <td style="width: 25%;" class="tbl2 forum-caption">' . showdate('forumdate', $blogarr['bp_timestamp']) . '</td> <td style="width: 75%;" class="tbl2 forum-caption">' . $blogarr['bp_title'] . '</td> </tr> <tr> <td style="width: 25%;" class="tbl2 forum-caption"> ' . profile_link($blogarr['bp_author'], $blogarr['user_name'], $blogarr['user_status']) . '<br />'; if ($blogarr['user_avatar'] && file_exists(IMAGES . "avatars/" . $blogarr['user_avatar']) && $blogarr['user_status'] != 6 && $blogarr['user_status'] != 5) { echo "<img src='" . IMAGES . "avatars/" . $blogarr['user_avatar'] . "' alt='Avatar' /><br /><br />\n"; } echo 'Antal blogindlæg: ' . $blogarr['user_blog'] . '<br /> <a href="/blog/liste.php?list=' . $blogarr['user_id'] . '">Se blog</a> ' . (iADMIN || $blogarr['user_id'] == $userdata['user_id'] ? '<br /><a href="/blog/slet.php?id=' . $blogarr['bp_id'] . '" onclick="return confirm(\'Er du sikker på, du vil slette dette indlæg?\')">Slet indlæg</a>' : '') . ' <br /><a href="/report.php?action=new&bp_id=' . $blogarr['bp_id'] . '">Anmeld</a> </td> <td style="width: 75%;" class="tbl1">' . nl2br(parseubb(phpentities($blogarr['bp_content']))) . '</td> </tr> <tr> <td colSpan="2" style="width: 5px;"> </td> </tr> '; } else {
function render_dashboard() { global $members, $forum, $download, $news, $articles, $weblinks, $photos, $global_comments, $global_ratings, $global_submissions, $link_type, $submit_type, $comments_type, $locale, $aidlink, $settings, $infusions_count; $mobile = '12'; $tablet = '12'; $laptop = '6'; $desktop = '3'; opentable($locale['250']); echo "<!--Start Members-->\n"; echo "<div class='row'>\n"; echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside(); echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n"; echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['registered']) . "</h4>"; echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['251'] . "</strong></span>\n"; closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "'>" . $locale['255'] . "</a><i class='entypo right-open-mini'></i></div>\n" : '') . ""); echo "</div>\n<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside(); echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n"; echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['cancelled']) . "</h4>"; echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['263'] . "</strong></span>\n"; closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "&status=5'>" . $locale['255'] . "</a> <i class='entypo right-open-mini'></i></div>\n" : '') . ""); echo "</div>\n<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside(); echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n"; echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['unactivated']) . "</h4>"; echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['252'] . "</strong></span>\n"; closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "&status=2'>" . $locale['255'] . "</a> <i class='entypo right-open-mini'></i></div>\n" : '') . ""); echo "</div>\n<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside(); echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n"; echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['security_ban']) . "</h4>"; echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['253'] . "</strong></span>\n"; closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'><a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "&status=4'>" . $locale['255'] . "</a> <i class='entypo right-open-mini'></i></div>\n" : '') . ""); echo "</div>\n</div>\n"; echo "<!--End Members-->\n"; $mobile = '12'; $tablet = '12'; $laptop = '6'; $desktop = '4'; echo "<div class='row'>\n"; if (db_exists(DB_FORUMS)) { echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside("", "well"); echo "<span class='text-smaller text-uppercase'><strong>" . $locale['265'] . " " . $locale['258'] . "</strong></span>\n<br/>\n"; echo "<div class='clearfix m-t-10'>\n"; echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_F") . "'/>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['265'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($forum['count']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['256'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($forum['thread']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['259'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($forum['post']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['260'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . $forum['users'] . "</h4>\n"; echo "</div>\n"; echo "</div>\n"; closeside(); echo "</div>\n"; } if (db_exists(DB_DOWNLOADS)) { echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside("", "well"); echo "<span class='text-smaller text-uppercase'><strong>" . $locale['268'] . " " . $locale['258'] . "</strong></span>\n<br/>\n"; echo "<div class='clearfix m-t-10'>\n"; echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_D") . "'/>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['268'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($download['download']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($download['comment']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($download['submit']) . "</h4>\n"; echo "</div>\n"; echo "</div>\n"; closeside(); echo "</div>\n"; } if (db_exists(DB_NEWS)) { echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside("", "well"); echo "<span class='text-smaller text-uppercase'><strong>" . $locale['269'] . " " . $locale['258'] . "</strong></span>\n<br/>\n"; echo "<div class='clearfix m-t-10'>\n"; echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_N") . "'/>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['269'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($news['news']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($news['comment']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($news['submit']) . "</h4>\n"; echo "</div>\n"; echo "</div>\n"; closeside(); echo "</div>\n"; } if (db_exists(DB_ARTICLES)) { echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside("", "well"); echo "<span class='text-smaller text-uppercase'><strong>" . $locale['270'] . " " . $locale['258'] . "</strong></span>\n<br/>\n"; echo "<div class='clearfix m-t-10'>\n"; echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_A") . "'/>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['270'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($articles['article']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($articles['comment']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($articles['submit']) . "</h4>\n"; echo "</div>\n"; echo "</div>\n"; closeside(); echo "</div>\n"; } if (db_exists(DB_WEBLINKS)) { echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside("", "well"); echo "<span class='text-smaller text-uppercase'><strong>" . $locale['271'] . " " . $locale['258'] . "</strong></span>\n<br/>\n"; echo "<div class='clearfix m-t-10'>\n"; echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_W") . "'/>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['271'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($weblinks['weblink']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($weblinks['comment']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($weblinks['submit']) . "</h4>\n"; echo "</div>\n"; echo "</div>\n"; closeside(); echo "</div>"; } if (db_exists(DB_PHOTOS)) { echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside("", "well"); echo "<span class='text-smaller text-uppercase'><strong>" . $locale['272'] . " " . $locale['258'] . "</strong></span>\n<br/>\n"; echo "<div class='clearfix m-t-10'>\n"; echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_PH") . "'/>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['272'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($photos['photo']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($photos['comment']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($photos['submit']) . "</h4>\n"; echo "</div>\n"; echo "</div>\n"; closeside(); echo "</div>\n"; } echo "</div>\n"; echo "<div class='row'>\n"; echo "<div class='col-xs-12 co-sm-6 col-md-6 col-lg-3'>\n"; openside("<span class='text-smaller text-uppercase'><strong>" . $locale['283'] . "</strong></span><span class='pull-right badge'>" . number_format($infusions_count) . "</span>"); if ($infusions_count > 0) { global $global_infusions; echo "<div class='comment_content'>\n"; if (!empty($global_infusions)) { foreach ($global_infusions as $inf_id => $inf_data) { echo "<span class='badge m-b-10'>" . $inf_data['inf_title'] . "</span>\n"; } } echo "</div>\n"; closeside("" . (checkrights("I") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "infusions.php" . $aidlink . "'>" . $locale['285'] . "</a><i class='entypo right-open-mini'></i></div>\n" : '') . ""); } else { echo "<div class='text-center'>" . $locale['284'] . "</div>\n"; closeside(); } // comments echo "</div>\n<div class='col-xs-12 co-sm-6 col-md-6 col-lg-3'>\n"; openside("<span class='text-smaller text-uppercase'><strong>" . $locale['277'] . "</strong></span><span class='pull-right badge'>" . number_format($global_comments['rows']) . "</span>"); if (count($global_comments['data']) > 0) { foreach ($global_comments['data'] as $i => $comment_data) { echo "<!--Start Comment Item-->\n"; echo "<div data-id='{$i}' class='comment_content clearfix p-t-10 p-b-10' " . ($i > 0 ? "style='border-top:1px solid #ddd;'" : '') . " >\n"; echo "<div class='pull-left display-inline-block' style='margin-top:0px; margin-bottom:10px;'>" . display_avatar($comment_data, "25px", "", FALSE, "", "") . "</div>\n"; echo "<div id='comment_action-{$i}' class='btn-group pull-right display-none' style='position:absolute; right: 30px; margin-top:25px;'>\n\n\t\t\t\t<a class='btn btn-xs btn-default' title='" . $locale['274'] . "' href='" . ADMIN . "comments.php" . $aidlink . "&ctype=" . $comment_data['comment_type'] . "&comment_item_id=" . $comment_data['comment_item_id'] . "'><i class='entypo eye'></i></a>\n\t\t\t\t<a class='btn btn-xs btn-default' title='" . $locale['275'] . "' href='" . ADMIN . "comments.php" . $aidlink . "&action=edit&comment_id=" . $comment_data['comment_id'] . "&ctype=" . $comment_data['comment_type'] . "&comment_item_id=" . $comment_data['comment_item_id'] . "'><i class='entypo pencil'></i></a>\n\t\t\t\t<a class='btn btn-xs btn-default' title='" . $locale['276'] . "' href='" . ADMIN . "comments.php" . $aidlink . "&action=delete&comment_id=" . $comment_data['comment_id'] . "&ctype=" . $comment_data['comment_type'] . "&comment_item_id=" . $comment_data['comment_item_id'] . "'><i class='entypo trash'></i></a></div>\n"; echo "<strong>" . profile_link($comment_data['user_id'], $comment_data['user_name'], $comment_data['user_status']) . "</strong>\n"; echo "<span class='text-lighter'>" . $locale['273'] . "</span> <a href='" . sprintf($link_type[$comment_data['comment_type']], $comment_data['comment_item_id']) . "'><strong>" . $comments_type[$comment_data['comment_type']] . "</strong></a>"; echo "<br/>\n" . timer($comment_data['comment_datestamp']) . "<br/>\n"; echo "<span class='text-smaller text-lighter'>" . trimlink(parseubb($comment_data['comment_message']), 70) . "</span>\n"; echo "</div>\n"; echo "<!--End Comment Item-->\n"; } if (isset($global_comments['comments_nav'])) { echo "<div class='clearfix'>\n"; echo "<span class='pull-right text-smaller'>" . $global_comments['comments_nav'] . "</span>"; echo "</div>\n"; } } else { echo "<div class='text-center'>" . $global_comments['nodata'] . "</div>\n"; } closeside(); echo "</div>\n<div class='col-xs-12 co-sm-6 col-md-6 col-lg-3'>\n"; // Ratings openside("<span class='text-smaller text-uppercase'><strong>" . $locale['278'] . "</strong></span>"); if (count($global_ratings['data']) > 0) { foreach ($global_ratings['data'] as $i => $ratings_data) { echo "<!--Start Rating Item-->\n"; echo "<div class='comment_content clearfix p-t-10 p-b-10' " . ($i > 0 ? "style='border-top:1px solid #ddd;'" : '') . " >\n"; echo "<div class='pull-left display-inline-block' style='margin-top:0px; margin-bottom:10px;'>" . display_avatar($ratings_data, "25px", "", FALSE, "", "") . "</div>\n"; echo "<strong>" . profile_link($ratings_data['user_id'], $ratings_data['user_name'], $ratings_data['user_status']) . "</strong>\n"; echo "<span class='text-lighter'>" . $locale['273a'] . "</span>\n"; echo "<a href='" . sprintf($link_type[$ratings_data['rating_type']], $ratings_data['rating_item_id']) . "'><strong>" . $comments_type[$ratings_data['rating_type']] . "</strong></a>"; echo "<span class='text-lighter m-l-10'>" . str_repeat("<i class='fa fa-star fa-fw'></i>", $ratings_data['rating_vote']) . "</span>\n<br/>"; echo timer($ratings_data['rating_datestamp']) . "<br/>\n"; echo "</div>\n"; echo "<!--End Rating Item-->\n"; } if (isset($global_ratings['ratings_nav'])) { echo "<div class='clearfix'>\n"; echo "<span class='pull-right text-smaller'>" . $global_ratings['ratings_nav'] . "</span>"; echo "</div>\n"; } } else { echo "<div class='text-center'>" . $global_ratings['nodata'] . "</div>\n"; } closeside(); echo "</div>\n<div class='col-xs-12 co-sm-6 col-md-6 col-lg-3'>\n"; openside("<span class='text-smaller text-uppercase'><strong>" . $locale['279'] . "</strong></span><span class='pull-right badge'>" . number_format($global_submissions['rows']) . "</span>"); if (count($global_submissions['data']) > 0) { foreach ($global_submissions['data'] as $i => $submit_data) { switch ($submit_data['submit_type']) { case "n": $review_link = INFUSIONS . "news/news_admin.php" . $aidlink . "&section=submissions&submit_id=" . $submit_data['submit_id']; break; case "a": $review_link = INFUSIONS . "articles/articles_admin.php" . $aidlink . "&section=submissions&submit_id=" . $submit_data['submit_id']; break; case "p": $review_link = INFUSIONS . "gallery/gallery_admin.php" . $aidlink . "&section=submissions&submit_id=" . $submit_data['submit_id']; break; case "b": $review_link = INFUSIONS . "blog/blog_admin.php" . $aidlink . "&section=submissions&submit_id=" . $submit_data['submit_id']; break; case "d": $review_link = INFUSIONS . "downloads/downloads_admin.php" . $aidlink . "&section=submissions&submit_id=" . $submit_data['submit_id']; break; case "l": $review_link = INFUSIONS . "weblinks/weblinks_admin.php" . $aidlink . "&section=submissions&submit_id=" . $submit_data['submit_id']; break; default: // @todo: add admin class API to use infusion_db.php to register submission link $review_link = ""; } echo "<!--Start Submissions Item-->\n"; echo "<div data-id='{$i}' class='submission_content clearfix p-t-10 p-b-10' " . ($i > 0 ? "style='border-top:1px solid #ddd;'" : '') . " >\n"; echo "<div class='pull-left display-inline-block' style='margin-top:0px; margin-bottom:10px;'>" . display_avatar($submit_data, "25px", "", FALSE, "", "") . "</div>\n"; echo "<strong>" . profile_link($submit_data['user_id'], $submit_data['user_name'], $submit_data['user_status']) . "</strong>\n"; echo "<span class='text-lighter'>" . $locale['273b'] . " <strong>" . $submit_type[$submit_data['submit_type']] . "</strong></span><br/>\n"; echo timer($submit_data['submit_datestamp']) . "<br/>\n"; if (!empty($review_link)) { echo "<a class='btn btn-xs btn-default m-t-5' title='" . $locale['286'] . "' href='" . $review_link . "'>" . $locale['286'] . "</a>\n"; } echo "</div>\n"; echo "<!--End Submissions Item-->\n"; } if (isset($global_submissions['submissions_nav'])) { echo "<div class='clearfix'>\n"; echo "<span class='pull-right text-smaller'>" . $global_submissions['submissions_nav'] . "</span>"; echo "</div>\n"; } } else { echo "<div class='text-center'>" . $global_submissions['nodata'] . "</div>\n"; } closeside(); echo "</div>\n"; closetable(); add_to_jquery("\n\t\$('.comment_content').hover(function() {\n\t\$('#comment_action-'+\$(this).data('id')).removeClass('display-none');\n\t},function(){\n\t\$('#comment_action-'+\$(this).data('id')).addClass('display-none');\n\t});\n\t\$('.submission_content').hover(function() {\n\t\$('#submission_action-'+\$(this).data('id')).removeClass('display-none');\n\t},function(){\n\t\$('#submission_action-'+\$(this).data('id')).addClass('display-none');\n\t});\n\t"); }
<? if(!empty($comments)) : ?> <div id="post_comments_list"> <? foreach($comments as $item): ?> <div class="post_comment" id="comment-list-id-<? print $item['id'];?>"> <? $author = CI::model('users')->getUserById( $item['created_by']); ?> <? $thumb = CI::model('users')->getUserThumbnail( $author['id'], 70); ?> <a class="img" href="<? print profile_link($author['id']);?>"> <span style="background-image: url('<? print $thumb; ?>');"></span> </a> <div class="post_comment_text"> <? if(!empty($author)): ?> <div class="post_comment_author"><strong><a href="<? print profile_link( $item['created_by']);?>"><? print user_name( $item['created_by']);?> </a></strong> said:</div> <? else: ?> <div class="post_comment_author"><strong>Anonymous</strong> said:</div> <? endif; ?> <p class=""><? print ($item['comment_body']); ?> </p> <? if($item['created_by'] == user_id()): ?> <a href="javascript:mw.comments.del(<? print $item['id'];?>, '#comment-list-id-<? print $item['id'];?>')" class="comment_delete">delete</a> <? endif; ?> </div> <div class="c"> </div> <div class="user_activity_bar"> <div><a class="user_activity_likes" href="<? print voting_link($item['id'], '#post-comments-'.$item['id'], 'comments'); ?>"><strong id="post-comments-<? print ($item['id']); ?>"><? print votes_count($item['id'], false, 'comments'); ?></strong><span></span><strong >Like</strong></a></div> </div> </div>
/** * @param $comment_type - abbr or short ID * @param $comment_db - Current Application DB - DB_BLOG for example. * @param $comment_col - current sql primary key column - 'blog_id' for example * @param $comment_item_id - current sql primary key value '$_GET['blog_id']' for example * @param $clink - current page link 'FUSION_SELF' is ok. */ function showcomments($comment_type, $comment_db, $comment_col, $comment_item_id, $clink) { global $settings, $locale, $userdata, $aidlink; $link = FUSION_SELF . (FUSION_QUERY ? "?" . FUSION_QUERY : ""); $link = preg_replace("^(&|\\?)c_action=(edit|delete)&comment_id=\\d*^", "", $link); $_GET['comment'] = isset($_GET['comment']) && isnum($_GET['comment']) ? $_GET['comment'] : 0; $cpp = $settings['comments_per_page']; if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "delete") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) { if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_name='" . $userdata['user_id'] . "'")) { $result = dbquery("DELETE FROM " . DB_COMMENTS . "\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : "\n\t\t\t\tAND comment_name='" . $userdata['user_id'] . "'")); } redirect($clink . ($settings['comments_sorting'] == "ASC" ? "" : "&c_start=0")); } if ($settings['comments_enabled'] == "1") { if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) { if (!iMEMBER && $settings['guestpost'] == 1) { if (!isset($_POST['comment_name'])) { redirect($link); } if (isnum($_POST['comment_name'])) { $_POST['comment_name'] = ''; } $_CAPTCHA_IS_VALID = FALSE; include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_check.php"; if (!isset($_POST['captcha_code']) || $_CAPTCHA_IS_VALID == FALSE) { redirect($link); } } $comment_data = array('comment_id' => isset($_GET['comment_id']) && isnum($_GET['comment_id']) ? $_GET['comment_id'] : 0, 'comment_name' => iMEMBER ? $userdata['user_id'] : form_sanitizer($_POST['comment_name'], '', 'comment_name'), 'comment_message' => form_sanitizer($_POST['comment_message'], '', 'comment_message'), 'comment_datestamp' => time(), 'comment_item_id' => $comment_item_id, 'comment_type' => $comment_type, 'comment_cat' => 0, 'comment_ip' => USER_IP, 'comment_ip_type' => USER_IP_TYPE, 'comment_hidden' => 0); if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && $comment_data['comment_id']) { $comment_updated = FALSE; if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $comment_data['comment_id'] . "' \n\t\t\t\tAND comment_item_id='" . $comment_item_id . "'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tAND comment_type='" . $comment_type . "' \n\t\t\t\tAND comment_name='" . $userdata['user_id'] . "' \n\t\t\t\tAND comment_hidden='0'")) { dbquery_insert(DB_COMMENTS, $comment_data, 'update'); if ($comment_data['comment_message']) { $result = dbquery("UPDATE " . DB_COMMENTS . " SET comment_message='" . $comment_data['comment_message'] . "'\n \t\t\t\t\t\t\t\t\t WHERE comment_id='" . $_GET['comment_id'] . "' " . (iADMIN ? "" : "AND comment_name='" . $userdata['user_id'] . "'")); if ($result) { $comment_updated = TRUE; } } } if ($comment_updated) { if ($settings['comments_sorting'] == "ASC") { $c_operator = "<="; } else { $c_operator = ">="; } $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_id" . $c_operator . "'" . $comment_data['comment_id'] . "'\n\t\t\t\t\t\t\t\tAND comment_item_id='" . $comment_item_id . "'\n\t\t\t\t\t\t\t\tAND comment_type='" . $comment_type . "'"); $c_start = (ceil($c_count / $cpp) - 1) * $cpp; } redirect($clink . "&c_start=" . (isset($c_start) && isnum($c_start) ? $c_start : "")); } else { if (!dbcount("(" . $comment_col . ")", $comment_db, $comment_col . "='" . $comment_item_id . "'")) { redirect(BASEDIR . "index.php"); } $id = 0; if ($comment_data['comment_name'] && $comment_data['comment_message']) { require_once INCLUDES . "flood_include.php"; if (!flood_control("comment_datestamp", DB_COMMENTS, "comment_ip='" . USER_IP . "'")) { dbquery_insert(DB_COMMENTS, $comment_data, 'save'); $id = dblastid(); } } if ($settings['comments_sorting'] == "ASC") { $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $comment_item_id . "' AND comment_type='" . $comment_type . "'"); $c_start = (ceil($c_count / $cpp) - 1) * $cpp; } else { $c_start = 0; } //if (!$settings['site_seo']) { redirect($clink . "&c_start=" . $c_start . "#c" . $id); //} } } $c_arr = array("c_con" => array(), "c_info" => array("c_makepagenav" => FALSE, "admin_link" => FALSE)); $c_rows = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $comment_item_id . "' AND comment_type='" . $comment_type . "' AND comment_hidden='0'"); if (!isset($_GET['c_start']) && $c_rows > $cpp) { $_GET['c_start'] = (ceil($c_rows / $cpp) - 1) * $cpp; } if (!isset($_GET['c_start']) || !isnum($_GET['c_start'])) { $_GET['c_start'] = 0; } $result = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcm.comment_datestamp,\n\t\t\t\t\ttcu.user_id, tcu.user_name, tcu.user_avatar, tcu.user_status\n\t\t\t\t\tFROM " . DB_COMMENTS . " tcm\n\t\t\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\n\t\t\t\t\tWHERE comment_item_id='" . $comment_item_id . "' AND comment_type='" . $comment_type . "' AND comment_hidden='0'\n\t\t\t\t\tORDER BY comment_datestamp " . $settings['comments_sorting'] . " LIMIT " . $_GET['c_start'] . "," . $cpp); if (dbrows($result) > 0) { $i = $settings['comments_sorting'] == "ASC" ? $_GET['c_start'] + 1 : $c_rows - $_GET['c_start']; if ($c_rows > $cpp) { $c_arr['c_info']['c_makepagenav'] = makepagenav($_GET['c_start'], $cpp, $c_rows, 3, $clink . "&", "c_start"); } while ($data = dbarray($result)) { $c_arr['c_con'][$i]['comment_id'] = $data['comment_id']; $c_arr['c_con'][$i]['edit_dell'] = FALSE; $c_arr['c_con'][$i]['i'] = $i; if ($data['user_name']) { $c_arr['c_con'][$i]['comment_name'] = profile_link($data['comment_name'], $data['user_name'], $data['user_status'], 'strong text-dark'); } else { $c_arr['c_con'][$i]['comment_name'] = $data['comment_name']; } $c_arr['c_con'][$i]['user_avatar'] = display_avatar($data, '35px', '', true, 'img-rounded'); $c_arr['c_con'][$i]['user'] = array('user_id' => $data['user_id'], 'user_name' => $data['user_name'], 'user_avatar' => $avatar = $data['user_avatar'] !== '' && file_exists(IMAGES . 'avatars/' . $data['user_avatar']) ? IMAGES . 'avatars/' . $data['user_avatar'] : IMAGES . "avatars/noavatar50.png", 'user_status' => $data['user_status']); $c_arr['c_con'][$i]['comment_datestamp'] = showdate('shortdate', $data['comment_datestamp']); $c_arr['c_con'][$i]['comment_time'] = timer($data['comment_datestamp']); $c_arr['c_con'][$i]['comment_message'] = "<!--comment_message-->\n" . nl2br(parseubb(parsesmileys($data['comment_message']))); if (iADMIN && checkrights("C") || iMEMBER && $data['comment_name'] == $userdata['user_id'] && isset($data['user_name'])) { $edit_link = clean_request('c_action=edit&comment_id=' . $data['comment_id'], array('c_action', 'comment_id'), false) . "#edit_comment"; $delete_link = clean_request('c_action=delete&comment_id=' . $data['comment_id'], array('c_action', 'comment_id'), false); $c_arr['c_con'][$i]['edit_link'] = array('link' => $edit_link, 'name' => $locale['c108']); $c_arr['c_con'][$i]['delete_link'] = array('link' => $delete_link, 'name' => $locale['c109']); $c_arr['c_con'][$i]['edit_dell'] = "<!--comment_actions-->\n"; $c_arr['c_con'][$i]['edit_dell'] .= "<div class='btn-group'>"; $c_arr['c_con'][$i]['edit_dell'] .= "<a class='btn btn-xs btn-default' href='" . $edit_link . "'>"; $c_arr['c_con'][$i]['edit_dell'] .= $locale['c108'] . "</a>\n"; $c_arr['c_con'][$i]['edit_dell'] .= "<a class='btn btn-xs btn-default' href='" . $delete_link . "' onclick=\"return confirm('" . $locale['c110'] . "');\">"; $c_arr['c_con'][$i]['edit_dell'] .= "<i class='fa fa-trash'></i> " . $locale['c109'] . "</a>"; $c_arr['c_con'][$i]['edit_dell'] .= "</div>\n"; } $settings['comments_sorting'] == "ASC" ? $i++ : $i--; } if (iADMIN && checkrights("C")) { $c_arr['c_info']['admin_link'] = "<!--comment_admin-->\n"; $c_arr['c_info']['admin_link'] .= "<a href='" . ADMIN . "comments.php" . $aidlink . "&ctype=" . $comment_type . "&comment_item_id=" . $comment_item_id . "'>" . $locale['c106'] . "</a>"; } } opentable($locale['c102']); $comment_message = ""; if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) { $eresult = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcu.user_name\n\t\t\t\tFROM " . DB_COMMENTS . " tcm\n\t\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "' AND comment_item_id='" . $comment_item_id . "'\n\t\t\t\tAND comment_type='" . $comment_type . "' AND comment_hidden='0'"); if (dbrows($eresult) > 0) { $edata = dbarray($eresult); if (iADMIN && checkrights("C") || iMEMBER && $edata['comment_name'] == $userdata['user_id'] && isset($edata['user_name'])) { $clink .= "&c_action=edit&comment_id=" . $edata['comment_id']; $comment_message = $edata['comment_message']; } } else { $comment_message = ""; } } if (iMEMBER || $settings['guestposts'] == "1") { require_once INCLUDES . "bbcode_include.php"; echo "<a id='edit_comment' name='edit_comment'></a>\n"; echo openform('inputform', 'post', $clink, array('class' => 'm-b-20', 'max_tokens' => 1)); if (iGUEST) { echo form_text('comment_name', $locale['c104'], '', array('max_length' => 30)); } echo form_textarea('comment_message', '', $comment_message, array('required' => 1, 'autosize' => 1, 'form_name' => 'inputform', 'bbcode' => 1)); if (iGUEST && (!isset($_CAPTCHA_HIDE_INPUT) || isset($_CAPTCHA_HIDE_INPUT) && !$_CAPTCHA_HIDE_INPUT)) { $_CAPTCHA_HIDE_INPUT = FALSE; echo "<div style='width:360px; margin:10px auto;'>"; echo $locale['global_150'] . "<br />\n"; include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_display.php"; if (!$_CAPTCHA_HIDE_INPUT) { echo "<br />\n<label for='captcha_code'>" . $locale['global_151'] . "</label>"; echo "<br />\n<input type='text' id='captcha_code' name='captcha_code' class='textbox' autocomplete='off' style='width:100px' />\n"; } echo "</div>\n"; } echo form_button('post_comment', $comment_message ? $locale['c103'] : $locale['c102'], $comment_message ? $locale['c103'] : $locale['c102'], array('class' => 'btn-success m-t-10')); echo closeform(); } else { echo "<div class='well'>\n"; echo $locale['c105'] . "\n"; echo "</div>\n"; } closetable(); echo "<a id='comments' name='comments'></a>"; render_comments($c_arr['c_con'], $c_arr['c_info']); } }
echo "<td class='tbl2'>" . $locale['pla_112'] . "</td>\n"; echo "<td class='tbl2'>" . $locale['pla_140'] . "</td>\n"; echo "<td class='tbl2'>" . $locale['pla_125'] . "</td>\n"; echo "<td class='tbl2'>" . $locale['pla_612'] . "</td>\n"; echo "<td class='tbl2'>" . $locale['pla_127'] . "</td>\n"; echo "<td class='tbl2'>" . $locale['pla_128'] . "</td>\n"; echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['pla_133'] . "</td>\n"; echo "</tr>\n"; while ($data = dbarray($result)) { $row_color = $i % 2 == 0 ? "tbl1" : "tbl2"; echo "<tr>\n"; echo "<td class='{$row_color}'>" . (isset($data['user_name']) ? profile_link($data['user_id'], $data['user_name'], $data['user_status']) : $locale['pla_608']) . "</td>\n"; echo "<td class='{$row_color}'>" . $data['app_realname'] . "</td>\n"; echo "<td class='{$row_color}'>" . $license_types[$data['app_type']] . "</td>\n"; $get_admin = dbarray(dbquery("SELECT user_name, user_status FROM " . DB_USERS . " WHERE user_id = '" . $app_approver . "'")); echo "<td class='{$row_color}'>" . profile_link($data['app_approver'], $get_admin['user_name'], $get_admin['user_status']) . "</td>\n"; if (!strstr($data['app_url'], "http://") && !strstr($data['app_url'], "https://")) { $urlprefix = "http://"; } else { $urlprefix = ""; } echo "<td class='{$row_color}'>"; if ($data['app_url']) { echo "<a href='" . $urlprefix . $data['app_url'] . "' title='" . $urlprefix . $data['app_url'] . "' target='_blank'>" . $data['app_url'] . "</a>"; } echo "</td>\n"; echo "<td class='{$row_color}'>" . showdate("shortdate", $data['app_datestamp']) . "</td>\n"; echo "<td align='center' width='1%' class='{$row_color}' style='white-space:nowrap'><a href='" . FUSION_SELF . $aidlink . "&action=edit&app_id=" . $data['app_id'] . "'>" . $locale['pla_138'] . "</a> -\n"; echo "<a href='" . FUSION_SELF . $aidlink . "&action=delete&app_id=" . $data['app_id'] . "'>" . $locale['pla_139'] . "</a></td>\n"; echo "</tr>\n"; }
echo "<div class='tbl2 forum_breadcrumbs' style='margin-bottom:5px'><a href='index.php'>" . $settings['sitename'] . "</a> » " . $caption . "</div>\n"; if ($fdata['forum_poll'] && checkgroup($fdata['forum_poll'])) { if (isset($poll_title) && $poll_title && (isset($poll_opts) && is_array($poll_opts))) { echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border' style='margin-bottom:5px'>\n<tr>\n"; echo "<td align='center' class='tbl2'><strong>" . $poll_title . "</strong></td>\n</tr>\n<tr>\n<td class='tbl1'>\n"; echo "<table align='center' cellpadding='0' cellspacing='0'>\n"; foreach ($poll_opts as $poll_option) { echo "<tr>\n<td class='tbl1'><input type='radio' name='poll_option' value='{$i}' style='vertical-align:middle;' /> " . $poll_option . "</td>\n</tr>\n"; $i++; } echo "</table>\n</td>\n</tr>\n</table>\n"; } } echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border forum_thread_table'>\n<tr>\n"; echo "<td colspan='2' class='tbl2'><strong>" . $subject . "</strong></td>\n</tr>\n"; echo "<tr>\n<td class='tbl2 forum_thread_user_name' style='width:140px;'>" . profile_link($userdata['user_id'], $userdata['user_name'], $userdata['user_status']) . "</td>\n"; echo "<td class='tbl2 forum_thread_post_date'>" . $locale['426'] . showdate("forumdate", time()) . "</td>\n"; echo "</tr>\n<tr>\n<td valign='top' width='140' class='tbl2 forum_thread_user_info'>\n"; if ($userdata['user_avatar'] && file_exists(IMAGES . "avatars/" . $userdata['user_avatar'])) { echo "<img src='" . IMAGES . "avatars/" . $userdata['user_avatar'] . "' alt='' /><br /><br />\n"; } echo "<span class='small'>" . getuserlevel($userdata['user_level']) . "</span><br /><br />\n"; echo "<span class='small'><strong>" . $locale['423'] . "</strong> " . $userdata['user_posts'] . "</span><br />\n"; echo "<span class='small'><strong>" . $locale['425'] . "</strong> " . showdate("shortdate", $userdata['user_joined']) . "</span><br />\n"; echo "<br /></td>\n<td valign='top' class='tbl1 forum_thread_user_post'>" . $previewmessage . "</td>\n"; echo "</tr>\n</table>\n"; closetable(); } } if (isset($_POST['postnewthread'])) { $subject = trim(stripinput(censorwords($_POST['subject'])));
if ($a_files) { echo "<div class='emulated-fieldset'>\n"; echo "<span class='emulated-legend'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . $locale['506'] . ($i_files > 1 ? $locale['506d'] : $locale['506c']) . "</span>\n"; echo "<div class='attachments-list'>" . $a_files . "</div>\n"; echo "</div>\n"; } if ($a_images) { $colorbox_rel[] = $data['post_id']; echo "<div class='emulated-fieldset'>\n"; echo "<span class='emulated-legend'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . $locale['506'] . ($i_images > 1 ? $locale['506b'] : $locale['506a']) . "</span>\n"; echo "<div class='attachments-list'>" . $a_images . "</div>\n"; echo "</div>\n"; } } if ($data['post_edittime'] != "0") { echo "\n<hr />\n<span class='small'>" . $locale['508'] . profile_link($data['post_edituser'], $data['edit_name'], $data['edit_status']) . $locale['509'] . showdate("forumdate", $data['post_edittime']) . "</span>\n"; if ($data['post_editreason'] != "" && iMEMBER) { $edit_reason = true; echo "<br /><div class='edit_reason'><a id='reason_pid_" . $data['post_id'] . "' rel='" . $data['post_id'] . "' class='reason_button small' href='#reason_div_pid_" . $data['post_id'] . "'>"; echo "<strong>" . $locale['508a'] . "</strong>"; echo "</a>\n"; echo "<div id='reason_div_pid_" . $data['post_id'] . "' class='reason_div small'>" . $data['post_editreason'] . "</div></div>\n"; } } if ($data['post_showsig'] && isset($data['user_sig']) && $data['user_sig'] && $data['user_status'] != 6 && $data['user_status'] != 5) { echo "\n<hr /><div class='forum_sig'>" . nl2br(parseubb(parsesmileys($data['user_sig']), "b|i|u||center|small|url|mail|img|color")) . "</div>\n"; } echo "<!--sub_forum_post--></td>\n</tr>\n"; echo "<tr>\n<td class='tbl2 forum_thread_ip' style='width:140px;white-space:nowrap'>"; if ($settings['forum_ips'] && iMEMBER || iMOD) { echo "<strong>" . $locale['571'] . "</strong>: " . $data['post_ip'];
function showcomments($ctype, $cdb, $ccol, $cid, $clink) { global $settings, $locale, $userdata, $aidlink; $link = FUSION_SELF . (FUSION_QUERY ? "?" . FUSION_QUERY : ""); $link = preg_replace("^(&|\\?)c_action=(edit|delete)&comment_id=\\d*^", "", $link); $cpp = $settings['comments_per_page']; if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "delete") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) { if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_name='" . $userdata['user_id'] . "'")) { $result = dbquery("DELETE FROM " . DB_COMMENTS . "\r\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : "\r\n\t\t\t\t\tAND comment_name='" . $userdata['user_id'] . "'")); } redirect($clink . ($settings['comments_sorting'] == "ASC" ? "" : "&c_start=0")); } if ($settings['comments_enabled'] == "1") { if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) { if (iMEMBER) { $comment_name = $userdata['user_id']; } elseif ($settings['guestposts'] == "1") { if (!isset($_POST['comment_name'])) { redirect($link); } $comment_name = trim(stripinput($_POST['comment_name'])); $comment_name = preg_replace("(^[+0-9\\s]*)", "", $comment_name); if (isnum($comment_name)) { $comment_name = ""; } $_CAPTCHA_IS_VALID = FALSE; include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_check.php"; if (!isset($_POST['captcha_code']) || $_CAPTCHA_IS_VALID == FALSE) { redirect($link); } } $comment_message = trim(stripinput(censorwords($_POST['comment_message']))); if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) { $comment_updated = FALSE; if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\tAND comment_type='" . $ctype . "' AND comment_name='" . $userdata['user_id'] . "'\r\n\t\t\t\t\t\tAND comment_hidden='0'")) { if ($comment_message) { $result = dbquery("UPDATE " . DB_COMMENTS . " SET comment_message='" . $comment_message . "'\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : "\r\n\t\t\t\t\t\t\t\t\t\t\tAND comment_name='" . $userdata['user_id'] . "'")); $comment_updated = TRUE; } } if ($comment_updated) { if ($settings['comments_sorting'] == "ASC") { $c_operator = "<="; } else { $c_operator = ">="; } $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_id" . $c_operator . "'" . $_GET['comment_id'] . "'\r\n\t\t\t\t\t\t\t\tAND comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\t\t\tAND comment_type='" . $ctype . "'"); $c_start = (ceil($c_count / $cpp) - 1) * $cpp; } redirect($clink . "&c_start=" . (isset($c_start) && isnum($c_start) ? $c_start : "")); } else { if (!dbcount("(" . $ccol . ")", $cdb, $ccol . "='" . $cid . "'")) { redirect(BASEDIR . "index.php"); } if ($comment_name && $comment_message) { require_once INCLUDES . "flood_include.php"; if (!flood_control("comment_datestamp", DB_COMMENTS, "comment_ip='" . USER_IP . "'")) { $result = dbquery("INSERT INTO " . DB_COMMENTS . " (\r\n\t\t\t\t\t\t\t\tcomment_item_id, comment_type, comment_name, comment_message, comment_datestamp,\r\n\t\t\t\t\t\t\t\tcomment_ip, comment_ip_type, comment_hidden\r\n\t\t\t\t\t\t\t) VALUES (\r\n\t\t\t\t\t\t\t\t'" . $cid . "', '" . $ctype . "', '" . $comment_name . "', '" . $comment_message . "', '" . time() . "',\r\n\t\t\t\t\t\t\t\t'" . USER_IP . "', '" . USER_IP_TYPE . "', '0'\r\n\t\t\t\t\t\t\t)"); } } if ($settings['comments_sorting'] == "ASC") { $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\t\t\t\t\tAND comment_type='" . $ctype . "'"); $c_start = (ceil($c_count / $cpp) - 1) * $cpp; } else { $c_start = 0; } redirect($clink . "&c_start=" . $c_start); } } $c_arr = array("c_con" => array(), "c_info" => array("c_makepagenav" => FALSE, "admin_link" => FALSE)); $c_rows = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\t\tAND comment_type='" . $ctype . "' AND comment_hidden='0'"); if (!isset($_GET['c_start']) && $c_rows > $cpp) { $_GET['c_start'] = (ceil($c_rows / $cpp) - 1) * $cpp; } if (!isset($_GET['c_start']) || !isnum($_GET['c_start'])) { $_GET['c_start'] = 0; } $result = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcm.comment_datestamp,\r\n\t\t\t\t\ttcu.user_id, tcu.user_name, tcu.user_avatar, tcu.user_status\r\n\t\t\tFROM " . DB_COMMENTS . " tcm\r\n\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\r\n\t\t\tWHERE comment_item_id='" . $cid . "' AND comment_type='" . $ctype . "' AND comment_hidden='0'\r\n\t\t\tORDER BY comment_datestamp " . $settings['comments_sorting'] . " LIMIT " . $_GET['c_start'] . "," . $cpp); if (dbrows($result)) { $i = $settings['comments_sorting'] == "ASC" ? $_GET['c_start'] + 1 : $c_rows - $_GET['c_start']; if ($c_rows > $cpp) { $c_arr['c_info']['c_makepagenav'] = makepagenav($_GET['c_start'], $cpp, $c_rows, 3, $clink . "&", "c_start"); } while ($data = dbarray($result)) { $c_arr['c_con'][$i]['comment_id'] = $data['comment_id']; $c_arr['c_con'][$i]['edit_dell'] = FALSE; $c_arr['c_con'][$i]['i'] = $i; if ($data['user_name']) { $c_arr['c_con'][$i]['comment_name'] = profile_link($data['comment_name'], $data['user_name'], $data['user_status']); } else { $c_arr['c_con'][$i]['comment_name'] = $data['comment_name']; } //Add user avatar in comments new feature in v7.02.04 $c_arr['c_con'][$i]['user_avatar'] = display_avatar($data, '80px'); $c_arr['c_con'][$i]['comment_datestamp'] = $locale['global_071'] . showdate("longdate", $data['comment_datestamp']); $c_arr['c_con'][$i]['comment_message'] = "<!--comment_message-->\n" . nl2br(parseubb(parsesmileys($data['comment_message']))); if (iADMIN && checkrights("C") || iMEMBER && $data['comment_name'] == $userdata['user_id'] && isset($data['user_name'])) { $c_arr['c_con'][$i]['edit_dell'] = "<!--comment_actions-->\n"; $c_arr['c_con'][$i]['edit_dell'] .= "<a href='" . FUSION_REQUEST . "&c_action=edit&comment_id=" . $data['comment_id'] . "#edit_comment'>"; $c_arr['c_con'][$i]['edit_dell'] .= $locale['c108'] . "</a> |\n"; $c_arr['c_con'][$i]['edit_dell'] .= "<a href='" . FUSION_REQUEST . "&c_action=delete&comment_id=" . $data['comment_id'] . "' onclick=\"return confirm('" . $locale['c110'] . "');\">"; $c_arr['c_con'][$i]['edit_dell'] .= $locale['c109'] . "</a>"; } $settings['comments_sorting'] == "ASC" ? $i++ : $i--; } if (iADMIN && checkrights("C")) { $c_arr['c_info']['admin_link'] = "<!--comment_admin-->\n"; $c_arr['c_info']['admin_link'] .= "<a href='" . ADMIN . "comments.php" . $aidlink . "&ctype=" . $ctype . "&cid=" . $cid . "'>" . $locale['c106'] . "</a>"; } } // Render comments echo "<a id='comments' name='comments'></a>"; render_comments($c_arr['c_con'], $c_arr['c_info']); // Add / edit comment opentable($locale['c102']); if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) { $eresult = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcu.user_name\r\n\t\t\t\tFROM " . DB_COMMENTS . " tcm\r\n\t\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\r\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "' AND comment_item_id='" . $cid . "'\r\n\t\t\t\t\tAND comment_type='" . $ctype . "' AND comment_hidden='0'"); if (dbrows($eresult)) { $edata = dbarray($eresult); if (iADMIN && checkrights("C") || iMEMBER && $edata['comment_name'] == $userdata['user_id'] && isset($edata['user_name'])) { $clink .= "&c_action=edit&comment_id=" . $edata['comment_id']; $comment_message = $edata['comment_message']; } } else { $comment_message = ""; } } else { $comment_message = ""; } if (iMEMBER || $settings['guestposts'] == "1") { require_once INCLUDES . "bbcode_include.php"; echo "<a id='edit_comment' name='edit_comment'></a>\n"; echo openform('inputform', 'inputform', 'post', $clink); if (iGUEST) { echo "<div align='center' class='tbl'>\n" . $locale['c104'] . "<br />\n"; echo "<input type='text' name='comment_name' maxlength='30' class='textbox' style='width:360px' />\n"; echo "</div>\n"; } echo "<div class='row'>\n"; echo "<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12'>\n"; echo form_textarea('', 'comment_message', 'comment_message', $comment_message, array('required' => 1)); echo display_bbcodes("360px", "comment_message"); if (iGUEST && (!isset($_CAPTCHA_HIDE_INPUT) || isset($_CAPTCHA_HIDE_INPUT) && !$_CAPTCHA_HIDE_INPUT)) { $_CAPTCHA_HIDE_INPUT = FALSE; echo "<div style='width:360px; margin:10px auto;'>"; echo $locale['global_150'] . "<br />\n"; include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_display.php"; if (!$_CAPTCHA_HIDE_INPUT) { echo "<br />\n<label for='captcha_code'>" . $locale['global_151'] . "</label>"; echo "<br />\n<input type='text' id='captcha_code' name='captcha_code' class='textbox' autocomplete='off' style='width:100px' />\n"; } echo "</div>\n"; } echo form_button($comment_message ? $locale['c103'] : $locale['c102'], 'post_comment', 'post_comment', $comment_message ? $locale['c103'] : $locale['c102'], array('class' => 'btn btn-primary m-t-10')); echo "</div>\n</div>\n"; echo closeform(); } else { echo $locale['c105'] . "\n"; } closetable(); } }
echo "<div class='forum_attachments_content'>" . $print_files . "</div>"; echo "</fieldset>\n"; } if ($print_images != '') { if ($print_files != '') { echo "<br />"; } echo "\n<fieldset class='forum_attachments'>"; echo "<legend class='forum_attachments_legend'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . ($count_images > 1 ? $locale['506b'] : $locale['506']) . "</legend>"; echo "<div class='forum_attachments_content'>" . $print_images . "</div>"; echo "</fieldset>\n"; } } } if ($data['post_edittime'] != "0") { echo "\n<fieldset class='forum_edit'>\n" . $locale['508'] . profile_link($data['post_edituser'], $data['edit_name'], $data['edit_status']) . $locale['509'] . showdate("forumdate", $data['post_edittime']) . "</fieldset>"; // Pimped: added profile_link() } if ($data['post_showsig'] && isset($data['user_sig']) && $data['user_sig']) { echo "\n<fieldset class='forum_signatur'>\r\n\t\t\t<legend class='forum_signatur_legend'>" . $locale['507d'] . "</legend>" . nl2br(parseubb(parsesmileys($data['user_sig']), "b|i|u||center|small|url|mail|img|color")) . "\r\n\t\t\t</fieldset>"; } echo "<!--sub_forum_post--></td>\n</tr>\n"; // Pimped: Post Ratings -> if ($settings['forum_post_ratings']) { $show = post_ratings_show($data['post_id']); $do = ''; if (iMEMBER && $userdata['user_id'] !== $data['user_id']) { $do .= "<span id='rb_" . $data['post_id'] . "'>"; $do .= post_ratings_do($data['post_id'], $userdata['user_id'], $data['post_author'], false); $do .= "</span> "; }
// xss injection $result = dbquery("SELECT tn.thread_id FROM " . DB_FORUM_THREAD_NOTIFY . " tn\n INNER JOIN " . DB_FORUM_THREADS . " tt ON tn.thread_id = tt.thread_id\n INNER JOIN " . DB_FORUMS . " tf ON tt.forum_id = tf.forum_id\n WHERE tn.notify_user="******" AND " . groupaccess('forum_access') . " AND tt.thread_hidden='0'"); $rows = dbrows($result); if (!isset($_GET['rowstart']) or !isnum($_GET['rowstart']) or $_GET['rowstart'] > $rows) { $_GET['rowstart'] = 0; } $info['post_rows'] = $rows; if ($rows) { require_once INCLUDES . "mimetypes_include.php"; $info['page_nav'] = $rows > 10 ? makepagenav($_GET['rowstart'], 16, $rows, 3, FUSION_REQUEST, "rowstart") : ""; $result = dbquery("\n SELECT tf.forum_id, tf.forum_name, tf.forum_access, tf.forum_type, tf.forum_mods,\n tn.thread_id, tn.notify_datestamp, tn.notify_user,\n ttc.forum_id AS forum_cat_id, ttc.forum_name AS forum_cat_name,\n tp.post_datestamp, tp.post_message,\n tt.thread_subject, tt.forum_id, tt.thread_lastpost, tt.thread_lastpostid, tt.thread_lastuser, tt.thread_postcount, tt.thread_views, tt.thread_locked,\n tt.thread_author, tt.thread_poll, tt.thread_sticky,\n uc.user_id AS s_user_id, uc.user_name AS author_name, uc.user_status AS author_status, uc.user_avatar AS author_avatar,\n u.user_id, u.user_name as last_user_name, u.user_status as last_user_status, u.user_avatar as last_user_avatar,\n count(v.post_id) AS vote_count,\n count(a1.attach_mime) 'attach_image',\n\t\t\t\tcount(a2.attach_mime) 'attach_files'\n FROM " . DB_FORUM_THREAD_NOTIFY . " tn\n INNER JOIN " . DB_FORUM_THREADS . " tt ON tn.thread_id = tt.thread_id\n INNER JOIN " . DB_FORUMS . " tf ON tt.forum_id = tf.forum_id\n LEFT JOIN " . DB_FORUMS . " ttc ON ttc.forum_id = tf.forum_cat\n LEFT JOIN " . DB_USERS . " uc ON tt.thread_author = uc.user_id\n LEFT JOIN " . DB_USERS . " u ON tt.thread_lastuser = u.user_id\n LEFT JOIN " . DB_FORUM_POSTS . " tp ON tt.thread_id = tp.thread_id\n LEFT JOIN " . DB_FORUM_VOTES . " v ON v.thread_id = tt.thread_id AND tp.post_id = v.post_id\n LEFT JOIN " . DB_FORUM_ATTACHMENTS . " a1 on a1.thread_id = tt.thread_id AND a1.attach_mime IN ('" . implode(",", img_mimeTypes()) . "')\n\t\t\t\tLEFT JOIN " . DB_FORUM_ATTACHMENTS . " a2 on a2.thread_id = tt.thread_id AND a2.attach_mime NOT IN ('" . implode(",", img_mimeTypes()) . "')\n WHERE tn.notify_user="******" AND " . groupaccess('forum_access') . " AND tt.thread_hidden='0'\n GROUP BY tn.thread_id\n ORDER BY tn.notify_datestamp DESC\n LIMIT " . $_GET['rowstart'] . ",16\n "); $i = 0; while ($threads = dbarray($result)) { // opt for moderators. $this->forum_info['moderators'] = \PHPFusion\Forums\Moderator::parse_forum_mods($threads['forum_mods']); $icon = ""; $match_regex = $threads['thread_id'] . "\\|" . $threads['thread_lastpost'] . "\\|" . $threads['forum_id']; if ($threads['thread_lastpost'] > $this->forum_info['lastvisited']) { if (iMEMBER && ($threads['thread_lastuser'] == $userdata['user_id'] || preg_match("(^\\.{$match_regex}\$|\\.{$match_regex}\\.|\\.{$match_regex}\$)", $userdata['user_threads']))) { $icon = "<i class='" . get_forumIcons('thread') . "' title='" . $locale['forum_0261'] . "'></i>"; } else { $icon = "<i class='" . get_forumIcons('new') . "' title='" . $locale['forum_0260'] . "'></i>"; } } $author = array('user_id' => $threads['thread_author'], 'user_name' => $threads['author_name'], 'user_status' => $threads['author_status'], 'user_avatar' => $threads['author_avatar']); $lastuser = array('user_id' => $threads['thread_lastuser'], 'user_name' => $threads['last_user_name'], 'user_status' => $threads['last_user_status'], 'user_avatar' => $threads['last_user_avatar']); $threads += array("thread_link" => array("link" => INFUSIONS . "forum/viewthread.php?thread_id=" . $threads['thread_id'], "title" => $threads['thread_subject']), "forum_type" => $threads['forum_type'], "thread_pages" => makepagenav(0, $forum_settings['posts_per_page'], $threads['thread_postcount'], 3, FORUM . "viewthread.php?thread_id=" . $threads['thread_id'] . "&"), "thread_icons" => array('lock' => $threads['thread_locked'] ? "<i class='" . get_forumIcons('lock') . "' title='" . $locale['forum_0263'] . "'></i>" : '', 'sticky' => $threads['thread_sticky'] ? "<i class='" . get_forumIcons('sticky') . "' title='" . $locale['forum_0103'] . "'></i>" : '', 'poll' => $threads['thread_poll'] ? "<i class='" . get_forumIcons('poll') . "' title='" . $locale['forum_0314'] . "'></i>" : '', 'hot' => $threads['thread_postcount'] >= 20 ? "<i class='" . get_forumIcons('hot') . "' title='" . $locale['forum_0311'] . "'></i>" : '', 'reads' => $threads['thread_views'] >= 20 ? "<i class='" . get_forumIcons('reads') . "' title='" . $locale['forum_0311'] . "'></i>" : '', 'image' => $threads['attach_image'] > 0 ? "<i class='" . get_forumIcons('image') . "' title='" . $locale['forum_0313'] . "'></i>" : '', 'file' => $threads['attach_files'] > 0 ? "<i class='" . get_forumIcons('file') . "' title='" . $locale['forum_0312'] . "'></i>" : '', 'icon' => $icon), "thread_starter" => $locale['forum_0006'] . timer($threads['post_datestamp']) . " " . $locale['by'] . " " . profile_link($author['user_id'], $author['user_name'], $author['user_status']) . "</span>", "thread_author" => $author, "thread_last" => array('avatar' => display_avatar($lastuser, '30px', '', '', ''), 'profile_link' => profile_link($lastuser['user_id'], $lastuser['user_name'], $lastuser['user_status']), 'time' => $threads['post_datestamp'], 'post_message' => parseubb(parsesmileys($threads['post_message'])), "formatted" => "<div class='pull-left'>" . display_avatar($lastuser, '30px', '', '', '') . "</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class='overflow-hide'>" . $locale['forum_0373'] . " <span class='forum_profile_link'>" . profile_link($lastuser['user_id'], $lastuser['user_name'], $lastuser['user_status']) . "</span><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . timer($threads['post_datestamp']) . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>"), "track_button" => array('link' => FORUM . "index.php?section=tracked&delete=" . $threads['thread_id'], 'title' => $locale['global_058'])); // push $this->forum_info['item'][$threads['thread_id']] = $threads; } }
echo form_button('preview', $locale['articles_0240'], $locale['articles_0240'], array('class' => 'btn-default m-r-10')); echo form_button('publish', $locale['articles_0242'], $locale['articles_0242'], array('class' => 'btn-primary m-r-10')); echo form_button('delete', $locale['articles_0243'], $locale['articles_0243'], array('class' => 'btn-warning m-r-10')); echo closeform(); } } } } else { $result = dbquery("SELECT\n\t\t\tts.submit_id, ts.submit_datestamp, ts.submit_criteria, tu.user_id, tu.user_name, tu.user_avatar, tu.user_status\n\t\t\tFROM " . DB_SUBMISSIONS . " ts\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON ts.submit_user=tu.user_id\n\t\t\tWHERE submit_type='a' order by submit_datestamp desc\n\t\t\t"); $rows = dbrows($result); if ($rows > 0) { echo "<div class='well'>" . sprintf($locale['articles_0044'], format_word($rows, $locale['fmt_submission'])) . "</div>\n"; echo "<table class='table table-striped'>\n"; echo "<tr>\n"; echo "<th>" . $locale['articles_0041'] . "</th>\n<th>" . $locale['articles_0046'] . "</th><th>" . $locale['articles_0047'] . "</th><th>" . $locale['articles_0048'] . "</th>"; echo "</tr>\n"; echo "<tbody>\n"; while ($data = dbarray($result)) { $submit_criteria = unserialize($data['submit_criteria']); echo "<tr>\n"; echo "<td><a href='" . clean_request("submit_id=" . $data['submit_id'], array("section", "aid"), TRUE) . "'>" . $submit_criteria['article_subject'] . "</a></td>\n"; echo "<td>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</td>\n"; echo "<td>" . timer($data['submit_datestamp']) . "</td>\n"; echo "<td>" . $data['submit_id'] . "</td>\n"; echo "</tr>\n"; } echo "</tbody>\n</table>\n"; } else { echo "<div class='well text-center m-t-20'>" . $locale['articles_0042'] . "</div>\n"; } }
echo "<tr>\n"; echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>{$fim}</td>\n"; echo "<td class='tbl1 forum_name'><!--forum_name--><a href='viewforum.php?forum_id=" . $data['forum_id'] . "'>" . $data['forum_name'] . "</a><br />\n"; if ($data['forum_description'] || $moderators) { echo "<span class='small'>" . nl2br(parseubb($data['forum_description'])) . ($data['forum_description'] && $moderators ? "<br />\n" : ""); echo ($moderators ? "<strong>" . $locale['411'] . "</strong>" . $moderators . "</span>\n" : "</span>\n") . "\n"; } echo "</td>\n"; echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $data['forum_threadcount'] . "</td>\n"; echo "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'>" . $data['forum_postcount'] . "</td>\n"; echo "<td width='1%' class='tbl2' style='white-space:nowrap'>"; if ($data['forum_lastpost'] == 0) { echo $locale['405'] . "</td>\n</tr>\n"; } else { echo showdate("forumdate", $data['forum_lastpost']) . "<br />\n"; echo "<span class='small'>" . $locale['406'] . profile_link($data['forum_lastuser'], $data['user_name'], $data['user_status']) . "</span></td>\n"; echo "</tr>\n"; } } } else { echo "<tr>\n<td colspan='5' class='tbl1'>" . $locale['407'] . "</td>\n</tr>\n"; } echo "</table><!--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><td align='right' valign='bottom' class='forum'>\n"; echo "<form name='searchform' method='get' action='" . BASEDIR . "search.php?stype=forums'>\n"; echo "<input type='hidden' name='stype' value='forums' />\n"; echo "<input type='text' name='stext' class='textbox' style='width:150px' />\n"; echo "<input type='submit' name='search' value='" . $locale['550'] . "' class='button' />\n";
$sel = $msg_to_group == $user_group['0'] ? " selected='selected'" : ""; $user_types .= "<option value='" . $user_group['0'] . "'{$sel}>" . $user_group['1'] . "</option>\n"; } } } add_to_title($locale['global_201'] . $locale['420']); opentable($locale['420']); echo "<form name='inputform' method='post' action='" . FUSION_SELF . "?msg_send=0' onsubmit=\"return ValidateForm(this)\">\n"; echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n"; echo "<tr>\n<td align='right' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['421'] . ":</td>\n<td class='tbl1'>\n"; if ($_GET['msg_send'] == "0") { echo "<select name='msg_send' class='textbox'>\n" . $user_list . "</select>\n"; } else { $udata = dbarray(dbquery("SELECT user_id, user_name, user_status FROM " . DB_USERS . " WHERE user_id='" . $_GET['msg_send'] . "'")); echo "<input type='hidden' name='msg_send' value='" . $udata['user_id'] . "' />\n"; echo profile_link($udata['user_id'], $udata['user_name'], $udata['user_status']) . "\n"; } echo "</td>\n<td class='tbl1' align='right'>\n"; if (iADMIN && !isset($_GET['msg_id'])) { echo "<label><input name='chk_sendtoall' type='checkbox' " . $sendtoall_chk . " />\n"; echo "" . $locale['434'] . ":</label> <select name='msg_to_group' class='textbox'>\n" . $user_types . "</select>\n"; } echo "</td>\n</tr>\n"; echo "<tr>\n<td align='right' class='tbl2' style='white-space:nowrap'>" . $locale['405'] . ":</td>\n"; echo "<td class='tbl1' colspan='2'><input type='text' name='subject' value='" . $subject . "' maxlength='32' class='textbox' style='width:250px;' /></td>\n</tr>\n"; if ($reply_message) { echo "<tr>\n<td align='right' class='tbl2' valign='top' style='white-space:nowrap'>" . $locale['422'] . ":</td>\n"; echo "<td class='tbl1' colspan='2'>" . nl2br(parseubb($reply_message)) . "</td>\n</tr>\n"; } echo "<tr>\n<td align='right' class='tbl2' valign='top' style='white-space:nowrap'>" . ($reply_message ? $locale['433'] : $locale['422']) . ":</td>\n"; echo "<td class='tbl1' colspan='2'><textarea name='message' cols='75' rows='15' class='textbox' style='width:98%'>" . $message . "</textarea></td>\n</tr>\n";
$rows = dbrows($result); if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; } if ($rows) { $i = 0; echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n"; echo "<td class='tbl2'><strong>" . $locale['401'] . "</strong></td>\n"; echo "<td class='tbl2'><strong>" . $locale['405'] . "</strong></td>\n"; echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><strong>" . $locale['402'] . "</strong></td>\n"; echo "</tr>\n"; $result = dbquery("SELECT user_id, user_name, user_status, user_level, user_groups FROM " . DB_USERS . " WHERE user_status='0'" . $orderby . " ORDER BY user_level DESC, user_name LIMIT " . $_GET['rowstart'] . ",20"); while ($data = dbarray($result)) { $cell_color = $i % 2 == 0 ? "tbl1" : "tbl2"; $i++; echo "<tr>\n<td class='{$cell_color}'>\n" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</td>\n"; $groups = ""; $user_groups = explode(".", $data['user_groups']); $j = 0; foreach ($user_groups as $key => $value) { if ($value) { $groups .= "<a href='profile.php?group_id=" . $value . "'>" . getgroupname($value) . "</a>" . ($j < count($user_groups) - 1 ? ", " : ""); } $j++; } echo "<td class='{$cell_color}'>\n" . ($groups ? $groups : ($data['user_level'] == 103 ? $locale['407'] : $locale['406'])) . "</td>\n"; echo "<td align='center' width='1%' class='{$cell_color}' style='white-space:nowrap'>" . getuserlevel($data['user_level']) . "</td>\n</tr>"; } echo "</table>\n"; } else { echo "<div style='text-align:center'><br />\n" . $locale['403'] . $_GET['sortby'] . "<br /><br />\n</div>\n";
if (dbrows($result)) { echo "<table cellpadding='0' cellspacing='1' class='tbl-border center' style='width: 700px;'>\n"; echo "<tr>\n"; echo "<td class='tbl2' style='white-space:nowrap; width:100px;'>" . $locale['102'] . "</td>\n"; echo "<td class='tbl2' style='white-space:nowrap; width:150px;'>" . $locale['103'] . "</td>\n"; echo "<td class='tbl2' style='white-space:nowrap; width:140px;'>" . $locale['104'] . "</td>\n"; echo "<td class='tbl2' style='white-space:nowrap; width:160px;'>" . $locale['105'] . "</td>\n"; echo "<td class='tbl2' style='white-space:nowrap; width:160px;'>" . $locale['106'] . "</td>\n"; echo "<td class='tbl2' style='white-space:nowrap; width:160px;'>" . $locale['117'] . "</td>\n"; echo "</tr>\n"; $i = 1; while ($data = dbarray($result)) { $class = $i % 2 ? "tbl1" : "tbl2"; echo "<tr>\n"; echo "<td class='" . $class . "'>" . showdate("shortdate", $data['userlog_timestamp']) . "</td>\n"; echo "<td class='" . $class . "'>" . profile_link($data['userlog_user_id'], $data['user_name'], $data['user_status']) . "</td>\n"; echo "<td class='" . $class . "'>" . $data['userlog_field'] . "</td>\n"; echo "<td class='" . $class . "'>" . trimlink($data['userlog_value_old'], 100) . "</td>\n"; echo "<td class='" . $class . "'>" . trimlink($data['userlog_value_new'], 100) . "</td>\n"; echo "<td class='" . $class . "'><a href='" . FUSION_SELF . $getString . "&delete=" . $data['userlog_id'] . "'>" . $locale['116'] . "</a></td>\n"; echo "</tr>\n"; $i++; } echo "</table>\n"; } else { echo "<center>" . $locale['112'] . "</center>\n"; } if ($rows > 20) { echo "<div align='center' style='margin-top:5px;'>\n" . makepagenav($_GET['rowstart'], 20, $rows, 3, FUSION_SELF . $getString . "&") . "\n</div>\n"; } echo "<br />";
echo "<br /><input type='submit' name='post_archive_shout' value='" . $locale['SB_shout'] . "' class='button' />\n"; echo "</div>\n</form>\n<br />\n"; } else { echo "<div style='text-align:center'>" . $locale['SB_login_req'] . "</div>\n"; } $rows = dbcount("(shout_id)", DB_SHOUTBOX, "shout_hidden='0'"); if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; } if ($rows != 0) { $result = dbquery("SELECT s.shout_id, s.shout_name, s.shout_message, s.shout_datestamp, u.user_id, u.user_name, u.user_status\r\n\t\tFROM " . DB_SHOUTBOX . " s\r\n\t\tLEFT JOIN " . DB_USERS . " u ON s.shout_name=u.user_id\r\n\t\t" . (multilang_table("SB") ? "WHERE shout_language='" . LANGUAGE . "' AND" : "WHERE") . " s.shout_hidden='0'\r\n\t\tORDER BY s.shout_datestamp DESC LIMIT " . $_GET['rowstart'] . ",20"); while ($data = dbarray($result)) { echo "<div class='tbl2'>\n"; if (iADMIN && checkrights("S") || iMEMBER && $data['shout_name'] == $userdata['user_id'] && isset($data['user_name'])) { echo "<div style='float:right'>\n<a href='" . FUSION_SELF . "?action=edit&shout_id=" . $data['shout_id'] . "'>" . $locale['SB_edit'] . "</a> |\n"; echo "<a href='" . FUSION_SELF . "?action=delete&shout_id=" . $data['shout_id'] . "'>" . $locale['SB_delete'] . "</a>\n</div>\n"; } if ($data['user_name']) { echo "<span class='comment-name'><span class='slink'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</span>\n</span>\n"; } else { echo "<span class='comment-name'>" . $data['shout_name'] . "</span>\n"; } echo "<span class='small'>" . showdate("longdate", $data['shout_datestamp']) . "</span>"; echo "</div>\n<div class='tbl1'>\n" . sbawrap(parseubb(parsesmileys($data['shout_message']), "b|i|u|url|color")) . "</div>\n"; } } else { echo "<div style='text-align:center'><br />\n" . $locale['SB_no_msgs'] . "<br /><br />\n</div>\n"; } closetable(); echo "<div align='center' style='margin-top:5px;'>\n" . makepagenav($_GET['rowstart'], 20, $rows, 3, FUSION_SELF . "?") . "\n</div>\n"; require_once THEMES . "templates/footer.php";
+--------------------------------------------------------+ | This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ if (!defined("IN_FUSION")) { die("Access Denied"); } include LOCALE . LOCALESET . "search/members.php"; if ($_GET['stype'] == "members" || $_GET['stype'] == "all") { if (!$settings['hide_userprofiles'] || iMEMBER) { $rows = dbcount("(user_id)", DB_USERS, "user_status='0' AND user_name LIKE '%" . $_GET['stext'] . "%'"); if ($rows != 0) { $items_count .= THEME_BULLET . " <a href='" . FUSION_SELF . "?stype=members&stext=" . $_GET['stext'] . "&" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['m401'] : $locale['m402']) . " " . $locale['522'] . "</a><br />\n"; $result = dbquery("\r\n\t\t\tSELECT user_id, user_name, user_status FROM " . DB_USERS . "\r\n\t\t\tWHERE user_status='0' AND user_name LIKE '%" . $_GET['stext'] . "%'\r\n\t\t\tORDER BY user_name" . ($_GET['stype'] != "all" ? " LIMIT " . $_GET['rowstart'] . ",10" : "")); while ($data = dbarray($result)) { $search_result = profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "<br />\n"; search_globalarray($search_result); } } else { $items_count .= THEME_BULLET . " 0 " . $locale['m402'] . " " . $locale['522'] . "<br />\n"; } $navigation_result = search_navigation($rows); } else { $items_count .= THEME_BULLET . " 0 <span class='small'>(" . $locale['m403'] . ")</span><br />\n"; } }
} if ($fieldsvar) { $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_message, tt.thread_subject,\r\n\t\t\ttf.forum_access FROM " . DB_POSTS . " tp\r\n\t\t\tLEFT JOIN " . DB_FORUMS . " tf ON tf.forum_id = tp.forum_id\r\n\t\t\tLEFT JOIN " . DB_THREADS . " tt ON tt.thread_id = tp.thread_id\t\t\t\r\n\t\t\tWHERE " . groupaccess('forum_access') . ($_GET['forum_id'] != 0 ? " AND tf.forum_id=" . $_GET['forum_id'] : "") . "\r\n\t\t\tAND " . $fieldsvar . ($_GET['datelimit'] != 0 ? " AND post_datestamp>=" . (time() - $_GET['datelimit']) : "")); $rows = dbrows($result); } else { $rows = 0; } if ($rows) { $items_count .= THEME_BULLET . " <a href='" . FUSION_SELF . "?stype=forums&stext=" . $_GET['stext'] . "&" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['f402'] : $locale['f403']) . " " . $locale['522'] . "</a><br />\n"; $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_message, tp.post_datestamp, tt.thread_subject,\r\n\t\t\ttt.thread_sticky, tf.forum_access, tu.user_id, tu.user_name, tu.user_status FROM " . DB_POSTS . " tp\r\n\t\t\tLEFT JOIN " . DB_THREADS . " tt ON tp.thread_id = tt.thread_id\r\n\t\t\tLEFT JOIN " . DB_FORUMS . " tf ON tp.forum_id = tf.forum_id\r\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON tp.post_author=tu.user_id\r\n\t\t\tWHERE " . groupaccess('forum_access') . ($_GET['forum_id'] != 0 ? " AND tf.forum_id=" . $_GET['forum_id'] : "") . "\r\n\t\t\tAND " . $fieldsvar . ($_GET['datelimit'] != 0 ? " AND post_datestamp>=" . (time() - $_GET['datelimit']) : "") . "\r\n\t\t\tORDER BY " . $sortby . " " . ($_GET['order'] == 1 ? "ASC" : "DESC") . ($_GET['stype'] != "all" ? " LIMIT " . $_GET['rowstart'] . ",10" : "")); while ($data = dbarray($result)) { $search_result = ""; $text_all = search_striphtmlbbcodes(iADMIN ? $data['post_message'] : preg_replace("#\\[hide\\](.*)\\[/hide\\]#si", "", $data['post_message'])); $text_frag = search_textfrag($text_all); $subj_c = search_stringscount($data['thread_subject']); $text_c = search_stringscount($data['post_message']); // $text_frag = highlight_words($swords, $text_frag); $search_result .= ($data['thread_sticky'] == 1 ? "<strong>" . $locale['f404'] . "</strong> " : "") . "<a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&highlight=" . urlencode($_GET['stext']) . "&pid=" . $data['post_id'] . "#post_" . $data['post_id'] . "'>" . $data['thread_subject'] . "</a>" . "<br /><br />\n"; // $search_result .= ($data['thread_sticky'] == 1 ? "<strong>".$locale['f404']."</strong> " : "")."<a href='".FORUM."viewthread.php?thread_id=".$data['thread_id']."&highlight=".urlencode($_GET['stext'])."&pid=".$data['post_id']."#post_".$data['post_id']."'>".highlight_words($swords, $data['thread_subject'])."</a>"."<br /><br />\n"; $search_result .= "<div class='quote' style='width:auto;height:auto;overflow:auto'>" . $text_frag . "</div><br />"; $search_result .= "<span class='small2'>" . $locale['global_070'] . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "\n"; $search_result .= $locale['global_071'] . showdate("longdate", $data['post_datestamp']) . "</span><br />\n"; $search_result .= "<span class='small'>" . $subj_c . " " . ($subj_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['f406'] . " " . $locale['f407'] . ", "; $search_result .= $text_c . " " . ($text_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['f406'] . " " . $locale['f408'] . "</span><br /><br />\n"; search_globalarray($search_result); } } else { $items_count .= THEME_BULLET . " 0 " . $locale['f403'] . " " . $locale['522'] . "<br />\n"; } $navigation_result = search_navigation($rows); }
public function render_reply_form() { global $locale, $userdata, $forum_settings, $defender; $thread_data = $this->thread_info['thread']; if ((!iMOD or !iSUPERADMIN) && $thread_data['thread_locked']) { redirect(INFUSIONS . 'forum/index.php'); } if ($this->getThreadPermission("can_reply")) { add_to_title($locale['global_201'] . $locale['forum_0503']); add_breadcrumb(array('link' => '', 'title' => $locale['forum_0503'])); // field data $post_data = array('post_id' => 0, 'forum_id' => $this->thread_info['thread']['forum_id'], 'thread_id' => $this->thread_info['thread']['thread_id'], 'post_message' => isset($_POST['post_message']) ? form_sanitizer($_POST['post_message'], '', 'post_message') : '', 'post_showsig' => isset($_POST['post_showsig']) ? 1 : 0, 'post_smileys' => isset($_POST['post_smileys']) || isset($_POST['post_message']) && preg_match("#(\\[code\\](.*?)\\[/code\\]|\\[geshi=(.*?)\\](.*?)\\[/geshi\\]|\\[php\\](.*?)\\[/php\\])#si", $_POST['post_message']) ? 1 : 0, 'post_author' => $userdata['user_id'], 'post_datestamp' => time(), 'post_ip' => USER_IP, 'post_ip_type' => USER_IP_TYPE, 'post_edituser' => 0, 'post_edittime' => 0, 'post_editreason' => '', 'post_hidden' => 0, 'notify_me' => 0, 'post_locked' => $forum_settings['forum_edit_lock'] || isset($_POST['post_locked']) ? 1 : 0); // execute form post actions if (isset($_POST['post_reply'])) { require_once INCLUDES . "flood_include.php"; // all data is sanitized here. if (!flood_control("post_datestamp", DB_FORUM_POSTS, "post_author='" . $userdata['user_id'] . "'")) { // have notice $update_forum_lastpost = FALSE; if ($defender->safe()) { // Prepare forum merging action $last_post_author = dbarray(dbquery("SELECT post_author FROM " . DB_FORUM_POSTS . " WHERE thread_id='" . $thread_data['thread_id'] . "' ORDER BY post_id DESC LIMIT 1")); if ($last_post_author['post_author'] == $post_data['post_author'] && $thread_data['forum_merge']) { $last_message = dbarray(dbquery("SELECT post_id, post_message FROM " . DB_FORUM_POSTS . " WHERE thread_id='" . $thread_data['thread_id'] . "' ORDER BY post_id DESC")); $post_data['post_id'] = $last_message['post_id']; $post_data['post_message'] = $last_message['post_message'] . "\n\n" . $locale['forum_0640'] . " " . showdate("longdate", time()) . ":\n" . $post_data['post_message']; dbquery_insert(DB_FORUM_POSTS, $post_data, 'update', array('primary_key' => 'post_id', 'keep_session' => TRUE)); } else { $update_forum_lastpost = TRUE; dbquery_insert(DB_FORUM_POSTS, $post_data, 'save', array('primary_key' => 'post_id', 'keep_session' => TRUE)); $post_data['post_id'] = dblastid(); if (!defined("FUSION_NULL")) { dbquery("UPDATE " . DB_USERS . " SET user_posts=user_posts+1 WHERE user_id='" . $post_data['post_author'] . "'"); } } // Attach files if permitted if (!empty($_FILES) && is_uploaded_file($_FILES['file_attachments']['tmp_name'][0]) && $this->getThreadPermission("can_upload_attach")) { $upload = form_sanitizer($_FILES['file_attachments'], '', 'file_attachments'); if ($upload['error'] == 0) { foreach ($upload['target_file'] as $arr => $file_name) { $adata = array('thread_id' => $thread_data['thread_id'], 'post_id' => $post_data['post_id'], 'attach_name' => $file_name, 'attach_mime' => $upload['type'][$arr], 'attach_size' => $upload['source_size'][$arr], 'attach_count' => 0); dbquery_insert(DB_FORUM_ATTACHMENTS, $adata, "save", array('keep_session' => TRUE)); } } } // Update stats in forum and threads if ($update_forum_lastpost == TRUE) { // find all parents and update them $list_of_forums = get_all_parent(dbquery_tree(DB_FORUMS, 'forum_id', 'forum_cat'), $thread_data['forum_id']); foreach ($list_of_forums as $fid) { dbquery("UPDATE " . DB_FORUMS . " SET forum_lastpost='" . time() . "', forum_postcount=forum_postcount+1, forum_lastpostid='" . $post_data['post_id'] . "', forum_lastuser='******'post_author'] . "' WHERE forum_id='" . $fid . "'"); } // update current forum dbquery("UPDATE " . DB_FORUMS . " SET forum_lastpost='" . time() . "', forum_postcount=forum_postcount+1, forum_lastpostid='" . $post_data['post_id'] . "', forum_lastuser='******'post_author'] . "' WHERE forum_id='" . $thread_data['forum_id'] . "'"); // update current thread dbquery("UPDATE " . DB_FORUM_THREADS . " SET thread_lastpost='" . time() . "', thread_lastpostid='" . $post_data['post_id'] . "', thread_postcount=thread_postcount+1, thread_lastuser='******'post_author'] . "' WHERE thread_id='" . $thread_data['thread_id'] . "'"); } if ($forum_settings['thread_notify'] && isset($_POST['notify_me'])) { if (!dbcount("(thread_id)", DB_FORUM_THREAD_NOTIFY, "thread_id='" . $thread_data['thread_id'] . "' AND notify_user='******'post_author'] . "'")) { dbquery("INSERT INTO " . DB_FORUM_THREAD_NOTIFY . " (thread_id, notify_datestamp, notify_user, notify_status) VALUES('" . $thread_data['thread_id'] . "', '" . time() . "', '" . $post_data['post_author'] . "', '1')"); } } if ($defender->safe()) { redirect(INFUSIONS . "forum/postify.php?post=reply&error=0&forum_id=" . intval($post_data['forum_id']) . "&thread_id=" . intval($post_data['thread_id']) . "&post_id=" . intval($post_data['post_id'])); } } } } // template data $form_action = INFUSIONS . "forum/viewthread.php?action=reply&forum_id=" . $thread_data['forum_id'] . "&thread_id=" . $thread_data['thread_id']; // Quote Get if (isset($_GET['quote']) && isnum($_GET['quote'])) { $quote_result = dbquery("SELECT a.post_message, b.user_name\n\t\t\t\t\t\t\t\t\t\tFROM " . DB_FORUM_POSTS . " a\n\t\t\t\t\t\t\t\t\t\tINNER JOIN " . DB_USERS . " b ON a.post_author=b.user_id\n\t\t\t\t\t\t\t\t\t\tWHERE thread_id='" . $thread_data['thread_id'] . "' and post_id='" . $_GET['quote'] . "'"); if (dbrows($quote_result) > 0) { $quote_data = dbarray($quote_result); // do not do this. to silently inject. $post_data['post_message'] = "[quote name=" . $quote_data['user_name'] . " post=" . $_GET['quote'] . "]@" . $quote_data['user_name'] . " - " . strip_bbcodes($quote_data['post_message']) . "[/quote]" . $post_data['post_message']; $form_action .= "&post_id=" . $_GET['post_id'] . "&quote=" . $_GET['quote']; } else { redirect(INFUSIONS . "forum/index.php"); } } $info = array('title' => $locale['forum_0503'], 'description' => $locale['forum_2000'] . $thread_data['thread_subject'], 'openform' => openform('input_form', 'post', $form_action, array('enctype' => $this->getThreadPermission("can_upload_attach") ? TRUE : FALSE, 'max_tokens' => 1)), 'closeform' => closeform(), 'forum_id_field' => form_hidden('forum_id', "", $post_data['forum_id']), 'thread_id_field' => form_hidden('thread_id', "", $post_data['thread_id']), "forum_field" => "", 'subject_field' => form_hidden('thread_subject', "", $thread_data['thread_subject']), 'message_field' => form_textarea('post_message', $locale['forum_0601'], $post_data['post_message'], array('required' => TRUE, 'error_text' => '', 'autosize' => TRUE, 'no_resize' => TRUE, 'preview' => TRUE, 'form_name' => 'input_form', 'bbcode' => TRUE)), 'delete_field' => '', 'edit_reason_field' => '', 'attachment_field' => $this->getThreadPermission("can_upload_attach") ? form_fileinput('file_attachments[]', $locale['forum_0557'], "", array('input_id' => 'file_attachments', 'upload_path' => INFUSIONS . 'forum/attachments/', 'type' => 'object', 'preview_off' => TRUE, "multiple" => TRUE, "inline" => false, 'max_count' => $forum_settings['forum_attachmax_count'], 'valid_ext' => $forum_settings['forum_attachtypes'], "class" => "m-b-0")) . "\n\t\t\t\t\t\t\t\t <div class='m-b-20'>\n<small>" . sprintf($locale['forum_0559'], parsebytesize($forum_settings['forum_attachmax']), str_replace('|', ', ', $forum_settings['forum_attachtypes']), $forum_settings['forum_attachmax_count']) . "</small>\n</div>\n" : "", "poll_form" => "", 'smileys_field' => form_checkbox('post_smileys', $locale['forum_0622'], $post_data['post_smileys'], array('class' => 'm-b-0')), 'signature_field' => array_key_exists("user_sig", $userdata) && $userdata['user_sig'] ? form_checkbox('post_showsig', $locale['forum_0623'], $post_data['post_showsig'], array('class' => 'm-b-0')) : '', 'sticky_field' => '', 'lock_field' => '', 'hide_edit_field' => '', 'post_locked_field' => '', 'notify_field' => $forum_settings['thread_notify'] ? form_checkbox('notify_me', $locale['forum_0626'], $post_data['notify_me'], array('class' => 'm-b-0')) : '', 'post_buttons' => form_button('post_reply', $locale['forum_0504'], $locale['forum_0504'], array('class' => 'btn-primary')) . form_button('cancel', $locale['cancel'], $locale['cancel'], array('class' => 'btn-default m-l-10')), 'last_posts_reply' => ''); // only in reply if ($forum_settings['forum_last_posts_reply']) { $result = dbquery("\n\t\t\t\tSELECT\n\t\t\t\tp.thread_id, p.post_message, p.post_smileys, p.post_author, p.post_datestamp, p.post_hidden,\n\t\t\t\t\t\t\tu.user_id, u.user_name, u.user_status, u.user_avatar\n\t\t\t\t\t\t\tFROM " . DB_FORUM_POSTS . " p\n\t\t\t\t\t\t\tLEFT JOIN " . DB_USERS . " u ON p.post_author = u.user_id\n\t\t\t\t\t\t\tWHERE p.thread_id='" . $thread_data['thread_id'] . "' AND p.post_hidden='0'\n\t\t\t\t\t\t\tGROUP BY p.post_id\n\t\t\t\t\t\t\tORDER BY p.post_datestamp DESC LIMIT 0," . $forum_settings['posts_per_page']); if (dbrows($result)) { $title = sprintf($locale['forum_0526'], $forum_settings['forum_last_posts_reply']); if ($forum_settings['forum_last_posts_reply'] == "1") { $title = $locale['forum_0525']; } ob_start(); echo "<p><strong>" . $title . "</strong>\n</p>\n"; echo "<table class='table table-responsive'>\n"; $i = $forum_settings['posts_per_page']; while ($data = dbarray($result)) { $message = $data['post_message']; if ($data['post_smileys']) { $message = parsesmileys($message); } $message = parseubb($message); echo "<tr>\n<td class='tbl2 forum_thread_user_name' style='width:10%'><!--forum_thread_user_name-->" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</td>\n"; echo "<td class='tbl2 forum_thread_post_date'>\n"; echo "<div style='float:right' class='small'>\n"; echo $i . ($i == $forum_settings['forum_last_posts_reply'] ? " (" . $locale['forum_0525'] . ")" : ""); echo "</div>\n"; echo "<div class='small'>" . $locale['forum_0524'] . showdate("forumdate", $data['post_datestamp']) . "</div>\n"; echo "</td>\n"; echo "</tr>\n<tr>\n<td valign='top' class='tbl2 forum_thread_user_info' style='width:10%'>\n"; echo display_avatar($data, '50px'); echo "</td>\n<td valign='top' class='tbl1 forum_thread_user_post'>\n"; echo nl2br($message); echo "</td>\n</tr>\n"; $i--; } echo "</table>\n"; $info['last_posts_reply'] = ob_get_contents(); ob_end_clean(); } } postform($info); } else { redirect(INFUSIONS . 'forum/index.php'); } }
$items_count = dbrows($result); if (!$items_count) { continue; } $contents[$table]['colwidth'] = floor(12 / $items_count); $data = array(); $count = 1; while ($row = dbarray($result)) { $keys = array_keys($row); foreach ($keys as $i => $key) { $keys[$i] = '{' . $key . '}'; } $row['content'] = str_replace("../../images", IMAGES, $row['content']); $pairs = array_combine($keys, array_values($row)); $cat = $row['cat_id'] ? "<a href='" . strtr($config['categoryLinkPattern'], $pairs) . "'>" . $row['cat_name'] . "</a>" : $locale['home_0102']; $data[$count] = array('cat' => $cat, 'url' => strtr($config['contentLinkPattern'], $pairs), 'title' => $row['title'], 'meta' => $locale['home_0105'] . profile_link($row['user_id'], $row['user_name'], $row['user_status']) . " " . showdate('newsdate', $row['datestamp']) . $locale['home_0106'] . $cat, 'content' => parse_textarea($row['content']), 'datestamp' => $row['datestamp'], 'cat_name' => $row['cat_name']); /* Infusion Settings Readings */ switch ($table) { case DB_NEWS: if ($config['infSettings']['news_image_frontpage']) { // if it's 0 use uploaded photo, 1 always use category image // go for cat image always if ($row['cat_image']) { $data[$count]['image'] = INFUSIONS . "news/news_cats/" . $row['cat_image']; } } else { // go for image if available if ($row['image'] || $row['cat_image']) { if ($row['cat_image']) { $data[$count]['image'] = INFUSIONS . "news/news_cats/" . $row['cat_image']; }
$guests = 0; $members = array(); while ($data = dbarray($result)) { if ($data['online_user'] == "0") { $guests++; } else { $members[] = array($data['user_id'], $data['user_name'], $data['user_status']); } } echo THEME_BULLET . " " . $locale['global_011'] . ": " . $guests . "<br /><br />\n"; echo THEME_BULLET . " " . $locale['global_012'] . ": " . count($members) . "<br />\n"; if (count($members)) { $i = 1; while (list($key, $member) = each($members)) { echo "<span class='side'>" . profile_link($member[0], $member[1], $member[2]) . "</span>"; if ($i != count($members)) { echo ",\n"; } else { echo "<br />\n"; } $i++; } } echo "<br />\n" . THEME_BULLET . " " . $locale['global_014'] . ": " . number_format(dbcount("(user_id)", DB_USERS, "user_status<='1'")) . "<br />\n"; if (iADMIN && checkrights("M") && $settings['admin_activation'] == "1") { echo THEME_BULLET . " <a href='" . ADMIN . "members.php" . $aidlink . "&status=2' class='side'>" . $locale['global_015'] . "</a>"; echo ": " . dbcount("(user_id)", DB_USERS, "user_status='2'") . "<br />\n"; } $data = dbarray(dbquery("SELECT user_id, user_name, user_status FROM " . DB_USERS . " WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1")); echo THEME_BULLET . " " . $locale['global_016'] . ": <span class='side'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</span>\n"; closeside();
<div id="domain_accounts"> <?php if (isset($data) && is_array($data)) foreach ($data as $eid=>$domains): ?> <div class="body mid"> <h4><?=profile_link($eid)?></h4> <table> <thead> <tr> <td>Domain</td> <td>Renewal Date</td> <td>Actions</td> </tr> </thead> <tbody> <?php foreach ($domains as $domain=>$data) : ?> <tr> <td><?=$domain?></td> <td> <?php if (element('expiredate', $data)): ?> <?=date_user(strtotime(element('expiredate', $data)),false,null)?> <?php if (element('auto_renew', $data)): ?> <img src="<?=assets_url('images/global/icons/refresh_14.png')?>"/> <?php endif; ?> <?php endif; ?> </td> <td class="justr"> <?php if ($data) : ?> <a href="<?=site_url('products/domain_names/domain/'.$domain)?>" class="button">View Registration</a> <?php else: ?> <a href="<?=site_url('products/domain_names/register/'.$domain)?>" class="button green">Transfer Domain</a> <?php endif; ?>
} $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_author, IF(tp.post_datestamp>tp.post_edittime, tp.post_datestamp, tp.post_edittime) AS post_timestamp,\r\n\t\ttf.forum_name, tf.forum_access, tt.thread_subject, tu.user_id, tu.user_name, tu.user_status\r\n\t\tFROM " . DB_FORUM_POSTS . " tp\r\n\t\tLEFT JOIN " . DB_FORUMS . " tf ON tp.forum_id = tf.forum_id\r\n\t\tLEFT JOIN " . DB_FORUM_THREADS . " tt ON tp.thread_id = tt.thread_id\r\n\t\tLEFT JOIN " . DB_USERS . " tu ON tp.post_author = tu.user_id\r\n\t\t" . (multilang_table("FO") ? "WHERE tf.forum_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('tf.forum_access') . " AND tp.post_hidden='0' AND tt.thread_hidden='0' AND (tp.post_datestamp > '" . $lastvisited . "' OR tp.post_edittime > '" . $lastvisited . "')\r\n\t\tGROUP BY tp.thread_id\r\n\t\tORDER BY post_timestamp DESC LIMIT " . $_GET['rowstart'] . ",20"); $i = 0; echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n<tr>\n"; echo "<td width='1%' class='tbl2' style='white-space:nowrap'><strong>" . $locale['global_048'] . "</strong></td>\n"; echo "<td class='tbl2'><strong>" . $locale['global_044'] . "</strong></td>\n"; echo "<td width='1%' class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_050'] . "</strong></td>\n"; echo "</tr>\n"; $threads = dbrows($result); while ($data = dbarray($result)) { if ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl2"; } echo "<tr>\n"; echo "<td width='1%' class='" . $row_color . "' style='white-space:nowrap'>" . $data['forum_name'] . "</td>\n"; echo "<td class='" . $row_color . "'><a href='" . INFUSIONS . "forum/viewthread.php?thread_id=" . $data['thread_id'] . "&pid=" . $data['post_id'] . "#post_" . $data['post_id'] . "'>" . $data['thread_subject'] . "</a></td>\n"; echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . profile_link($data['post_author'], $data['user_name'], $data['user_status']) . "<br />\n" . showdate("forumdate", $data['post_timestamp']) . "</td>\n"; echo "</tr>\n"; $i++; } echo "<tr>\n<td align='center' colspan='4' class='tbl1'>" . sprintf($locale['global_055'], $rows, $threads) . "</td>\n</tr>\n</table>\n"; } else { echo "<div style='text-align:center'><br />" . sprintf($locale['global_055'], 0, 0) . "<br /><br /></div>\n"; } closetable(); if ($threads > 20) { echo "<div align='center' style='margin-top:5px;'>\n" . makepagenav($_GET['rowstart'], 20, $threads, 3) . "\n</div>\n"; } require_once THEMES . "templates/footer.php";