示例#1
0
function awec_post_process_events(&$events, &$out)
{
    global $ec_today, $ec_tomorrow, $locale, $awec_settings;
    $count = 0;
    $current = 'others';
    $path_event = INFUSIONS . 'aw_ecal_panel/view_event.php?id=';
    $path_birthday = INFUSIONS . 'aw_ecal_panel/birthday.php?id=';
    $show_details = $awec_settings['show_today_in_panel'] ? true : false;
    foreach ($events as $year => $y_data) {
        ksort($y_data, SORT_NUMERIC);
        foreach ($y_data as $month => $m_data) {
            ksort($m_data, SORT_NUMERIC);
            $today_month = $ec_today['mon'] == $month && $ec_today['year'] == $year;
            $tomorrow_month = $ec_tomorrow['mon'] == $month && $ec_tomorrow['year'] == $year;
            foreach ($m_data as $mday => $d_data) {
                if ($today_month && $ec_today['mday'] == $mday) {
                    $current = 'today';
                } else {
                    if ($tomorrow_month && $ec_tomorrow['mday'] == $mday) {
                        $current = 'tomorrow';
                    } else {
                        $current = 'others';
                    }
                }
                foreach ($d_data as $ev) {
                    $item = '';
                    if ($current != 'others') {
                        if ($ev['start_time']) {
                            $item .= $ev['start_time'];
                            if ($ev['end_time']) {
                                $item .= '-' . $ev['end_time'];
                            }
                            $item .= ' ';
                        }
                    } else {
                        $item .= ec_format_fucking_date($year, $month, $mday) . ' ';
                    }
                    if ($ev['is_birthday']) {
                        $path = $path_birthday . $ev['user_id'];
                    } else {
                        $path = $path_event . $ev['ev_id'];
                    }
                    $item .= '<a href="' . $path . '">' . $ev['ev_title'] . '</a>';
                    if ($show_details && $current == 'today') {
                        $body = parseubb($ev['ev_body']);
                        $body = explode(stripinput(AWEC_BREAK), $body);
                        if (count($body) > 1) {
                            $body[0] .= ' <a href="' . $path . '">' . $locale['EC207'] . '</a>';
                        }
                        $item .= '<br /><span class="small2">' . $body[0] . '</span>';
                    }
                    $out[$current][] = $item;
                    ++$count;
                }
            }
        }
    }
    return $count;
}
            include INFUSIONS . "ss_feeds_panel/locale/English/feeds/" . $data['feed_name'] . ".php";
        }
        include INFUSIONS . "ss_feeds_panel/feeds/" . $data['feed_name'] . "_var.php";
        $feed_icon = makefilelist(INFUSIONS . "ss_feeds_panel/images/icon/", "index.php", true, "files");
        foreach ($feed_icon as $icon) {
            $aicon = "<a href='" . INFUSIONS . "ss_feeds_panel/rss/" . $data['feed_name'] . ".rss' target='_blank'><img src='" . INFUSIONS . "ss_feeds_panel/images/icon/" . $icon . "' title='" . $feed_title . "' alt='" . $feed_title . "' style='border: 0pt none;' /></a>\n";
            $acheck = "&nbsp;<input type='radio' name='feed_icon' value='" . $icon . "' class='textbox' " . ($icon == $data['feed_icon'] ? " checked='checked'" : "") . " onclick='submit();' />" . $locale['ssfp_010'];
            $code = "";
            $code .= "[code]";
            $code .= "rss_icon(\"" . $data['feed_name'] . "\", " . $updfrq . ", \"" . $icon . "\");\n";
            $code .= "[/code]";
            echo "\t<tr>\n";
            echo "\t\t<td class='tbl2' style='white-space:nowrap'>" . $aicon . $acheck . "</td>\n";
            echo "\t</tr>\n";
            echo "\t<tr>\n";
            echo "\t\t<td class='tbl1' style='white-space:nowrap'>" . nl2br(parseubb(stripinput($code))) . "</td>\n";
            echo "\t</tr>\n";
        }
    }
    echo "</table>\n";
    echo "</form>\n";
} else {
    opentable($locale['ssfp_005']);
    echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border center'>\n";
    echo "\t<tr>\n";
    echo "\t\t<td align='center' class='tbl1'>" . $locale['ssfp_102'] . "</td>\n";
    echo "\t</tr>\n";
    echo "</table>\n";
}
echo "<br /><br /><div align='center'><strong><a href='javascript:window.close();'>" . $locale['ssfp_008'] . "</a></strong></div>\n";
closetable();
                echo "<h2>" . parseubb($navigation_cache[$i]['link_name'], "b|i|u|color") . "</h2>\n";
            } elseif ($navigation_cache[$i]['link_name'] == "---" && $navigation_cache[$i]['link_url'] == "---") {
                if ($list_open) {
                    echo "</ul>\n";
                    $list_open = false;
                }
                echo "<hr class='side-hr' />\n";
            } else {
                if (!$list_open) {
                    echo "<ul>\n";
                    $list_open = true;
                }
                $link_target = $navigation_cache[$i]['link_window'] == "1" ? " target='_blank'" : "";
                if (strstr($navigation_cache[$i]['link_url'], "http://") || strstr($navigation_cache[$i]['link_url'], "https://")) {
                    echo "<li><a href='" . $navigation_cache[$i]['link_url'] . "'" . $link_target . " class='side'>" . THEME_BULLET . " <span>" . parseubb($navigation_cache[$i]['link_name'], "b|i|u|color") . "</span></a></li>\n";
                } elseif (URL_REWRITE && $navigation_cache[$i]['link_seo_url'] != '') {
                    echo "<li><a href='" . BASEDIR . $navigation_cache[$i]['link_seo_url'] . "'" . $link_target . " class='side'>" . THEME_BULLET . " <span>" . parseubb($navigation_cache[$i]['link_name'], "b|i|u|color") . "</span></a></li>\n";
                } else {
                    echo "<li><a href='" . BASEDIR . $navigation_cache[$i]['link_url'] . "'" . $link_target . " class='side'>" . THEME_BULLET . " <span>" . parseubb($navigation_cache[$i]['link_name'], "b|i|u|color") . "</span></a></li>\n";
                }
            }
        }
    }
    if ($list_open) {
        echo "</ul>\n";
    }
    echo "</div>\n";
} else {
    echo $locale['global_002'];
}
closeside();
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;
    }
}
示例#5
0
     if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) {
         $_GET['rowstart'] = 0;
     }
     $result = dbquery("SELECT fp.post_message, fp.post_datestamp, fp.post_edittime, fp.post_author, fp.post_edituser,\n                fu.user_name AS user_name, fu.user_status AS user_status, fe.user_name AS edit_name, fe.user_status AS edit_status,\n                ft.thread_subject, ff.forum_access\n                FROM " . DB_FORUM_THREADS . " ft\n                INNER JOIN " . DB_FORUM_POSTS . " fp ON ft.thread_id = fp.thread_id\n                INNER JOIN " . DB_FORUMS . " ff ON ff.forum_id = ft.forum_id\n                INNER JOIN " . DB_USERS . " fu ON fu.user_id = fp.post_author\n                LEFT JOIN " . DB_USERS . " fe ON fe.user_id = fp.post_edituser\n                WHERE ft.thread_id=" . $_GET['item_id'] . "\n                ORDER BY fp.post_datestamp\n                LIMIT " . $_GET['rowstart'] . ",{$posts_per_page}");
     $res = FALSE;
     $i = 0;
     if (dbrows($result)) {
         while ($data = dbarray($result)) {
             if (checkgroup($data['forum_access'])) {
                 $res = TRUE;
                 if ($i == 0) {
                     echo $locale['500'] . " <strong>" . $settings['sitename'] . " :: " . $data['thread_subject'] . "</strong><hr /><br />\n";
                 }
                 echo "<div style='margin-left:20px'>\n";
                 echo "<div style='float:left'>" . $locale['501'] . profile_link($data['post_author'], $data['user_name'], $data['user_status']) . $locale['502'] . showdate("forumdate", $data['post_datestamp']) . "</div><div style='float:right'>#" . ($i + 1) . "</div><div style='float:none;clear:both'></div><hr />\n";
                 echo nl2br(parseubb(parsesmileys($data['post_message'])));
                 if ($data['edit_name'] != '') {
                     echo "<div style='margin-left:20px'>\n<hr />\n";
                     echo $locale['503'] . profile_link($data['post_edituser'], $data['edit_name'], $data['edit_status']) . $locale['502'] . showdate("forumdate", $data['post_edittime']);
                     echo "</div>\n";
                 }
                 echo "</div>\n";
                 echo "<br />\n";
                 $i++;
             }
         }
     }
     if (!$res) {
         redirect($settings['opening_page']);
     }
 }
示例#6
0
function navigation($main_menu = true)
{
    if ($main_menu) {
        $link = Cache::read('navigation');
        if (!$link) {
            $result = dbquery("SELECT link_name, link_url, link_window, link_visibility FROM " . DB_SITE_LINKS . "\r\n\t\t\t\t WHERE link_position='3' ORDER BY link_order");
            $link = array();
            while ($data = dbarray($result)) {
                $link[] = $data;
            }
            Cache::write('navigation', $link);
        }
        echo "<ul>\n";
        foreach ($link as $data) {
            if (checkgroup($data['link_visibility'])) {
                $link_target = $data['link_window'] == "1" ? " target='_blank'" : "";
                $li_class = preg_match("/^" . preg_quote(START_PAGE, '/') . "/i", $data['link_url']) ? " class='current'" : "";
                if (strstr($data['link_name'], "%submenu% ")) {
                    echo "        <li{$li_class}><a href='/" . $data['link_url'] . "'{$link_target}><span>" . parseubb(str_replace("%submenu% ", "", $data['link_name']), "b|i|u|color") . "</span></a>\n        <ul class='children'>\n";
                } elseif (strstr($data['link_name'], "%endmenu% ")) {
                    echo "        <li{$li_class}><a href='/" . $data['link_url'] . "'{$link_target}><span>" . parseubb(str_replace("%endmenu% ", "", $data['link_name']), "b|i|u|color") . "</span></a></li>\n        </ul>\n        </li>\n";
                } elseif (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) {
                    echo "        <li{$li_class}><a href='" . $data['link_url'] . "'{$link_target}><span>" . parseubb($data['link_name'], "b|i|u|color") . "</span></a></li>\n";
                } else {
                    echo "        <li{$li_class}><a href='/" . $data['link_url'] . "'{$link_target}><span>" . parseubb($data['link_name'], "b|i|u|color") . "</span></a></li>\n";
                }
            }
        }
        echo "      </ul>\n";
    } else {
        $link = Cache::read('footer');
        $list_open = false;
        if (!$link) {
            $result = dbquery("SELECT link_name, link_url, link_window, link_visibility FROM " . DB_SITE_LINKS . "\r\n\t\t\t\t WHERE link_position='1' ORDER BY link_order");
            $link = array();
            while ($data = dbarray($result)) {
                $link[] = $data;
            }
            Cache::write('footer', $link);
        }
        foreach ($link as $data) {
            if (checkgroup($data['link_visibility'])) {
                if ($data['link_name'] != "---" && $data['link_url'] == "---") {
                    if ($list_open) {
                        echo "\t\t\t</ul>\n\t\t</div>\n";
                        $list_open = false;
                    }
                    echo "\t\t<div class='footer grid_4'>\n\t\t\t<h3>" . parseubb($data['link_name'], "b|i|u|color") . "</h3>\n";
                } elseif ($data['link_name'] == "---" && $data['link_url'] == "---") {
                    echo "\t\t\t\t<li>Method does not exist anymore</li>\n";
                } else {
                    if (!$list_open) {
                        echo "\t\t\t<ul>\n";
                        $list_open = true;
                    }
                    $link_target = $data['link_window'] == "1" ? " target='_blank'" : "";
                    if (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) {
                        echo "\t\t\t\t<li><a href='" . $data['link_url'] . "'" . $link_target . "><span>" . parseubb($data['link_name'], "b|i|u|color") . "</span></a></li>\n";
                    } else {
                        echo "\t\t\t\t<li><a href='/" . $data['link_url'] . "'" . $link_target . "><span>" . parseubb($data['link_name'], "b|i|u|color") . "</span></a></li>\n";
                    }
                }
            }
        }
        if ($list_open) {
            echo "\t\t\t</ul>\n\t\t</div>\n";
        }
    }
}
 $rows = dbcount("(photo_id)", DB_PHOTOS, "album_id='" . (int) $_GET['album_id'] . "'");
 add_to_title($locale['global_201'] . $data['album_title']);
 opentable($locale['420']);
 echo "<!--pre_album_info-->";
 echo "<table cellpadding='0' cellspacing='0' width='80%' class='center'>\n<tr>\n";
 echo "<td rowspan='2' align='center' class='tbl1 photogallery_album_thumb'><!--photogallery_album_thumb-->";
 if ($data['album_thumb'] && file_exists(PHOTOS . $data['album_thumb'])) {
     echo "<img src='" . PHOTOS . $data['album_thumb'] . "' alt='" . $data['album_thumb'] . "' />";
 } elseif (file_exists(PHOTOS . "nophoto.jpg")) {
     echo "<img src='" . PHOTOS . "nophoto.jpg' alt='" . $locale['432'] . "' title='" . $locale['432'] . "' style='border:0px' />";
 } else {
     echo $locale['432'];
 }
 echo "</td>\n";
 echo "<td valign='top' width='100%'><div class='tbl2' style='font-weight:bold;vertical-align:top'>" . $locale['421'] . $data['album_title'] . "</div>\n";
 echo "<div class='tbl1 photogallery_album_desc' style='vertical-align:middle'><!--photogallery_album_desc-->" . nl2br(parseubb($data['album_description'])) . "</div>\n</td>\n</tr>\n";
 echo "<tr>\n<td valign='bottom' width='100%'>\n<div class='tbl2' style='vertical-align:bottom'>\n";
 if ($rows) {
     $pdata = dbarray(dbquery("\r\n\t\t\t\t\tSELECT tp.photo_datestamp, tu.user_id, tu.user_name, tu.user_status\r\n\t\t\t\t\tFROM " . DB_PHOTOS . " tp\r\n\t\t\t\t\tLEFT JOIN " . DB_USERS . " tu ON tp.photo_user=tu.user_id\r\n\t\t\t\t\tWHERE album_id='" . (int) $_GET['album_id'] . "' ORDER BY photo_datestamp DESC LIMIT 1"));
     echo $locale['422'] . "{$rows}<br />\n";
     echo $locale['423'] . profile_link($pdata['user_id'], $pdata['user_name'], $pdata['user_status']) . "" . $locale['424'] . showdate("longdate", $pdata['photo_datestamp']) . "\n";
 } else {
     echo $locale['425'] . "\n";
 }
 echo "</div>\n</td>\n</tr>\n</table>";
 echo "<!--sub_album_info-->";
 closetable();
 //Pimped subcategories begin
 $subs = dbcount("(album_id)", DB_PHOTO_ALBUMS, groupaccess('album_access') . " AND album_parent='" . $_GET['album_id'] . "'");
 if (!isset($_GET['page']) || !isnum($_GET['page'])) {
     $_GET['page'] = 0;
示例#8
0
文件: vis.php 项目: necrophcodr/Muks
}
echo '<table style="width: 100%;"  class="tbl-border forum_thread_table">';
if ($blogarr = dbarray($bloglist)) {
    echo '
<tr>
<td style="width: 25%;" class="tbl2 forum-caption">' . showdate('forumdate', $blogarr['bp_timestamp']) . '</td>
<td style="width: 75%;" class="tbl2 forum-caption">' . $blogarr['bp_title'] . '</td>
</tr>
<tr>
<td style="width: 25%;" class="tbl2 forum-caption">
' . profile_link($blogarr['bp_author'], $blogarr['user_name'], $blogarr['user_status']) . '<br />';
    if ($blogarr['user_avatar'] && file_exists(IMAGES . "avatars/" . $blogarr['user_avatar']) && $blogarr['user_status'] != 6 && $blogarr['user_status'] != 5) {
        echo "<img src='" . IMAGES . "avatars/" . $blogarr['user_avatar'] . "' alt='Avatar' /><br /><br />\n";
    }
    echo 'Antal blogindlæg: ' . $blogarr['user_blog'] . '<br />
<a href="/blog/liste.php?list=' . $blogarr['user_id'] . '">Se blog</a>
' . (iADMIN || $blogarr['user_id'] == $userdata['user_id'] ? '<br /><a href="/blog/slet.php?id=' . $blogarr['bp_id'] . '" onclick="return confirm(\'Er du sikker på, du vil slette dette indlæg?\')">Slet indlæg</a>' : '') . '
<br /><a href="/report.php?action=new&amp;bp_id=' . $blogarr['bp_id'] . '">Anmeld</a>
</td>
<td style="width: 75%;" class="tbl1">' . nl2br(parseubb(phpentities($blogarr['bp_content']))) . '</td>
</tr>
<tr>
<td colSpan="2" style="width: 5px;">&nbsp;</td>
</tr>
';
} else {
    echo 'Indlægget kunne ikke findes.';
}
echo '</table>';
closetable();
require_once THEMES . "templates/footer.php";
示例#9
0
 } else {
     $udata = dbarray(dbquery("SELECT user_id, user_name, user_status FROM " . DB_USERS . " WHERE user_id='" . $_GET['msg_send'] . "'"));
     echo "<input type='hidden' name='msg_send' value='" . $udata['user_id'] . "' />\n";
     echo profile_link($udata['user_id'], $udata['user_name'], $udata['user_status']) . "\n";
 }
 echo "</td>\n<td class='tbl1' align='right'>\n";
 if (iADMIN && !isset($_GET['msg_id'])) {
     echo "<label><input name='chk_sendtoall' type='checkbox' " . $sendtoall_chk . " />\n";
     echo "" . $locale['434'] . ":</label> <select name='msg_to_group' class='textbox'>\n" . $user_types . "</select>\n";
 }
 echo "</td>\n</tr>\n";
 echo "<tr>\n<td align='right' class='tbl2' style='white-space:nowrap'>" . $locale['405'] . ":</td>\n";
 echo "<td class='tbl1' colspan='2'><input type='text' name='subject' value='" . $subject . "' maxlength='32' class='textbox' style='width:250px;' /></td>\n</tr>\n";
 if ($reply_message) {
     echo "<tr>\n<td align='right' class='tbl2' valign='top' style='white-space:nowrap'>" . $locale['422'] . ":</td>\n";
     echo "<td class='tbl1' colspan='2'>" . nl2br(parseubb($reply_message)) . "</td>\n</tr>\n";
 }
 echo "<tr>\n<td align='right' class='tbl2' valign='top' style='white-space:nowrap'>" . ($reply_message ? $locale['433'] : $locale['422']) . ":</td>\n";
 echo "<td class='tbl1' colspan='2'><textarea name='message' cols='75' rows='15' class='textbox' style='width:98%'>" . $message . "</textarea></td>\n</tr>\n";
 echo "<tr>\n<td align='right' class='tbl2' valign='top'></td>\n<td class='tbl1' colspan='2'>\n";
 echo display_bbcodes("98%", "message") . "</td>\n</tr>\n";
 echo "<tr>\n<td align='right' class='tbl2' valign='top' style='white-space:nowrap'>" . $locale['425'] . ":</td>\n";
 echo "<td class='tbl1' colspan='2'>\n<label><input type='checkbox' name='chk_disablesmileys' value='y'" . $disablesmileys_chk . " />" . $locale['427'] . "</label></td>\n</tr>\n";
 echo "</table>\n";
 echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n";
 echo "<tr>\n<td class='tbl'><a href='" . FUSION_SELF . "?folder=inbox'>" . $locale['435'] . "</a></td>\n";
 echo "<td align='right' class='tbl'>\n<input type='submit' name='send_preview' value='" . $locale['429'] . "' class='button' />\n";
 echo "<input type='submit' name='send_message' value='" . $locale['430'] . "' class='button' />\n</td>\n</tr>\n";
 echo "</table>\n</form>\n";
 closetable();
 echo "<script type='text/javascript'>\n";
示例#10
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");
}
示例#11
0
/**
 * @param $comment_type - abbr or short ID
 * @param $comment_db - Current Application DB - DB_BLOG for example.
 * @param $comment_col - current sql primary key column - 'blog_id' for example
 * @param $comment_item_id - current sql primary key value '$_GET['blog_id']' for example
 * @param $clink - current page link 'FUSION_SELF' is ok.
 */
function showcomments($comment_type, $comment_db, $comment_col, $comment_item_id, $clink)
{
    global $settings, $locale, $userdata, $aidlink;
    $link = FUSION_SELF . (FUSION_QUERY ? "?" . FUSION_QUERY : "");
    $link = preg_replace("^(&amp;|\\?)c_action=(edit|delete)&amp;comment_id=\\d*^", "", $link);
    $_GET['comment'] = isset($_GET['comment']) && isnum($_GET['comment']) ? $_GET['comment'] : 0;
    $cpp = $settings['comments_per_page'];
    if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "delete") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
        if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_name='" . $userdata['user_id'] . "'")) {
            $result = dbquery("DELETE FROM " . DB_COMMENTS . "\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : "\n\t\t\t\tAND comment_name='" . $userdata['user_id'] . "'"));
        }
        redirect($clink . ($settings['comments_sorting'] == "ASC" ? "" : "&amp;c_start=0"));
    }
    if ($settings['comments_enabled'] == "1") {
        if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) {
            if (!iMEMBER && $settings['guestpost'] == 1) {
                if (!isset($_POST['comment_name'])) {
                    redirect($link);
                }
                if (isnum($_POST['comment_name'])) {
                    $_POST['comment_name'] = '';
                }
                $_CAPTCHA_IS_VALID = FALSE;
                include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_check.php";
                if (!isset($_POST['captcha_code']) || $_CAPTCHA_IS_VALID == FALSE) {
                    redirect($link);
                }
            }
            $comment_data = array('comment_id' => isset($_GET['comment_id']) && isnum($_GET['comment_id']) ? $_GET['comment_id'] : 0, 'comment_name' => iMEMBER ? $userdata['user_id'] : form_sanitizer($_POST['comment_name'], '', 'comment_name'), 'comment_message' => form_sanitizer($_POST['comment_message'], '', 'comment_message'), 'comment_datestamp' => time(), 'comment_item_id' => $comment_item_id, 'comment_type' => $comment_type, 'comment_cat' => 0, 'comment_ip' => USER_IP, 'comment_ip_type' => USER_IP_TYPE, 'comment_hidden' => 0);
            if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && $comment_data['comment_id']) {
                $comment_updated = FALSE;
                if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $comment_data['comment_id'] . "' \n\t\t\t\tAND comment_item_id='" . $comment_item_id . "'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tAND comment_type='" . $comment_type . "' \n\t\t\t\tAND comment_name='" . $userdata['user_id'] . "' \n\t\t\t\tAND comment_hidden='0'")) {
                    dbquery_insert(DB_COMMENTS, $comment_data, 'update');
                    if ($comment_data['comment_message']) {
                        $result = dbquery("UPDATE " . DB_COMMENTS . " SET comment_message='" . $comment_data['comment_message'] . "'\n  \t\t\t\t\t\t\t\t\t   WHERE comment_id='" . $_GET['comment_id'] . "' " . (iADMIN ? "" : "AND comment_name='" . $userdata['user_id'] . "'"));
                        if ($result) {
                            $comment_updated = TRUE;
                        }
                    }
                }
                if ($comment_updated) {
                    if ($settings['comments_sorting'] == "ASC") {
                        $c_operator = "<=";
                    } else {
                        $c_operator = ">=";
                    }
                    $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_id" . $c_operator . "'" . $comment_data['comment_id'] . "'\n\t\t\t\t\t\t\t\tAND comment_item_id='" . $comment_item_id . "'\n\t\t\t\t\t\t\t\tAND comment_type='" . $comment_type . "'");
                    $c_start = (ceil($c_count / $cpp) - 1) * $cpp;
                }
                redirect($clink . "&amp;c_start=" . (isset($c_start) && isnum($c_start) ? $c_start : ""));
            } else {
                if (!dbcount("(" . $comment_col . ")", $comment_db, $comment_col . "='" . $comment_item_id . "'")) {
                    redirect(BASEDIR . "index.php");
                }
                $id = 0;
                if ($comment_data['comment_name'] && $comment_data['comment_message']) {
                    require_once INCLUDES . "flood_include.php";
                    if (!flood_control("comment_datestamp", DB_COMMENTS, "comment_ip='" . USER_IP . "'")) {
                        dbquery_insert(DB_COMMENTS, $comment_data, 'save');
                        $id = dblastid();
                    }
                }
                if ($settings['comments_sorting'] == "ASC") {
                    $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $comment_item_id . "' AND comment_type='" . $comment_type . "'");
                    $c_start = (ceil($c_count / $cpp) - 1) * $cpp;
                } else {
                    $c_start = 0;
                }
                //if (!$settings['site_seo']) {
                redirect($clink . "&amp;c_start=" . $c_start . "#c" . $id);
                //}
            }
        }
        $c_arr = array("c_con" => array(), "c_info" => array("c_makepagenav" => FALSE, "admin_link" => FALSE));
        $c_rows = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $comment_item_id . "' AND comment_type='" . $comment_type . "' AND comment_hidden='0'");
        if (!isset($_GET['c_start']) && $c_rows > $cpp) {
            $_GET['c_start'] = (ceil($c_rows / $cpp) - 1) * $cpp;
        }
        if (!isset($_GET['c_start']) || !isnum($_GET['c_start'])) {
            $_GET['c_start'] = 0;
        }
        $result = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcm.comment_datestamp,\n\t\t\t\t\ttcu.user_id, tcu.user_name, tcu.user_avatar, tcu.user_status\n\t\t\t\t\tFROM " . DB_COMMENTS . " tcm\n\t\t\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\n\t\t\t\t\tWHERE comment_item_id='" . $comment_item_id . "' AND comment_type='" . $comment_type . "' AND comment_hidden='0'\n\t\t\t\t\tORDER BY comment_datestamp " . $settings['comments_sorting'] . " LIMIT " . $_GET['c_start'] . "," . $cpp);
        if (dbrows($result) > 0) {
            $i = $settings['comments_sorting'] == "ASC" ? $_GET['c_start'] + 1 : $c_rows - $_GET['c_start'];
            if ($c_rows > $cpp) {
                $c_arr['c_info']['c_makepagenav'] = makepagenav($_GET['c_start'], $cpp, $c_rows, 3, $clink . "&amp;", "c_start");
            }
            while ($data = dbarray($result)) {
                $c_arr['c_con'][$i]['comment_id'] = $data['comment_id'];
                $c_arr['c_con'][$i]['edit_dell'] = FALSE;
                $c_arr['c_con'][$i]['i'] = $i;
                if ($data['user_name']) {
                    $c_arr['c_con'][$i]['comment_name'] = profile_link($data['comment_name'], $data['user_name'], $data['user_status'], 'strong text-dark');
                } else {
                    $c_arr['c_con'][$i]['comment_name'] = $data['comment_name'];
                }
                $c_arr['c_con'][$i]['user_avatar'] = display_avatar($data, '35px', '', true, 'img-rounded');
                $c_arr['c_con'][$i]['user'] = array('user_id' => $data['user_id'], 'user_name' => $data['user_name'], 'user_avatar' => $avatar = $data['user_avatar'] !== '' && file_exists(IMAGES . 'avatars/' . $data['user_avatar']) ? IMAGES . 'avatars/' . $data['user_avatar'] : IMAGES . "avatars/noavatar50.png", 'user_status' => $data['user_status']);
                $c_arr['c_con'][$i]['comment_datestamp'] = showdate('shortdate', $data['comment_datestamp']);
                $c_arr['c_con'][$i]['comment_time'] = timer($data['comment_datestamp']);
                $c_arr['c_con'][$i]['comment_message'] = "<!--comment_message-->\n" . nl2br(parseubb(parsesmileys($data['comment_message'])));
                if (iADMIN && checkrights("C") || iMEMBER && $data['comment_name'] == $userdata['user_id'] && isset($data['user_name'])) {
                    $edit_link = clean_request('c_action=edit&comment_id=' . $data['comment_id'], array('c_action', 'comment_id'), false) . "#edit_comment";
                    $delete_link = clean_request('c_action=delete&comment_id=' . $data['comment_id'], array('c_action', 'comment_id'), false);
                    $c_arr['c_con'][$i]['edit_link'] = array('link' => $edit_link, 'name' => $locale['c108']);
                    $c_arr['c_con'][$i]['delete_link'] = array('link' => $delete_link, 'name' => $locale['c109']);
                    $c_arr['c_con'][$i]['edit_dell'] = "<!--comment_actions-->\n";
                    $c_arr['c_con'][$i]['edit_dell'] .= "<div class='btn-group'>";
                    $c_arr['c_con'][$i]['edit_dell'] .= "<a class='btn btn-xs btn-default' href='" . $edit_link . "'>";
                    $c_arr['c_con'][$i]['edit_dell'] .= $locale['c108'] . "</a>\n";
                    $c_arr['c_con'][$i]['edit_dell'] .= "<a class='btn btn-xs btn-default' href='" . $delete_link . "' onclick=\"return confirm('" . $locale['c110'] . "');\">";
                    $c_arr['c_con'][$i]['edit_dell'] .= "<i class='fa fa-trash'></i> " . $locale['c109'] . "</a>";
                    $c_arr['c_con'][$i]['edit_dell'] .= "</div>\n";
                }
                $settings['comments_sorting'] == "ASC" ? $i++ : $i--;
            }
            if (iADMIN && checkrights("C")) {
                $c_arr['c_info']['admin_link'] = "<!--comment_admin-->\n";
                $c_arr['c_info']['admin_link'] .= "<a href='" . ADMIN . "comments.php" . $aidlink . "&amp;ctype=" . $comment_type . "&amp;comment_item_id=" . $comment_item_id . "'>" . $locale['c106'] . "</a>";
            }
        }
        opentable($locale['c102']);
        $comment_message = "";
        if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
            $eresult = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcu.user_name\n\t\t\t\tFROM " . DB_COMMENTS . " tcm\n\t\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "' AND comment_item_id='" . $comment_item_id . "'\n\t\t\t\tAND comment_type='" . $comment_type . "' AND comment_hidden='0'");
            if (dbrows($eresult) > 0) {
                $edata = dbarray($eresult);
                if (iADMIN && checkrights("C") || iMEMBER && $edata['comment_name'] == $userdata['user_id'] && isset($edata['user_name'])) {
                    $clink .= "&amp;c_action=edit&amp;comment_id=" . $edata['comment_id'];
                    $comment_message = $edata['comment_message'];
                }
            } else {
                $comment_message = "";
            }
        }
        if (iMEMBER || $settings['guestposts'] == "1") {
            require_once INCLUDES . "bbcode_include.php";
            echo "<a id='edit_comment' name='edit_comment'></a>\n";
            echo openform('inputform', 'post', $clink, array('class' => 'm-b-20', 'max_tokens' => 1));
            if (iGUEST) {
                echo form_text('comment_name', $locale['c104'], '', array('max_length' => 30));
            }
            echo form_textarea('comment_message', '', $comment_message, array('required' => 1, 'autosize' => 1, 'form_name' => 'inputform', 'bbcode' => 1));
            if (iGUEST && (!isset($_CAPTCHA_HIDE_INPUT) || isset($_CAPTCHA_HIDE_INPUT) && !$_CAPTCHA_HIDE_INPUT)) {
                $_CAPTCHA_HIDE_INPUT = FALSE;
                echo "<div style='width:360px; margin:10px auto;'>";
                echo $locale['global_150'] . "<br />\n";
                include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_display.php";
                if (!$_CAPTCHA_HIDE_INPUT) {
                    echo "<br />\n<label for='captcha_code'>" . $locale['global_151'] . "</label>";
                    echo "<br />\n<input type='text' id='captcha_code' name='captcha_code' class='textbox' autocomplete='off' style='width:100px' />\n";
                }
                echo "</div>\n";
            }
            echo form_button('post_comment', $comment_message ? $locale['c103'] : $locale['c102'], $comment_message ? $locale['c103'] : $locale['c102'], array('class' => 'btn-success m-t-10'));
            echo closeform();
        } else {
            echo "<div class='well'>\n";
            echo $locale['c105'] . "\n";
            echo "</div>\n";
        }
        closetable();
        echo "<a id='comments' name='comments'></a>";
        render_comments($c_arr['c_con'], $c_arr['c_info']);
    }
}
示例#12
0
 echo "</tr>\n<tr>\n";
 echo "<td class='tbl1' align='right' width='20%'>" . $locale['pla_148'] . ":</td>";
 echo "<td class='tbl1'><a href='mailto:" . $data['app_bill_email'] . "' title='" . $data['app_bill_email'] . "'>" . $data['app_bill_email'] . "</a></td>";
 echo "</tr>\n<tr>\n";
 echo "<td class='tbl1' align='right' width='20%'>" . $locale['pla_146'] . ":</td>";
 echo "<td class='tbl1'>" . $data['app_tech_name'] . "</td>";
 echo "</tr>\n<tr>\n";
 echo "<td class='tbl1' align='right' width='20%'>" . $locale['pla_148'] . ":</td>";
 echo "<td class='tbl1'><a href='mailto:" . $data['app_tech_email'] . "' title='" . $data['app_tech_email'] . "'>" . $data['app_tech_email'] . "</td>";
 echo "</tr>\n<tr>\n";
 echo "<td class='tbl1' align='right' width='20%'>" . $locale['pla_153'] . ":</td>";
 echo "<td class='tbl1' nowrap valign='top'>" . $license_types[$data['app_type']] . "</td>\n";
 echo "</tr>\n<tr>\n";
 echo "<td class='tbl1' align='right' valign='top' width='20%'>" . $locale['pla_113'] . ":</td>";
 echo "<td class='quote' valign='top'>";
 $text = nl2br(parseubb(censorwords($data['app_text'])));
 echo isset($text) ? $text : "";
 echo "</td>";
 echo "</tr>\n<tr>\n";
 echo "<td class='tbl1' width='20%'>" . $locale['pla_133'] . ":</td>";
 echo "<td class='tbl1' nowrap valign='top'>";
 echo "<select name='app_status' class='textbox'>\n";
 echo "<option value='0' " . ($app_status == 0 ? "selected" : "") . ">" . $locale['pla_110'] . "</option>\n";
 echo "<option value='1' " . ($app_status == 1 ? "selected" : "") . ">" . $locale['pla_135'] . "</option>\n";
 echo "<option value='2' " . ($app_status == 2 ? "selected" : "") . ">" . $locale['pla_136'] . "</option>\n";
 echo "<option value='3' " . ($app_status == 3 ? "selected" : "") . ">" . $locale['pla_137'] . "</option>\n";
 echo "</select>\n</td>\n";
 echo "</tr>\n<tr>\n";
 echo "<td class='tbl1' colspan='2'><hr /></td>";
 echo "</tr>\n<tr>\n";
 echo "<td class='tbl1' valign='top' width='20%'>" . $locale['pla_613'] . ":</td>";
示例#13
0
 /**
  * Forum Listing
  */
 private function display_forum_list()
 {
     global $aidlink;
     $title = !empty($this->level['title']) ? sprintf(self::$locale['forum_000b'], $this->level['title'][0]) : self::$locale['forum_000c'];
     add_to_title(" " . $title);
     $forum_settings = $this->get_forum_settings();
     $threads_per_page = $forum_settings['threads_per_page'];
     $max_rows = dbcount("('forum_id')", DB_FORUMS, (multilang_table("FO") ? "forum_language='" . LANGUAGE . "' AND" : '') . " forum_cat='" . $_GET['parent_id'] . "'");
     // need max rows
     $_GET['rowstart'] = isset($_GET['rowstart']) && isnum($_GET['rowstart']) && $_GET['rowstart'] <= $max_rows ? intval($_GET['rowstart']) : 0;
     opentable($title);
     $result = dbquery("SELECT forum_id, forum_cat, forum_branch, forum_name, forum_description, forum_image, forum_alias, forum_type, forum_threadcount, forum_postcount, forum_order FROM\n\t\t\t" . DB_FORUMS . " " . (multilang_table("FO") ? "WHERE forum_language='" . LANGUAGE . "' AND" : "WHERE") . " forum_cat='" . intval($_GET['parent_id']) . "'\n\t\t\t ORDER BY forum_order ASC LIMIT " . $_GET['rowstart'] . ", {$threads_per_page}\n\t\t\t ");
     $rows = dbrows($result);
     if ($rows > 0) {
         // To support entypo and font-awesome icon switching
         $has_entypo = fusion_get_settings("entypo") ? TRUE : FALSE;
         $has_fa = fusion_get_settings("fontawesome") ? TRUE : FALSE;
         $type_icon = array('1' => $has_entypo ? 'entypo folder' : $has_fa ? 'fa fa-folder fa-fw fa-2x' : "", '2' => $has_entypo ? 'entypo icomment' : $has_fa ? 'fa fa-comment-o fa-fw fa-2x' : "", '3' => $has_entypo ? 'entypo link' : $has_fa ? 'fa fa-external-link fa-fw fa-2x' : "", '4' => $has_entypo ? 'entypo info-circled' : $has_fa ? 'fa fa-lightbulb-o fa-fw fa-2x' : "");
         $ui_label = array("move_up" => $has_entypo ? "<i class='entypo up-bold m-r-10'></i>" : $has_fa ? "<i class='fa fa-arrow-up fa-lg m-r-10'></i>" : self::$locale['forum_046'], "move_down" => $has_entypo ? "<i class='entypo down-bold m-r-10'></i>" : $has_fa ? "<i class='fa fa-arrow-down fa-lg m-r-10'></i>" : self::$locale['forum_045'], "edit_permission" => $has_entypo ? "<i class='entypo key m-r-10'></i>" : $has_fa ? "<i class='fa fa-eye fa-lg m-r-10'></i>" : self::$locale['forum_047'], "edit" => $has_entypo ? "<i class='entypo cog m-r-10'></i>" : $has_fa ? "<i class='fa fa-cog fa-lg m-r-10'></i>" : self::$locale['forum_048'], "delete" => $has_entypo ? "<i class='entypo icancel m-r-10'></i>" : $has_fa ? "<i class='fa fa-trash-o fa-lg m-r-10'></i>" : self::$locale['forum_049']);
         $i = 1;
         while ($data = dbarray($result)) {
             $up = $data['forum_order'] - 1;
             $down = $data['forum_order'] + 1;
             $subforums = get_child($this->forum_index, $data['forum_id']);
             $subforums = !empty($subforums) ? count($subforums) : 0;
             echo "<div class='panel panel-default'>\n";
             echo "<div class='panel-body'>\n";
             echo "<div class='pull-left m-r-10'>\n";
             echo "<i class='display-inline-block text-lighter " . $type_icon[$data['forum_type']] . "'></i>\n";
             echo "</div>\n";
             echo "<div class='overflow-hide'>\n";
             echo "<div class='row'>\n";
             echo "<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'>\n";
             $html2 = '';
             if ($data['forum_image'] && file_exists(INFUSIONS . "forum/images/" . $data['forum_image'])) {
                 echo "<div class='pull-left m-r-10'>\n" . thumbnail(INFUSIONS . "forum/images/" . $data['forum_image'], '50px') . "</div>\n";
                 echo "<div class='overflow-hide'>\n";
                 $html2 = "</div>\n";
             }
             echo "<span class='strong text-bigger'><a href='" . FUSION_SELF . $aidlink . "&amp;parent_id=" . $data['forum_id'] . "&amp;branch=" . $data['forum_branch'] . "'>" . $data['forum_name'] . "</a></span><br/>" . nl2br(parseubb($data['forum_description'])) . $html2;
             echo "</div>\n<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'>\n";
             echo "<div class='pull-right'>\n";
             $upLink = FUSION_SELF . $aidlink . $this->ext . "&amp;action=mu&amp;order={$up}&amp;forum_id=" . $data['forum_id'];
             $downLink = FUSION_SELF . $aidlink . $this->ext . "&amp;action=md&amp;order={$down}&amp;forum_id=" . $data['forum_id'];
             echo $i == 1 ? '' : "<a title='" . self::$locale['forum_046'] . "' href='" . $upLink . "'>" . $ui_label['move_up'] . "</a>";
             echo $i == $rows ? '' : "<a title='" . self::$locale['forum_045'] . "' href='" . $downLink . "'>" . $ui_label['move_down'] . "</a>";
             echo "<a title='" . self::$locale['forum_047'] . "' href='" . FUSION_SELF . $aidlink . "&amp;action=p_edit&forum_id=" . $data['forum_id'] . "&amp;parent_id=" . $_GET['parent_id'] . "'>" . $ui_label['edit_permission'] . "</a>";
             // edit
             echo "<a title='" . self::$locale['forum_048'] . "' href='" . FUSION_SELF . $aidlink . "&amp;action=edit&forum_id=" . $data['forum_id'] . "&amp;parent_id=" . $_GET['parent_id'] . "'>" . $ui_label['edit'] . "</a>";
             // edit
             echo "<a title='" . self::$locale['forum_049'] . "' href='" . FUSION_SELF . $aidlink . "&amp;action=delete&amp;forum_id=" . $data['forum_id'] . "&amp;forum_cat=" . $data['forum_cat'] . "&amp;forum_branch=" . $data['forum_branch'] . $this->ext . "' onclick=\"return confirm('" . self::$locale['delete_notice'] . "');\">" . $ui_label['delete'] . "</a>";
             // delete
             echo "</div>\n";
             echo "<span class='text-dark text-smaller strong'>" . self::$locale['forum_057'] . " " . number_format($data['forum_threadcount']) . " / " . self::$locale['forum_059'] . " " . number_format($data['forum_postcount']) . " </span>\n<br/>";
             echo "<span class='text-dark text-smaller strong'>" . self::$locale['forum_058'] . " " . number_format($subforums) . "</span>\n<br/>";
             echo "<span class='text-smaller text-dark strong'>" . self::$locale['forum_051'] . " </span> <span class='text-smaller'>" . $data['forum_alias'] . " </span>\n";
             echo "</div></div>\n";
             // end row
             echo "</div>\n";
             echo "</div>\n</div>\n";
             $i++;
         }
         if ($max_rows > $threads_per_page) {
             $ext = isset($_GET['parent_id']) ? "&amp;parent_id=" . $_GET['parent_id'] . "&amp;" : '';
             echo makepagenav($_GET['rowstart'], $threads_per_page, $max_rows, 3, FUSION_SELF . $aidlink . $ext);
         }
     } else {
         echo "<div class='well text-center'>" . self::$locale['560'] . "</div>\n";
     }
     closetable();
 }
示例#14
0
         echo "<div class='attachments-list'>" . $a_images . "</div>\n";
         echo "</div>\n";
     }
 }
 if ($data['post_edittime'] != "0") {
     echo "\n<hr />\n<span class='small'>" . $locale['508'] . profile_link($data['post_edituser'], $data['edit_name'], $data['edit_status']) . $locale['509'] . showdate("forumdate", $data['post_edittime']) . "</span>\n";
     if ($data['post_editreason'] != "" && iMEMBER) {
         $edit_reason = true;
         echo "<br /><div class='edit_reason'><a id='reason_pid_" . $data['post_id'] . "' rel='" . $data['post_id'] . "' class='reason_button small' href='#reason_div_pid_" . $data['post_id'] . "'>";
         echo "<strong>" . $locale['508a'] . "</strong>";
         echo "</a>\n";
         echo "<div id='reason_div_pid_" . $data['post_id'] . "' class='reason_div small'>" . $data['post_editreason'] . "</div></div>\n";
     }
 }
 if ($data['post_showsig'] && isset($data['user_sig']) && $data['user_sig'] && $data['user_status'] != 6 && $data['user_status'] != 5) {
     echo "\n<hr /><div class='forum_sig'>" . nl2br(parseubb(parsesmileys($data['user_sig']), "b|i|u||center|small|url|mail|img|color")) . "</div>\n";
 }
 echo "<!--sub_forum_post--></td>\n</tr>\n";
 echo "<tr>\n<td class='tbl2 forum_thread_ip' style='width:140px;white-space:nowrap'>";
 if ($settings['forum_ips'] && iMEMBER || iMOD) {
     echo "<strong>" . $locale['571'] . "</strong>: " . $data['post_ip'];
 } else {
     echo "&nbsp;";
 }
 echo "</td>\n<td class='tbl2 forum_thread_userbar'>\n<div style='float:left;white-space:nowrap' class='small'><!--forum_thread_userbar-->\n";
 if (isset($data['user_web']) && $data['user_web'] && (iADMIN || $data['user_status'] != 6 && $data['user_status'] != 5)) {
     echo "<a href='" . $data['user_web'] . "' target='_blank'><img src='" . get_image("web") . "' alt='" . $data['user_web'] . "' style='border:0;vertical-align:middle' /></a>";
 }
 if (iMEMBER && $data['user_id'] != $userdata['user_id'] && (iADMIN || $data['user_status'] != 6 && $data['user_status'] != 5)) {
     echo "<a href='" . BASEDIR . "messages.php?msg_send=" . $data['user_id'] . "'><img src='" . get_image("pm") . "' alt='" . $locale['572'] . "' style='border:0;vertical-align:middle' /></a>\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";
        }
    }
             if ($print_files != '') {
                 echo "<br />";
             }
             echo "\n<fieldset class='forum_attachments'>";
             echo "<legend class='forum_attachments_legend'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . ($count_images > 1 ? $locale['506b'] : $locale['506']) . "</legend>";
             echo "<div class='forum_attachments_content'>" . $print_images . "</div>";
             echo "</fieldset>\n";
         }
     }
 }
 if ($data['post_edittime'] != "0") {
     echo "\n<fieldset class='forum_edit'>\n" . $locale['508'] . profile_link($data['post_edituser'], $data['edit_name'], $data['edit_status']) . $locale['509'] . showdate("forumdate", $data['post_edittime']) . "</fieldset>";
     // Pimped: added profile_link()
 }
 if ($data['post_showsig'] && isset($data['user_sig']) && $data['user_sig']) {
     echo "\n<fieldset class='forum_signatur'>\r\n\t\t\t<legend class='forum_signatur_legend'>" . $locale['507d'] . "</legend>" . nl2br(parseubb(parsesmileys($data['user_sig']), "b|i|u||center|small|url|mail|img|color")) . "\r\n\t\t\t</fieldset>";
 }
 echo "<!--sub_forum_post--></td>\n</tr>\n";
 // Pimped: Post Ratings ->
 if ($settings['forum_post_ratings']) {
     $show = post_ratings_show($data['post_id']);
     $do = '';
     if (iMEMBER && $userdata['user_id'] !== $data['user_id']) {
         $do .= "<span id='rb_" . $data['post_id'] . "'>";
         $do .= post_ratings_do($data['post_id'], $userdata['user_id'], $data['post_author'], false);
         $do .= "</span>&nbsp;";
     }
     if ($do != '' || $show != '') {
         echo "<tr>\n<td class='tbl2'>\n</td>\n<td class='tbl2'>";
         echo "<div align='left'>\n";
         echo $show;
示例#17
0
// xss injection
$result = dbquery("SELECT tn.thread_id FROM " . DB_FORUM_THREAD_NOTIFY . " tn\n            INNER JOIN " . DB_FORUM_THREADS . " tt ON tn.thread_id = tt.thread_id\n            INNER JOIN " . DB_FORUMS . " tf ON tt.forum_id = tf.forum_id\n            WHERE tn.notify_user="******" AND " . groupaccess('forum_access') . " AND tt.thread_hidden='0'");
$rows = dbrows($result);
if (!isset($_GET['rowstart']) or !isnum($_GET['rowstart']) or $_GET['rowstart'] > $rows) {
    $_GET['rowstart'] = 0;
}
$info['post_rows'] = $rows;
if ($rows) {
    require_once INCLUDES . "mimetypes_include.php";
    $info['page_nav'] = $rows > 10 ? makepagenav($_GET['rowstart'], 16, $rows, 3, FUSION_REQUEST, "rowstart") : "";
    $result = dbquery("\n                SELECT tf.forum_id, tf.forum_name, tf.forum_access, tf.forum_type, tf.forum_mods,\n                tn.thread_id, tn.notify_datestamp, tn.notify_user,\n                ttc.forum_id AS forum_cat_id, ttc.forum_name AS forum_cat_name,\n                tp.post_datestamp, tp.post_message,\n                tt.thread_subject, tt.forum_id, tt.thread_lastpost, tt.thread_lastpostid, tt.thread_lastuser, tt.thread_postcount, tt.thread_views, tt.thread_locked,\n                tt.thread_author, tt.thread_poll, tt.thread_sticky,\n                uc.user_id AS s_user_id, uc.user_name AS author_name, uc.user_status AS author_status, uc.user_avatar AS author_avatar,\n                u.user_id, u.user_name as last_user_name, u.user_status as last_user_status, u.user_avatar as last_user_avatar,\n                count(v.post_id) AS vote_count,\n                count(a1.attach_mime) 'attach_image',\n\t\t\t\tcount(a2.attach_mime) 'attach_files'\n                FROM " . DB_FORUM_THREAD_NOTIFY . " tn\n                INNER JOIN " . DB_FORUM_THREADS . " tt ON tn.thread_id = tt.thread_id\n                INNER JOIN " . DB_FORUMS . " tf ON tt.forum_id = tf.forum_id\n                LEFT JOIN " . DB_FORUMS . " ttc ON ttc.forum_id = tf.forum_cat\n                LEFT JOIN " . DB_USERS . " uc ON tt.thread_author = uc.user_id\n                LEFT JOIN " . DB_USERS . " u ON tt.thread_lastuser = u.user_id\n                LEFT JOIN " . DB_FORUM_POSTS . " tp ON tt.thread_id = tp.thread_id\n                LEFT JOIN " . DB_FORUM_VOTES . " v ON v.thread_id = tt.thread_id AND tp.post_id = v.post_id\n                LEFT JOIN " . DB_FORUM_ATTACHMENTS . " a1 on a1.thread_id = tt.thread_id AND a1.attach_mime IN ('" . implode(",", img_mimeTypes()) . "')\n\t\t\t\tLEFT JOIN " . DB_FORUM_ATTACHMENTS . " a2 on a2.thread_id = tt.thread_id AND a2.attach_mime NOT IN ('" . implode(",", img_mimeTypes()) . "')\n                WHERE tn.notify_user="******" AND " . groupaccess('forum_access') . " AND tt.thread_hidden='0'\n                GROUP BY tn.thread_id\n                ORDER BY tn.notify_datestamp DESC\n                LIMIT " . $_GET['rowstart'] . ",16\n            ");
    $i = 0;
    while ($threads = dbarray($result)) {
        // opt for moderators.
        $this->forum_info['moderators'] = \PHPFusion\Forums\Moderator::parse_forum_mods($threads['forum_mods']);
        $icon = "";
        $match_regex = $threads['thread_id'] . "\\|" . $threads['thread_lastpost'] . "\\|" . $threads['forum_id'];
        if ($threads['thread_lastpost'] > $this->forum_info['lastvisited']) {
            if (iMEMBER && ($threads['thread_lastuser'] == $userdata['user_id'] || preg_match("(^\\.{$match_regex}\$|\\.{$match_regex}\\.|\\.{$match_regex}\$)", $userdata['user_threads']))) {
                $icon = "<i class='" . get_forumIcons('thread') . "' title='" . $locale['forum_0261'] . "'></i>";
            } else {
                $icon = "<i class='" . get_forumIcons('new') . "' title='" . $locale['forum_0260'] . "'></i>";
            }
        }
        $author = array('user_id' => $threads['thread_author'], 'user_name' => $threads['author_name'], 'user_status' => $threads['author_status'], 'user_avatar' => $threads['author_avatar']);
        $lastuser = array('user_id' => $threads['thread_lastuser'], 'user_name' => $threads['last_user_name'], 'user_status' => $threads['last_user_status'], 'user_avatar' => $threads['last_user_avatar']);
        $threads += array("thread_link" => array("link" => INFUSIONS . "forum/viewthread.php?thread_id=" . $threads['thread_id'], "title" => $threads['thread_subject']), "forum_type" => $threads['forum_type'], "thread_pages" => makepagenav(0, $forum_settings['posts_per_page'], $threads['thread_postcount'], 3, FORUM . "viewthread.php?thread_id=" . $threads['thread_id'] . "&amp;"), "thread_icons" => array('lock' => $threads['thread_locked'] ? "<i class='" . get_forumIcons('lock') . "' title='" . $locale['forum_0263'] . "'></i>" : '', 'sticky' => $threads['thread_sticky'] ? "<i class='" . get_forumIcons('sticky') . "' title='" . $locale['forum_0103'] . "'></i>" : '', 'poll' => $threads['thread_poll'] ? "<i class='" . get_forumIcons('poll') . "' title='" . $locale['forum_0314'] . "'></i>" : '', 'hot' => $threads['thread_postcount'] >= 20 ? "<i class='" . get_forumIcons('hot') . "' title='" . $locale['forum_0311'] . "'></i>" : '', 'reads' => $threads['thread_views'] >= 20 ? "<i class='" . get_forumIcons('reads') . "' title='" . $locale['forum_0311'] . "'></i>" : '', 'image' => $threads['attach_image'] > 0 ? "<i class='" . get_forumIcons('image') . "' title='" . $locale['forum_0313'] . "'></i>" : '', 'file' => $threads['attach_files'] > 0 ? "<i class='" . get_forumIcons('file') . "' title='" . $locale['forum_0312'] . "'></i>" : '', 'icon' => $icon), "thread_starter" => $locale['forum_0006'] . timer($threads['post_datestamp']) . " " . $locale['by'] . " " . profile_link($author['user_id'], $author['user_name'], $author['user_status']) . "</span>", "thread_author" => $author, "thread_last" => array('avatar' => display_avatar($lastuser, '30px', '', '', ''), 'profile_link' => profile_link($lastuser['user_id'], $lastuser['user_name'], $lastuser['user_status']), 'time' => $threads['post_datestamp'], 'post_message' => parseubb(parsesmileys($threads['post_message'])), "formatted" => "<div class='pull-left'>" . display_avatar($lastuser, '30px', '', '', '') . "</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class='overflow-hide'>" . $locale['forum_0373'] . " <span class='forum_profile_link'>" . profile_link($lastuser['user_id'], $lastuser['user_name'], $lastuser['user_status']) . "</span><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . timer($threads['post_datestamp']) . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>"), "track_button" => array('link' => FORUM . "index.php?section=tracked&amp;delete=" . $threads['thread_id'], 'title' => $locale['global_058']));
        // push
        $this->forum_info['item'][$threads['thread_id']] = $threads;
    }
}
示例#18
0
    foreach (cache_smileys() as $smiley) {
        $smiley_path = "./" . $prefix_ . "images/smiley/" . $smiley['smiley_image'];
        \PHPFusion\ImageRepo::setImage("smiley_" . $smiley['smiley_text'], $smiley_path);
    }
}
if ($_POST['editor'] == 'html') {
    $text = parsesmileys(nl2br(html_entity_decode(stripslashes($text))));
    if (isset($_POST['mode']) && $_POST['mode'] == 'admin') {
        $images = str_replace('../../../', '', IMAGES);
        $text = str_replace(IMAGES, $images, $text);
        $text = str_replace(IMAGES_N, $images, $text);
        $text = parse_imageDir($text, $prefix_ . "images/");
    }
    echo html_entity_decode($text, ENT_QUOTES, $locale['charset']) ?: "<p class='text-center'>" . $locale['nopreview'] . "</p>\n";
} elseif ($_POST['editor'] == 'bbcode') {
    $text = parseubb(parsesmileys($text));
    if (isset($_POST['mode']) && $_POST['mode'] == 'admin') {
        $images = str_replace('../../../', '', IMAGES);
        $text = str_replace(IMAGES, $images, $text);
        $text = str_replace(IMAGES_N, $images, $text);
        $text = parse_imageDir($text, $prefix_ . "images/");
    }
    echo html_entity_decode($text, ENT_QUOTES, $locale['charset']) ?: "<p class='text-center'>" . $locale['nopreview'] . "</p>\n";
} else {
    $text = parsesmileys($text);
    if (isset($_POST['mode']) && $_POST['mode'] == 'admin') {
        $images = str_replace('../../../', '', IMAGES);
        $text = str_replace(IMAGES, $images, $text);
        $text = str_replace(IMAGES_N, $images, $text);
    }
    echo parse_imageDir(nl2br(html_entity_decode($text, ENT_QUOTES, $locale['charset']))) ?: "<p class='text-center'>" . $locale['nopreview'] . "</p>\n";
示例#19
0
文件: index.php 项目: dioda/phpfusion
        }
        $forum_match = "\\|" . $data['forum_lastpost'] . "\\|" . $data['forum_id'];
        if ($data['forum_lastpost'] > $lastvisited) {
            if (iMEMBER && ($data['forum_lastuser'] == $userdata['user_id'] || 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='tbl2' style='white-space:nowrap'>{$fim}</td>\n";
        echo "<td class='tbl1 forum_name'><!--forum_name--><a href='viewforum.php?forum_id=" . $data['forum_id'] . "'>" . $data['forum_name'] . "</a><br />\n";
        if ($data['forum_description'] || $moderators) {
            echo "<span class='small'>" . nl2br(parseubb($data['forum_description'])) . ($data['forum_description'] && $moderators ? "<br />\n" : "");
            echo ($moderators ? "<strong>" . $locale['411'] . "</strong>" . $moderators . "</span>\n" : "</span>\n") . "\n";
        }
        echo "</td>\n";
        echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $data['forum_threadcount'] . "</td>\n";
        echo "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'>" . $data['forum_postcount'] . "</td>\n";
        echo "<td width='1%' class='tbl2' style='white-space:nowrap'>";
        if ($data['forum_lastpost'] == 0) {
            echo $locale['405'] . "</td>\n</tr>\n";
        } else {
            echo showdate("forumdate", $data['forum_lastpost']) . "<br />\n";
            echo "<span class='small'>" . $locale['406'] . profile_link($data['forum_lastuser'], $data['user_name'], $data['user_status']) . "</span></td>\n";
            echo "</tr>\n";
        }
    }
} else {
示例#20
0
 }
 if (isset($_POST['previewpost'])) {
     if ($subject == "") {
         $subject = $locale['420'];
     }
     if ($message == "") {
         $previewmessage = $locale['421'];
     } else {
         $previewmessage = $message;
         if ($sig_checked) {
             $previewmessage = $previewmessage . "\n\n" . $userdata['user_sig'];
         }
         if (!$disable_smileys_check) {
             $previewmessage = parsesmileys($previewmessage);
         }
         $previewmessage = parseubb($previewmessage);
         $previewmessage = nl2br($previewmessage);
     }
     //$is_mod = iMOD && iUSER < "102" ? true : false;
     opentable($locale['400']);
     echo "<div class='tbl2' style='margin-bottom:5px'><span class='small'><a href='index.php'>" . $settings['sitename'] . "</a> :: " . $caption . "</span></div>\n";
     if ($fdata['forum_poll'] && checkgroup($fdata['forum_poll'])) {
         if (isset($poll_title) && $poll_title && (isset($poll_opts) && is_array($poll_opts))) {
             echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border' style='margin-bottom:5px'>\n<tr>\n";
             echo "<td align='center' class='tbl2'><strong>" . $poll_title . "</strong></td>\n</tr>\n<tr>\n<td class='tbl1'>\n";
             echo "<table align='center' cellpadding='0' cellspacing='0'>\n";
             foreach ($poll_opts as $poll_option) {
                 echo "<tr>\n<td class='tbl1'><input type='radio' name='poll_option' value='{$i}' style='vertical-align:middle;' /> " . $poll_option . "</td>\n</tr>\n";
                 $i++;
             }
             echo "</table>\n</td>\n</tr>\n</table>\n";
示例#21
0
     echo "</div>\n";
 } else {
     // Preview
     if (isset($_POST['preview_news'])) {
         $news_snippet = "";
         if ($_POST['news_news']) {
             $news_snippet = parse_textarea($_POST['news_news']);
         }
         $news_body = "";
         if ($_POST['news_body']) {
             $news_body = parse_textarea($_POST['news_body']);
         }
         $criteriaArray = array("news_subject" => form_sanitizer($_POST['news_subject'], "", "news_subject"), "news_language" => form_sanitizer($_POST['news_language'], "", "news_language"), "news_ialign" => form_sanitizer($_POST['news_ialign'], "", "news_ialign"), "news_keywords" => form_sanitizer($_POST['news_keywords'], "", "news_keywords"), "news_cat" => form_sanitizer($_POST['news_cat'], 0, "news_cat"), "news_snippet" => form_sanitizer($_POST['news_news'], "", "news_news"), "news_body" => form_sanitizer($_POST['news_body'], "", "news_body"));
         opentable($criteriaArray['news_subject']);
         echo $locale['news_0203'] . " " . nl2br(parseubb($news_snippet)) . "<br /><br />";
         echo $locale['news_0204'] . " " . nl2br(parseubb($news_body));
         closetable();
     }
     add_to_title($locale['global_200'] . $locale['news_0400']);
     echo "<div class='panel panel-default tbl-border'>\n<div class='panel-body'>\n";
     echo "<div class='alert alert-info m-b-20 submission-guidelines'>" . str_replace("[SITENAME]", fusion_get_settings("sitename"), $locale['news_0703']) . "</div>\n";
     echo openform('submit_form', 'post', BASEDIR . "submit.php?stype=n", array("enctype" => $news_settings['news_allow_submission_files'] ? TRUE : FALSE));
     echo form_text('news_subject', $locale['news_0200'], $criteriaArray['news_subject'], array("required" => TRUE, "inline" => TRUE));
     if (multilang_table("NS")) {
         echo form_select('news_language', $locale['global_ML100'], $criteriaArray['news_language'], array("options" => fusion_get_enabled_languages(), "placeholder" => $locale['choose'], "width" => "250px", "inline" => TRUE));
     } else {
         echo form_hidden('news_language', '', $criteriaArray['news_language']);
     }
     echo form_select('news_keywords', $locale['news_0205'], $criteriaArray['news_keywords'], array("max_length" => 320, "inline" => TRUE, "placeholder" => $locale['news_0205a'], "width" => "100%", "error_text" => $locale['news_0255'], "tags" => TRUE, "multiple" => TRUE));
     echo form_select_tree("news_cat", $locale['news_0201'], $criteriaArray['news_cat'], array("width" => "250px", "inline" => TRUE, "parent_value" => $locale['news_0202'], "query" => multilang_table("NS") ? "WHERE news_cat_language='" . LANGUAGE . "'" : ""), DB_NEWS_CATS, "news_cat_name", "news_cat_id", "news_cat_parent");
     if ($news_settings['news_allow_submission_files']) {
示例#22
0
}
closetable();
/****************************************************************************
 * COMMENTS
 */
opentable($locale['PDP021']);
$res = dbquery("SELECT comment_user_name, comment_smileys,\n\tcomment_text, user_id, comment_id, comment_timestamp\n\tFROM " . DB_PDP_COMMENTS . "\n\tWHERE download_id='" . $download->id . "'\n\tORDER BY comment_timestamp ASC");
$count_comments = $count = dbrows($res);
while ($data = dbarray($res)) {
    $name = $data['comment_user_name'];
    if ($data['comment_smileys'] == "1") {
        $text = parsesmileys($data['comment_text']);
    } else {
        $text = $data['comment_text'];
    }
    $text = parseubb($text);
    if ($data['user_id']) {
        $name = '<a href="' . BASEDIR . 'profile.php?lookup=' . $data['user_id'] . '">' . $name . '</a>';
    } else {
        $name = '<strong>' . $name . '</strong>';
    }
    echo '
<div class="comment" id="comm' . $data['comment_id'] . '">
<span class="comment-name">' . $name . '</a></span>
<span class="small">' . $locale['PDP031'] . showdate('shortdate', $data['comment_timestamp']) . '</span>
<p>
' . $text . '
</p>
</div>';
    if (--$count) {
        echo '<hr />';
示例#23
0
     add_to_title($locale['global_200'] . $locale['articles_0040']);
     echo "<div class='well text-center'><p><strong>" . $locale['articles_0061'] . "</strong></p>";
     echo "<p><a href='submit.php?stype=a'>" . $locale['articles_0062'] . "</a></p>";
     echo "<p><a href='index.php'>" . str_replace("[SITENAME]", fusion_get_settings("sitename"), $locale['articles_0064']) . "</a></p>\n";
     echo "</div>\n";
 } else {
     // Preview
     if (isset($_POST['preview_article'])) {
         $article_snippet = "";
         if ($_POST['article_snippet']) {
             $article_snippet = str_replace("src='" . str_replace("../", "", IMAGES_A), "src='" . IMAGES_A, parseubb(stripslashes($_POST['article_snippet'])));
             $article_snippet = parse_textarea($article_snippet);
         }
         $article_article = "";
         if ($_POST['article_article']) {
             $article_article = str_replace("src='" . str_replace("../", "", IMAGES_A), "src='" . IMAGES_A, parseubb(stripslashes($_POST['article_article'])));
             $article_article = parse_textarea($article_article);
         }
         $criteriaArray = array("article_subject" => form_sanitizer($_POST['article_subject'], "", "article_subject"), "article_cat" => form_sanitizer($_POST['article_cat'], 0, "article_cat"), "article_snippet" => form_sanitizer($article_snippet, "", "article_snippet"), "article_article" => form_sanitizer($article_article, "", "article_article"), "article_keywords" => form_sanitizer($_POST['article_keywords'], "", "article_keywords"), "article_language" => form_sanitizer($_POST['article_language'], "", "article_language"));
         $criteriaArray['article_snippet'] = parse_textarea($article_snippet);
         $criteriaArray['article_article'] = parse_textarea($article_article);
         opentable($criteriaArray['article_subject']);
         echo "<p class='text-bigger'>" . $criteriaArray['article_snippet'] . "</p>";
         echo $criteriaArray['article_article'];
         closetable();
     }
     add_to_title($locale['global_200'] . $locale['articles_0060']);
     echo "<div class='panel panel-default tbl-border'>\n<div class='panel-body'>\n";
     echo "<div class='alert alert-info m-b-20 submission-guidelines'>" . str_replace("[SITENAME]", fusion_get_settings("sitename"), $locale['articles_0063']) . "</div>\n";
     echo openform('submit_form', 'post', BASEDIR . "submit.php?stype=a");
     echo form_text('article_subject', $locale['articles_0304'], $criteriaArray['article_subject'], array("required" => TRUE, "inline" => TRUE));
示例#24
0
    }
    $path[] = array('id' => 0, 'name' => $locale['PRP820']);
    $path = array_reverse($path);
    // get child cats in current cat
    $cats = array();
    if (!$review->id) {
        foreach ($all_cats as $id => $data) {
            if ($data['parentcat'] != $catid) {
                continue;
            }
            if (!checkgroup($data['access']) && $prp->settings['hide_cats']) {
                continue;
            }
            $cnt_cats = prp_count_cats($id);
            $cnt_downs = prp_count_dl($all_cats, $id);
            $cats[$id] = array("name" => $data['name'], "cnt_downs" => $cnt_downs, "cnt_cats" => $cnt_cats, "desc" => parseubb($data['desc']));
        }
    }
    prp_render_cats($catid, $review->id, $path, $cats);
    unset($path, $cats);
    if (!is_null($access_group)) {
        if ($prp->settings['hide_cats']) {
            fallback("error.php?type=access");
        }
        show_info('<img src="icons/lock.png" alt="' . $locale['prp_locked'] . '" /> ' . str_replace('%s', getgroupname($access_group), $locale['PRP215']));
    }
}
/***************************************************************************
 *  DOWNLOADS                                                              *
 ***************************************************************************/
if (is_null($access_group) && !$review->id && (!isset($catid) || $catid != 0)) {
示例#25
0
    echo "<br /><input type='submit' name='post_archive_shout' value='" . $locale['SB_shout'] . "' class='button' />\n";
    echo "</div>\n</form>\n<br />\n";
} else {
    echo "<div style='text-align:center'>" . $locale['SB_login_req'] . "</div>\n";
}
$rows = dbcount("(shout_id)", DB_SHOUTBOX, "shout_hidden='0'");
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) {
    $_GET['rowstart'] = 0;
}
if ($rows != 0) {
    $result = dbquery("SELECT s.shout_id, s.shout_name, s.shout_message, s.shout_datestamp, u.user_id, u.user_name, u.user_status\r\n\t\tFROM " . DB_SHOUTBOX . " s\r\n\t\tLEFT JOIN " . DB_USERS . " u ON s.shout_name=u.user_id\r\n\t\t" . (multilang_table("SB") ? "WHERE shout_language='" . LANGUAGE . "' AND" : "WHERE") . " s.shout_hidden='0'\r\n\t\tORDER BY s.shout_datestamp DESC LIMIT " . $_GET['rowstart'] . ",20");
    while ($data = dbarray($result)) {
        echo "<div class='tbl2'>\n";
        if (iADMIN && checkrights("S") || iMEMBER && $data['shout_name'] == $userdata['user_id'] && isset($data['user_name'])) {
            echo "<div style='float:right'>\n<a href='" . FUSION_SELF . "?action=edit&amp;shout_id=" . $data['shout_id'] . "'>" . $locale['SB_edit'] . "</a> |\n";
            echo "<a href='" . FUSION_SELF . "?action=delete&amp;shout_id=" . $data['shout_id'] . "'>" . $locale['SB_delete'] . "</a>\n</div>\n";
        }
        if ($data['user_name']) {
            echo "<span class='comment-name'><span class='slink'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</span>\n</span>\n";
        } else {
            echo "<span class='comment-name'>" . $data['shout_name'] . "</span>\n";
        }
        echo "<span class='small'>" . showdate("longdate", $data['shout_datestamp']) . "</span>";
        echo "</div>\n<div class='tbl1'>\n" . sbawrap(parseubb(parsesmileys($data['shout_message']), "b|i|u|url|color")) . "</div>\n";
    }
} else {
    echo "<div style='text-align:center'><br />\n" . $locale['SB_no_msgs'] . "<br /><br />\n</div>\n";
}
closetable();
echo "<div align='center' style='margin-top:5px;'>\n" . makepagenav($_GET['rowstart'], 20, $rows, 3, FUSION_SELF . "?") . "\n</div>\n";
require_once THEMES . "templates/footer.php";
示例#26
0
if ($list !== 'blogs') {
    echo '<table style="width: 100%;" class="tbl-border forum_thread_table">';
    while ($blogarr = dbarray($bloglist)) {
        echo '
<tr>
<td style="width: 25%;" class="tbl2 forum-caption">' . showdate('forumdate', $blogarr['bp_timestamp']) . '</td>
<td style="width: 75%;" class="tbl2 forum-caption">' . $blogarr['bp_title'] . '</td>
</tr>
<tr>
<td style="width: 25%;" class="tbl2 forum-caption">
' . profile_link($blogarr['bp_author'], $blogarr['user_name'], $blogarr['user_status']) . '<br />';
        if ($blogarr['user_avatar'] && file_exists(IMAGES . "avatars/" . $blogarr['user_avatar']) && $blogarr['user_status'] != 6 && $blogarr['user_status'] != 5) {
            echo "<img src='" . IMAGES . "avatars/" . $blogarr['user_avatar'] . "' alt='Avatar' /><br /><br />\n";
        }
        echo 'Antal blogindlæg: ' . $blogarr['user_blog'] . '<br />
<a href="/blog/liste.php?list=' . $blogarr['user_id'] . '">Se blog</a>
' . (iADMIN || $blogarr['user_id'] == $userdata['user_id'] ? '<br /><a href="/blog/slet.php?id=' . $blogarr['bp_id'] . '" onclick="return confirm(\'Er du sikker på, du vil slette dette indlæg?\')">Slet indlæg</a>' : '') . '
<br /><a href="/report.php?action=new&amp;bp_id=' . $blogarr['bp_id'] . '">Anmeld</a>
</td>
<td style="width: 75%;" class="tbl1">' . nl2br(parseubb(preg_replace('/\\[(\\/){0,1}img\\]/', '[$1url]', phpentities($blogarr['bp_content'])))) . '</td>
</tr>
<tr>
<td colSpan="2" style="width: 5px;">&nbsp;</td>
</tr>
';
    }
    echo '</table>';
}
echo makepagenav($_GET['rowstart'], 20, $bloglist2, 3, FUSION_SELF . "?list=" . $list . "&amp;") . "\n";
closetable();
require_once THEMES . "templates/footer.php";
示例#27
0
     echo "<div style='float:right'><input type='checkbox' name='delete_post[]' value='" . $data['post_id'] . "' /></div>\n";
 }
 echo nl2br(parseubb($message));
 echo "<!--sub_forum_post_message-->";
 if ($data['attach_id']) {
     if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM . "attachments/" . $data['attach_name'])) {
         echo "\n<hr />\n" . $data['user_name'] . $locale['506'] . "<br /><br />\n" . display_image($data['attach_name']) . "<br />[" . parsebytesize(filesize(FORUM . "attachments/" . $data['attach_name'])) . "]\n";
     } else {
         echo "\n<hr />\n" . $data['user_name'] . $locale['507'] . "<br />\n<a href='" . FUSION_SELF . "?thread_id=" . $_GET['thread_id'] . "&amp;getfile=" . $data['post_id'] . "'>" . $data['attach_name'] . "</a>";
     }
 }
 if ($data['post_edittime'] != "0") {
     echo "\n<hr />\n" . $locale['508'] . "<a href='../profile.php?lookup=" . $data['post_edituser'] . "'>" . $data['edit_name'] . "</a>" . $locale['509'] . showdate("forumdate", $data['post_edittime']);
 }
 if ($data['post_showsig'] && array_key_exists("user_sig", $data) && $data['user_sig']) {
     echo "\n<hr />" . nl2br(parseubb(parsesmileys($data['user_sig']), "b|i|u||center|small|url|mail|img|color"));
 }
 echo "<!--sub_forum_post--></td>\n</tr>\n";
 echo "<tr>\n<td class='tbl2' style='width:140px;white-space:nowrap'>";
 if ($settings['forum_ips'] && iMEMBER || iMOD) {
     echo "<strong>" . $locale['571'] . "</strong>: " . $data['post_ip'];
 } else {
     echo "&nbsp;";
 }
 echo "</td>\n<td class='tbl2 forum_thread_userbar'>\n<div style='float:left;white-space:nowrap' class='small'><!--forum_thread_userbar-->\n";
 if (array_key_exists("user_web", $data) && $data['user_web']) {
     if (!strstr($data['user_web'], "http://")) {
         $urlprefix = "http://";
     } else {
         $urlprefix = "";
     }
示例#28
0
 public function render_reply_form()
 {
     global $locale, $userdata, $forum_settings, $defender;
     $thread_data = $this->thread_info['thread'];
     if ((!iMOD or !iSUPERADMIN) && $thread_data['thread_locked']) {
         redirect(INFUSIONS . 'forum/index.php');
     }
     if ($this->getThreadPermission("can_reply")) {
         add_to_title($locale['global_201'] . $locale['forum_0503']);
         add_breadcrumb(array('link' => '', 'title' => $locale['forum_0503']));
         // field data
         $post_data = array('post_id' => 0, 'forum_id' => $this->thread_info['thread']['forum_id'], 'thread_id' => $this->thread_info['thread']['thread_id'], 'post_message' => isset($_POST['post_message']) ? form_sanitizer($_POST['post_message'], '', 'post_message') : '', 'post_showsig' => isset($_POST['post_showsig']) ? 1 : 0, 'post_smileys' => isset($_POST['post_smileys']) || isset($_POST['post_message']) && preg_match("#(\\[code\\](.*?)\\[/code\\]|\\[geshi=(.*?)\\](.*?)\\[/geshi\\]|\\[php\\](.*?)\\[/php\\])#si", $_POST['post_message']) ? 1 : 0, 'post_author' => $userdata['user_id'], 'post_datestamp' => time(), 'post_ip' => USER_IP, 'post_ip_type' => USER_IP_TYPE, 'post_edituser' => 0, 'post_edittime' => 0, 'post_editreason' => '', 'post_hidden' => 0, 'notify_me' => 0, 'post_locked' => $forum_settings['forum_edit_lock'] || isset($_POST['post_locked']) ? 1 : 0);
         // execute form post actions
         if (isset($_POST['post_reply'])) {
             require_once INCLUDES . "flood_include.php";
             // all data is sanitized here.
             if (!flood_control("post_datestamp", DB_FORUM_POSTS, "post_author='" . $userdata['user_id'] . "'")) {
                 // have notice
                 $update_forum_lastpost = FALSE;
                 if ($defender->safe()) {
                     // Prepare forum merging action
                     $last_post_author = dbarray(dbquery("SELECT post_author FROM " . DB_FORUM_POSTS . " WHERE thread_id='" . $thread_data['thread_id'] . "' ORDER BY post_id DESC LIMIT 1"));
                     if ($last_post_author['post_author'] == $post_data['post_author'] && $thread_data['forum_merge']) {
                         $last_message = dbarray(dbquery("SELECT post_id, post_message FROM " . DB_FORUM_POSTS . " WHERE thread_id='" . $thread_data['thread_id'] . "' ORDER BY post_id DESC"));
                         $post_data['post_id'] = $last_message['post_id'];
                         $post_data['post_message'] = $last_message['post_message'] . "\n\n" . $locale['forum_0640'] . " " . showdate("longdate", time()) . ":\n" . $post_data['post_message'];
                         dbquery_insert(DB_FORUM_POSTS, $post_data, 'update', array('primary_key' => 'post_id', 'keep_session' => TRUE));
                     } else {
                         $update_forum_lastpost = TRUE;
                         dbquery_insert(DB_FORUM_POSTS, $post_data, 'save', array('primary_key' => 'post_id', 'keep_session' => TRUE));
                         $post_data['post_id'] = dblastid();
                         if (!defined("FUSION_NULL")) {
                             dbquery("UPDATE " . DB_USERS . " SET user_posts=user_posts+1 WHERE user_id='" . $post_data['post_author'] . "'");
                         }
                     }
                     // Attach files if permitted
                     if (!empty($_FILES) && is_uploaded_file($_FILES['file_attachments']['tmp_name'][0]) && $this->getThreadPermission("can_upload_attach")) {
                         $upload = form_sanitizer($_FILES['file_attachments'], '', 'file_attachments');
                         if ($upload['error'] == 0) {
                             foreach ($upload['target_file'] as $arr => $file_name) {
                                 $adata = array('thread_id' => $thread_data['thread_id'], 'post_id' => $post_data['post_id'], 'attach_name' => $file_name, 'attach_mime' => $upload['type'][$arr], 'attach_size' => $upload['source_size'][$arr], 'attach_count' => 0);
                                 dbquery_insert(DB_FORUM_ATTACHMENTS, $adata, "save", array('keep_session' => TRUE));
                             }
                         }
                     }
                     // Update stats in forum and threads
                     if ($update_forum_lastpost == TRUE) {
                         // find all parents and update them
                         $list_of_forums = get_all_parent(dbquery_tree(DB_FORUMS, 'forum_id', 'forum_cat'), $thread_data['forum_id']);
                         foreach ($list_of_forums as $fid) {
                             dbquery("UPDATE " . DB_FORUMS . " SET forum_lastpost='" . time() . "', forum_postcount=forum_postcount+1, forum_lastpostid='" . $post_data['post_id'] . "', forum_lastuser='******'post_author'] . "' WHERE forum_id='" . $fid . "'");
                         }
                         // update current forum
                         dbquery("UPDATE " . DB_FORUMS . " SET forum_lastpost='" . time() . "', forum_postcount=forum_postcount+1, forum_lastpostid='" . $post_data['post_id'] . "', forum_lastuser='******'post_author'] . "' WHERE forum_id='" . $thread_data['forum_id'] . "'");
                         // update current thread
                         dbquery("UPDATE " . DB_FORUM_THREADS . " SET thread_lastpost='" . time() . "', thread_lastpostid='" . $post_data['post_id'] . "', thread_postcount=thread_postcount+1, thread_lastuser='******'post_author'] . "' WHERE thread_id='" . $thread_data['thread_id'] . "'");
                     }
                     if ($forum_settings['thread_notify'] && isset($_POST['notify_me'])) {
                         if (!dbcount("(thread_id)", DB_FORUM_THREAD_NOTIFY, "thread_id='" . $thread_data['thread_id'] . "' AND notify_user='******'post_author'] . "'")) {
                             dbquery("INSERT INTO " . DB_FORUM_THREAD_NOTIFY . " (thread_id, notify_datestamp, notify_user, notify_status) VALUES('" . $thread_data['thread_id'] . "', '" . time() . "', '" . $post_data['post_author'] . "', '1')");
                         }
                     }
                     if ($defender->safe()) {
                         redirect(INFUSIONS . "forum/postify.php?post=reply&error=0&amp;forum_id=" . intval($post_data['forum_id']) . "&amp;thread_id=" . intval($post_data['thread_id']) . "&amp;post_id=" . intval($post_data['post_id']));
                     }
                 }
             }
         }
         // template data
         $form_action = INFUSIONS . "forum/viewthread.php?action=reply&amp;forum_id=" . $thread_data['forum_id'] . "&amp;thread_id=" . $thread_data['thread_id'];
         // Quote Get
         if (isset($_GET['quote']) && isnum($_GET['quote'])) {
             $quote_result = dbquery("SELECT a.post_message, b.user_name\n\t\t\t\t\t\t\t\t\t\tFROM " . DB_FORUM_POSTS . " a\n\t\t\t\t\t\t\t\t\t\tINNER JOIN " . DB_USERS . " b ON a.post_author=b.user_id\n\t\t\t\t\t\t\t\t\t\tWHERE thread_id='" . $thread_data['thread_id'] . "' and post_id='" . $_GET['quote'] . "'");
             if (dbrows($quote_result) > 0) {
                 $quote_data = dbarray($quote_result);
                 // do not do this. to silently inject.
                 $post_data['post_message'] = "[quote name=" . $quote_data['user_name'] . " post=" . $_GET['quote'] . "]@" . $quote_data['user_name'] . " - " . strip_bbcodes($quote_data['post_message']) . "[/quote]" . $post_data['post_message'];
                 $form_action .= "&amp;post_id=" . $_GET['post_id'] . "&amp;quote=" . $_GET['quote'];
             } else {
                 redirect(INFUSIONS . "forum/index.php");
             }
         }
         $info = array('title' => $locale['forum_0503'], 'description' => $locale['forum_2000'] . $thread_data['thread_subject'], 'openform' => openform('input_form', 'post', $form_action, array('enctype' => $this->getThreadPermission("can_upload_attach") ? TRUE : FALSE, 'max_tokens' => 1)), 'closeform' => closeform(), 'forum_id_field' => form_hidden('forum_id', "", $post_data['forum_id']), 'thread_id_field' => form_hidden('thread_id', "", $post_data['thread_id']), "forum_field" => "", 'subject_field' => form_hidden('thread_subject', "", $thread_data['thread_subject']), 'message_field' => form_textarea('post_message', $locale['forum_0601'], $post_data['post_message'], array('required' => TRUE, 'error_text' => '', 'autosize' => TRUE, 'no_resize' => TRUE, 'preview' => TRUE, 'form_name' => 'input_form', 'bbcode' => TRUE)), 'delete_field' => '', 'edit_reason_field' => '', 'attachment_field' => $this->getThreadPermission("can_upload_attach") ? form_fileinput('file_attachments[]', $locale['forum_0557'], "", array('input_id' => 'file_attachments', 'upload_path' => INFUSIONS . 'forum/attachments/', 'type' => 'object', 'preview_off' => TRUE, "multiple" => TRUE, "inline" => false, 'max_count' => $forum_settings['forum_attachmax_count'], 'valid_ext' => $forum_settings['forum_attachtypes'], "class" => "m-b-0")) . "\n\t\t\t\t\t\t\t\t <div class='m-b-20'>\n<small>" . sprintf($locale['forum_0559'], parsebytesize($forum_settings['forum_attachmax']), str_replace('|', ', ', $forum_settings['forum_attachtypes']), $forum_settings['forum_attachmax_count']) . "</small>\n</div>\n" : "", "poll_form" => "", 'smileys_field' => form_checkbox('post_smileys', $locale['forum_0622'], $post_data['post_smileys'], array('class' => 'm-b-0')), 'signature_field' => array_key_exists("user_sig", $userdata) && $userdata['user_sig'] ? form_checkbox('post_showsig', $locale['forum_0623'], $post_data['post_showsig'], array('class' => 'm-b-0')) : '', 'sticky_field' => '', 'lock_field' => '', 'hide_edit_field' => '', 'post_locked_field' => '', 'notify_field' => $forum_settings['thread_notify'] ? form_checkbox('notify_me', $locale['forum_0626'], $post_data['notify_me'], array('class' => 'm-b-0')) : '', 'post_buttons' => form_button('post_reply', $locale['forum_0504'], $locale['forum_0504'], array('class' => 'btn-primary')) . form_button('cancel', $locale['cancel'], $locale['cancel'], array('class' => 'btn-default m-l-10')), 'last_posts_reply' => '');
         // only in reply
         if ($forum_settings['forum_last_posts_reply']) {
             $result = dbquery("\n\t\t\t\tSELECT\n\t\t\t\tp.thread_id, p.post_message, p.post_smileys, p.post_author, p.post_datestamp, p.post_hidden,\n\t\t\t\t\t\t\tu.user_id, u.user_name, u.user_status, u.user_avatar\n\t\t\t\t\t\t\tFROM " . DB_FORUM_POSTS . " p\n\t\t\t\t\t\t\tLEFT JOIN " . DB_USERS . " u ON p.post_author = u.user_id\n\t\t\t\t\t\t\tWHERE p.thread_id='" . $thread_data['thread_id'] . "' AND p.post_hidden='0'\n\t\t\t\t\t\t\tGROUP BY p.post_id\n\t\t\t\t\t\t\tORDER BY p.post_datestamp DESC LIMIT 0," . $forum_settings['posts_per_page']);
             if (dbrows($result)) {
                 $title = sprintf($locale['forum_0526'], $forum_settings['forum_last_posts_reply']);
                 if ($forum_settings['forum_last_posts_reply'] == "1") {
                     $title = $locale['forum_0525'];
                 }
                 ob_start();
                 echo "<p><strong>" . $title . "</strong>\n</p>\n";
                 echo "<table class='table table-responsive'>\n";
                 $i = $forum_settings['posts_per_page'];
                 while ($data = dbarray($result)) {
                     $message = $data['post_message'];
                     if ($data['post_smileys']) {
                         $message = parsesmileys($message);
                     }
                     $message = parseubb($message);
                     echo "<tr>\n<td class='tbl2 forum_thread_user_name' style='width:10%'><!--forum_thread_user_name-->" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</td>\n";
                     echo "<td class='tbl2 forum_thread_post_date'>\n";
                     echo "<div style='float:right' class='small'>\n";
                     echo $i . ($i == $forum_settings['forum_last_posts_reply'] ? " (" . $locale['forum_0525'] . ")" : "");
                     echo "</div>\n";
                     echo "<div class='small'>" . $locale['forum_0524'] . showdate("forumdate", $data['post_datestamp']) . "</div>\n";
                     echo "</td>\n";
                     echo "</tr>\n<tr>\n<td valign='top' class='tbl2 forum_thread_user_info' style='width:10%'>\n";
                     echo display_avatar($data, '50px');
                     echo "</td>\n<td valign='top' class='tbl1 forum_thread_user_post'>\n";
                     echo nl2br($message);
                     echo "</td>\n</tr>\n";
                     $i--;
                 }
                 echo "</table>\n";
                 $info['last_posts_reply'] = ob_get_contents();
                 ob_end_clean();
             }
         }
         postform($info);
     } else {
         redirect(INFUSIONS . 'forum/index.php');
     }
 }
示例#29
0
             $a_files .= "<a href='" . FUSION_SELF . "?thread_id=" . $_GET['thread_id'] . "&amp;getfile=" . $a_data['attach_id'] . "'>" . $a_data['attach_name'] . "</a> [<span class='small'>" . parsebytesize(filesize(FORUM . "attachments/" . $a_data['attach_name'])) . " / " . $count . "</span>]\n";
             $i_files++;
         }
     }
     if ($a_files) {
         echo "<br /><br /><fieldset style='border:1px solid #ccc;width:320px;'>\n\t\t\t\t<legend>" . $locale['fb568'] . "</legend>\n\t\t\t\t<div style='padding:3px;width:320px;'>{$a_files}</div>\n\t\t\t</fieldset><br />\n";
     }
     if ($a_images) {
         if (!$a_files) {
             echo "<br /><br />\n";
         }
         echo "<fieldset style='border:1px solid #ccc;width:320px;'>\n\t\t\t\t<legend>" . $locale['fb567'] . "</legend>\n\t\t\t\t<div style='padding:3px;width:320px;'>{$a_images}</div>\n\t\t\t</fieldset><br />\n";
     }
 }
 if ($data['post_showsig'] && array_key_exists("user_sig", $data) && $data['user_sig']) {
     echo "\n<div class='tbl-border' style='height:2px;overflow:hidden; margin-top:5px; margin-bottom:5px;width:320px;'>&nbsp;</div>" . nl2br(parseubb(parsesmileys($data['user_sig']), "b|i|u||center|small|url|mail|img|color"));
 }
 if ((dbrows(dbquery("select * from " . DB_PREFIX . "fb_rate where rate_post='" . $data['post_id'] . "'")) || iMEMBER && $userdata['user_id'] !== $data['user_id']) && $fb4['show_ratings']) {
     echo "<br /><br />\n";
 }
 echo "<!--sub_forum_post--></td>\n</tr>\n";
 echo "<tr>\n<td class='tbl2' style='white-space:nowrap;font-size:9px;padding:8px;whitespace:no-wrap;'>";
 postRatings($data['post_id']);
 echo "</td>\n<td class='tbl2' align='right' style='width:1%;height:1px;padding:8px;' nowrap='nowrap'>";
 if (iMEMBER) {
     showRatings($data['post_id'], $userdata['user_id'], $data['post_author'], false);
 }
 if (iMEMBER && ($can_post || $can_reply) && !$fb4['buttons']) {
     if ($userdata['user_id'] !== $data['user_id']) {
         echo ":: ";
     }
示例#30
0
 function send_pm_mail($to_id, $pm_type)
 {
     global $locale, $userdata, $settings;
     if (!isset($locale['PDP902']['subject'][$pm_type])) {
         return false;
     }
     if (iMEMBER) {
         $from_id = $userdata['user_id'];
         /*
         $res = dbquery("SELECT user_name"
         	." WHERE user_id='$from_id'");
         $from_name = array_shift(dbarray($res));
         */
     } else {
         $from_id = 0;
     }
     if (!$to_id || $from_id == $to_id) {
         return true;
     }
     // get user
     $res = dbquery("SELECT user_name, user_email" . " FROM " . DB_USERS . "" . " WHERE user_id='{$to_id}'");
     if (!dbrows($res)) {
         return false;
     }
     $data = dbarray($res);
     // collect
     $subject = stripinput($locale['PDP902']['subject'][$pm_type]);
     $body = stripinput($locale['PDP902']['body'][$pm_type]);
     $body .= "<br><br>";
     $body .= "[url=" . $settings['siteurl'] . "infusions/pro_download_panel/download.php" . "?did=" . $this->id . "]" . $locale['PDP026'] . "[/url]";
     $body .= "<br><br>";
     $body .= "[b]" . $locale['PDP051'] . ":[/b] " . USER_IP;
     // send pm
     $ok = dbquery("INSERT INTO " . DB_MESSAGES . " SET message_to='{$to_id}'," . " message_from='{$from_id}'," . " message_subject='{$subject}'," . " message_message='{$body}'," . " message_smileys='Y'," . " message_read='0'," . " message_datestamp='" . time() . "'");
     // send mail
     require_once INCLUDES . "sendmail_include.php";
     $type = "plain";
     $body = $subject;
     $body .= "\n\n";
     $body .= stripinput($locale['PDP902']['body'][$pm_type]);
     $body .= "\n\n";
     $body .= $locale['PDP026'] . ": " . $settings['siteurl'] . "infusions/pro_download_panel/download.php" . "?did=" . $this->id;
     $body .= "\n\n";
     sendemail($data['user_name'], $data['user_email'], $settings['siteusername'], $settings['siteemail'], $subject, strip_tags(parseubb($body)), $type);
     return true;
 }