function replace_url($m)
 {
     // Get input url if any, if not get the content as a url but check if has a schema, if not add one
     $this_url = !empty($m['url']) ? $m['url'] : (preg_match("#^((f|ht)tp(s)?://)#i", $m['content']) ? $m['content'] : "http://" . $m['content']);
     // Trim only the default url
     $content = empty($m['url']) ? trimlink($m['content'], 40) . (strlen($m['content']) > 40 ? substr($m['content'], strlen($m['content']) - 10, strlen($m['content'])) : '') : $m['content'];
     return (fusion_get_settings('index_url_bbcode') ? "" : "<!--noindex-->") . "<a href='{$this_url}' target='_blank' " . (fusion_get_settings('index_url_bbcode') ? "" : "rel='nofollow' ") . "title='" . urldecode($this_url) . "'>" . $content . "</a>" . (fusion_get_settings('index_url_bbcode') ? "" : "<!--/noindex-->");
 }
function articles_admin_subcats($id)
{
    global $aidlink, $locale, $i, $data;
    $sublist = "";
    $result2 = dbquery("SELECT article_cat_id, article_cat_name, article_cat_description, article_cat_access FROM " . DB_ARTICLE_CATS . " WHERE article_cat_parent='" . (int) $id . "' ORDER BY article_cat_name");
    while ($data2 = dbarray($result2)) {
        $cell_color = $i % 2 == 0 ? "tbl1" : "tbl2";
        $sublist .= "<tr>\n";
        $sublist .= "<td class='{$cell_color}'><strong>-" . $data2['article_cat_name'] . "</strong><br />\n";
        $sublist .= "<span class='small'>" . trimlink($data2['article_cat_description'], 45) . "</span></td>\n";
        $sublist .= "<td align='center' width='1%' class='{$cell_color}' style='white-space:nowrap'>" . getgroupname($data2['article_cat_access']) . "</td>\n";
        $sublist .= "<td align='center' width='1%' class='{$cell_color}' style='white-space:nowrap'><a href='" . FUSION_SELF . $aidlink . "&action=edit&cat_id=" . $data2['article_cat_id'] . "'>" . $locale['443'] . "</a> -\n";
        $sublist .= "<a href='" . FUSION_SELF . $aidlink . "&action=delete&cat_id=" . $data2['article_cat_id'] . "' onclick=\"return confirm('" . $locale['450'] . "');\">" . $locale['444'] . "</a></td>\n";
        $sublist .= "</tr>\n";
    }
    return $sublist;
}
Exemple #3
0
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 . "&amp;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 . "&amp;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 . "&amp;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 . "&amp;ctype=" . $comment_data['comment_type'] . "&amp;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 . "&amp;action=edit&amp;comment_id=" . $comment_data['comment_id'] . "&amp;ctype=" . $comment_data['comment_type'] . "&amp;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 . "&amp;action=delete&amp;comment_id=" . $comment_data['comment_id'] . "&amp;ctype=" . $comment_data['comment_type'] . "&amp;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 . "&amp;section=submissions&amp;submit_id=" . $submit_data['submit_id'];
                    break;
                case "a":
                    $review_link = INFUSIONS . "articles/articles_admin.php" . $aidlink . "&amp;section=submissions&amp;submit_id=" . $submit_data['submit_id'];
                    break;
                case "p":
                    $review_link = INFUSIONS . "gallery/gallery_admin.php" . $aidlink . "&amp;section=submissions&amp;submit_id=" . $submit_data['submit_id'];
                    break;
                case "b":
                    $review_link = INFUSIONS . "blog/blog_admin.php" . $aidlink . "&amp;section=submissions&amp;submit_id=" . $submit_data['submit_id'];
                    break;
                case "d":
                    $review_link = INFUSIONS . "downloads/downloads_admin.php" . $aidlink . "&amp;section=submissions&amp;submit_id=" . $submit_data['submit_id'];
                    break;
                case "l":
                    $review_link = INFUSIONS . "weblinks/weblinks_admin.php" . $aidlink . "&amp;section=submissions&amp;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");
}
Exemple #4
0
 $rows = dbcount("(group_id)", DB_PREFIX . "fb_groups");
 echo "<tr>\n<td class='tbl1 navtitle'" . ($rows ? " colspan='5'" : "") . ">" . $locale['uc250'] . "</td>\n</tr>\n";
 if ($rows) {
     echo "<tr>\n<td class='tbl2' style='font-weight:bold;'>" . $locale['uc251'] . "</td>\n";
     echo "<td class='tbl2' style='font-weight:bold;' width='1%'>" . $locale['uc252'] . "</td>\n";
     echo "<td class='tbl2' style='font-weight:bold;' width='1%'>" . $locale['uc253'] . "</td>\n";
     echo "<td class='tbl2' style='font-weight:bold;white-space:nowrap' width='1%'>" . $locale['uc254'] . "</td>\n";
     echo "<td class='tbl2' style='font-weight:bold; width:150px;'>" . $locale['uc255'] . "</td>\n</tr>\n";
     $result = dbquery("select * from " . DB_PREFIX . "fb_groups fg\n\t\tleft join " . DB_USER_GROUPS . " g on fg.group_id=g.group_id\n\t\torder by fg.group_created desc");
     while ($data = dbarray($result)) {
         $members = dbquery("SELECT * FROM " . DB_USERS . " WHERE user_groups REGEXP('^\\\\.{$data['group_id']}\$|\\\\.{$data['group_id']}\\\\.|\\\\.{$data['group_id']}\$') or user_groups='" . $data['group_id'] . "' ORDER BY user_level DESC, user_name");
         $members = dbrows($members);
         $wallposts = dbcount("(comment_id)", DB_COMMENTS, "comment_type='g' and comment_item_id='" . $data['group_id'] . "'");
         echo "<tr>\n<td class='tbl2' style='padding:7px;'><span style='font-size:13px;'><a href='" . FUSION_SELF . "?section=groups&amp;view=" . $data['group_id'] . "' style='text-decoration:underline;'>" . $data['group_name'] . "</a></span>\n";
         if ($data['group_description']) {
             echo "<br />\n<span class='small'>" . trimlink($data['group_description'], 30) . "</span>\n";
         }
         echo "</td>\n";
         echo "<td class='tbl1' style='white-space:nowrap;padding:7px;'>" . timePassed($data['group_created'], false) . "</td>\n";
         echo "<td class='tbl2' style='text-align:center;padding:7px;'>{$members}</td>\n";
         echo "<td class='tbl1' style='text-align:center;padding:7px;'>{$wallposts}</td>\n";
         echo "<td class='tbl2' style='padding:7px;'>";
         if ($wallposts) {
             $latest = dbarray(dbquery("select c.*, u.* from " . DB_COMMENTS . " c\n\t\t\t\tleft join " . DB_USERS . " u on u.user_id=c.comment_name\n\t\t\t\twhere c.comment_type='g' and c.comment_item_id='" . $data['group_id'] . "' order by c.comment_datestamp desc limit 1"));
             echo timepassed($latest['comment_datestamp']) . "<br />\n";
             echo $locale['uc282'] . "<a href='" . BASEDIR . "profile.php?lookup=" . $latest['user_id'] . "'>" . showLabel($latest['user_id']) . "</a>\n";
         } else {
             echo $locale['uc281'];
         }
         echo "</td>\n</tr>\n";
     }
Exemple #5
0
    echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n";
    $result = dbquery("SELECT article_cat_id, article_cat_name, article_cat_description, article_cat_access FROM " . DB_ARTICLE_CATS . " WHERE article_cat_parent='0' ORDER BY article_cat_name");
    //subarticles
    if (dbrows($result) != 0) {
        $i = 0;
        echo "<tr>\n";
        echo "<td class='tbl2'>" . $locale['440'] . "</td>\n";
        echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['441'] . "</td>\n";
        echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['442'] . "</td>\n";
        echo "</tr>\n";
        while ($data = dbarray($result)) {
            $cell_color = $i % 2 == 0 ? "tbl1" : "tbl2";
            echo "<tr>\n";
            echo "<td class='{$cell_color}'><strong>" . $data['article_cat_name'] . "</strong>\n";
            if ($data['article_cat_description']) {
                echo "<br /><span class='small'>" . trimlink($data['article_cat_description'], 45) . "</span></td>\n";
            }
            echo "<td align='center' width='1%' class='{$cell_color}' style='white-space:nowrap'>" . getgroupname($data['article_cat_access']) . "</td>\n";
            echo "<td align='center' width='1%' class='{$cell_color}' style='white-space:nowrap'><a href='" . FUSION_SELF . $aidlink . "&amp;action=edit&amp;cat_id=" . $data['article_cat_id'] . "'>" . $locale['443'] . "</a> -\n";
            echo "<a href='" . FUSION_SELF . $aidlink . "&amp;action=delete&amp;cat_id=" . $data['article_cat_id'] . "' onclick=\"return confirm('" . $locale['450'] . "');\">" . $locale['444'] . "</a></td>\n";
            echo "</tr>\n";
            echo articles_admin_subcats($data['article_cat_id']);
            //subarticles
            $i++;
        }
        echo "</table>\n";
    } else {
        echo "<tr><td align='center' class='tbl1'>" . $locale['445'] . "</td></tr>\n</table>\n";
    }
    closetable();
}
if (!defined("IN_FUSION")) {
    die("Access Denied");
}
include LOCALE . LOCALESET . "search/forums.php";
$forum_list = "";
$current_cat = "";
$result = dbquery("SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name\n   FROM " . DB_FORUMS . " f\n   INNER JOIN " . DB_FORUMS . " f2 ON f.forum_cat=f2.forum_id\n   WHERE " . groupaccess('f.forum_access') . " AND f.forum_cat!='0' ORDER BY f2.forum_order ASC, f.forum_order ASC");
$sel = "";
$forum_list .= "<select name='forum_id' class='textbox'>";
$forum_list .= "<option value='0'{$sel}>" . $locale['f401'] . "</option>\n";
$rows2 = dbrows($result);
while ($data2 = dbarray($result)) {
    if ($data2['forum_cat_name'] != $current_cat) {
        if ($current_cat != "") {
            $forum_list .= "</optgroup>\n";
        }
        $current_cat = $data2['forum_cat_name'];
        $forum_list .= "<optgroup label='" . trimlink($data2['forum_cat_name'], 20) . "'>\n";
    }
    $sel = $data2['forum_id'] == $_GET['forum_id'] ? " selected='selected'" : "";
    $forum_list .= "<option value='" . $data2['forum_id'] . "'{$sel}>" . trimlink($data2['forum_name'], 20) . "</option>\n";
}
if ($rows2) {
    $forum_list .= "</optgroup>\n";
}
$forum_list .= "</select>";
$form_elements['forums']['enabled'] = array("datelimit", "fields1", "fields2", "fields3", "sort", "order1", "order2", "chars");
$form_elements['forums']['disabled'] = array();
$form_elements['forums']['display'] = array();
$form_elements['forums']['nodisplay'] = array();
$radio_button['forums'] = "<label><input type='radio' name='stype' value='forums'" . ($_GET['stype'] == "forums" ? " checked='checked'" : "") . " onclick=\"display(this.value)\" /> " . $locale['f400'] . "</label> " . $forum_list;
function subcats($id)
{
    global $aidlink, $locale, $data;
    $sublist = "";
    $result2 = dbquery("SELECT download_cat_id, download_cat_name, download_cat_description, download_cat_access\r\n\tFROM " . DB_DOWNLOAD_CATS . " WHERE download_cat_parent='" . $id . "' ORDER BY download_cat_name");
    while ($data2 = dbarray($result2)) {
        $sublist .= "<tr>\n";
        $sublist .= "<td class='tbl1'>--" . $data2['download_cat_name'];
        if ($data2['download_cat_description']) {
            $sublist .= "<br />\n<span class='small'>" . trimlink($data2['download_cat_description'], 45) . "</span>\n";
        }
        $sublist .= "</td>\n";
        $sublist .= "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'>" . getgroupname($data2['download_cat_access']) . "</td>\n";
        $sublist .= "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'><a href='" . FUSION_SELF . $aidlink . "&amp;action=edit&amp;cat_id=" . $data2['download_cat_id'] . "'>" . $locale['443'] . "</a> -\n";
        $sublist .= "<a href='" . FUSION_SELF . $aidlink . "&amp;action=delete&amp;cat_id=" . $data2['download_cat_id'] . "' onclick=\"return confirm('" . $locale['450'] . "');\">" . $locale['444'] . "</a></td>\n";
        $sublist .= "</tr>\n";
    }
    return $sublist;
}
<?php

/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: latest_downloads_panel.php
| Author: PHP-Fusion Development Team
+--------------------------------------------------------+
| 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");
}
openside($locale['global_032']);
$result = dbquery("SELECT td.download_id, td.download_title, td.download_cat, td.download_datestamp, td.download_visibility\n\t\t\tFROM " . DB_DOWNLOADS . " td\n\t\t\tINNER JOIN " . DB_DOWNLOAD_CATS . " tc ON td.download_cat=tc.download_cat_id\n\t\t\t" . (multilang_table("DL") ? "WHERE download_cat_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('download_visibility') . "\n\t\t\tORDER BY download_datestamp DESC LIMIT 0,5");
if (dbrows($result)) {
    while ($data = dbarray($result)) {
        echo THEME_BULLET . " <a href='" . INFUSIONS . "downloads/downloads.php?download_id=" . $data['download_id'] . "' title='" . $data['download_title'] . "' class='side'>" . trimlink($data['download_title'], 23) . "</a><br />\n";
    }
} else {
    echo "<div style='text-align:center'>" . $locale['global_033'] . "</div>\n";
}
closeside();
Exemple #9
0
        echo "<tr><td align='center' class='tbl2'>";
        $rtype = substr($reldata['kroax_url'], -3, 3);
        if ($rtype == "mp3") {
            $showimg = "<img src='" . INFUSIONS . "the_kroax/img/musicstream.jpg' width='50' height='30'>";
        } elseif ($reldata['kroax_tumb']) {
            $showimg = "<IMG SRC='" . $reldata['kroax_tumb'] . "' width='70' height='50'>";
        } else {
            $showimg = "<img src='" . INFUSIONS . "the_kroax/img/nopic.gif' width='70' height='50'>";
        }
        if (!isset($p)) {
            $videolink = '<a href="' . INFUSIONS . 'the_kroax/embed.php?url=' . $reldata['kroax_id'] . '">';
        } else {
            $videolink = '<a href="#" onclick=window.open("' . INFUSIONS . 'the_kroax/embed.php?p=1&url=' . $reldata['kroax_id'] . '","Click","scrollbars=yes,resizable=yes,width=800,height=600")>';
        }
        echo "" . $videolink . "";
        echo '' . $showimg . '<br>' . trimlink($reldata['kroax_titel'], 15) . '</a></td></tr>';
    }
    if ($kroaxsettings['kroax_set_keepalive'] == "1") {
        $result_guest = dbrows(dbquery("SELECT * FROM " . $db_prefix . "kroax_activeusr WHERE movie_id='" . $data['kroax_id'] . "' AND member='0'"));
        $result_total = dbrows(dbquery("SELECT * FROM " . $db_prefix . "kroax_activeusr WHERE movie_id='" . $data['kroax_id'] . "' AND  member>='0'"));
        $result_members = dbrows(dbquery("SELECT * FROM " . $db_prefix . "kroax_activeusr WHERE movie_id='" . $data['kroax_id'] . "' AND  member>0"));
        echo "<tr><td class='tbl2' align='center'><b>" . $locale['KROAXC724'] . "</b></td></tr>";
        echo "<tr><td align='center' class='tbl2'>";
        echo '' . $locale['KROAXC720'] . '' . $result_members . ' 
</td></tr>';
        echo "<tr><td align='center' class='tbl2'>";
        echo '' . $locale['KROAXC721'] . '' . $result_guest . '
</td></tr>';
        echo "<tr><td align='center' class='tbl2'>";
        echo ' ' . $locale['KROAXC722'] . '' . $result_total . ' ';
    }
     if ($fb4['latest_post']) {
         echo "&nbsp;<a";
         if ($fb4['latest_popup']) {
             $originalpost = dbarray(dbquery("select * from " . DB_POSTS . " where post_id='" . $data['thread_lastpostid'] . "' order by post_id asc limit 1"));
             $post = trimlink(nl2br(stripinput(parseubb($originalpost['post_message']))), 200);
             echo " title='header=[" . $locale['fb615'] . ":] body=[" . $post . "] delay=[0] fade=[on]'";
         }
         echo " href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&amp;pid=" . $data['thread_lastpostid'] . "#post_" . $data['thread_lastpostid'] . "'" . (!$fb4['latest_popup'] ? " title='" . $locale['fb615'] . "'" : "") . " class='small'>(<b>&raquo;</b>)</a>";
     }
     echo "<br />\n<a href='" . BASEDIR . "profile.php?lookup=" . $data['original_id'] . "' style='font-size:11px;'>" . showLabel($data['original_id'], false, "panel") . "</a><br />\n\t\t<span style='font-size:10px;'>" . $timepassed . "</span>\n\t\t</td>\n";
     echo "<td width='20%' class='" . $row_color . "' style='text-align:right;white-space:nowrap'>\n\t\t" . timePassed($data['thread_lastpost'], false) . "<br />\n\t\tby <a href='" . BASEDIR . "profile.php?lookup=" . $data['thread_lastuser'] . "'>" . showLabel($data['thread_lastuser'], false, "panel") . "</a>";
     if (!$fb4['latest_post']) {
         echo "&nbsp;<a";
         if ($fb4['latest_popup']) {
             $originalpost = dbarray(dbquery("select * from " . DB_POSTS . " where post_id='" . $data['thread_lastpostid'] . "' order by post_id asc limit 1"));
             $post = trimlink(nl2br(stripinput(parseubb($originalpost['post_message']))), 200);
             echo " title='header=[" . ($data['thread_postcount'] - 1 > 0 ? "RE: " : "") . $data['thread_subject'] . "] body=[" . $post . "] delay=[0] fade=[on]'";
         }
         echo " href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&amp;pid=" . $data['thread_lastpostid'] . "#post_" . $data['thread_lastpostid'] . "' title='" . $locale['fb615'] . "'><b>&raquo;&raquo;</b></a>";
     }
     echo "</td>\n";
     echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . $data['thread_views'] . "</td>\n";
     echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . ($data['thread_postcount'] - 1) . "</td>\n";
     echo "</tr>\n";
     $i++;
 }
 echo "</table>\n";
 if ($fb4['latest_popup']) {
     echo "<script src='" . INFUSIONS . "fusionboard4/includes/js/boxover.js' type='text/javascript'></script>\n";
 }
 if ($fb4['latestscroll']) {
    // mFusion environment
    $this_lang = LANGUAGE;
    if (file_exists(INFUSIONS . "the_kroax/locale/" . $this_lang . ".php")) {
        include INFUSIONS . "the_kroax/locale/" . $this_lang . ".php";
    } else {
        include INFUSIONS . "the_kroax/locale/English.php";
    }
}
$read_settingskroax = dbquery("SELECT * FROM " . $db_prefix . "kroax_set");
if (dbrows($read_settingskroax) != 0) {
    $settingskroax = dbarray($read_settingskroax);
    $skroaxembed = $settingskroax['kroax_set_show'];
}
openside("" . $locale['KROAX803'] . "");
$result = dbquery("SELECT kroax_id,kroax_titel,kroax_url,kroax_date FROM " . $db_prefix . "kroax WHERE " . groupaccess('kroax_access') . " AND  kroax_approval=''  ORDER BY kroax_id DESC LIMIT 0,10");
if (dbrows($result) != 0) {
    echo "<table width='100%' cellpadding='0' cellspacing='0'>";
    while ($data = dbarray($result)) {
        $itemsubject = trimlink($data['kroax_titel'], 22);
        if ($skroaxembed == "1") {
            echo "<tr>\n<td class='small'><img src='" . THEME . "images/bullet.gif'> <a href='" . INFUSIONS . "the_kroax/embed.php?url=" . $data['kroax_id'] . "'>{$itemsubject}</a><br> [" . showdate('forumdate', $data['kroax_date']) . "]</td>\n";
        } else {
            echo "<tr>\n<td class='small'><img src='" . THEME . "images/bullet.gif'> <a href='#' onclick=window.open('" . INFUSIONS . "the_kroax/embed.php?p=1&url=" . $data['kroax_id'] . "','Click','scrollbars=yes,resizable=yes,width=650,height=550')>{$itemsubject}</a><br> [" . showdate('forumdate', $data['kroax_date']) . "]</td>\n";
        }
        echo "</tr>\n";
    }
    echo "</table>";
} else {
    echo "" . $locale['KROAX802'] . "";
}
closeside();
Exemple #12
0
function showcatlist($parent = 0, $level = 0)
{
    global $locale, $aidlink;
    $result = dbquery("\n\tSELECT article_cat_id, article_cat_name, article_cat_description\n\tFROM " . DB_ARTICLE_CATS . "\n\tWHERE article_cat_parent='" . $parent . "'" . (multilang_table("AR") ? " AND article_cat_language='" . LANGUAGE . "'" : "") . "\n\tORDER BY article_cat_name");
    $rows = dbrows($result);
    if ($rows > 0) {
        while ($data = dbarray($result)) {
            $description = strip_tags(parse_textarea($data['article_cat_description']));
            echo "<tr>\n";
            echo "<td><strong>" . str_repeat("&mdash;", $level) . $data['article_cat_name'] . "</strong>\n";
            if ($data['article_cat_description']) {
                echo "<br />" . str_repeat("&mdash;", $level) . "<span class='small'>" . trimlink($description, 45) . "</span></td>\n";
            }
            echo "<td align='center' width='1%' style='white-space:nowrap'>\n\n\t\t\t<a href='" . clean_request("action=edit&cat_id=" . $data['article_cat_id'], array("section", "aid"), true) . "'>" . $locale['edit'] . "</a> -\n";
            echo "<a href='" . clean_request("action=delete&cat_id=" . $data['article_cat_id'], array("section", "aid"), true) . "' onclick=\"return confirm('" . $locale['articles_0350'] . "');\">" . $locale['delete'] . "</a></td>\n";
            echo "</tr>\n";
            showcatlist($data['article_cat_id'], $level + 1);
        }
    }
}
Exemple #13
0
 $album_title = str_replace("\n", "", $album_title);
 $album_title = preg_replace("[\\[(.*?)\\]]", "", $album_title);
 $album_title = preg_replace("<\\<(.*?)\\>>", "", $album_title);
 $album_title = trimlink($album_title, 75);
 $album_title = str_replace($enc, $dec, $album_title);
 $album_description = str_replace("\r", "", $data['album_description']);
 $album_description = str_replace("\n", "", $album_description);
 $album_description = preg_replace("[\\[(.*?)\\]]", "", $album_description);
 $album_description = preg_replace("<\\<(.*?)\\>>", "", $album_description);
 $album_description = trimlink($album_description, 75);
 $album_description = str_replace($enc, $dec, $album_description);
 $photo_title = str_replace("\r", "", $data['photo_title']);
 $photo_title = str_replace("\n", "", $photo_title);
 $photo_title = preg_replace("[\\[(.*?)\\]]", "", $photo_title);
 $photo_title = preg_replace("<\\<(.*?)\\>>", "", $photo_title);
 $photo_title = trimlink($photo_title, 75);
 $photo_title = str_replace($enc, $dec, $photo_title);
 $album_title_font_size = !isset($_GET['full']) ? 3 : 5;
 $album_descr_font_size = !isset($_GET['full']) ? 1 : 3;
 $photo_title_font_size = !isset($_GET['full']) ? 1 : 3;
 //album title
 ImageString($image2 ? $image2 : $image, $album_title_font_size, 10, $mty1 - 1, $album_title, $black);
 ImageString($image2 ? $image2 : $image, $album_title_font_size, 10, $mty1 + 1, $album_title, $black);
 ImageString($image2 ? $image2 : $image, $album_title_font_size, 9, $mty1, $album_title, $black);
 ImageString($image2 ? $image2 : $image, $album_title_font_size, 11, $mty1, $album_title, $black);
 ImageString($image2 ? $image2 : $image, $album_title_font_size, 10, $mty1, $album_title, $color1);
 //album info
 ImageString($image2 ? $image2 : $image, $album_descr_font_size, 10, $mty2 - 1, $album_description, $black);
 ImageString($image2 ? $image2 : $image, $album_descr_font_size, 10, $mty2 + 1, $album_description, $black);
 ImageString($image2 ? $image2 : $image, $album_descr_font_size, 9, $mty2, $album_description, $black);
 ImageString($image2 ? $image2 : $image, $album_descr_font_size, 11, $mty2, $album_description, $black);
Exemple #14
0
 function renderSubforums($forum)
 {
     global $locale, $userdata, $db_prefix, $lastvisited, $fb4;
     $forum_list = "";
     $current_cat = "";
     $result = dbquery("SELECT f.*, f2.forum_name AS forum_cat_name, u.user_id, u.user_name\n\t\tFROM " . DB_FORUMS . " f\n\t\tLEFT JOIN " . DB_FORUMS . " f2 ON f.forum_cat = f2.forum_id\n\t\tLEFT JOIN " . DB_USERS . " u ON f.forum_lastuser = u.user_id\n\t\tLEFT JOIN " . DB_PREFIX . "fb_forums f3 on f3.forum_id=f.forum_id\n\t\tWHERE " . groupaccess('f.forum_access') . " AND f3.forum_parent='" . $forum . "' GROUP BY forum_id ORDER BY f2.forum_order ASC, f.forum_order ASC");
     if (dbrows($result) != 0) {
         $state = "off";
         $boxname = "subforums";
         echo "<!--pre_forum_idx--><table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
         if ($fb4['forum_icons']) {
             echo "<tr>\n<td colspan='6' class='forum-caption' style='padding:7px;'><div style='float:right'>" . panelbutton($state, $boxname) . "</div>\n\n\t\t\t<!--forum_cat_name_cell-->" . $locale['fb553'] . "</td>\n</tr>";
             echo "</table>" . panelstate($state, $boxname) . "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
             echo "<tr>\n<td colspan='3' class='tbl2' width='65%'>" . $locale['401'] . "</td>\n";
         } else {
             echo "<tr>\n<td colspan='6' class='forum-caption' style='padding:7px;'><div style='float:right'>" . panelbutton($state, $boxname) . "</div>\n\n\t\t\t<!--forum_cat_name_cell-->" . $locale['fb553'] . "</td>\n</tr>";
             echo "</table>" . panelstate($state, $boxname) . "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
             echo "<tr>\n<td colspan='2' class='tbl2' width='65%'>" . $locale['401'] . "</td>\n";
         }
         echo "<td class='tbl2' width='35%' style='white-space:nowrap'>" . $locale['404'] . "</td>\n";
         echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['402'] . "</td>\n";
         echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['403'] . "</td>\n";
         echo "</tr>\n";
         while ($data = dbarray($result)) {
             $moderators = "";
             if ($data['forum_moderators']) {
                 $mod_groups = explode(".", $data['forum_moderators']);
                 foreach ($mod_groups as $mod_group) {
                     if ($moderators) {
                         $moderators .= ", ";
                     }
                     $moderators .= $mod_group < 101 ? "<a href='" . BASEDIR . "profile.php?group_id=" . $mod_group . "'>" . getgroupname($mod_group) . "</a>" : getgroupname($mod_group);
                 }
             }
             $forum_match = "\\|" . $data['forum_lastpost'] . "\\|" . $data['forum_id'];
             if ($data['forum_lastpost'] > $lastvisited) {
                 if (iMEMBER && preg_match("({$forum_match}\\.|{$forum_match}\$)", $userdata['user_threads'])) {
                     $fim = "<img src='" . get_image("folder") . "' alt='" . $locale['561'] . "' />";
                 } else {
                     $fim = "<img src='" . get_image("foldernew") . "' alt='" . $locale['560'] . "' />";
                 }
             } else {
                 $fim = "<img src='" . get_image("folder") . "' alt='" . $locale['561'] . "' />";
             }
             echo "<tr>\n";
             echo "<td align='center' width='1%' class='tbl1' style='white-space:nowrap' style='padding:7px;'>{$fim}</td>\n";
             $iconQuery = dbquery("select * from " . $db_prefix . "fb_forums where forum_id='" . $data['forum_id'] . "'");
             if (dbrows($iconQuery)) {
                 $iconData = dbarray($iconQuery);
                 $ficon = $iconData['forum_icon'] !== "" ? $iconData['forum_icon'] : "folder.png";
             } else {
                 $ficon = "folder.png";
             }
             if ($fb4['forum_icons']) {
                 $ficon = "<img src='" . INFUSIONS . "fusionboard4/images/forum_icons/{$ficon}' alt='' />";
                 echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap; padding:7px;'>{$ficon}</td>\n";
             }
             echo "<td class='tbl1' style='padding:5px;width:65%;'><a href='viewforum.php?forum_id=" . $data['forum_id'] . "' style='font-size:12px; text-decoration:underline; font-weight:bold;'>\n\t\t\t<!--forum_name_cell-->" . $data['forum_name'] . "</a><br />\n";
             if ($data['forum_description'] || $moderators) {
                 echo "<span class='small'>" . $data['forum_description'] . ($data['forum_description'] && $moderators ? "<br />\n" : "");
                 echo ($moderators ? "<strong>" . $locale['411'] . "</strong>" . $moderators . "</span>\n" : "</span>\n") . "\n";
             }
             $c_res = dbquery("select * from " . DB_PREFIX . "forums f\n\t\t\tleft join " . DB_PREFIX . "fb_forums f2 on f2.forum_id=f.forum_id\n\t\t\twhere " . groupaccess("f.forum_access") . " AND f2.forum_parent='" . $data['forum_id'] . "'");
             if (dbrows($c_res)) {
                 if ($fb4['subforum_view']) {
                     echo "<br /><span class='small'><strong>" . $locale['fb552'] . "</strong> ";
                     $i = dbrows($c_res);
                     while ($c_data = dbarray($c_res)) {
                         $i--;
                         echo "<a href='" . FORUM . "viewforum.php?forum_id=" . $c_data['forum_id'] . "'>" . $c_data['forum_name'] . "</a>";
                         if ($i > 0) {
                             echo ", ";
                         }
                     }
                     echo "</span>";
                 } else {
                     $counter = 0;
                     $rows = 3;
                     $sfimage1 = file_exists(THEME . "images/folder_open.png") ? THEME . "images/folder_open.png" : INFUSIONS . "fusionboard4/images/folder_open.png";
                     $sfimage2 = file_exists(THEME . "images/subforum.png") ? THEME . "images/subforum.png" : INFUSIONS . "fusionboard4/images/subforum.png";
                     echo "<br /><img src='{$sfimage1}' alt='' style='vertical-align:middle;'> <span class='small' style='font-weight:bold;'>" . $locale['fb552'] . "</span><br />";
                     echo "<table cellspacing='0' cellpadding='0' border='0' width='100%' style='padding-left:10px;'><tr>\n\t\t\t\t\t<td width='50%' class='small' style='padding-left:3px; padding-right:3px; vertical-align:top;'>";
                     while ($c_data = dbarray($c_res)) {
                         if ($counter != 0 && $counter % $rows == 0) {
                             echo "</td><td width='50%' class='small' style='padding-left:3px; padding-right:3px; vertical-align:top;'>\n";
                         }
                         $subforum = is_file(THEME . "images/subforum.png") ? THEME . "images/subforum.png" : INFUSIONS . "fusionboard4/images/subforum.png";
                         echo "<img src='{$sfimage2}' alt='' style='vertical-align:middle;'> \n\t\t\t\t\t\t<a href='" . FORUM . "viewforum.php?forum_id=" . $c_data['forum_id'] . "' class='small'>" . $c_data['forum_name'] . "</a><br />";
                         $counter++;
                     }
                     echo "</td></tr></table>";
                 }
             }
             echo "</td>\n";
             echo "<td class='tbl2' style='white-space:nowrap; padding:5px;width:35%;'>";
             $children = array();
             $child_res = dbquery("select * from " . $db_prefix . "fb_forums f\n\t\t\tleft join " . $db_prefix . "forums f2 on f2.forum_id=f.forum_id\n\t\t\twhere " . groupaccess("f2.forum_access") . " and f.forum_parent='" . $data['forum_id'] . "'");
             if (dbrows($child_res)) {
                 while ($child_data = dbarray($child_res)) {
                     array_push($children, $child_data['forum_id']);
                     findChildren($child_data['forum_id']);
                 }
             }
             if (count($children)) {
                 $where = "";
                 $counter = count($children);
                 foreach ($children as $child) {
                     $where .= "t.forum_id='{$child}' " . ($counter > 1 ? "OR " : "");
                     $counter--;
                 }
                 $childrenForums = dbquery("select * from " . $db_prefix . "threads t\n\t\t\t\tleft join " . $db_prefix . "users u on u.user_id=t.thread_lastuser\n\t\t\t\tleft join " . $db_prefix . "posts p on p.post_id=t.thread_lastpostid\n\t\t\t\twhere ({$where} OR t.forum_id='" . $data['forum_id'] . "') \n\t\t\t\torder by t.thread_lastpost desc limit 1");
                 if (!dbrows($childrenForums)) {
                     echo $locale['405'] . "</td>\n";
                 } else {
                     $childrenData = dbarray($childrenForums);
                     echo "<b><a href='viewthread.php?thread_id=" . $childrenData['thread_id'] . "' style='text-decoration:underline;'>" . trimlink($childrenData['thread_subject'], 30) . "</a></b><br />";
                     echo "" . $locale['406'] . "<a href='" . BASEDIR . "profile.php?lookup=" . $childrenData['thread_lastuser'] . "'>" . showLabel($childrenData['user_id'], false, "index") . "</a><br />\n\t\t\t\t\t<div align='right'>" . timePassed($childrenData['thread_lastpost'], false) . "\n\t\t\t\t\t<a href='" . FORUM . "viewthread.php?thread_id=" . $childrenData['thread_id'] . "&amp;pid=" . $childrenData['thread_lastpostid'] . "#post_" . $childrenData['thread_lastpostid'] . "' title='Go To Last Post'><b>»</b></a></div></td>\n";
                 }
             } else {
                 if ($data['forum_lastpost'] == 0) {
                     echo $locale['405'] . "</td>\n";
                 } else {
                     $threadData = dbarray(dbquery("select * from " . $db_prefix . "threads t\n\t\t\t\t\tleft join " . $db_prefix . "posts p on p.post_id=t.thread_lastpostid\n\t\t\t\t\twhere t.thread_lastpost='" . $data['forum_lastpost'] . "'"));
                     echo "<b><a href='viewthread.php?thread_id=" . $threadData['thread_id'] . "' style='text-decoration:underline;'>" . trimlink($threadData['thread_subject'], 30) . "</a></b><br />";
                     echo "" . $locale['406'] . "<a href='" . BASEDIR . "profile.php?lookup=" . $data['forum_lastuser'] . "' style='text-decoration:underline;'>" . showLabel($data['forum_lastuser'], false, "index") . "</a><br />\n\t\t\t\t\t<div align='right'>" . timePassed($data['forum_lastpost'], false) . "\n\t\t\t\t\t<a href='" . FORUM . "viewthread.php?thread_id=" . $threadData['thread_id'] . "&amp;pid=" . $threadData['thread_lastpostid'] . "#post_" . $threadData['thread_lastpostid'] . "' title='Go To Last Post'><b>»</b></a></div></td>\n";
                 }
             }
             echo "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'>" . $data['forum_threadcount'] . "</td>\n";
             echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $data['forum_postcount'] . "</td>\n";
             echo "</tr>\n";
         }
         echo "</table></div>";
     }
 }
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: latest_downloads_panel.php
| Author: PHP-Fusion Development Team
+--------------------------------------------------------+
| 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");
}
openside($locale['global_032']);
$result = dbquery("SELECT td.download_id, td.download_title, td.download_cat, td.download_datestamp, td.download_visibility\n\t\t\tFROM " . DB_DOWNLOADS . " td\n\t\t\tINNER JOIN " . DB_DOWNLOAD_CATS . " tc ON td.download_cat=tc.download_cat_id\n\t\t\t" . (multilang_table("DL") ? "WHERE download_cat_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('download_visibility') . "\n\t\t\tORDER BY download_datestamp DESC LIMIT 0,5");
if (dbrows($result)) {
    while ($data = dbarray($result)) {
        $download_title = trimlink($data['download_title'], 23);
        echo THEME_BULLET . " <a href='" . BASEDIR . "downloads.php?download_id=" . $data['download_id'] . "' title='" . $data['download_title'] . "' class='side'>" . $download_title . "</a><br />\n";
    }
} else {
    echo "<div style='text-align:center'>" . $locale['global_033'] . "</div>\n";
}
closeside();
Exemple #16
0
function render_item($item_id)
{
    global $aidlink, $locale, $settings, $golddata, $_REQUEST, $_POST, $_GET;
    include INCLUDES . "comments_include.php";
    include INCLUDES . "ratings_include.php";
    echo "<table width='100%' cellpadding='0' cellspacing='0' class='tbl-border'>\n<tr>\n";
    echo "<td valign='top' align='left'>\n";
    $result = dbquery("SELECT * FROM " . DB_UG3_USAGE . " LEFT JOIN (" . DB_UG3_CATEGORIES . ")\n\t\t\t\t ON (" . DB_UG3_CATEGORIES . ".cat_id = " . DB_UG3_USAGE . ".category)\n\t\t\t\t WHERE " . DB_UG3_USAGE . ".id = '" . $item_id . "'\n\t\t\t\t LIMIT 1");
    if (dbrows($result)) {
        $data = dbarray($result);
        if (checkgroup($data['cat_access'])) {
            echo "<table cellpadding='3' cellspacing='0' width='100%' class='tbl-border'>\n<tr>\n";
            echo "<td align='left' valign='top'>&nbsp;</td>\n";
            echo "<td algin='left' valign='top'><h3>" . $data['name'] . "</h3></td>\n";
            echo "</tr><tr>\n";
            echo "<td align='left' valign='top'><img src='" . GOLD_IMAGE_ITEM . $data['image'] . "' /></td>";
            echo "<td algin='left' valign='top'>" . $data['description'] . "<br/><br />\n";
            echo "<u>" . $locale['urg_shop_109'] . "</u> " . formatMoney($data['cost']) . "<br /><br />\n";
            echo "<u>" . $locale['urg_shop_117'] . "</u> " . $data['stock'] . "<br /><br />\n";
            if ($golddata['cash'] >= $data['cost']) {
                echo "<a href='index.php?op=shop_finalise&amp;id=" . $data['id'] . "&amp;return=" . urlencode(FUSION_SELF . "?op=shop_start&category=" . $data['category']) . "'>" . $locale['urg_shop_119'] . "</a>\n";
            } elseif ($data['stock'] == 0) {
                echo "<strong>" . $locale['urg_shop_120'] . "</strong>\n";
            } else {
                echo "<span style='color:red;'>" . sprintf($locale['urg_shop_121'] . " %s", formatMoney($data['cost'] - $golddata['cash'])) . "</span>\n";
            }
            echo "</td>\n";
            echo "</tr>\n</table>\n";
        } else {
            echo $locale['urg_shop_150'];
            pagerefresh('meta', 3, FUSION_SELF . '?op=shop_start');
        }
    } else {
        echo $locale['urg_shop_151'];
        pagerefresh('meta', 3, FUSION_SELF . '?op=shop_start');
    }
    echo "</td>\n";
    echo "<td valign='top' align='left' width='150px'>\n";
    echo "<table width='100%' cellpadding='3' cellspacing='3' class='tbl-border'>\n<tr>\n";
    echo "<td class='tbl2'><strong>" . $locale['urg_shop_152'] . "</strong></td>\n";
    echo "</tr>\n";
    $count = 0;
    $result = dbquery("SELECT ownerid FROM " . DB_UG3_INVENTORY . " WHERE itemid = '" . $item_id . "' AND ownerid != '" . $userdata['user_id'] . "' GROUP BY ownerid ORDER BY RAND()");
    if (dbrows($result)) {
        while ($data = dbarray($result)) {
            if ($count < 5) {
                $result2 = dbquery("SELECT itemid FROM " . DB_UG3_INVENTORY . " WHERE ownerid = '" . $data['ownerid'] . "' AND itemid != '" . $item_id . "' GROUP BY itemid ORDER BY RAND() LIMIT 5");
                while ($data2 = dbarray($result2)) {
                    if ($count < 5) {
                        $item = dbarray(dbquery("SELECT id, name, image FROM " . DB_UG3_USAGE . " WHERE id = '" . $data2['itemid'] . "' LIMIT 1"));
                        echo "<tr>\n";
                        echo "<td><img src='" . GOLD_IMAGE_ITEM . $item['image'] . "' alt='" . $data['itemname'] . "' width='15px' height='15px' align='left' /> \n";
                        echo "<a href='" . FUSION_SELF . "?op=shop_item&amp;id=" . $item['id'] . "'>" . trimlink($item['name'], 15) . "</a></td>\n";
                        echo "</tr>\n";
                        $count++;
                    } else {
                        break;
                    }
                }
            } else {
                break;
            }
        }
    } else {
        echo "<tr><td>" . $locale['urg_shop_153'] . "</td></tr>\n";
    }
    echo "</table>\n";
    echo "</td>\n</tr>\n</table>\n";
    echo "<div style='margin:5px'></div>\n";
    showcomments("S", DB_UG3_USAGE, "id", $_REQUEST['id'], FUSION_SELF . "?op=shop_item&amp;id=" . $_REQUEST['id']);
    showratings("S", $_REQUEST['id'], FUSION_SELF . "?op=shop_item&amp;id=" . $_REQUEST['id']);
}
Exemple #17
0
 if (!flood_control("message_datestamp", DB_MESSAGES, "message_from='" . $userdata['user_id'] . "'")) {
     $result = dbquery("SELECT u.user_id, u.user_name, u.user_email, u.user_level, mo.pm_email_notify, s.pm_inbox, COUNT(message_id) as message_count\n\t\t\t\tFROM " . DB_USERS . " u\n\t\t\t\tLEFT JOIN " . DB_MESSAGES_OPTIONS . " mo USING(user_id)\n\t\t\t\tLEFT JOIN " . DB_MESSAGES_OPTIONS . " s ON s.user_id='0'\n\t\t\t\tLEFT JOIN " . DB_MESSAGES . " ON message_to=u.user_id AND message_folder='0'\n\t\t\t\tWHERE u.user_id='" . $_GET['msg_send'] . "' GROUP BY u.user_id");
     if (dbrows($result)) {
         $data = dbarray($result);
         if ($data['user_id'] != $userdata['user_id']) {
             if ($data['user_id'] == 1 || $data['user_level'] > 101 || $data['pm_inbox'] == "0" || $data['message_count'] + 1 <= $data['pm_inbox']) {
                 $result = dbquery("INSERT INTO " . DB_MESSAGES . " (message_to, message_from, message_subject, message_message, message_smileys, message_read, message_datestamp, message_folder) VALUES('" . $data['user_id'] . "','" . $userdata['user_id'] . "','" . $subject . "','" . $message . "','" . $smileys . "','0','" . time() . "','0')");
                 $send_email = isset($data['pm_email_notify']) ? $data['pm_email_notify'] : $msg_settings['pm_email_notify'];
                 if ($send_email == "1") {
                     $message_content = str_replace("[SUBJECT]", $subject, $locale['626']);
                     $message_content = str_replace("[USER]", $userdata['user_name'], $message_content);
                     $template_result = dbquery("SELECT template_key, template_active FROM " . DB_EMAIL_TEMPLATES . " WHERE template_key='PM' LIMIT 1");
                     if (dbrows($template_result)) {
                         $template_data = dbarray($template_result);
                         if ($template_data['template_active'] == "1") {
                             sendemail_template("PM", $subject, trimlink($message, 150), $userdata['user_name'], $data['user_name'], "", $data['user_email']);
                         } else {
                             sendemail($data['user_name'], $data['user_email'], $settings['siteusername'], $settings['siteemail'], $locale['625'], $data['user_name'] . $message_content);
                         }
                     } else {
                         sendemail($data['user_name'], $data['user_email'], $settings['siteusername'], $settings['siteemail'], $locale['625'], $data['user_name'] . $message_content);
                     }
                 }
             } else {
                 $error = "2";
             }
         }
     } else {
         redirect(FUSION_SELF . "?folder=inbox&error=noresult");
     }
 } else {
 echo "<td width='100%' class='tbl2'><strong>" . $locale['global_044'] . "</strong></td>\n";
 if (IF_MULTI_LANGUAGE_FORUM) {
     echo "<td width='1%' class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_061'] . "</strong></td>\n";
 }
 // Pimped
 echo "<td width='1%' class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_049'] . "</strong></td>\n";
 echo "</tr>\n";
 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'>" . trimlink($data['forum_name'], 30) . "</td>\n";
     echo "<td width='100%' class='" . $row_color . "'><a href='" . make_url(FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&amp;pid=" . $data['post_id'], BASEDIR . "forum-thread-" . $data['thread_id'] . "-pid" . $data['post_id'] . "-", $data['thread_subject'], ".html") . "#post_" . $data['post_id'] . "' title='" . $data['thread_subject'] . "'>" . trimlink($data['thread_subject'], 40) . "</a></td>\n";
     // Pimped
     if (IF_MULTI_LANGUAGE_FORUM) {
         echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . get_image($data['forum_language'], $data['forum_language'], "", $data['forum_language'], "", true) . "</td>\n";
     }
     // Pimped
     echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . showdate("forumdate", $data['post_datestamp']) . "</td>\n";
     echo "</tr>\n";
     $i++;
 }
 echo "</table>\n";
 require_once INFUSIONS . "forum_threads_list_panel/threads_list_navigation.php";
 closetable();
 if ($rows > 20) {
     echo "<div align='center' style='margin-top:5px;'>\n" . makepagenav($_GET['rowstart'], 20, $rows, 3) . "\n</div>\n";
 }
Exemple #19
0
    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 . "&amp;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 . "&amp;") . "\n</div>\n";
}
echo "<br />";
echo "<form action='" . FUSION_SELF . $aidlink . "' method='post'>\n";
echo "<table cellpadding='0' cellspacing='1' class='tbl-border center' style='width: 400px;'>\n";
echo "<tr>\n";
    function pdp_render_download($id, $data, $links, $files, $images, $old_data)
    {
        global $locale, $pdp;
        $down_link = '';
        if (!$data['can_download']) {
        } elseif (!empty($old_data['down']) || !empty($old_data['link_extern'])) {
            $down_link = array('did' => $id, 'file' => 0);
        } elseif (count($files)) {
            $latest_download = array_shift($files);
            $down_link = array('did' => $id, 'file' => $latest_download['id']);
            $old_ver = $latest_download['ver'];
            $old_size = $latest_download['size'];
            array_unshift($files, $latest_download);
        }
        if (is_array($down_link)) {
            $down_link = '
<form action="file.php" method="get">
<input type="hidden" name="did" value="' . $down_link['did'] . '" />
<input type="hidden" name="file_id" value="' . $down_link['file'] . '" />
<input type="submit" class="button" value="' . $locale['PDP201'] . '" />
</form>';
        } else {
            $down_link = parseubb($pdp->settings['download_restricted']);
            if (FUSION_VERSION != 'FF') {
                $down_link = nl2br($down_link);
            }
        }
        if (!empty($data['pic'])) {
            $pic = $data['pic'];
            $pic_id = 0;
        } elseif (count($images)) {
            $first_pic = $images[0];
            $pic = $first_pic['url'];
            $pic_id = $first_pic['id'];
        } else {
            $pic = "";
        }
        echo "<p><font size='+1'><b>" . $data['name'] . "</b></font>\n";
        echo "<hr />\n\n<table border='0' cellspacing='2' width='100%' cellpadding='0'>\n<tr>\n\t<td valign='top' colspan='2'>" . $data['desc'] . "</td>\n\t<td width='150' valign='top' rowspan='2'>\n\t<table class='tbl-border' cellspacing='1' width='100%'>";
        // version
        if (!empty($old_data['version'])) {
            echo "<tr><td class='tbl2' align='center'>" . $locale['PDP018'] . ":<br />" . $old_data['version'] . "</td>";
        }
        // homepage
        if (!empty($data['homepage'])) {
            echo "<tr><td class='tbl2' align='center'><a href='" . $data['homepage'] . "'" . " target='_blank'>" . $locale['PDP020'] . "</a></td>";
        }
        // screenshot
        if (!empty($pic)) {
            echo "<tr>\n\t<td align='center' class='tbl2'>" . "<a href='image.php?did=" . $id . "&amp;pic_id={$pic_id}'>" . $locale['PDP028'] . "</a></td>\n</tr>";
        }
        // download count
        echo "<tr>\n\t<td align='center' class='tbl2'>" . $locale['pdp_downloads'] . ":<br />" . pdpCore::format_number($data['count']) . "</td>\n</tr>";
        // FIXME TODO
        if (!empty($old_data['size'])) {
            echo "<tr><td align='center' class='tbl2'>" . $locale['PDP029'] . ":<br />" . $old_data['size'] . "</td></tr>";
        }
        if (!empty($data['license'])) {
            echo "<tr>\n\t<td align='center' class='tbl2'>" . $locale['pdp_license'] . ': ' . $data['license'] . "</td>\n</tr>";
        }
        // who posted and when.
        echo "<tr><td align='center' class='tbl2'>" . ($data['user_id'] ? "<a href='profile.php?id=" . $data['user_id'] . "'>" . $data['user_name'] . "</a><br />" : "") . showdate("shortdate", $data['mtime']) . "</td>\n</tr>\n";
        if (!empty($data['copyright'])) {
            echo "<tr>\n\t<td class='tbl2' align='center'>" . $data['copyright'] . "</td>\n</tr>\n";
        }
        if ($data['allow_notify']) {
            if ($data['can_subscribe']) {
                echo "<tr>\n\t<td class='tbl2' align='center'>" . ($data['is_subscribing'] ? "<a href='include/do_did.php?did=" . $id . "&amp;subscibe=0'>" . $locale['PDP060'] . "</a>" : "<a href='include/do_did.php?did=" . $id . "&amp;subscibe=1'>" . $locale['PDP059'] . "</a>") . "</td>\n</tr>\n";
            }
        }
        echo "</table></td>\n</tr>\n<tr>\n\t<td align='center' valign='bottom'>" . $down_link . "\n\t</td>\n</tr>\n</table>\n<hr />\n";
        // report broken downloads
        echo "<div align='right'>";
        if (iPDP_BROKEN) {
            echo "[ <a href='broken.php?did=" . $id . "'>" . $locale['PDP024'] . "</a> ]<br />";
        }
        // edit link
        if (count($links)) {
            echo "<b>" . $locale['pdp_edit'] . ":</b> [ " . implode(" | ", $links) . " ]";
        }
        echo "</div>\n";
        // files
        if (count($files)) {
            echo '<strong>' . $locale['PDP200'] . ":</strong><ul>\n";
        }
        foreach ($files as $row) {
            echo "<li>" . showdate("shortdate", $row['timestamp']) . " - <b>" . $row['ver'] . " - </b>";
            if ($data['can_download']) {
                echo " <a href='file.php?did=" . $id . "&amp;file_id=" . $row['id'] . "'" . " title='" . $row['url'] . "'>" . trimlink($row['url'], 40) . "</a>";
            } else {
                echo trimlink($row['url'], 40);
            }
            echo " (<span class='small2'>" . $row['size'] . " - " . $row['desc'] . ")</span>" . "</li>\n";
        }
        if (count($files)) {
            echo "</ul>\n";
        }
    }
Exemple #21
0
        echo "<td class='tbl2'><img src='" . get_image("panel_{$p_img}") . "' name='b_" . $data['faq_cat_id'] . "' alt='' onclick=\"javascript:flipBox('" . $data['faq_cat_id'] . "')\" /> " . $data['faq_cat_name'] . "</td>\n";
        echo "<td class='tbl2' align='right' width='80' style='font-weight:normal;'><a href='" . FUSION_SELF . $aidlink . "&amp;action=edit&amp;faq_cat_id=" . $data['faq_cat_id'] . "&amp;t=cat'>" . $locale['542'] . "</a> -\n";
        echo "<a href='" . FUSION_SELF . $aidlink . "&amp;action=delete&amp;faq_cat_id=" . $data['faq_cat_id'] . "&amp;t=cat' onclick=\"return confirm('" . $locale['546'] . "');\">" . $locale['543'] . "</a></td>\n";
        echo "</tr>\n";
        $result2 = dbquery("SELECT faq_id, faq_question, faq_answer FROM " . DB_FAQS . " WHERE faq_cat_id='" . $data['faq_cat_id'] . "' ORDER BY faq_id");
        if (dbrows($result2) != 0) {
            echo "<tr>\n<td colspan='2'>\n";
            echo "<div id='box_" . $data['faq_cat_id'] . "'" . $div . ">\n";
            echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
            while ($data2 = dbarray($result2)) {
                echo "<tr>\n";
                echo "<td class='tbl'><strong>" . $data2['faq_question'] . "</strong></td>\n";
                echo "<td align='right' class='tbl' width='80'><a href='" . FUSION_SELF . $aidlink . "&amp;action=edit&amp;faq_cat_id=" . $data['faq_cat_id'] . "&amp;faq_id=" . $data2['faq_id'] . "&amp;t=faq'>" . $locale['542'] . "</a> -\n";
                echo "<a href='" . FUSION_SELF . $aidlink . "&amp;action=delete&amp;faq_cat_id=" . $data['faq_cat_id'] . "&amp;faq_id=" . $data2['faq_id'] . "&amp;t=faq' onclick=\"return confirm('" . $locale['547'] . "');\">" . $locale['543'] . "</a></td>\n";
                echo "</tr>\n<tr>\n";
                echo "<td colspan='2' class='tbl'>" . trimlink(stripinput($data2['faq_answer']), 60) . "</td>\n";
                echo "</tr>\n";
            }
            echo "</table>\n</div>\n</td>\n</tr>\n";
        } else {
            echo "<tr>\n<td colspan='2'>\n";
            echo "<div id='box_" . $data['faq_cat_id'] . "' style='display:none'>\n";
            echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
            echo "<tr>\n<td class='tbl'>" . $locale['544'] . "</td>\n</tr>\n";
            echo "</table>\n</div>\n</td>\n</tr>\n";
        }
    }
    echo "</table>\n";
} else {
    echo "<div style='text-align:center'>" . $locale['545'] . "<br />\n</div>\n";
}
function showsublinks($sep = "&middot;", $class = "")
{
    global $settings;
    require_once INCLUDES . "mobile.menu.inc.php";
    $mobile_icon = isset($default_mobile_icon) ? $default_mobile_icon : '';
    $sres = dbquery("SELECT link_name, link_url, link_window, link_visibility FROM " . DB_SITE_LINKS . "\r\n\t        " . (multilang_table("SL") ? "WHERE link_language='" . LANGUAGE . "' AND" : "WHERE") . " link_position>='2' ORDER BY link_order");
    $mobile_link = array();
    if (dbrows($sres)) {
        $i = 0;
        if ($settings['bootstrap']) {
            $res = "<nav class='navbar' role='navigation'>\n";
            $res .= "<div class='mobile-menu'>\n<button type='button' class='navbar-toggle collapsed' data-toggle='collapse' data-target='#mp'><i class='entypo menu'></i></button>\n</div>\n";
            $res .= "<div id='mp' class='navbar-collapse collapse'>\n";
            // collect all navbar item.
            $res .= "<ul class='nav navbar-nav hidden-xs'>\n";
        } else {
            $res = "<ul>\n";
        }
        while ($sdata = dbarray($sres)) {
            $mobile_link[$sdata['link_name']] = $sdata['link_url'];
            // order, visibility, language - complied.
            $li_class = $class;
            $i++;
            if ($sdata['link_url'] != "---" && checkgroup($sdata['link_visibility'])) {
                $link_target = $sdata['link_window'] == "1" ? " target='_blank'" : "";
                if ($i == 1) {
                    $li_class .= ($li_class ? " " : "") . "first-link";
                }
                if (START_PAGE == $sdata['link_url']) {
                    $li_class .= ($li_class ? " " : "") . "current-link";
                }
                if (preg_match("!^(ht|f)tp(s)?://!i", $sdata['link_url'])) {
                    $res .= "<li" . ($li_class ? " class='" . $li_class . "'" : "") . ">" . $sep . "<a href='" . $sdata['link_url'] . "'" . $link_target . ">\n";
                    $res .= "<span>" . parseubb($sdata['link_name'], "b|i|u|color|img") . "</span></a></li>\n";
                } else {
                    $res .= "<li" . ($li_class ? " class='" . $li_class . "'" : "") . ">" . $sep . "<a href='" . BASEDIR . $sdata['link_url'] . "'" . $link_target . ">\n";
                    $res .= "<span>" . parseubb($sdata['link_name'], "b|i|u|color|img") . "</span></a></li>\n";
                }
            }
        }
        if ($settings['bootstrap']) {
            $res .= "</ul>\n";
            $res .= "<!--start of mobile menu -->\n";
            $res .= "<div class='hidden-sm hidden-md hidden-lg mobile-panel m-0'>\n";
            $res .= "<div class='mobile-pane'>\n";
            $res .= "<div class='mobile-header'>\n";
            $res .= "<button class='btn mobile-btn-close' data-toggle='collapse' data-target='#mp'>Close</button>\n";
            $res .= "<div class='mobile-header-text text-center'>Navigation</div>";
            $res .= "</div>\n";
            if (count($mobile_link) > 0) {
                $res .= "<div class='row m-0 mobile-body'>\n";
                foreach ($mobile_link as $link_name => $link_url) {
                    $icon = array_key_exists($link_url, $mobile_icon) ? $mobile_icon[$link_url] : 'entypo layout';
                    $res .= "<div class='col-xs-3 mobile-grid text-center'><a href='{$link_url}' class='btn btn-menu btn-block btn-default m-b-10'><i class='" . $icon . "'></i><br/><span class='mobile-text'>" . trimlink($link_name, 10) . "</span></a></div>\n";
                }
                $res .= "</div>\n";
            }
            $res .= "</div>\n";
            $res .= "</div>\n";
            $res .= "<!--end of mobile menu -->\n";
        } else {
            $res .= "</ul>\n";
        }
        $res .= "</div>\n";
        $res .= "</nav>\n";
        return $res;
    }
}
Exemple #23
0
    closetable();
    opentable($locale['402']);
    echo "<table width='400' cellspacing='1' cellpadding='0' class='tbl-border center'>\n";
    $result = dbquery("SELECT download_cat_id, download_cat_name, download_cat_description, download_cat_access FROM " . DB_DOWNLOAD_CATS . " ORDER BY download_cat_name");
    if (dbrows($result) != 0) {
        $i = 0;
        echo "<tr>\n";
        echo "<td class='tbl2'>" . $locale['440'] . "</td>\n";
        echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['441'] . "</td>\n";
        echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['442'] . "</td>\n";
        echo "</tr>\n";
        while ($data = dbarray($result)) {
            $cell_color = $i % 2 == 0 ? "tbl1" : "tbl2";
            echo "<tr>\n";
            echo "<td class='" . $cell_color . "'>" . $data['download_cat_name'] . "\n";
            if ($data['download_cat_description']) {
                echo "<br /><span class='small'>" . trimlink($data['download_cat_description'], 45) . "</span>";
            }
            echo "</td>\n<td align='center' width='1%' class='{$cell_color}' style='white-space:nowrap'>" . getgroupname($data['download_cat_access']) . "</td>\n";
            echo "<td align='center' width='1%' class='{$cell_color}' style='white-space:nowrap'><a href='" . FUSION_SELF . $aidlink . "&amp;action=edit&amp;cat_id=" . $data['download_cat_id'] . "'>" . $locale['443'] . "</a> -\n";
            echo "<a href='" . FUSION_SELF . $aidlink . "&amp;action=delete&amp;cat_id=" . $data['download_cat_id'] . "' onclick=\"return confirm('" . $locale['450'] . "');\">" . $locale['444'] . "</a></td>\n";
            echo "</tr>\n";
            $i++;
        }
        echo "</table>\n";
    } else {
        echo "<tr><td align='center' class='tbl1'>" . $locale['445'] . "</td></tr>\n</table>\n";
    }
    closetable();
}
require_once THEMES . "templates/footer.php";
Exemple #24
0
    $i = 0;
    opentable($locale['global_042']);
    echo "<table cellpadding='0' cellspacing='0' 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 width='100%' class='tbl2'><strong>" . $locale['global_044'] . "</strong></td>\n";
    echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><strong>" . $locale['global_049'] . "</strong></td>\n";
    echo "</tr>\n";
    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'>" . trimlink($data['forum_name'], 30) . "</td>\n";
        echo "<td width='100%' class='" . $row_color . "'><a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&amp;pid=" . $data['post_id'] . "#post_" . $data['post_id'] . "' title='" . $data['thread_subject'] . "'>" . trimlink($data['thread_subject'], 40) . "</a></td>\n";
        echo "<td align='center' width='1%' class='" . $row_color . "' style='white-space:nowrap'>" . showdate("forumdate", $data['post_datestamp']) . "</td>\n";
        echo "</tr>\n";
        $i++;
    }
    echo "</table>\n";
    closetable();
    if ($rows > 20) {
        echo "<div align='center' style='margin-top:5px;'>\n" . makepagenav($_GET['rowstart'], 20, $rows, 3) . "\n</div>\n";
    }
} else {
    opentable($locale['global_042']);
    echo "<div style='text-align:center'><br />\n" . $locale['global_054'] . "<br /><br />\n</div>\n";
    closetable();
}
require_once THEMES . "templates/footer.php";
Exemple #25
0
    closetable();
    opentable($locale['402']);
    echo "<table cellpadding='0' cellspacing='1' width='400' class='table table-responsive tbl-border center'>\n<thead>\n";
    $result = dbquery("SELECT weblink_cat_id, weblink_cat_name, weblink_cat_description, weblink_cat_access, weblink_cat_language FROM " . DB_WEBLINK_CATS . " " . (multilang_table("WL") ? "WHERE weblink_cat_language='" . LANGUAGE . "'" : "") . " ORDER BY weblink_cat_name");
    if (dbrows($result) != 0) {
        $i = 0;
        echo "<tr>\n";
        echo "<th class='tbl2'>" . $locale['430'] . "</th>\n";
        echo "<th align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['431'] . "</th>\n";
        echo "<th align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['532'] . "</th>\n";
        echo "</tr>\n";
        echo "</thead>\n<tbody>\n";
        while ($data = dbarray($result)) {
            $cell_color = $i % 2 == 0 ? "tbl1" : "tbl2";
            echo "<tr>\n";
            echo "<td class='{$cell_color}'><strong>" . $data['weblink_cat_name'] . "</strong>\n";
            echo ($data['weblink_cat_description'] ? "<br />\n<span class='small'>" . trimlink($data['weblink_cat_description'], 45) . "</span>" : "") . "</td>\n";
            echo "<td align='center' width='1%' class='{$cell_color}' style='white-space:nowrap'>" . getgroupname($data['weblink_cat_access']) . "</td>\n";
            echo "<td align='center' width='1%' class='{$cell_color}' style='white-space:nowrap'><a href='" . FUSION_SELF . $aidlink . "&amp;action=edit&amp;cat_id=" . $data['weblink_cat_id'] . "'>" . $locale['533'] . "</a> -\n";
            echo "<a href='" . FUSION_SELF . $aidlink . "&amp;action=delete&amp;cat_id=" . $data['weblink_cat_id'] . "' onclick=\"return confirm('" . $locale['440'] . "');\">" . $locale['534'] . "</a></td>\n";
            echo "</tr>\n";
            $i++;
        }
        echo "</tbody>\n";
        echo "</table>\n";
    } else {
        echo "<tr><td align='center' class='tbl1'>" . $locale['536'] . "</td></tr>\n</table>\n";
    }
    closetable();
}
require_once THEMES . "templates/footer.php";
Exemple #26
0
 echo "<td class='tbl2 forum-stats'>\n";
 echo "<dl class='threads-count'><dt class='flleft'>" . $locale['402'] . ":</dt> <dd class='flright'>" . $data['forum_threadcount'] . "</dd></dl>\n";
 echo "<dl class='posts-count'><dt class='flleft'>" . $locale['403'] . ":</dt> <dd class='flright'>" . $data['forum_postcount'] . "</dd></dl>\n</td>\n";
 echo "<td class='tbl1 forum-lastpost'>";
 if ($data['forum_lastpost'] == 0) {
     echo $locale['405'] . "</td>\n</tr>\n";
 } else {
     // Show avatar of the last user that made a post
     if ($settings['forum_last_post_avatar'] == 1) {
         $avatar = IMAGES . "avatars/noavatar50.png";
         if ($data['user_avatar'] && file_exists(IMAGES . "avatars/" . $data['user_avatar']) && $data['user_status'] != 6 && $data['user_status'] != 5) {
             $avatar = IMAGES . "avatars/" . $data['user_avatar'];
         }
         echo "<div class='lastpost-avatar flleft'><img src='" . $avatar . "' alt='" . $locale['567'] . "' /></div>\n";
     }
     echo "<a class='lastpost-title' href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "' title='" . $data['thread_subject'] . "'>" . trimlink($data['thread_subject'], 25) . "</a> ";
     echo "<a class='lastpost-goto' href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&amp;pid=" . $data['thread_lastpostid'] . "#post_" . $data['thread_lastpostid'] . "' title='" . $data['thread_subject'] . "'>";
     if ($data['forum_lastpost'] > $lastvisited) {
         if (iMEMBER && preg_match("({$forum_match}\\.|{$forum_match}\$)", $userdata['user_threads'])) {
             $fim = "<img src='" . get_image("lastpost") . "' alt='" . $locale['404'] . "' title='" . $locale['404'] . "' />";
         } else {
             $fim = "<img src='" . get_image("lastpostnew") . "' alt='" . $locale['404'] . "' title='" . $locale['404'] . "' />";
         }
     } else {
         $fim = "<img src='" . get_image("lastpost") . "' alt='" . $locale['404'] . "' title='" . $locale['404'] . "' />";
     }
     echo $fim;
     echo "</a><br />\n";
     echo "<span class='lastpost-user small'>" . profile_link($data['forum_lastuser'], $data['user_name'], $data['user_status']) . "</span><br />\n";
     echo "<span class='lastpost-date small'>" . showdate("forumdate", $data['forum_lastpost']) . "</span></td>\n";
     echo "</tr>\n";
                if ($access > 0) {
                    $comment = trimlink($data['comment_message'], 23);
                    $commentStart = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $data['comment_item_id'] . "' AND comment_type='C' AND comment_id<=" . $data['comment_id']);
                    if ($commentStart > $settings['comments_per_page']) {
                        $commentStart = "&amp;c_start=" . floor($commentStart / $settings['comments_per_page']) * $settings['comments_per_page'];
                    } else {
                        $commentStart = "";
                    }
                    $output .= THEME_BULLET . " <a href='" . BASEDIR . "viewpage.php?page_id=" . $data['comment_item_id'] . $commentStart . "#c" . $data['comment_id'] . "' title='" . $comment . "' class='side'>" . $comment . "</a><br />\n";
                    $i++;
                }
                continue;
            case "D":
                $access = dbquery("\tSELECT download_id FROM " . DB_DOWNLOADS . " d, " . DB_DOWNLOAD_CATS . " c WHERE\n\t\t\t\t\t\t\t\t\td.download_id='" . $data['comment_item_id'] . "' AND\n\t\t\t\t\t\t\t\t\td.download_cat=c.download_cat_id AND\n\t\t\t\t\t\t\t\t\t" . groupaccess('c.download_cat_access'));
                if (dbrows($access) > 0) {
                    $comment = trimlink($data['comment_message'], 23);
                    $commentStart = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $data['comment_item_id'] . "' AND comment_type='D' AND comment_id<=" . $data['comment_id']);
                    if ($commentStart > $settings['comments_per_page']) {
                        $commentStart = "&amp;c_start=" . floor($commentStart / $settings['comments_per_page']) * $settings['comments_per_page'];
                    } else {
                        $commentStart = "";
                    }
                    $output .= THEME_BULLET . " <a href='" . BASEDIR . "downloads.php?download_id=" . $data['comment_item_id'] . $commentStart . "#c" . $data['comment_id'] . "' title='" . $comment . "' class='side'>" . $comment . "</a><br />\n";
                    $i++;
                }
                continue;
        }
    }
    echo $output;
} else {
    echo "<div style='text-align:center'>" . $locale['global_026'] . "</div>\n";
         $thread_match = $data['thread_id'] . "\\|" . $data['thread_lastpost'] . "\\|" . $data['forum_id'];
         if (iMEMBER && ($data['thread_lastuser'] == $userdata['user_id'] || preg_match("(^\\.{$thread_match}\$|\\.{$thread_match}\\.|\\.{$thread_match}\$)", $userdata['user_threads']))) {
             echo "<img src='" . get_image("folder") . "' alt='' />";
         } else {
             echo "<img src='" . get_image("foldernew") . "' alt='' />";
         }
     } else {
         echo "<img src='" . get_image("folder") . "' alt='' />";
     }
     if ($data['thread_poll']) {
         $thread_poll = "<span class='small' style='font-weight:bold'>[" . $locale['global_051'] . "]</span> ";
     } else {
         $thread_poll = "";
     }
     echo "</td>\n";
     echo "<td width='100%' class='" . $row_color . "'>" . $thread_poll . "<a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&amp;pid=" . $data['thread_lastpostid'] . "#post_" . $data['thread_lastpostid'] . "' title='" . $data['thread_subject'] . "'>" . trimlink($data['thread_subject'], 30) . "</a><br />\n" . $data['forum_name'] . "</td>\n";
     echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . $data['thread_views'] . "</td>\n";
     echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . ($data['thread_postcount'] - 1) . "</td>\n";
     echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . profile_link($data['thread_lastuser'], $data['user_name'], $data['user_status']) . "<br />\n" . showdate("forumdate", $data['thread_lastpost']) . "</td>\n";
     echo "</tr>\n";
     $i++;
 }
 echo "</table>\n";
 if (iMEMBER) {
     echo "<div class='tbl1' style='text-align:center'><a href='" . INFUSIONS . "forum_threads_list_panel/my_threads.php'>" . $locale['global_041'] . "</a> ::\n";
     echo "<a href='" . INFUSIONS . "forum_threads_list_panel/my_posts.php'>" . $locale['global_042'] . "</a> ::\n";
     echo "<a href='" . INFUSIONS . "forum_threads_list_panel/new_posts.php'>" . $locale['global_043'] . "</a>";
     if ($settings['thread_notify']) {
         echo " ::\n<a href='" . INFUSIONS . "forum_threads_list_panel/my_tracked_threads.php'>" . $locale['global_056'] . "</a>";
     }
     echo "</div>\n";
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) {
    die("Access Denied");
}
openside($locale['global_020']);
echo "<div class='side-label'><strong>" . $locale['global_021'] . "</strong></div>\n";
$result = dbquery("\r\n\tSELECT tt.forum_id, tt.thread_id, tt.thread_subject, tt.thread_lastpost FROM " . DB_THREADS . " tt\r\n\tINNER JOIN " . DB_FORUMS . " tf ON tt.forum_id=tf.forum_id\r\n\tWHERE " . groupaccess('forum_access') . " ORDER BY thread_lastpost DESC LIMIT 5\r\n");
if (dbrows($result)) {
    while ($data = dbarray($result)) {
        $itemsubject = trimlink($data['thread_subject'], 23);
        echo THEME_BULLET . " <a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "' title='" . $data['thread_subject'] . "' class='side'>{$itemsubject}</a><br />\n";
    }
} else {
    echo "<div style='text-align:center'>" . $locale['global_023'] . "</div>\n";
}
echo "<div class='side-label'><strong>" . $locale['global_022'] . "</strong></div>\n";
list($min_posts) = dbarraynum(dbquery("SELECT thread_postcount FROM " . DB_THREADS . " ORDER BY thread_postcount DESC LIMIT 4,5"));
$result = dbquery("\r\n\tSELECT tf.forum_id, tt.thread_id, tt.thread_subject, tt.thread_postcount\r\n\tFROM " . DB_FORUMS . " tf\r\n\tINNER JOIN " . DB_THREADS . " tt USING(forum_id)\r\n\tWHERE " . groupaccess('forum_access') . " AND tt.thread_postcount >= '{$min_posts}'\r\n\tORDER BY thread_postcount DESC, thread_lastpost DESC LIMIT 5\r\n");
if (dbrows($result) != 0) {
    echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
    while ($data = dbarray($result)) {
        $itemsubject = trimlink($data['thread_subject'], 20);
        echo "<tr>\n<td class='side-small'>" . THEME_BULLET . " <a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "' title='" . $data['thread_subject'] . "' class='side'>{$itemsubject}</a></td>\n";
        echo "<td align='right' class='side-small'>[" . ($data['thread_postcount'] - 1) . "]</td>\n</tr>\n";
    }
    echo "</table>\n";
} else {
    echo "<div style='text-align:center'>" . $locale['global_023'] . "</div>\n";
}
closeside();
    echo "</tr>\n";
    while ($data = dbarray($result)) {
        $row_color = $i % 2 == 0 ? "tbl1" : "tbl2";
        echo "<tr>\n";
        if ($data['thread_lastpost'] > $lastvisited) {
            $thread_match = $data['thread_id'] . "\\|" . $data['thread_lastpost'] . "\\|" . $data['forum_id'];
            if (iMEMBER && ($data['thread_lastuser'] == $userdata['user_id'] || preg_match("(^\\.{$thread_match}\$|\\.{$thread_match}\\.|\\.{$thread_match}\$)", $userdata['user_threads']))) {
                $boldynew = false;
            } else {
                $boldynew = true;
            }
        } else {
            $boldynew = false;
        }
        echo "<td style='margin: 0px; font-size: 7pt; white-space: normal;' class='" . $row_color . "'>" . ($boldynew ? '<b>' : '') . "<a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&amp;pid=" . $data['thread_lastpostid'] . "#post_" . $data['thread_lastpostid'] . "' title='" . $data['thread_subject'] . "'>" . trimlink(preg_replace('/([^\\s]{15})([^\\s]+)/', '$1 $2 ', $data['thread_subject']), 70) . "</a><br />\n" . $data['forum_name'] . ($boldynew ? '</b>' : '') . "</td>\n";
        $usernamestuff1 = alias2($data['thread_lastpost_alias'], trimlink(alias1($data['user_aliases']), 25), $data['thread_lastuser'], trimlink($data['user_name'], 14), $data['user_status'], TRUE);
        echo "<td class='" . $row_color . "' style='text-align:center; margin: 0px; font-size: 7pt; white-space: normal;'>" . $usernamestuff1 . "<br />\n" . showdate("<span title='%d-%m-%y'>%H:%M:%S</span>", $data['thread_lastpost']) . "</td>\n";
        echo "</tr>\n";
        $i++;
    }
    echo "</table>\n";
}
echo "<div style='clear: both;'></div>";
if (iMEMBER) {
    echo "<div class='tbl1' style='text-align:center'><a href='" . INFUSIONS . "latest_forumactivity_panel/my_threads.php'>" . $locale['global_041'] . "</a> ::\n";
    echo "<a href='" . INFUSIONS . "latest_forumactivity_panel/my_posts.php'>" . $locale['global_042'] . "</a> ::\n";
    echo "<a href='" . INFUSIONS . "latest_forumactivity_panel/new_posts.php'>" . $locale['global_043'] . "</a>";
    if ($settings['thread_notify']) {
        echo " ::\n<a href='" . INFUSIONS . "latest_forumactivity_panel/my_tracked_threads.php'>" . $locale['global_056'] . "</a>";
    }
    echo "</div>\n";