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


PHP profile_link函数代码示例

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


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

示例1: get_mood_message

 public function get_mood_message()
 {
     // whether any user has reacted to this post
     $locale = fusion_get_locale("", FORUM_ADMIN_LOCALE);
     $locale += fusion_get_locale("", FORUM_LOCALE);
     $last_datestamp = array();
     $mood_description = array();
     $mood_cache = $this->cache_mood();
     $response_query = "SELECT pn.*, u.user_id, u.user_name, u.user_avatar, u.user_status\n        FROM " . DB_POST_NOTIFY . " pn\n        LEFT JOIN " . DB_USERS . " u ON pn.notify_sender = u.user_id\n        WHERE post_id='" . $this->post_id . "' GROUP BY pn.notify_mood_id ORDER BY pn.notify_mood_id ASC, pn.post_id ASC";
     $response_result = dbquery($response_query);
     if (dbrows($response_result)) {
         while ($m_data = dbarray($response_result)) {
             $user_output = "<a class='mood_sender' href='" . FUSION_REQUEST . "#post_" . $this->post_id . "'>\n" . profile_link($m_data['user_id'], $m_data['user_name'], $m_data['user_status'], "", FALSE) . "</a>";
             if (fusion_get_userdata('user_id') == $m_data['notify_sender']) {
                 $user_output = $locale['you'];
             }
             $reply_sender[$m_data['notify_mood_id']][] = $user_output;
             // The pairing errors are when `notify_mood_id` is illegally inserted or deleted
             // To code fallback on empty
             $last_datestamp[$m_data['notify_mood_id']] = $m_data['notify_datestamp'];
             $icon = isset($mood_cache[$m_data['notify_mood_id']]['mood_icon']) ? $mood_cache[$m_data['notify_mood_id']]['mood_icon'] : "fa fa-question fa-fw";
             $mood_icon[$m_data['notify_mood_id']] = "<i class='{$icon}'></i>";
             $description = isset($mood_cache[$m_data['notify_mood_id']]['mood_description']) ? $mood_cache[$m_data['notify_mood_id']]['mood_description'] : $locale['forum_0529'];
             $mood_description[$m_data['notify_mood_id']] = $description;
         }
         $output_message = "";
         foreach ($mood_description as $mood_id => $mood_output) {
             $senders = implode(", ", $reply_sender[$mood_id]);
             $output_message .= sprintf($locale['forum_0528'], $mood_icon[$mood_id], $senders, $mood_output, timer($last_datestamp[$mood_id])) . "\n                        <br/>";
         }
         return (string) $output_message;
     }
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:33,代码来源:mood.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: opentable

opentable($locale['global_056']);
$result = dbquery("SELECT tn.thread_id FROM " . DB_THREAD_NOTIFY . " tn\n\tINNER JOIN " . DB_THREADS . " tt ON tn.thread_id = tt.thread_id\n\tINNER JOIN " . DB_FORUMS . " tf ON tt.forum_id = tf.forum_id\n\tWHERE tn.notify_user=" . $userdata['user_id'] . " AND " . groupaccess('forum_access') . " AND tt.thread_hidden='0'");
$rows = dbrows($result);
if ($rows) {
    $result = dbquery("\n\t\tSELECT tf.forum_access, tn.thread_id, tn.notify_datestamp, tn.notify_user,\n\t\ttt.thread_subject, tt.forum_id, tt.thread_lastpost, tt.thread_lastuser, tt.thread_postcount,\n\t\ttu.user_id AS user_id1, tu.user_name AS user_name1, tu.user_status AS user_status1, \n\t\ttu2.user_id AS user_id2, tu2.user_name AS user_name2, tu2.user_status AS user_status2\n\t\tFROM " . DB_THREAD_NOTIFY . " tn\n\t\tINNER JOIN " . DB_THREADS . " tt ON tn.thread_id = tt.thread_id\n\t\tINNER JOIN " . DB_FORUMS . " tf ON tt.forum_id = tf.forum_id\n\t\tLEFT JOIN " . DB_USERS . " tu ON tt.thread_author = tu.user_id\n\t\tLEFT JOIN " . DB_USERS . " tu2 ON tt.thread_lastuser = tu2.user_id\n\t\tINNER JOIN " . DB_POSTS . " tp ON tt.thread_id = tp.thread_id\n\t\tWHERE tn.notify_user=" . $userdata['user_id'] . " AND " . groupaccess('forum_access') . " AND tt.thread_hidden='0'\n\t\tGROUP BY tn.thread_id\n\t\tORDER BY tn.notify_datestamp DESC\n\t\tLIMIT " . $_GET['rowstart'] . ",10\n\t");
    echo "<table class='tbl-border' cellpadding='0' cellspacing='1' width='100%'>\n<tr>\n";
    echo "<td class='tbl2'><strong>" . $locale['global_044'] . "</strong></td>\n";
    echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_050'] . "</strong></td>\n";
    echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_047'] . "</strong></td>\n";
    echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_046'] . "</strong></td>\n";
    echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_057'] . "</strong></td>\n";
    echo "</tr>\n";
    $i = 0;
    while ($data = dbarray($result)) {
        $row_color = $i % 2 == 0 ? "tbl1" : "tbl2";
        echo "<tr>\n<td class='" . $row_color . "'><a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "'>" . $data['thread_subject'] . "</a></td>\n";
        echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . profile_link($data['user_id1'], $data['user_name1'], $data['user_status1']) . "</td>\n";
        echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . profile_link($data['user_id2'], $data['user_name2'], $data['user_status2']) . "<br />\n\t\t" . showdate("forumdate", $data['thread_lastpost']) . "</td>\n";
        echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . ($data['thread_postcount'] - 1) . "</td>\n";
        echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'><a href='" . FUSION_SELF . "?delete=" . $data['thread_id'] . "' onclick=\"return confirm('" . $locale['global_060'] . "');\">" . $locale['global_058'] . "</a></td>\n";
        echo "</tr>\n";
        $i++;
    }
    echo "</table>\n";
    closetable();
    echo "<div align='center' style='margin-top:5px;'>" . makePageNav($_GET['rowstart'], 10, $rows, 3, FUSION_SELF . "?") . "</div>\n";
} else {
    echo "<div style='text-align:center;'>" . $locale['global_059'] . "</div>\n";
    closetable();
}
require_once THEMES . "templates/footer.php";
开发者ID:dioda,项目名称:phpfusion,代码行数:31,代码来源:my_tracked_threads.php

示例4: elseif

 if ($settings['comments_enabled'] == "0" || $settings['ratings_enabled'] == "0") {
     $sys = "";
     if ($settings['comments_enabled'] == "0" && $settings['ratings_enabled'] == "0") {
         $sys = $locale['663'];
     } elseif ($settings['comments_enabled'] == "0") {
         $sys = $locale['661'];
     } else {
         $sys = $locale['662'];
     }
     echo "<tr>\n<td colspan='2' class='tbl1' style='font-weight:bold;text-align:left; color:black !important; background-color:#FFDBDB;'>";
     echo "<span style='color:red;font-weight:bold;margin-right:5px;'>*</span>" . sprintf($locale['660'], $sys);
     echo "</td>\n</tr>";
 }
 echo "<tr>\n";
 echo "<td align='center' colspan='2' class='tbl1'>\n";
 echo $locale['641'] . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "<br /><br />\n";
 echo $locale['642'] . "<br />\n";
 echo "<input type='submit' name='publish' value='" . $locale['643'] . "' class='button' />\n";
 echo "<input type='submit' name='delete' value='" . $locale['644'] . "' class='button' />\n";
 echo "</td>\n</tr>\n</table>\n</form>\n";
 echo "<script language='JavaScript' type='text/javascript'>\n";
 echo "/* <![CDATA[ */\n";
 echo "jQuery(document).ready(function() {\n";
 echo "jQuery('#shortdesc_display').show();\n";
 echo "jQuery('#calc_upload').click(\n";
 echo "function() {\n";
 echo "if (jQuery('#calc_upload').attr('checked')) {\n";
 echo "jQuery('#download_filesize').attr('readonly', 'readonly');\n";
 echo "jQuery('#download_filesize').val('');\n";
 echo "jQuery('#calc_upload').attr('checked', 'checked');\n";
 echo "} else {\n";
开发者ID:WuChEn,项目名称:PHP-Fusion,代码行数:31,代码来源:submissions.php

示例5: articleposter

function articleposter($info, $sep = "", $class = "")
{
    global $locale, $settings;
    $res = "";
    $link_class = $class ? " class='{$class}' " : "";
    $res = THEME_BULLET . " " . $locale['global_070'] . "<span " . $link_class . ">" . profile_link($info['user_id'], $info['user_name'], $info['user_status']) . "</span>\n";
    $res .= $locale['global_071'] . showdate("newsdate", $info['article_date']);
    $res .= $info['article_allow_comments'] && $settings['comments_enabled'] == "1" ? $sep . "\n" : "\n";
    return "<!--article_poster-->" . $res;
}
开发者ID:WuChEn,项目名称:PHP-Fusion,代码行数:10,代码来源:theme_functions_include.php

示例6: dbquery

         $result = dbquery("SELECT fp.post_message, fp.post_datestamp, fp.post_edittime, fp.post_author, fp.post_edituser,\n                fu.user_name AS user_name, fu.user_status AS user_status, fe.user_name AS edit_name, fe.user_status AS edit_status,\n                ft.thread_subject, ff.forum_access\n                FROM " . DB_FORUM_THREADS . " ft\n                INNER JOIN " . DB_FORUM_POSTS . " fp ON ft.thread_id = fp.thread_id\n                INNER JOIN " . DB_FORUMS . " ff ON ff.forum_id = ft.forum_id\n                INNER JOIN " . DB_USERS . " fu ON fu.user_id = fp.post_author\n                LEFT JOIN " . DB_USERS . " fe ON fe.user_id = fp.post_edituser\n                WHERE ft.thread_id=" . $_GET['item_id'] . "\n                ORDER BY fp.post_datestamp\n                LIMIT " . $_GET['rowstart'] . ",{$posts_per_page}");
         $res = FALSE;
         $i = 0;
         if (dbrows($result)) {
             while ($data = dbarray($result)) {
                 if (checkgroup($data['forum_access'])) {
                     $res = TRUE;
                     if ($i == 0) {
                         echo $locale['500'] . " <strong>" . $settings['sitename'] . " :: " . $data['thread_subject'] . "</strong><hr /><br />\n";
                     }
                     echo "<div style='margin-left:20px'>\n";
                     echo "<div style='float:left'>" . $locale['501'] . profile_link($data['post_author'], $data['user_name'], $data['user_status']) . $locale['502'] . showdate("forumdate", $data['post_datestamp']) . "</div><div style='float:right'>#" . ($i + 1) . "</div><div style='float:none;clear:both'></div><hr />\n";
                     echo nl2br(parseubb(parsesmileys($data['post_message'])));
                     if ($data['edit_name'] != '') {
                         echo "<div style='margin-left:20px'>\n<hr />\n";
                         echo $locale['503'] . profile_link($data['post_edituser'], $data['edit_name'], $data['edit_status']) . $locale['502'] . showdate("forumdate", $data['post_edittime']);
                         echo "</div>\n";
                     }
                     echo "</div>\n";
                     echo "<br />\n";
                     $i++;
                 }
             }
         }
         if (!$res) {
             redirect($settings['opening_page']);
         }
     }
     break;
 case "T":
     if ($settings['enable_terms'] == 1) {
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:31,代码来源:print.php

示例7: render_news_item

    /**
     * News Item Page Template
     * @param $info
     */
    function render_news_item($info)
    {
        global $aidlink;
        $locale = fusion_get_locale();
        $news_settings = get_settings('news');
        $data = $info['news_item'];
        add_to_head("<link rel='stylesheet' href='" . INFUSIONS . "news/templates/css/news.css' type='text/css'>");
        add_to_head("<link rel='stylesheet' href='" . INCLUDES . "jquery/colorbox/colorbox.css' type='text/css' media='screen' />");
        add_to_head("<script type='text/javascript' src='" . INCLUDES . "jquery/colorbox/jquery.colorbox.js'></script>");
        add_to_footer('<script type="text/javascript">
			$(document).ready(function() {
				$(".news-image-overlay").colorbox({
					transition: "elasic",
					height:"100%",
					width:"100%",
					maxWidth:"98%",
					maxHeight:"98%",
					scrolling:false,
					overlayClose:true,
					close:false,
					photo:true,
					onComplete: function(result) {
						$("#colorbox").live("click", function(){
						$(this).unbind("click");
						$.fn.colorbox.close();
						});
					},
					onLoad: function () {
					}
			   });
			});
			</script>');
        opentable($locale['news_0004']);
        echo render_breadcrumbs();
        echo "<!--news_pre_readmore-->";
        echo "<article class='news-item' style='display:block; width:100%; overflow:hidden;'>\n";
        echo "<h2 class='text-center'>" . $data['news_subject'] . "</h2>\n";
        echo "<div class='news_news text-dark m-t-20 m-b-20'>\n";
        if ($data['news_image_src']) {
            echo "<a class='" . $data['news_ialign'] . " news-image-overlay' href='" . $data['news_image_src'] . "'>\n            <img class='img-responsive' src='" . $data['news_image_src'] . "' alt='" . $data['news_subject'] . "' style='padding:5px; max-height:" . $news_settings['news_photo_h'] . "px; overflow:hidden;' /></a>";
        } elseif (!empty($data['news_image']) && !empty($data['news_cat_image_src'])) {
            echo "<a class='" . $data['news_ialign'] . "' href='" . INFUSIONS . "news/news.php?cat_id=" . $data['news_cat_id'] . "'>\n            <img class='img-responsive' src='" . IMAGES_NC . $data['news_cat_image_src'] . "' style='padding:5px; max-height:" . $news_settings['news_photo_h'] . "px; alt='" . $data['news_cat_name'] . "' />\n            </a>";
        }
        echo $data['news_news'];
        echo "</div>\n";
        echo "<div class='news_extended text-dark m-t-20 m-b-20'>" . $data['news_extended'] . "</div>\n";
        echo "<div style='clear:both;'></div>\n";
        echo "<div class='well m-t-5 text-center'>\n";
        echo "<span class='news-action m-r-10'><i class='fa fa-user'></i>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</span>\n";
        echo "<span class='news-action m-r-10'><i class='fa fa-calendar'></i>" . showdate("newsdate", $data['news_datestamp']) . "</span>\n";
        echo "<span class='news-action'><i class='fa fa-eye'></i><span class='text-dark m-r-10'>" . number_format($data['news_reads']) . "</span>\n</span>";
        echo $data['news_allow_comments'] ? display_comments($data['news_comments'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#comments") : '';
        echo $data['news_allow_ratings'] ? "<span class='m-r-10'>" . display_ratings($data['news_sum_rating'], $data['news_count_votes'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#ratings") . " </span>" : '';
        echo "<a class='m-r-10' title='" . $locale['news_0002'] . "' href='" . BASEDIR . "print.php?type=N&amp;item_id=" . $data['news_id'] . "'><i class='fa fa-print'></i></a>";
        echo iADMIN && checkrights("N") ? "<a title='" . $locale['news_0003'] . "' href='" . INFUSIONS . "news/news_admin.php" . $aidlink . "&amp;action=edit&amp;section=news_form&amp;news_id=" . $data['news_id'] . "' title='" . $locale['news_0003'] . "' />" . $locale['news_0003'] . "</a>\n" : "";
        echo "</div>";
        echo "<!--news_sub_readmore-->";
        echo !isset($_GET['readmore']) && $data['news_ext'] == "y" ? "<div class='m-t-20'>\n<a href='" . INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "' class='button'>" . $locale['news_0001'] . "</a>\n</div>\n" : "";
        if ($data['page_count'] > 0) {
            echo "<div class='text-center m-t-10'>\n" . makepagenav($_GET['rowstart'], 1, $data['page_count'], 3, INFUSIONS . "news/news.php?readmore=" . $_GET['readmore'] . "&amp;") . "\n</div>\n";
        }
        if ($data['news_allow_comments']) {
            echo "<hr />" . showcomments("N", DB_NEWS, "news_id", $_GET['readmore'], INFUSIONS . "news/news.php?readmore=" . $_GET['readmore']) . "\n";
        }
        if ($data['news_allow_ratings']) {
            echo "<hr />" . showratings("N", $_GET['readmore'], INFUSIONS . "news/news.php?readmore=" . $_GET['readmore']) . "\n";
        }
        echo "</article>\n";
        closetable();
    }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:74,代码来源:custom_news.php

示例8: isset

$list = isset($_GET['bp_id']) && isnum($_GET['bp_id']) ? $_GET['bp_id'] : 0;
opentable('Blog');
echo '<a href="/blog/liste.php">Mine blogindlæg</a> :: <a href="/blog/liste.php?list=newest">Nyeste blogindlæg</a> :: <a href="/blog/liste.php?list=blogs">Brugere med blogindlæg</a> :: <a href="/blog/skriv.php">Skriv nyt blogindlæg</a><br />';
if (isnum($list)) {
    $bloglist = dbquery('SELECT bp.*, u.user_avatar, u.user_id, u.user_name, u.user_blog, u.user_status FROM ' . DB_PREFIX . 'blogposts AS bp INNER JOIN ' . DB_PREFIX . 'users AS u ON u.user_id = bp.bp_author WHERE bp.bp_id = ' . $list);
}
echo '<table style="width: 100%;"  class="tbl-border forum_thread_table">';
if ($blogarr = dbarray($bloglist)) {
    echo '
<tr>
<td style="width: 25%;" class="tbl2 forum-caption">' . showdate('forumdate', $blogarr['bp_timestamp']) . '</td>
<td style="width: 75%;" class="tbl2 forum-caption">' . $blogarr['bp_title'] . '</td>
</tr>
<tr>
<td style="width: 25%;" class="tbl2 forum-caption">
' . profile_link($blogarr['bp_author'], $blogarr['user_name'], $blogarr['user_status']) . '<br />';
    if ($blogarr['user_avatar'] && file_exists(IMAGES . "avatars/" . $blogarr['user_avatar']) && $blogarr['user_status'] != 6 && $blogarr['user_status'] != 5) {
        echo "<img src='" . IMAGES . "avatars/" . $blogarr['user_avatar'] . "' alt='Avatar' /><br /><br />\n";
    }
    echo 'Antal blogindlæg: ' . $blogarr['user_blog'] . '<br />
<a href="/blog/liste.php?list=' . $blogarr['user_id'] . '">Se blog</a>
' . (iADMIN || $blogarr['user_id'] == $userdata['user_id'] ? '<br /><a href="/blog/slet.php?id=' . $blogarr['bp_id'] . '" onclick="return confirm(\'Er du sikker på, du vil slette dette indlæg?\')">Slet indlæg</a>' : '') . '
<br /><a href="/report.php?action=new&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 {
开发者ID:necrophcodr,项目名称:Muks,代码行数:31,代码来源:vis.php

示例9: render_dashboard


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

示例10: if

<? if(!empty($comments)) : ?>

<div id="post_comments_list">
  <? foreach($comments as $item): ?>
  <div class="post_comment" id="comment-list-id-<? print $item['id'];?>">
    <? $author = CI::model('users')->getUserById( $item['created_by']); 
	

	?>
    <? $thumb = CI::model('users')->getUserThumbnail( $author['id'], 70); ?>
    <a class="img" href="<? print profile_link($author['id']);?>"> <span style="background-image: url('<?  print $thumb; ?>');"></span> </a>
    <div class="post_comment_text">
    
    <? if(!empty($author)): ?>
      <div class="post_comment_author"><strong><a href="<? print profile_link( $item['created_by']);?>"><? print user_name( $item['created_by']);?> </a></strong> said:</div>
      <? else: ?>
      <div class="post_comment_author"><strong>Anonymous</strong> said:</div>
      <? endif; ?>
      
      <p class=""><? print ($item['comment_body']); ?> </p>
      <? if($item['created_by'] == user_id()): ?>
      
      <a href="javascript:mw.comments.del(<? print $item['id'];?>, '#comment-list-id-<? print $item['id'];?>')" class="comment_delete">delete</a>
      <? endif; ?>
      
    </div>
    <div class="c">&nbsp;</div>
    <div class="user_activity_bar">
      <div><a class="user_activity_likes" href="<? print voting_link($item['id'], '#post-comments-'.$item['id'], 'comments'); ?>"><strong id="post-comments-<? print ($item['id']); ?>"><? print votes_count($item['id'], false, 'comments'); ?></strong><span></span><strong >Like</strong></a></div>
    </div>
  </div>
开发者ID:Gninety,项目名称:Microweber,代码行数:31,代码来源:list_default.php

示例11: showcomments

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

示例12: while

 echo "<td class='tbl2'>" . $locale['pla_112'] . "</td>\n";
 echo "<td class='tbl2'>" . $locale['pla_140'] . "</td>\n";
 echo "<td class='tbl2'>" . $locale['pla_125'] . "</td>\n";
 echo "<td class='tbl2'>" . $locale['pla_612'] . "</td>\n";
 echo "<td class='tbl2'>" . $locale['pla_127'] . "</td>\n";
 echo "<td class='tbl2'>" . $locale['pla_128'] . "</td>\n";
 echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['pla_133'] . "</td>\n";
 echo "</tr>\n";
 while ($data = dbarray($result)) {
     $row_color = $i % 2 == 0 ? "tbl1" : "tbl2";
     echo "<tr>\n";
     echo "<td class='{$row_color}'>" . (isset($data['user_name']) ? profile_link($data['user_id'], $data['user_name'], $data['user_status']) : $locale['pla_608']) . "</td>\n";
     echo "<td class='{$row_color}'>" . $data['app_realname'] . "</td>\n";
     echo "<td class='{$row_color}'>" . $license_types[$data['app_type']] . "</td>\n";
     $get_admin = dbarray(dbquery("SELECT user_name, user_status FROM " . DB_USERS . " WHERE user_id = '" . $app_approver . "'"));
     echo "<td class='{$row_color}'>" . profile_link($data['app_approver'], $get_admin['user_name'], $get_admin['user_status']) . "</td>\n";
     if (!strstr($data['app_url'], "http://") && !strstr($data['app_url'], "https://")) {
         $urlprefix = "http://";
     } else {
         $urlprefix = "";
     }
     echo "<td class='{$row_color}'>";
     if ($data['app_url']) {
         echo "<a href='" . $urlprefix . $data['app_url'] . "' title='" . $urlprefix . $data['app_url'] . "' target='_blank'>" . $data['app_url'] . "</a>";
     }
     echo "</td>\n";
     echo "<td class='{$row_color}'>" . showdate("shortdate", $data['app_datestamp']) . "</td>\n";
     echo "<td align='center' width='1%' class='{$row_color}' style='white-space:nowrap'><a href='" . FUSION_SELF . $aidlink . "&amp;action=edit&amp;app_id=" . $data['app_id'] . "'>" . $locale['pla_138'] . "</a> -\n";
     echo "<a href='" . FUSION_SELF . $aidlink . "&amp;action=delete&amp;app_id=" . $data['app_id'] . "'>" . $locale['pla_139'] . "</a></td>\n";
     echo "</tr>\n";
 }
开发者ID:xXxthebeastxXx,项目名称:addondb,代码行数:31,代码来源:license_admin.php

示例13: foreach

        echo "<div class='tbl2 forum_breadcrumbs' style='margin-bottom:5px'><a href='index.php'>" . $settings['sitename'] . "</a> &raquo; " . $caption . "</div>\n";
        if ($fdata['forum_poll'] && checkgroup($fdata['forum_poll'])) {
            if (isset($poll_title) && $poll_title && (isset($poll_opts) && is_array($poll_opts))) {
                echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border' style='margin-bottom:5px'>\n<tr>\n";
                echo "<td align='center' class='tbl2'><strong>" . $poll_title . "</strong></td>\n</tr>\n<tr>\n<td class='tbl1'>\n";
                echo "<table align='center' cellpadding='0' cellspacing='0'>\n";
                foreach ($poll_opts as $poll_option) {
                    echo "<tr>\n<td class='tbl1'><input type='radio' name='poll_option' value='{$i}' style='vertical-align:middle;' /> " . $poll_option . "</td>\n</tr>\n";
                    $i++;
                }
                echo "</table>\n</td>\n</tr>\n</table>\n";
            }
        }
        echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border forum_thread_table'>\n<tr>\n";
        echo "<td colspan='2' class='tbl2'><strong>" . $subject . "</strong></td>\n</tr>\n";
        echo "<tr>\n<td class='tbl2 forum_thread_user_name' style='width:140px;'>" . profile_link($userdata['user_id'], $userdata['user_name'], $userdata['user_status']) . "</td>\n";
        echo "<td class='tbl2 forum_thread_post_date'>" . $locale['426'] . showdate("forumdate", time()) . "</td>\n";
        echo "</tr>\n<tr>\n<td valign='top' width='140' class='tbl2 forum_thread_user_info'>\n";
        if ($userdata['user_avatar'] && file_exists(IMAGES . "avatars/" . $userdata['user_avatar'])) {
            echo "<img src='" . IMAGES . "avatars/" . $userdata['user_avatar'] . "' alt='' /><br /><br />\n";
        }
        echo "<span class='small'>" . getuserlevel($userdata['user_level']) . "</span><br /><br />\n";
        echo "<span class='small'><strong>" . $locale['423'] . "</strong> " . $userdata['user_posts'] . "</span><br />\n";
        echo "<span class='small'><strong>" . $locale['425'] . "</strong> " . showdate("shortdate", $userdata['user_joined']) . "</span><br />\n";
        echo "<br /></td>\n<td valign='top' class='tbl1 forum_thread_user_post'>" . $previewmessage . "</td>\n";
        echo "</tr>\n</table>\n";
        closetable();
    }
}
if (isset($_POST['postnewthread'])) {
    $subject = trim(stripinput(censorwords($_POST['subject'])));
开发者ID:dioda,项目名称:phpfusion,代码行数:31,代码来源:postnewthread.php

示例14: profile_link

     if ($a_files) {
         echo "<div class='emulated-fieldset'>\n";
         echo "<span class='emulated-legend'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . $locale['506'] . ($i_files > 1 ? $locale['506d'] : $locale['506c']) . "</span>\n";
         echo "<div class='attachments-list'>" . $a_files . "</div>\n";
         echo "</div>\n";
     }
     if ($a_images) {
         $colorbox_rel[] = $data['post_id'];
         echo "<div class='emulated-fieldset'>\n";
         echo "<span class='emulated-legend'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . $locale['506'] . ($i_images > 1 ? $locale['506b'] : $locale['506a']) . "</span>\n";
         echo "<div class='attachments-list'>" . $a_images . "</div>\n";
         echo "</div>\n";
     }
 }
 if ($data['post_edittime'] != "0") {
     echo "\n<hr />\n<span class='small'>" . $locale['508'] . profile_link($data['post_edituser'], $data['edit_name'], $data['edit_status']) . $locale['509'] . showdate("forumdate", $data['post_edittime']) . "</span>\n";
     if ($data['post_editreason'] != "" && iMEMBER) {
         $edit_reason = true;
         echo "<br /><div class='edit_reason'><a id='reason_pid_" . $data['post_id'] . "' rel='" . $data['post_id'] . "' class='reason_button small' href='#reason_div_pid_" . $data['post_id'] . "'>";
         echo "<strong>" . $locale['508a'] . "</strong>";
         echo "</a>\n";
         echo "<div id='reason_div_pid_" . $data['post_id'] . "' class='reason_div small'>" . $data['post_editreason'] . "</div></div>\n";
     }
 }
 if ($data['post_showsig'] && isset($data['user_sig']) && $data['user_sig'] && $data['user_status'] != 6 && $data['user_status'] != 5) {
     echo "\n<hr /><div class='forum_sig'>" . nl2br(parseubb(parsesmileys($data['user_sig']), "b|i|u||center|small|url|mail|img|color")) . "</div>\n";
 }
 echo "<!--sub_forum_post--></td>\n</tr>\n";
 echo "<tr>\n<td class='tbl2 forum_thread_ip' style='width:140px;white-space:nowrap'>";
 if ($settings['forum_ips'] && iMEMBER || iMOD) {
     echo "<strong>" . $locale['571'] . "</strong>: " . $data['post_ip'];
开发者ID:keddyboys,项目名称:kmods,代码行数:31,代码来源:viewthread.php

示例15: showcomments

function showcomments($ctype, $cdb, $ccol, $cid, $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);
    $cpp = $settings['comments_per_page'];
    if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "delete") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
        if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_name='" . $userdata['user_id'] . "'")) {
            $result = dbquery("DELETE FROM " . DB_COMMENTS . "\r\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : "\r\n\t\t\t\t\tAND comment_name='" . $userdata['user_id'] . "'"));
        }
        redirect($clink . ($settings['comments_sorting'] == "ASC" ? "" : "&amp;c_start=0"));
    }
    if ($settings['comments_enabled'] == "1") {
        if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) {
            if (iMEMBER) {
                $comment_name = $userdata['user_id'];
            } elseif ($settings['guestposts'] == "1") {
                if (!isset($_POST['comment_name'])) {
                    redirect($link);
                }
                $comment_name = trim(stripinput($_POST['comment_name']));
                $comment_name = preg_replace("(^[+0-9\\s]*)", "", $comment_name);
                if (isnum($comment_name)) {
                    $comment_name = "";
                }
                $_CAPTCHA_IS_VALID = FALSE;
                include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_check.php";
                if (!isset($_POST['captcha_code']) || $_CAPTCHA_IS_VALID == FALSE) {
                    redirect($link);
                }
            }
            $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
            if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
                $comment_updated = FALSE;
                if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\tAND comment_type='" . $ctype . "' AND comment_name='" . $userdata['user_id'] . "'\r\n\t\t\t\t\t\tAND comment_hidden='0'")) {
                    if ($comment_message) {
                        $result = dbquery("UPDATE " . DB_COMMENTS . " SET comment_message='" . $comment_message . "'\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : "\r\n\t\t\t\t\t\t\t\t\t\t\tAND comment_name='" . $userdata['user_id'] . "'"));
                        $comment_updated = TRUE;
                    }
                }
                if ($comment_updated) {
                    if ($settings['comments_sorting'] == "ASC") {
                        $c_operator = "<=";
                    } else {
                        $c_operator = ">=";
                    }
                    $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_id" . $c_operator . "'" . $_GET['comment_id'] . "'\r\n\t\t\t\t\t\t\t\tAND comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\t\t\tAND comment_type='" . $ctype . "'");
                    $c_start = (ceil($c_count / $cpp) - 1) * $cpp;
                }
                redirect($clink . "&amp;c_start=" . (isset($c_start) && isnum($c_start) ? $c_start : ""));
            } else {
                if (!dbcount("(" . $ccol . ")", $cdb, $ccol . "='" . $cid . "'")) {
                    redirect(BASEDIR . "index.php");
                }
                if ($comment_name && $comment_message) {
                    require_once INCLUDES . "flood_include.php";
                    if (!flood_control("comment_datestamp", DB_COMMENTS, "comment_ip='" . USER_IP . "'")) {
                        $result = dbquery("INSERT INTO " . DB_COMMENTS . " (\r\n\t\t\t\t\t\t\t\tcomment_item_id, comment_type, comment_name, comment_message, comment_datestamp,\r\n\t\t\t\t\t\t\t\tcomment_ip, comment_ip_type, comment_hidden\r\n\t\t\t\t\t\t\t) VALUES (\r\n\t\t\t\t\t\t\t\t'" . $cid . "', '" . $ctype . "', '" . $comment_name . "', '" . $comment_message . "', '" . time() . "',\r\n\t\t\t\t\t\t\t\t'" . USER_IP . "', '" . USER_IP_TYPE . "', '0'\r\n\t\t\t\t\t\t\t)");
                    }
                }
                if ($settings['comments_sorting'] == "ASC") {
                    $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\t\t\t\t\tAND comment_type='" . $ctype . "'");
                    $c_start = (ceil($c_count / $cpp) - 1) * $cpp;
                } else {
                    $c_start = 0;
                }
                redirect($clink . "&amp;c_start=" . $c_start);
            }
        }
        $c_arr = array("c_con" => array(), "c_info" => array("c_makepagenav" => FALSE, "admin_link" => FALSE));
        $c_rows = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\t\tAND comment_type='" . $ctype . "' AND comment_hidden='0'");
        if (!isset($_GET['c_start']) && $c_rows > $cpp) {
            $_GET['c_start'] = (ceil($c_rows / $cpp) - 1) * $cpp;
        }
        if (!isset($_GET['c_start']) || !isnum($_GET['c_start'])) {
            $_GET['c_start'] = 0;
        }
        $result = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcm.comment_datestamp,\r\n\t\t\t\t\ttcu.user_id, tcu.user_name, tcu.user_avatar, tcu.user_status\r\n\t\t\tFROM " . DB_COMMENTS . " tcm\r\n\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\r\n\t\t\tWHERE comment_item_id='" . $cid . "' AND comment_type='" . $ctype . "' AND comment_hidden='0'\r\n\t\t\tORDER BY comment_datestamp " . $settings['comments_sorting'] . " LIMIT " . $_GET['c_start'] . "," . $cpp);
        if (dbrows($result)) {
            $i = $settings['comments_sorting'] == "ASC" ? $_GET['c_start'] + 1 : $c_rows - $_GET['c_start'];
            if ($c_rows > $cpp) {
                $c_arr['c_info']['c_makepagenav'] = makepagenav($_GET['c_start'], $cpp, $c_rows, 3, $clink . "&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']);
                } else {
                    $c_arr['c_con'][$i]['comment_name'] = $data['comment_name'];
                }
                //Add user avatar in comments new feature in v7.02.04
                $c_arr['c_con'][$i]['user_avatar'] = display_avatar($data, '80px');
                $c_arr['c_con'][$i]['comment_datestamp'] = $locale['global_071'] . showdate("longdate", $data['comment_datestamp']);
                $c_arr['c_con'][$i]['comment_message'] = "<!--comment_message-->\n" . nl2br(parseubb(parsesmileys($data['comment_message'])));
                if (iADMIN && checkrights("C") || iMEMBER && $data['comment_name'] == $userdata['user_id'] && isset($data['user_name'])) {
                    $c_arr['c_con'][$i]['edit_dell'] = "<!--comment_actions-->\n";
                    $c_arr['c_con'][$i]['edit_dell'] .= "<a href='" . FUSION_REQUEST . "&amp;c_action=edit&amp;comment_id=" . $data['comment_id'] . "#edit_comment'>";
                    $c_arr['c_con'][$i]['edit_dell'] .= $locale['c108'] . "</a> |\n";
//.........这里部分代码省略.........
开发者ID:WuChEn,项目名称:PHP-Fusion,代码行数:101,代码来源:comments_include.php


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