当前位置: 首页>>代码示例>>PHP>>正文


PHP display_avatar函数代码示例

本文整理汇总了PHP中display_avatar函数的典型用法代码示例。如果您正苦于以下问题:PHP display_avatar函数的具体用法?PHP display_avatar怎么用?PHP display_avatar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了display_avatar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render_article

 function render_article($subject, $article, $info)
 {
     global $locale;
     $category = "<a href='" . INFUSIONS . "articles/articles.php?cat_id=" . $info['cat_id'] . "'>" . $info['cat_name'] . "</a>\n";
     $comment = "<a href='" . INFUSIONS . "articles/articles.php?article_id=" . $info['article_id'] . "#comments'> " . format_word($info['article_comments'], $locale['fmt_comment']) . " </a>\n";
     echo render_breadcrumbs();
     echo "<!--pre_article-->";
     echo "<article>\n";
     echo "<div class='news-action text-right'>";
     echo "<a title='" . $locale['global_075'] . "' href='" . BASEDIR . "print.php?type=A&amp;item_id=" . $info['article_id'] . "'><i class='entypo print'></i></a>";
     echo !empty($info['edit_link']) ? "<a href='" . $info['edit_link'] . "' title='" . $locale['global_076'] . "' /><i class='entypo pencil'></i></a>\n" : '';
     echo "</div>\n";
     echo "<div class='news-info'>" . ucfirst($locale['posted']) . " <span class='news-date'>" . showdate("%d %b %Y", $info['article_date']) . "</span> " . $locale['in'] . " {$category} " . $locale['and'] . " {$comment}</div>\n";
     echo "<h2 class='news-title'>{$subject}</h2>";
     echo "<div class='article'>\n";
     echo ($info['article_breaks'] == "y" ? nl2br($article) : $article) . "<br />\n";
     echo "</div>\n";
     echo "<hr />\n";
     echo "<div class='news-user-info clearfix m-b-10'>\n";
     echo "<h4>" . $locale['about'] . " <a href='" . BASEDIR . "profile.php?lookup=" . $info['user_id'] . "'>" . $info['user_name'] . "</a>\n</h4>";
     echo "<div class='pull-left m-r-10'>" . display_avatar($info, '80px') . "</div>\n";
     echo "<strong>" . getuserlevel($info['user_level']) . "</strong><br/>\n";
     echo "<strong>" . $locale['joined'] . showdate('newsdate', $info['user_joined']) . "</strong><br/>\n";
     echo "</div>\n";
     echo "</article>";
     echo "<!--sub_article-->";
     echo $info['page_nav'];
     echo "<hr />\n";
     if ($info['article_allow_comments']) {
         showcomments("A", DB_ARTICLES, "article_id", $_GET['article_id'], INFUSIONS . "articles/articles.php?article_id=" . $_GET['article_id']);
     }
     if ($info['article_allow_ratings']) {
         showratings("A", $_GET['article_id'], INFUSIONS . "articles/articles.php?article_id=" . $_GET['article_id']);
     }
 }
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:35,代码来源:articles.php

示例2: show_blacklist

 function show_blacklist($data)
 {
     global $locale;
     echo "<div class='alert alert-info display-none' id='ignore-message'></div>\n";
     if (is_array($data) && count($data) > 0) {
         foreach ($data as $id) {
             $result = dbquery("SELECT user_id, user_name, user_status, user_avatar FROM " . DB_USERS . " WHERE user_id='{$id}' ORDER BY user_id ASC");
             if (dbrows($result) > 0) {
                 while ($data = dbarray($result)) {
                     echo "<div id='" . $data['user_id'] . "-user-list' class='panel panel-default'>\n<div class='panel-body'>\n";
                     echo "<button type='button' value='" . $data['user_id'] . "' class='unblock pull-right m-t-5 btn btn-sm btn-primary'>" . $locale['uf_blacklist_001'] . "</button>\n";
                     echo "<div class='pull-left m-r-10'>" . display_avatar($data, '50px') . "</div>\n";
                     echo "<div class='clearfix'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "<br/>\n";
                     echo "<span class='text-lighter'>" . $locale['uf_blacklist_002'] . "</span>\n";
                     echo "</div>\n";
                     echo "</div>\n</div>\n";
                 }
             }
         }
     }
     add_to_jquery("\n\t\$('.unblock').bind('click', function(e) {\n\tvar user_id = \$(this).val();\n\t\$.ajax({\n\t\ttype: 'POST',\n\t\turl: '" . INCLUDES . "user_fields/user_blacklist.ajax.php',\n\t\tdata: { user_id : user_id },\n\t\tdataType: 'html',\n\t\tsuccess: function(data) {\n\t\t\talert(data);\n\t\t\t\$('#'+user_id+'-user-list').addClass('display-none');\n\t\t\t\$('#ignore-message').html(data).removeClass('display-none');\n\t\t},\n\t\terror: function() {\n\t\t\talert('" . $locale['uf_blacklist_desc'] . "');\n\t\t}\n\t\t});\n\t});\n\t");
 }
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:22,代码来源:user_blacklist_include.php

示例3: render_article

function render_article($subject, $article, $info)
{
    global $locale, $settings, $aidlink;
    $category = "<a href='" . BASEDIR . "articles.php?cat_id=" . $info['cat_id'] . "'>" . $info['cat_name'] . "</a>\n";
    $comment = "<a href='" . BASEDIR . "articles.php?article_id=" . $info['article_id'] . "#comments'>" . $info['article_comments'] . " comment</a>\n";
    echo "<article>\n";
    echo "<div class='news-action text-right'>";
    echo "<a title='" . $locale['global_075'] . "' href='" . BASEDIR . "print.php?type=A&amp;item_id=" . $info['article_id'] . "'><i class='entypo print'></i></a>";
    echo iADMIN && checkrights("A") ? "<a href='" . ADMIN . "articles.php" . $aidlink . "&amp;action=edit&amp;article_id=" . $info['article_id'] . "' title='" . $locale['global_076'] . "' /><i class='entypo pencil'></i></a>\n" : '';
    echo "</div>\n";
    echo "<div class='news-info'>Posted <span class='news-date'>" . showdate("%d %b %Y", $info['article_date']) . "</span> in {$category} and {$comment}</div>\n";
    echo "<h2 class='news-title'>{$subject}</h2>";
    echo "<div class='article'>\n";
    echo ($info['article_breaks'] == "y" ? nl2br($article) : $article) . "<br />\n";
    echo "</div>\n";
    echo "<div class='news-user-info'>\n";
    echo "<h4>About <a href='" . BASEDIR . "profile.php?lookup=" . $info['user_id'] . "'>" . $info['user_name'] . "</a>\n</h4>";
    echo "<div class='pull-left m-r-10'>" . display_avatar($info, '80px') . "</div>\n";
    echo "<strong>" . getuserlevel($info['user_level']) . "</strong><br/>\n";
    echo "<strong>Joined since: " . showdate('newsdate', $info['user_joined']) . "</strong><br/>\n";
    echo "</div>\n";
    echo "</article>";
}
开发者ID:WuChEn,项目名称:PHP-Fusion,代码行数:23,代码来源:render_news-articles.php

示例4: render_comments_form

 function render_comments_form($comment_type, $clink, $comment_item_id, $_CAPTCHA_HIDE_INPUT)
 {
     $userdata = fusion_get_userdata();
     $settings = fusion_get_settings();
     $locale = fusion_get_locale();
     $comment_cat = "";
     $comment_message = "";
     if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
         $eresult = dbquery("SELECT tcm.*, 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'];
                 $comment_cat = $edata['comment_cat'];
             }
         }
     }
     // Comments form
     if (iMEMBER || fusion_get_settings("guestposts") == 1) {
         $comments_form = openform('inputform', 'post', $clink);
         $comments_form .= form_hidden("comment_cat", "", $comment_cat);
         if (iGUEST) {
             $comments_form .= form_text('comment_name', $locale['c104'], '', array('max_length' => 30, 'required' => TRUE));
         }
         $comments_form .= form_textarea('comment_message', '', $comment_message, array('required' => 1, 'autosize' => 1, 'form_name' => 'inputform', "tinymce" => "simple", 'type' => fusion_get_settings("tinymce_enabled") ? "tinymce" : "bbcode"));
         if (iGUEST && (!isset($_CAPTCHA_HIDE_INPUT) || isset($_CAPTCHA_HIDE_INPUT) && !$_CAPTCHA_HIDE_INPUT)) {
             $_CAPTCHA_HIDE_INPUT = FALSE;
             $comments_form .= "<div class='m-t-10 m-b-10'>";
             $comments_form .= "<label class='col-xs-12 col-sm-3'>" . $locale['global_150'] . "</label><div class='col-xs-12 col-sm-9'>\n";
             ob_start();
             include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_display.php";
             $comments_form .= ob_get_contents();
             ob_end_clean();
             if (!$_CAPTCHA_HIDE_INPUT) {
                 $comments_form .= "<br />\n<label for='captcha_code'>" . $locale['global_151'] . "</label>";
                 $comments_form .= "<br />\n<input type='text' id='captcha_code' name='captcha_code' class='textbox' autocomplete='off' style='width:100px' />\n";
             }
             $comments_form .= "</div>\n";
             $comments_form .= "</div>\n";
         }
         $comments_form .= form_button('post_comment', $comment_message ? $locale['c103'] : $locale['c102'], $comment_message ? $locale['c103'] : $locale['c102'], array('class' => 'btn-success m-t-10'));
         $comments_form .= closeform();
     } else {
         $comments_form = "<div class='well'>\n";
         $comments_form .= $locale['c105'] . "\n";
         $comments_form .= "</div>\n";
     }
     ?>
     <!---comments form--->
     <div class="comments-form-panel">
         <!---comments header-->
         <div class="comments-form-header">
             <?php 
     echo $locale['c102'];
     ?>
         </div>
         <!---//comments header-->
         <div class="comments-form">
             <div class="pull-left">
                 <?php 
     echo display_avatar(fusion_get_userdata(), "50px", "", FALSE, "img-rounded");
     ?>
             </div>
             <div class="overflow-hide">
                 <a id="edit_comment" name="edit_comment"></a>
                 <?php 
     echo $comments_form;
     ?>
             </div>
         </div>
     </div>
     <!---//comments form--->
     <?php 
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:75,代码来源:render_functions.php

示例5: author

| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) {
    die("Access Denied");
}
if (!defined("iAUTH") || !isset($_GET['aid']) || $_GET['aid'] != iAUTH) {
    redirect("../index.php");
}
if (iADMIN && !$userdata['user_admin_password']) {
    echo "<div class='alert alert-danger text-center'>" . $locale['global_199'] . "</div>\n";
}
$form_action = FUSION_SELF . $aidlink == ADMIN . "index.php" . $aidlink ? FUSION_SELF . $aidlink . "&amp;pagenum=0" : FUSION_SELF . "?" . FUSION_QUERY;
// we can now MVC this.
echo openform('adminloginform', 'post', $form_action, array('max_tokens' => 2));
openside('');
echo "<div class='m-t-10 clearfix row'>\n";
echo "<div class='col-xs-3 col-sm-3 col-md-3 col-lg-3'>\n";
echo "<div class='pull-right'>\n";
echo display_avatar($userdata, '90px');
echo "</div>\n";
echo "</div>\n<div class='col-xs-9 col-sm-9 col-md-8 col-lg-7'>\n";
echo "<h5><strong>" . $locale['welcome'] . ", " . $userdata['user_name'] . "</strong><br/>" . getuserlevel($userdata['user_level']) . "</h5>";
echo "<div class='clearfix'>\n";
echo form_text('admin_password', '', '', array('placeholder' => $locale['281'], 'autocomplete_off' => 1, 'type' => 'password', 'required' => 1));
echo "</div>\n";
echo "</div>\n";
echo "</div>\n";
closeside();
echo form_button('admin_login', $locale['login'], 'Sign in', array('class' => 'btn-primary btn-block'));
echo closeform();
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:31,代码来源:login.php

示例6: openmodal

     }
     if (defender::safe()) {
         echo openmodal('article_preview', $locale['articles_0240']);
         echo "<h3>" . $callback_data['article_snippet'] . "</h3>\n";
         echo $callback_data['article_snippet'];
         echo "<hr/>\n";
         if (isset($callback_data['article_article'])) {
             echo $callback_data['article_article'];
         }
         echo closemodal();
     }
 }
 echo openform("publish_article", "post", FUSION_REQUEST);
 echo "<div class='well clearfix'>\n";
 echo "<div class='pull-left'>\n";
 echo display_avatar($data, "30px", "", "", "");
 echo "</div>\n";
 echo "<div class='overflow-hide'>\n";
 echo $locale['articles_0052'] . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "<br/>\n";
 echo $locale['articles_0053'] . timer($data['submit_datestamp']) . " - " . showdate("shortdate", $data['submit_datestamp']);
 echo "</div>\n";
 echo "</div>\n";
 echo "<div class='container-fluid'>\n";
 echo "<div class='col-xs-12 col-sm-12 col-md-12 col-lg-8'>";
 echo form_text("article_subject", $locale['articles_0200'], $callback_data['article_subject'], array("required" => TRUE, "inline" => FALSE));
 echo form_select('article_keywords', $locale['articles_0204'], $callback_data['article_keywords'], array("max_length" => 320, "placeholder" => $locale['articles_0204a'], "width" => "100%", "error_text" => $locale['articles_0257'], "tags" => TRUE, "multiple" => TRUE));
 $snippetSettings = array("required" => TRUE, "preview" => TRUE, "html" => TRUE, "autosize" => TRUE, "form_name" => "inputform");
 if (fusion_get_settings("tinymce_enabled")) {
     $snippetSettings = array("required" => TRUE);
 }
 echo form_textarea('article_snippet', $locale['articles_0202'], $callback_data['article_snippet'], $snippetSettings);
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:31,代码来源:article_submissions.php

示例7: dbquery

// 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=" . $userdata['user_id'] . " 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=" . $userdata['user_id'] . " 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;
    }
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:31,代码来源:tracked.php

示例8: opentable

     }
 }
 opentable($locale['SB_edit_shout']);
 echo $nav;
 $result = dbquery("SELECT * FROM " . DB_SHOUTBOX);
 $rows = dbrows($result);
 if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) {
     $_GET['rowstart'] = 0;
 }
 if ($rows != 0) {
     $i = 0;
     $result = dbquery("SELECT s.shout_id, s.shout_name, s.shout_message, s.shout_datestamp, s.shout_ip, u.user_id, u.user_name, u.user_avatar, u.user_status\r\n\t\t\t\tFROM " . DB_SHOUTBOX . " s\r\n\t\t\t\tLEFT JOIN " . DB_USERS . " u ON s.shout_name=u.user_id\r\n\t\t\t\tORDER BY shout_datestamp DESC LIMIT " . $_GET['rowstart'] . ",20");
     echo "<div class='list-group'>\n";
     while ($data = dbarray($result)) {
         echo "<div class='list-group-item' style='min-height:100px;'>\n";
         echo "<div class='pull-left m-r-10'>" . display_avatar($data, '80px') . "</div>\n";
         echo "<div class='comment-name'>";
         echo $data['user_name'] ? "<span class='slink'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</span>" : $data['shout_name'];
         echo "</span>\n";
         echo "<span class='small'>" . $locale['SB_on_date'] . showdate("longdate", $data['shout_datestamp']) . "</div>\n";
         echo "<div class='m-t-5'><small>\n";
         echo "<a href='" . FUSION_SELF . $aidlink . "&amp;action=edit&amp;shout_id=" . $data['shout_id'] . "'>" . $locale['SB_edit'] . "</a> -\n";
         echo "<a href='" . FUSION_SELF . $aidlink . "&amp;action=delete&amp;shout_id=" . $data['shout_id'] . "' onclick=\"return confirm('" . $locale['SB_warning_shout'] . "');\">" . $locale['SB_delete'] . "</a> -\n";
         echo "<strong>" . $locale['SB_userip'] . $data['shout_ip'] . "</strong>\n";
         echo "</small>\n</div>\n";
         echo str_replace("<br />", "", parseubb(parsesmileys($data['shout_message']), "b|i|u|url|color")) . "<br />\n";
         echo "</div>\n";
     }
     echo "</div>\n";
     echo "<div align='center' style='margin-top:5px;'>\n" . makePageNav($_GET['rowstart'], 20, $rows, 3, FUSION_SELF . $aidlink . "&amp;") . "\n</div>\n";
 } else {
开发者ID:WuChEn,项目名称:PHP-Fusion,代码行数:31,代码来源:shoutbox_admin.php

示例9: showcomments


//.........这里部分代码省略.........
                    $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'];
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:67,代码来源:comments_include.php

示例10: render_admin_panel

function render_admin_panel()
{
    global $locale, $userdata, $defender, $pages, $aidlink, $admin;
    $languages = fusion_get_enabled_languages();
    // Admin panel page
    echo "<div id='admin-panel' class='clearfix in'>\n";
    // Top header section
    echo "<section id='acp-header' class='pull-left affix clearfix' data-offset-top='0' data-offset-bottom='0'>\n";
    // Top content sections navigation
    echo "<nav>\n";
    echo "<ul class='top-left-menu pull-left m-l-15'>\n";
    echo "<li><a title='" . $locale['ac00'] . "' href='" . ADMIN . "index.php" . $aidlink . "&amp;pagenum=0'>" . $locale['ac00'] . "</a></li>\n";
    echo "<li><a title='" . $locale['ac01'] . "' href='" . ADMIN . "index.php" . $aidlink . "&amp;pagenum=1'>" . $locale['ac01'] . "</a></li>\n";
    echo "<li><a title='" . $locale['ac02'] . "' href='" . ADMIN . "index.php" . $aidlink . "&amp;pagenum=2'>" . $locale['ac02'] . "</a></li>\n";
    echo "<li><a title='" . $locale['ac03'] . "' href='" . ADMIN . "index.php" . $aidlink . "&amp;pagenum=3'>" . $locale['ac03'] . "</a></li>\n";
    echo "<li><a title='" . $locale['ac04'] . "' href='" . ADMIN . "index.php" . $aidlink . "&amp;pagenum=4'>" . $locale['ac04'] . "</a></li>\n";
    echo "<li><a title='" . $locale['ac05'] . "' href='" . ADMIN . "index.php" . $aidlink . "&amp;pagenum=5'>" . $locale['ac05'] . "</a></li>\n";
    echo "</ul>\n";
    echo "</nav>\n";
    // Top navigation
    echo "<nav>\n";
    // Top right menu links
    echo "<ul class='top-right-menu pull-right m-r-15'>\n";
    echo "<li class='dropdown'>\n";
    echo "<a class='dropdown-toggle pointer' data-toggle='dropdown'>" . display_avatar($userdata, '25px', '', '', '') . " " . $locale['logged'] . "<strong>" . $userdata['user_name'] . "</strong> <span class='caret'></span>\n</a>\n";
    echo "<ul class='dropdown-menu' role='menu'>\n";
    echo "<li><a class='display-block' href='" . BASEDIR . "edit_profile.php'>" . $locale['edit'] . " " . $locale['profile'] . "</a></li>\n";
    echo "<li><a class='display-block' href='" . BASEDIR . "profile.php?lookup=" . $userdata['user_id'] . "'>" . $locale['view'] . " " . $locale['profile'] . "</a></li>\n";
    echo "<li class='divider'> </li>\n";
    echo "<li><a class='display-block' href='" . FUSION_REQUEST . "&amp;logout'>" . $locale['admin-logout'] . "</a></li>\n";
    echo "<li><a class='display-block' href='" . BASEDIR . "index.php?logout=yes'>" . $locale['logout'] . "</a></li>\n";
    echo "</ul>\n";
    echo "</li>\n";
    if (count($languages) > 1) {
        echo "<li class='dropdown'><a class='dropdown-toggle pointer' data-toggle='dropdown' title='" . $locale['282'] . "'><i class='fa fa-globe fa-lg fa-fw'></i> " . translate_lang_names(LANGUAGE) . "<span class='caret'></span></a>\n";
        echo "<ul class='dropdown-menu'>\n";
        foreach ($languages as $language_folder => $language_name) {
            echo "<li><a class='display-block' href='" . clean_request("lang=" . $language_folder, array("lang"), FALSE) . "'><img class='m-r-5' src='" . BASEDIR . "locale/{$language_folder}/{$language_folder}-s.png'> {$language_name}</a></li>\n";
        }
        echo "</ul>\n";
        echo "</li>\n";
    }
    echo "</ul>\n";
    // .top-right-menu
    echo "</nav>\n";
    echo "</section>\n";
    // Content section
    echo "<div class='content-wrapper display-table pull-left'>\n";
    // Main content wrapper
    echo "<div id='acp-content' class='m-t-20 col-xs-12 col-sm-12 col-md-12 col-lg-12'>\n";
    // Render breadcrumbs
    echo render_breadcrumbs();
    // Get and render notices
    $notices = getNotices();
    echo renderNotices($notices);
    // Render the content
    echo CONTENT;
    echo "</div>\n";
    // #acp-content
    // Footer section
    echo "<footer class='m-l-20 display-inline-block m-t-20 m-b-20'>\n";
    // Copyright
    echo "Old_School Admin &copy; " . date("Y") . " created by <a href='https://www.php-fusion.co.uk'><strong>PHP-Fusion Inc.</strong></a>\n";
    echo showcopyright();
    // Render time
    if (fusion_get_settings('rendertime_enabled')) {
        echo "<br /><br />";
        // Make showing of queries and memory usage separate settings
        echo showrendertime();
        echo showMemoryUsage();
    }
    echo "<hr />\n";
    echo showFooterErrors();
    echo "</footer>\n";
    echo "</div>\n";
    // .acp-main
    echo "</div>\n";
    // #admin-panel
    // Wrappers
    echo "</div></div></div></div>\n";
    add_to_footer("<script src='" . THEMES . "admin_themes/Old_School/includes/jquery.slimscroll.min.js'></script>");
    add_to_jquery("\n// Initialize slimscroll\n\$('#adl').slimScroll({\n\theight: null\n});\n");
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:83,代码来源:acp_theme.php

示例11: _inbox

        /**
         * Message Reader Functions for Inbox, Outbox, Archive
         */
        function _inbox($info)
        {
            if (isset($_GET['msg_read']) && isset($info['items'][$_GET['msg_read']])) {
                // read view
                $data = $info['items'][$_GET['msg_read']];
                echo '
                <h4>' . $data['message']['message_header'] . '</h4>
                <div class="clearfix m-t-20 m-b-20">
                    <div class="pull-left m-r-15">' . display_avatar($data, "40px") . '</div>
                    <div class="overflow-hide">
                        ' . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . '<br/>
                        ' . showdate("shortdate", $data['message_datestamp']) . timer($data['message_datestamp']) . '
                    </div>
                </div>
                ' . $data['message']['message_text'] . '
                <hr/>
                ' . $info['reply_form'];
            } elseif (isset($_GET['msg_send'])) {
                // send new message form
                echo $info['reply_form'];
            } else {
                // display view
                global $locale;
                if (!empty($info['items'])) {
                    $unread = array();
                    $read = array();
                    foreach ($info['items'] as $message_id => $messageData) {
                        if ($messageData['message_read']) {
                            $read[$message_id] = $messageData;
                        } else {
                            $unread[$message_id] = $messageData;
                        }
                    }
                    echo '<h5><a data-target="#unread_inbox" class="pointer text-dark" data-toggle="collapse">
                    <i class="fa fa-caret-down"></i> ' . $locale['446'] . '</a></h5>
                    <div id="unread_inbox" class="collapse in">';
                    if (!empty($unread)) {
                        echo '<table id="unread_tbl" class="table table-responsive table-hover">';
                        foreach ($unread as $id => $messageData) {
                            echo "<tr>\n";
                            echo "<td>" . form_checkbox("pmID", "", $id, array("input_id" => "pmID-" . $id, "value" => $id, "class" => "checkbox m-b-0")) . "</td>\n";
                            echo "<td class='col-xs-2'><strong>" . $messageData['contact_user']['user_name'] . "</strong></td>\n";
                            echo "<td class='col-xs-7'><strong><a href='" . $messageData['message']['link'] . "'>" . $messageData['message']['name'] . "</a></strong></td>\n";
                            echo "<td>" . date("d M", $messageData['message_datestamp']) . "</td>\n";
                            echo "</tr>\n";
                        }
                        echo '</table>';
                    } else {
                        echo '<div class="text-center list-group-item">' . $locale['471'] . '</div>';
                    }
                    echo '</div>';
                    echo '<h5><a data-target="#read_inbox" class="pointer text-dark" data-toggle="collapse">
				<i class="fa fa-caret-down"></i> ' . $locale['447'] . '</a></h5>
				<div id="read_inbox" class="collapse in">';
                    if (!empty($read)) {
                        echo '<table id="read_tbl"  class="table table-responsive table-hover">';
                        foreach ($read as $id => $messageData) {
                            echo "<tr>\n";
                            echo "<td>" . form_checkbox("pmID", "", $id, array("input_id" => "pmID-" . $id, "value" => $id, "class" => "checkbox m-b-0")) . "</td>\n";
                            echo "<td class='col-xs-2'>" . $messageData['contact_user']['user_name'] . "</td>\n";
                            echo "<td class='col-xs-7'><a href='" . $messageData['message']['link'] . "'>" . $messageData['message']['name'] . "</a></td>\n";
                            echo "<td>" . date("d M", $messageData['message_datestamp']) . "</td>\n";
                            echo "</tr>\n";
                        }
                    }
                    echo '</table>';
                    echo '</div>';
                } else {
                    echo '<div class="text-center list-group-item">' . $info['no_item'] . '</div>';
                }
            }
        }
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:75,代码来源:messages.php

示例12: render_photo_items

 function render_photo_items(array $info = array())
 {
     global $locale, $gallery_settings;
     echo "<div class='panel panel-default'>\n";
     echo "<div class='overflow-hide' style='background: #ccc; height: " . ($gallery_settings['thumb_h'] - 15) . "px'>\n";
     echo $info['image'];
     echo "</div>\n";
     echo "<div class='panel-body'>\n";
     echo "<a class='word-break' href='" . $info['photo_link']['link'] . "'><strong>" . $locale['450'] . "</strong></a>\n<br/>";
     echo "</div>\n";
     echo "<div class='panel-footer'>\n";
     echo "<span><i class='fa fa-eye fa-fw'></i>" . $info['photo_views'] . "</span></br>\n";
     if (isset($info['photo_comments'])) {
         echo "<span><i class='fa fa-comment-o fa-fw'></i><a href='" . $info['photo_comments']['link'] . "'>" . $info['photo_comments']['word'] . "</a>\n</span></br>\n";
     }
     if (isset($info['photo_ratings'])) {
         echo "<span><i class='fa fa-star-o fa-fw'></i><a href='" . $info['photo_ratings']['link'] . "'>" . $info['photo_ratings']['word'] . "</a>\n</span></br>\n";
     }
     echo "</div>\n";
     echo "<div class='panel-footer'>\n";
     echo "<small><strong>" . $locale['434'] . "</strong></small>\n<br/>\n";
     echo "<div class='pull-left'>\n" . display_avatar($info, "15px", "", "", "") . "</div>";
     echo "<div class='overflow-hide'>\n" . profile_link($info['user_id'], $info['user_name'], $info['user_status']) . "</div>\n";
     echo "</div>\n";
     echo "<div class='panel-footer'>\n";
     echo "<abbr title='" . $locale['464'] . showdate("shortdate", $info['photo_datestamp']) . "'>\n\t\t\t<i class='entypo calendar text-lighter'></i></abbr> " . timer($info['photo_datestamp']) . "";
     if (!empty($info['photo_edit']) && !empty($info['photo_delete'])) {
         echo "</div>\n<div class='panel-footer'>\n";
         echo "<a class='btn btn-default' href='" . $info['photo_edit']['link'] . "' title='" . $info['photo_edit']['name'] . "'><i class='fa fa-edit fa-lg'></i></a>\n";
         echo "<a class='btn btn-danger' href='" . $info['photo_delete']['link'] . "' title='" . $info['photo_delete']['name'] . "'><i class='fa fa-trash fa-lg'></i></a>\n";
     }
     echo "</div></div>\n";
 }
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:33,代码来源:gallery.php

示例13: display_news_listing


//.........这里部分代码省略.........
                            <?php 
            echo $data['news_subject'];
            ?>
                        </a>
                    </td>
                    <td>
                        <a class="text-dark" href="<?php 
            echo $cat_edit_link;
            ?>
">
                            <?php 
            echo $data['news_cat_name'];
            ?>
                        </a>
                    </td>
                    <td>
                        <?php 
            echo getgroupname($data['news_visibility']);
            ?>
                    </td>
                    <td>
                        <span class="badge"><?php 
            echo $data['news_sticky'] ? $locale['yes'] : $locale['no'];
            ?>
</span>
                    </td>
                    <td>
                        <span class="badge"><?php 
            echo $data['news_draft'] ? $locale['yes'] : $locale['no'];
            ?>
</span>
                    </td>

                    <td><?php 
            echo $data['comments_count'];
            ?>
</td>
                    <td><?php 
            echo $data['ratings_count'];
            ?>
</td>
                    <td>
                        <div class="pull-left"><?php 
            echo display_avatar($data, "20px", "", FALSE, "img-rounded");
            ?>
</div>
                        <div class="overflow-hide"><?php 
            echo profile_link($data['user_id'], $data['user_name'], $data['user_status']);
            ?>
</div>
                    </td>
                    <td>
                        <div class="btn-group">
                            <a class="btn btn-xs btn-default" href="<?php 
            echo $edit_link;
            ?>
">
                                <?php 
            echo $locale['edit'];
            ?>
                            </a>
                            <a class="btn btn-xs btn-default"
                               href="<?php 
            echo FUSION_SELF . $aidlink . "&amp;action=delete&amp;news_id=" . $data['news_id'];
            ?>
"
                               onclick="return confirm('<?php 
            echo $locale['news_0251'];
            ?>
')">
                                <?php 
            echo $locale['delete'];
            ?>
                            </a>
                        </div>

                    </td>
                    <td><?php 
            echo $data['news_id'];
            ?>
</td>
                </tr>
                <?php 
        }
    } else {
        ?>
            <tr>
                <td colspan="10" class="text-center strong"><?php 
        echo $locale['news_0254'];
        ?>
</td>
            </tr>
        <?php 
    }
    ?>
        </tbody>
    </table>
    <?php 
    closeform();
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:101,代码来源:news.php

示例14: dbquery

<?php

/**
 * Displays all users
 */
echo "<h3 class='icon1 margin'>" . $locale['debonair_0400'] . "</h3>\n";
$result = dbquery("select user_id, user_name, user_status from " . DB_USERS . " order by user_joined DESC");
if (dbrows($result) > 0) {
    echo "<div class='m-b-10'>\n";
    while ($data = dbarray($result)) {
        echo display_avatar($data, '25px', "", true, "img-circle");
    }
    echo "</div>\n";
    echo "<div class='link-holder'><a href='" . BASEDIR . "members.php' class='more-dark'>" . $locale['debonair_0401'] . "</a></div>\n";
} else {
    echo $locale['debonair_0402'];
}
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:17,代码来源:users.php

示例15: set_ForumInfo


//.........这里部分代码省略.........
             // Filter Links
             $timeExt = isset($_GET['time']) ? "&amp;time=" . $_GET['time'] : '';
             $typeExt = isset($_GET['type']) ? "&amp;type=" . $_GET['type'] : '';
             $sortExt = isset($_GET['sort']) ? "&amp;sort=" . $_GET['sort'] : '';
             $orderExt = isset($_GET['order']) ? "&amp;order=" . $_GET['order'] : '';
             $baseLink = INFUSIONS . 'forum/index.php?viewforum&amp;forum_id=' . $_GET['forum_id'] . '' . (isset($_GET['parent_id']) ? '&amp;parent_id=' . $_GET['parent_id'] . '' : '');
             $timeLink = $baseLink . $typeExt . $sortExt . $orderExt;
             $this->forum_info['filter']['time'] = array($locale['forum_3006'] => INFUSIONS . 'forum/index.php?viewforum&amp;forum_id=' . $_GET['forum_id'] . '' . (isset($_GET['parent_id']) ? '&amp;parent_id=' . $_GET['parent_id'] . '' : ''), $locale['forum_3007'] => $timeLink . '&amp;time=today', $locale['forum_3008'] => $timeLink . '&amp;time=2days', $locale['forum_3009'] => $timeLink . '&amp;time=1week', $locale['forum_3010'] => $timeLink . '&amp;time=2week', $locale['forum_3011'] => $timeLink . '&amp;time=1month', $locale['forum_3012'] => $timeLink . '&amp;time=2month', $locale['forum_3013'] => $timeLink . '&amp;time=3month', $locale['forum_3014'] => $timeLink . '&amp;time=6month', $locale['forum_3015'] => $timeLink . '&amp;time=1year');
             $typeLink = $baseLink . $timeExt . $sortExt . $orderExt;
             $this->forum_info['filter']['type'] = array($locale['forum_3000'] => $typeLink . '&amp;type=all', $locale['forum_3001'] => $typeLink . '&amp;type=discussions', $locale['forum_3002'] => $typeLink . '&amp;type=attachments', $locale['forum_3003'] => $typeLink . '&amp;type=poll', $locale['forum_3004'] => $typeLink . '&amp;type=solved', $locale['forum_3005'] => $typeLink . '&amp;type=unsolved');
             $sortLink = $baseLink . $timeExt . $typeExt . $orderExt;
             $this->forum_info['filter']['sort'] = array($locale['forum_3016'] => $sortLink . '&amp;sort=author', $locale['forum_3017'] => $sortLink . '&amp;sort=time', $locale['forum_3018'] => $sortLink . '&amp;sort=subject', $locale['forum_3019'] => $sortLink . '&amp;sort=reply', $locale['forum_3020'] => $sortLink . '&amp;sort=view');
             $orderLink = $baseLink . $timeExt . $typeExt . $sortExt;
             $this->forum_info['filter']['order'] = array($locale['forum_3021'] => $orderLink . '&amp;order=descending', $locale['forum_3022'] => $orderLink . '&amp;order=ascending');
             // Forum SQL
             $result = dbquery("SELECT f.*, f2.forum_name AS forum_cat_name,\n\t\t\t\tt.thread_id, t.thread_lastpost, t.thread_lastpostid, t.thread_subject,\n\t\t\t\tcount(t.thread_id) as forum_threadcount, p.post_message,\n\t\t\t\tu.user_id, u.user_name, u.user_status, u.user_avatar\n\t\t\t\tFROM " . DB_FORUMS . " f\n\t\t\t\tLEFT JOIN " . DB_FORUMS . " f2 ON f.forum_cat = f2.forum_id\n\t\t\t\tLEFT JOIN " . DB_FORUM_THREADS . " t ON t.forum_id = f.forum_id\n\t\t\t\tLEFT JOIN " . DB_FORUM_POSTS . " p on p.thread_id = t.thread_id and p.post_id = t.thread_lastpostid\n\t\t\t\tLEFT JOIN " . DB_USERS . " u ON f.forum_lastuser=u.user_id  ## -- redo this part -- ##\n\t\t\t\t" . (multilang_table("FO") ? "WHERE f.forum_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('f.forum_access') . "\n\t\t\t\tAND f.forum_id='" . intval($this->forum_info['forum_id']) . "' OR f.forum_cat='" . intval($this->forum_info['forum_id']) . "' OR f.forum_branch='" . intval($this->forum_info['forum_branch']) . "'\n\t\t\t\tgroup by f.forum_id ORDER BY forum_cat ASC\n\t\t\t\t");
             $refs = array();
             if (dbrows($result) > 0) {
                 while ($row = dbarray($result) and checkgroup($row['forum_access'])) {
                     // Calculate Forum New Status
                     $newStatus = "";
                     $forum_match = "\\|" . $row['forum_lastpost'] . "\\|" . $row['forum_id'];
                     $last_visited = isset($userdata['user_lastvisit']) && isnum($userdata['user_lastvisit']) ? $userdata['user_lastvisit'] : time();
                     if ($row['forum_lastpost'] > $last_visited) {
                         if (iMEMBER && ($row['forum_lastuser'] !== $userdata['user_id'] || !preg_match("({$forum_match}\\.|{$forum_match}\$)", $userdata['user_threads']))) {
                             $newStatus = "<span class='forum-new-icon'><i title='" . $locale['forum_0260'] . "' class='" . Functions::get_forumIcons('new') . "'></i></span>";
                         }
                     }
                     // Calculate lastpost information
                     $lastPostInfo = array();
                     if ($row['forum_lastpostid']) {
                         $last_post = array('avatar' => '', 'avatar_src' => $row['user_avatar'] && file_exists(IMAGES . 'avatars/' . $row['user_avatar']) && !is_dir(IMAGES . 'avatars/' . $row['user_avatar']) ? IMAGES . 'avatars/' . $row['user_avatar'] : '', 'message' => fusion_first_words(parseubb(parsesmileys($row['post_message'])), 10), 'profile_link' => profile_link($row['forum_lastuser'], $row['user_name'], $row['user_status']), 'time' => timer($row['forum_lastpost']), 'date' => showdate("forumdate", $row['forum_lastpost']), 'thread_link' => INFUSIONS . "forum/viewthread.php?forum_id=" . $row['forum_id'] . "&amp;thread_id=" . $row['thread_id'], 'post_link' => INFUSIONS . "forum/viewthread.php?forum_id=" . $row['forum_id'] . "&amp;thread_id=" . $row['thread_id'] . "&amp;pid=" . $row['thread_lastpostid'] . "#post_" . $row['thread_lastpostid']);
                         if ($forum_settings['forum_last_post_avatar']) {
                             $last_post['avatar'] = display_avatar($row, '30px', '', '', 'img-rounded');
                         }
                         $lastPostInfo = $last_post;
                     }
                     /**
                      * Default system icons - why do i need this? Why not let themers decide?
                      */
                     switch ($row['forum_type']) {
                         case '1':
                             $forum_icon = "<i class='" . Functions::get_forumIcons('forum') . " fa-fw m-r-10'></i>";
                             $forum_icon_lg = "<i class='" . Functions::get_forumIcons('forum') . " fa-3x fa-fw m-r-10'></i>";
                             break;
                         case '2':
                             $forum_icon = "<i class='" . Functions::get_forumIcons('thread') . " fa-fw m-r-10'></i>";
                             $forum_icon_lg = "<i class='" . Functions::get_forumIcons('thread') . " fa-3x fa-fw m-r-10'></i>";
                             break;
                         case '3':
                             $forum_icon = "<i class='" . Functions::get_forumIcons('link') . " fa-fw m-r-10'></i>";
                             $forum_icon_lg = "<i class='" . Functions::get_forumIcons('link') . " fa-3x fa-fw m-r-10'></i>";
                             break;
                         case '4':
                             $forum_icon = "<i class='" . Functions::get_forumIcons('question') . " fa-fw m-r-10'></i>";
                             $forum_icon_lg = "<i class='" . Functions::get_forumIcons('question') . " fa-3x fa-fw m-r-10'></i>";
                             break;
                         default:
                             $forum_icon = "";
                             $forum_icon_lg = "";
                     }
                     $row += array("forum_moderators" => Functions::parse_forumMods($row['forum_mods']), "forum_new_status" => $newStatus, "forum_link" => array("link" => INFUSIONS . "forum/index.php?viewforum&amp;forum_id=" . $row['forum_id'] . "&amp;parent_id=" . $row['forum_cat'], "title" => $row['forum_name']), "forum_description" => nl2br(parseubb($row['forum_description'])), "forum_postcount_word" => format_word($row['forum_postcount'], $locale['fmt_post']), "forum_threadcount_word" => format_word($row['forum_threadcount'], $locale['fmt_thread']), "last_post" => $lastPostInfo, "forum_icon" => $forum_icon, "forum_icon_lg" => $forum_icon_lg, "forum_image" => $row['forum_image'] && file_exists(FORUM . "images/" . $row['forum_image']) ? $row['forum_image'] : "");
                     $this->forum_info['forum_moderators'] = $row['forum_moderators'];
                     // child hierarchy data.
                     $thisref =& $refs[$row['forum_id']];
                     $thisref = $row;
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:67,代码来源:Forum.php


注:本文中的display_avatar函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。