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


PHP getuserlevel函数代码示例

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


在下文中一共展示了getuserlevel函数的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: render_admin_login

function render_admin_login()
{
    global $locale, $aidlink, $userdata;
    echo "<div class='block'>\n";
    echo "<div class='block-content clearfix' style='font-size:13px;'>\n";
    echo "<h6><strong>" . $locale['280'] . "</strong></h6>\n";
    echo "<img src='" . IMAGES . "php-fusion-icon.png' class='pf-logo position-absolute' alt='PHP-Fusion'/>";
    echo "<p class='fusion-version text-right mid-opacity text-smaller'>" . $locale['version'] . fusion_get_settings('version') . "</p>";
    echo "<div class='row m-0'>\n<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12'>";
    $form_action = FUSION_SELF . $aidlink == ADMIN . "index.php" . $aidlink ? FUSION_SELF . $aidlink . "&amp;pagenum=0" : FUSION_SELF . "?" . FUSION_QUERY;
    // Get all notices
    $notices = getNotices();
    echo renderNotices($notices);
    echo openform('admin-login-form', 'post', $form_action);
    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 "<div class='clearfix'>\n";
    add_to_head('<style>#admin_password-field .required {display:none}</style>');
    echo "<h5><strong>" . $locale['welcome'] . ", " . $userdata['user_name'] . "</strong><br/>" . getuserlevel($userdata['user_level']) . "</h5>";
    echo form_text('admin_password', "", "", array('callback_check' => 'check_admin_pass', 'placeholder' => $locale['281'], 'error_text' => $locale['global_182'], 'autocomplete_off' => TRUE, 'type' => 'password', 'required' => TRUE));
    echo "</div>\n";
    echo "</div>\n";
    echo "</div>\n";
    closeside();
    echo form_button('admin_login', $locale['login'], $locale['login'], array('class' => 'btn-primary btn-block'));
    echo closeform();
    echo "</div>\n</div>\n";
    // .col-*, .row
    echo "</div>\n";
    // .block-content
    echo "</div>\n";
    // .block
    echo "<div class='copyright-note clearfix m-t-10'>" . showcopyright() . "</div>\n";
    echo "</aside>\n";
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:40,代码来源:acp_theme.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: opensidex

     opensidex($locale['UM096'] . $userdata['user_name'], "off");
 } else {
     openside($locale['UM096'] . $userdata['user_name']);
 }
 $messages_count = dbquery("SELECT\n\tSUM(message_folder=0) AS inbox_count,\n\tSUM(message_folder=1) AS outbox_count,\n\tSUM(message_folder=2) AS archive_count,\n\tSUM(message_read=0 AND message_folder=0) AS unread_count\n\tFROM " . DB_MESSAGES . " \n\tWHERE message_to='" . $userdata['user_id'] . "'\n\t");
 $messages_count = dbarray($messages_count);
 $inbox_count = (int) $messages_count['inbox_count'];
 $outbox_count = (int) $messages_count['outbox_count'];
 $archive_count = (int) $messages_count['archive_count'];
 $msg_count = (int) $messages_count['unread_count'];
 echo "<div class='clearfix'>\n";
 echo "<div class='avatar-row text-center'>\n";
 echo "<div class='pull-left m-r-10'>\n" . display_avatar($userdata, '90px') . "</div>\n";
 echo "</div>\n";
 echo "<h4 class='m-t-10 m-b-0'><strong>" . $userdata['user_name'] . "</strong></h4>\n";
 echo "<small>" . getuserlevel($userdata['user_level']) . "</small>\n<br/>";
 echo "</div>\n";
 echo "<ul class='user-info-bar'>\n";
 echo $msg_count ? "<li><a href='" . BASEDIR . "messages.php?folder=inbox' title='" . sprintf($locale['UM085'], $msg_count) . ($msg_count == 1 ? $locale['UM086'] : $locale['UM087']) . "' ><i class='entypo icomment'></i><label style='position:absolute; margin-left:-20px;' class='pointer label label-danger'>{$msg_count}</label></a>\n</li>\n" : "";
 echo "</ul>\n";
 $inbox_cfg = user_pm_settings($userdata['user_id'], "user_inbox");
 $inbox_percent = $inbox_cfg > 1 ? number_format($inbox_count / $inbox_cfg * 99, 0) : number_format(0 * 99, 0);
 echo progress_bar($inbox_percent, $locale['UM098']);
 $outbox_cfg = user_pm_settings($userdata['user_id'], "user_outbox");
 $outbox_percent = $outbox_cfg > 1 ? number_format($outbox_count / $outbox_cfg * 99, 0) : number_format(0 * 99, 0);
 echo progress_bar($outbox_percent, $locale['UM099']);
 $archive_cfg = user_pm_settings($userdata['user_id'], "user_archive");
 $archive_percent = $archive_cfg > 1 ? number_format($archive_count / $archive_cfg * 99, 0) : number_format(0 * 99, 0);
 echo progress_bar($archive_percent, $locale['UM100']);
 echo "<div id='navigation-user'>\n";
 echo "<h5><strong>" . $locale['UM097'] . "</strong></h5>\n";
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:31,代码来源:user_info_panel.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: rawurlencode

         echo "<span class='small' title=\"header=[" . $data['user_name'] . "] body=[" . rawurlencode("<center>{$avatar}</center></span><hr />\n<span class='small'><b><font color='#0066cc'>" . $locale['global_101'] . ":</font> <font color='#ff6600'>" . $data['user_name'] . "</font></b><br /><br />\n<b><font color='#0066cc'>" . $locale['424'] . "</font> <font color='#ff6600'>" . getuserlevel($data['user_level']) . "</font></b><br /><br />\n<b><font color='#0066cc'>" . $locale['u040'] . "</font> <font color='#ff6600'>" . showdate("shortdate", $data['user_joined']) . "</font></b><br /><br />\n<b><font color='#0066cc'>" . $locale['u041'] . "</font> <font color='#ff6600'>" . showdate("shortdate", $data['user_lastvisit']) . "</font></b> <br /><br />\n<b><font color='#0066cc'>" . $locale['uf_shouts-stat'] . "</font> <font color='#ff6600'>{$shoutcount}</font></b> ") . "] delay=[0] fade=[off]\">\n\n\t\t\t<a href='" . BASEDIR . "profile.php?lookup=" . $data['shout_name'] . "' class='shoutboxname'><b>" . $data['user_name'] . "</b></a></span> <img src='" . INFUSIONS . "shoutbox_panel/images/online.png' title=\"header=[" . $data['user_name'] . "] body=[" . rawurlencode("" . $data['user_name'] . " " . $locale['dsp001'] . "") . "] delay=[0] fade=[off]\" alt='' />\n";
         if (iMEMBER) {
             echo " <a href='" . BASEDIR . "messages.php?msg_send=" . $data['user_id'] . "'> <img src='" . INFUSIONS . "shoutbox_panel/images/pm.gif' title=\"header=[" . $data['user_name'] . "] body=[" . rawurlencode("" . $locale['dsp003'] . " " . $data['user_name'] . "") . "] delay=[0] fade=[off]\" alt='' border='0' /></a></span>\n";
         }
     } else {
         echo $data['shout_name'] . "\n";
     }
 }
 if ($lseen > 60) {
     if ($data['user_name']) {
         if ($data['user_avatar'] != "") {
             $avatar = "<img src='" . IMAGES . "avatars/" . $data['user_avatar'] . "' border='0' alt='' />";
         } else {
             $avatar = "<img src='" . INFUSIONS . "shoutbox_panel/images/noav.gif' border='0' alt='' />";
         }
         echo "<span class='small' title=\"header=[" . $data['user_name'] . "] body=[" . rawurlencode("<center>{$avatar}</center></span><hr />\n<span class='small'><b><font color='#0066cc'>" . $locale['global_101'] . ":</font> <font color='#ff6600'>" . $data['user_name'] . "</font></b><br /><br />\n<b><font color='#0066cc'>" . $locale['424'] . "</font> <font color='#ff6600'>" . getuserlevel($data['user_level']) . "</font></b><br /><br />\n<b><font color='#0066cc'>" . $locale['u040'] . "</font> <font color='#ff6600'>" . showdate("shortdate", $data['user_joined']) . "</font></b><br /><br />\n<b><font color='#0066cc'>" . $locale['u041'] . "</font> <font color='#ff6600'>" . showdate("shortdate", $data['user_lastvisit']) . "</font></b> <br /><br />\n<b><font color='#0066cc'>" . $locale['uf_shouts-stat'] . "</font> <font color='#ff6600'>{$shoutcount}</font></b> ") . "] delay=[0] fade=[off]\">\n\n\t\t\t<a href='" . BASEDIR . "profile.php?lookup=" . $data['shout_name'] . "' class='shoutboxname'><b>" . $data['user_name'] . "</b></a></span> <img src='" . INFUSIONS . "shoutbox_panel/images/offline.png' title=\"header=[" . $data['user_name'] . "] body=[" . rawurlencode("" . $data['user_name'] . " " . $locale['dsp002'] . "") . "] delay=[0] fade=[off]\" alt='' />\n";
         if (iMEMBER) {
             echo " <a href='" . BASEDIR . "messages.php?msg_send=" . $data['user_id'] . "'> <img src='" . INFUSIONS . "shoutbox_panel/images/pm.gif' title=\"header=[" . $data['user_name'] . "] body=[" . rawurlencode("" . $locale['dsp003'] . " " . $data['user_name'] . "") . "] delay=[0] fade=[off]\" alt='' border='0' /></a></span>\n";
         }
     } else {
         echo $data['shout_name'] . "\n";
     }
 }
 echo "</div>\n";
 echo "<div class='shoutboxdate'>" . showdate("shortdate", $data['shout_datestamp']) . "</div>";
 echo "<div class='shoutbox'>" . sbwrap(parseubb(parsesmileys($data['shout_message']), "b|i|u|url|color")) . "</div>\n";
 if (iADMIN && checkrights("S") || iMEMBER && $data['shout_name'] == $userdata['user_id'] && isset($data['user_name'])) {
     echo "[<a href='" . $link . $sep . "s_action=edit&amp;shout_id=" . $data['shout_id'] . "#edit_shout" . "' class='shoutboxedit' title=\"header=[" . $locale['global_076'] . "] body=[" . rawurlencode("" . $locale['dsp005'] . "") . "] delay=[0] fade=[off]\">" . $locale['global_076'] . "</a>]\n";
     echo "[<a href='" . $link . $sep . "s_action=delete&amp;shout_id=" . $data['shout_id'] . "' class='shoutboxdel' title=\"header=[" . $locale['global_157'] . "] body=[" . rawurlencode("" . $locale['dsp006'] . "") . "] delay=[0] fade=[off]\">" . $locale['global_157'] . "</a>]<br /><br />\n";
 }
 $i++;
开发者ID:edwintcloud,项目名称:mycms,代码行数:31,代码来源:shoutbox_panel.php

示例7: show_forum_rank

     echo "<img src='" . IMAGES . "avatars/" . $data['user_avatar'] . "' alt='" . $locale['567'] . "' /><br /><br />\n";
 }
 echo "<span class='small'>";
 if ($data['user_level'] >= 102) {
     echo $settings['forum_ranks'] ? show_forum_rank($data['user_posts'], $data['user_level']) : getuserlevel($data['user_level']);
 } else {
     $is_mod = false;
     foreach ($mod_groups as $mod_group) {
         if (!$is_mod && preg_match("(^\\.{$mod_group}\$|\\.{$mod_group}\\.|\\.{$mod_group}\$)", $data['user_groups'])) {
             $is_mod = true;
         }
     }
     if ($settings['forum_ranks']) {
         echo $is_mod ? show_forum_rank($data['user_posts'], 104) : show_forum_rank($data['user_posts'], $data['user_level']);
     } else {
         echo $is_mod ? $locale['user1'] : getuserlevel($data['user_level']);
     }
 }
 echo "</span><br /><br />\n";
 echo "<!--forum_thread_user_info--><span class='small'><strong>" . $locale['502'] . "</strong> " . $data['user_posts'] . "</span><br />\n";
 echo "<span class='small'><strong>" . $locale['504'] . "</strong> " . showdate("%d.%m.%y", $data['user_joined']) . "</span><br />\n";
 echo "<br /></td>\n<td valign='top' class='tbl1'>\n";
 if (iMOD) {
     echo "<div style='float:right'><input type='checkbox' name='delete_post[]' value='" . $data['post_id'] . "' /></div>\n";
 }
 echo nl2br(parseubb($message));
 echo "<!--sub_forum_post_message-->";
 if ($data['attach_id']) {
     if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM . "attachments/" . $data['attach_name'])) {
         echo "\n<hr />\n" . $data['user_name'] . $locale['506'] . "<br /><br />\n" . display_image($data['attach_name']) . "<br />[" . parsebytesize(filesize(FORUM . "attachments/" . $data['attach_name'])) . "]\n";
     } else {
开发者ID:simplyianm,项目名称:clububer,代码行数:31,代码来源:viewthread.php

示例8: get_thread_post


//.........这里部分代码省略.........
                                 add_to_jquery("\$('a[rel^=\"attach\"]').colorbox({ current: '" . $locale['forum_0159'] . " {current} " . $locale['forum_0160'] . " {total}',width:'80%',height:'80%'});");
                             }
                         }
                     } else {
                         $post_attachments = "Failed to fetch the attachment";
                     }
                 } else {
                     $post_attachments = "<small><i class='fa fa-clipboard'></i> " . $locale['forum_0184'] . "</small>\n";
                 }
             }
             $pdata += array("user_online" => $pdata['user_lastvisit'] >= time() - 3600 ? TRUE : FALSE, "is_first_post" => $pdata['post_id'] == $this->thread_info['post_firstpost'] ? TRUE : FALSE, "is_last_post" => $pdata['post_id'] == $this->thread_info['post_lastpost'] ? TRUE : FALSE, "user_profile_link" => profile_link($pdata['user_id'], $pdata['user_name'], $pdata['user_status']), "user_avatar_image" => display_avatar($pdata, '40px', FALSE, FALSE, 'img-rounded'), "user_ip" => $forum_settings['forum_ips'] && iMOD ? $locale['forum_0268'] . ' ' . $pdata['post_ip'] : '', "user_post_count" => format_word($pdata['user_posts'], $locale['fmt_post']), "print" => array('link' => BASEDIR . "print.php?type=F&amp;item_id=" . $_GET['thread_id'] . "&amp;post=" . $pdata['post_id'] . "&amp;nr=" . ($i + $_GET['rowstart']), 'title' => $locale['forum_0179']), "post_marker" => $post_marker, "marker" => $marker, "post_attachments" => $post_attachments);
             $pdata['post_message'] = $post_message;
             /**
              * User Stuffs, Sig, User Message, Web
              */
             // Quote & Edit Link
             if ($this->getThreadPermission("can_reply")) {
                 if (!$this->thread_info['thread']['thread_locked']) {
                     $pdata['post_quote'] = array('link' => INFUSIONS . "forum/viewthread.php?action=reply&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'] . "&amp;quote=" . $pdata['post_id'], 'title' => $locale['forum_0266']);
                     if (iMOD || ($forum_settings['forum_edit_lock'] == TRUE && $pdata['is_last_post'] || $forum_settings['forum_edit_lock'] == FALSE) && $userdata['user_id'] == $pdata['post_author'] && ($forum_settings['forum_edit_timelimit'] <= 0 || time() - $forum_settings['forum_edit_timelimit'] * 60 < $pdata['post_datestamp'])) {
                         $pdata['post_edit'] = array('link' => INFUSIONS . "forum/viewthread.php?action=edit&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'], 'title' => $locale['forum_0265']);
                     }
                     $pdata['post_reply'] = array('link' => INFUSIONS . "forum/viewthread.php?action=reply&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'], 'title' => $locale['forum_0509']);
                 } elseif (iMOD) {
                     $pdata['post_edit'] = array('link' => INFUSIONS . "forum/viewthread.php?action=edit&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'], 'title' => $locale['forum_0265']);
                 }
             }
             // rank img
             if ($pdata['user_level'] <= USER_LEVEL_ADMIN) {
                 if ($forum_settings['forum_ranks']) {
                     $pdata['user_rank'] = show_forum_rank($pdata['user_posts'], $pdata['user_level'], $pdata['user_groups']);
                     // in fact now is get forum rank
                 } else {
                     $pdata['user_rank'] = getuserlevel($pdata['user_level']);
                 }
             } else {
                 if ($forum_settings['forum_ranks']) {
                     $pdata['user_rank'] = iMOD ? show_forum_rank($pdata['user_posts'], 104, $pdata['user_groups']) : show_forum_rank($pdata['user_posts'], $pdata['user_level'], $pdata['user_groups']);
                 } else {
                     $pdata['user_rank'] = iMOD ? $locale['userf1'] : getuserlevel($pdata['user_level']);
                 }
             }
             // Website
             if ($pdata['user_web'] && (iADMIN || $pdata['user_status'] != 6 && $pdata['user_status'] != 5)) {
                 $user_web_url_prefix = !preg_match("@^http(s)?\\:\\/\\/@i", $pdata['user_web']) ? "http://" . $pdata['user_web'] : $pdata['user_web'];
                 $pdata['user_web'] = array('link' => $user_web_url_prefix . $pdata['user_web'], 'title' => $locale['forum_0364']);
             } else {
                 $pdata['user_web'] = array('link' => '', 'title' => '');
             }
             // PM link
             $pdata['user_message'] = array('link' => '', 'title' => '');
             if (iMEMBER && $pdata['user_id'] != $userdata['user_id'] && (iADMIN || $pdata['user_status'] != 6 && $pdata['user_status'] != 5)) {
                 $pdata['user_message'] = array('link' => BASEDIR . 'messages.php?msg_send=' . $pdata['user_id'], "title" => $locale['send_message']);
             }
             // User Sig
             if ($pdata['user_sig'] && isset($pdata['post_showsig']) && $pdata['user_status'] != 6 && $pdata['user_status'] != 5) {
                 $pdata['user_sig'] = nl2br(parseubb(parsesmileys(stripslashes($pdata['user_sig'])), "b|i|u||center|small|url|mail|img|color"));
             } else {
                 $pdata['user_sig'] = "";
             }
             // Voting - need up or down link - accessible to author also the vote
             // answered and on going questions.
             // Answer rating
             $pdata['vote_message'] = '';
             //echo $data['forum_type'] == 4 ? "<br/>\n".(number_format($data['thread_postcount']-1)).$locale['forum_0365']."" : ''; // answers
             // form components
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:67,代码来源:Viewthread.php

示例9: showcomments_avatar


//.........这里部分代码省略.........
        if (!isset($_GET['c_start']) && $c_rows > 10) {
            $_GET['c_start'] = (ceil($c_rows / 10) - 1) * 10;
        }
        if (!isset($_GET['c_start']) || !isnum($_GET['c_start'])) {
            $_GET['c_start'] = 0;
        }
        $result = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_datestamp, tcm.comment_message,\r\n\t\t\ttcu.user_name, tcu.user_avatar, tcu.user_id, tcu.user_level, 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=" . _db($cid) . " AND comment_type=" . _db($ctype) . " AND comment_hidden='0'\r\n\t\t\tORDER BY comment_datestamp ASC LIMIT " . (int) $_GET['c_start'] . ",10");
        if (dbrows($result)) {
            $i = $_GET['c_start'] + 1;
            if ($c_rows > 10) {
                echo "<div style='text-align:center;margin-bottom:5px;'>" . makecommentnav($_GET['c_start'], 10, $c_rows, 3, $clink . "&amp;", $seo_root_link, $a, $seo_catid, $b, $rowstart, "-cstart-", $c, $seo_subject) . "</div>\n";
            }
            echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
            while ($data = dbarray($result)) {
                echo "<tr><td class='tbl2' width='10%' align='center'>\n";
                if ($data['user_name']) {
                    echo "<span class='comment-name'>" . profile_link($data['comment_name'], $data['user_name'], $data['user_status']) . "</span>\n";
                } else {
                    echo "<span class='comment-name'>" . $data['comment_name'] . "</span>\n";
                }
                echo "</td>\n";
                echo "<td class='tbl2'>\n<span class='small'>" . $locale['global_071'] . showdate("longdate", $data['comment_datestamp']) . "</span>\n";
                echo "<div style='float:right' class='comment_actions'>";
                if ((iMODERATOR || iADMIN) && checkrights("C") || iMEMBER && $data['comment_name'] == $userdata['user_id'] && isset($data['user_name'])) {
                    echo "<!--comment_actions-->\n<a href='" . FUSION_SELF . "?" . FUSION_QUERY . "&amp;c_action=edit&amp;comment_id=" . $data['comment_id'] . "#edit_comment'>" . $locale['c108'] . "</a> |\n";
                    echo "<a href='" . FUSION_SELF . "?" . FUSION_QUERY . "&amp;c_action=delete&amp;comment_id=" . $data['comment_id'] . "'>" . $locale['c109'] . "</a> |\n";
                }
                echo "<a href='" . FUSION_REQUEST . "#c" . $data['comment_id'] . "' id='c" . $data['comment_id'] . "' name='c" . $data['comment_id'] . "'>#" . $i . "</a></div>\n";
                echo "</td>\n";
                echo "</tr>\n<tr>\n";
                $avatar = $data['user_avatar'] != "" && file_exists(IMAGES_AVA . $data['user_avatar']) ? IMAGES_AVA . $data['user_avatar'] : IMAGES_AVA . "noavatar.jpg";
                echo "<td class='tbl1' width='15%'>\n";
                echo "<div style='text-align:center;'><img src='" . $avatar . "' width='50' height='50' alt='' /></div><br />\n";
                if ($settings['warning_system_comments'] && $data['user_name']) {
                    $points = show_warning_points($data['user_id']);
                    echo "<div class='commentswarnings'>";
                    echo "<span class='small'><a style='cursor:help;' onclick=\"warning_info();\">" . $locale['WARN200'] . "</a></span> ";
                    echo warning_profile_link("1", $data['user_id'], $points);
                    echo "</div>";
                }
                echo "<span class='small2'>" . $locale['c110'] . number_format(dbcount("(comment_id)", DB_COMMENTS, "comment_name='" . (int) $data['user_id'] . "'")) . "<br />";
                echo $locale['c111'] . getuserlevel($data['user_level']) . "</span><br />";
                echo "</td>\n";
                echo "<td class='tbl2' valign='top'>\n" . nl2br(parseubb(parsesmileys($data['comment_message']))) . "</td>\n</tr>";
                $i++;
            }
            echo "\n</table>\n";
            if ((iMODERATOR || iADMIN) && checkrights("C")) {
                echo "<div align='right' class='tbl2'><a href='" . ADMIN . "comments.php" . $aidlink . "&amp;ctype={$ctype}&amp;cid={$cid}'>" . $locale['c106'] . "</a></div>\n";
            }
            if ($c_rows > 10) {
                echo "<br /><div style='text-align:center;margin-top:5px;'>" . makecommentnav($_GET['c_start'], 10, $c_rows, 3, $clink . "&amp;", $seo_root_link, $a, $seo_catid, $b, $rowstart, "-cstart-", $c, $seo_subject) . "</div>\n";
            }
        } else {
            echo $locale['c101'] . "\n";
        }
        closetable();
        opentable($locale['c102']);
        if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
            $eresult = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcu.user_name FROM " . DB_COMMENTS . " tcm\r\n\t\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\r\n\t\t\t\tWHERE comment_id='" . (int) $_GET['comment_id'] . "' AND comment_item_id=" . _db($cid) . " AND comment_type=" . _db($ctype) . " AND comment_hidden='0'");
            if (dbrows($eresult)) {
                $edata = dbarray($eresult);
                if ((iMODERATOR || iADMIN) && checkrights("C") || iMEMBER && $edata['comment_name'] == $userdata['user_id'] && isset($edata['user_name'])) {
                    $clink .= "&amp;c_action=edit&amp;comment_id=" . $edata['comment_id'];
                    $comment_message = $edata['comment_message'];
                }
            } else {
                $comment_message = "";
            }
        } else {
            $comment_message = "";
        }
        if (iMEMBER || $settings['guestposts'] == "1") {
            require_once INCLUDES . "bbcode_include.php";
            echo "<a id='edit_comment' name='edit_comment'></a>\n";
            echo "<form name='inputform' method='post' action='" . (URL_REWRITE && $seo_root_link != "" ? $seo_link : $clink) . "'>\n";
            // Pimped
            if (iGUEST) {
                echo "<div align='center' class='tbl'>\n" . $locale['c104'] . "<br />\n";
                echo "<input type='text' name='comment_name' maxlength='30' class='textbox' style='width:360px' />\n";
                echo "</div>\n";
            }
            echo "<div align='center' class='tbl'>\n";
            echo "<textarea name='comment_message' cols='70' rows='6' class='textbox' style='width:360px'>" . $comment_message . "</textarea><br />\n";
            echo display_bbcodes("360px", "comment_message");
            if (iGUEST) {
                echo $locale['global_158'] . "<br />\n";
                echo "<img id='com_captcha' src='" . INCLUDES . "securimage/securimage_show.php' alt='' /><br />\n";
                echo "<a href='" . INCLUDES . "securimage/securimage_play.php'><img src='" . INCLUDES . "securimage/images/audio_icon.gif' alt='' class='tbl-border' style='margin-bottom:1px' /></a>\n";
                echo "<a href='#' onclick=\"document.getElementById('com_captcha').src = '" . INCLUDES . "securimage/securimage_show.php?sid=' + Math.random(); return false\"><img src='" . INCLUDES . "securimage/images/refresh.gif' alt='' class='tbl-border' /></a><br />\n";
                echo $locale['global_159'] . "<br />\n<input type='text' name='com_captcha_code' class='textbox' style='width:100px' />\n";
            }
            echo "<br />\n<input type='submit' name='post_comment' value='" . ($comment_message ? $locale['c103'] : $locale['c102']) . "' class='button' />\n";
            echo "</div>\n</form>\n";
        } else {
            echo $locale['c105'] . "\n";
        }
        closetable();
    }
}
开发者ID:MichaelFichtner,项目名称:RadioLaFamilia,代码行数:101,代码来源:comments_include.php

示例10: dbarray

        // Pimped
        if (dbrows($result)) {
            $data = dbarray($result);
            $result = dbquery("SELECT user_id, user_name, user_level, user_status FROM " . DB_USERS . " WHERE user_groups REGEXP('^\\\\.{$_GET['group_id']}\$|\\\\.{$_GET['group_id']}\\\\.|\\\\.{$_GET['group_id']}\$') ORDER BY user_level DESC, user_name");
            opentable($locale['420']);
            echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
            echo "<td align='center' colspan='2' class='tbl1'><strong>" . $data['group_name'] . "</strong> (" . sprintf(dbrows($result) == 1 ? $locale['421'] : $locale['422'], dbrows($result)) . ")</td>\n";
            echo "</tr>\n<tr>\n";
            echo "<td class='tbl2'><strong>" . $locale['423'] . "</strong></td>\n";
            echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><strong>" . $locale['424'] . "</strong></td>\n";
            echo "</tr>\n";
            while ($data = dbarray($result)) {
                $cell_color = $i % 2 == 0 ? "tbl1" : "tbl2";
                $i++;
                echo "<tr>\n<td class='" . $cell_color . "'>\n" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</td>\n";
                echo "<td align='center' width='1%' class='" . $cell_color . "' style='white-space:nowrap'>" . getuserlevel($data['user_level']) . "</td>\n</tr>";
            }
            echo "</table>\n";
            closetable();
        } else {
            redirect("index.php");
        }
    } else {
        opentable($locale['420']);
        echo "<div style='text-align:center;'><br />" . $locale['430a'] . "<br /><br /></div>";
        closetable();
    }
} else {
    redirect("index.php");
}
require_once TEMPLATES . "footer.php";
开发者ID:MichaelFichtner,项目名称:RadioLaFamilia,代码行数:31,代码来源:profile.php

示例11: render_user_tags

 /**
  * The callback function for parseUser()
  * @global array $locale
  * @param string $m The message
  * @return string
  */
 function render_user_tags($m)
 {
     $locale = fusion_get_locale();
     add_to_jquery("\$('[data-toggle=\"user-tooltip\"]').popover();");
     $user = str_replace('@', '', $m[0]);
     $result = dbquery("SELECT user_id, user_name, user_level, user_status, user_avatar FROM " . DB_USERS . " WHERE user_name='" . $user . "' or user_name='" . ucwords($user) . "' or user_name='" . strtolower($user) . "' AND user_status='0' LIMIT 1");
     if (dbrows($result) > 0) {
         $data = dbarray($result);
         $src = $data['user_avatar'] && file_exists(IMAGES . "avatars/" . $data['user_avatar']) ? $src = IMAGES . "avatars/" . $data['user_avatar'] : IMAGES . "avatars/no-avatar.jpg";
         $title = '<div class="user-tooltip"><div class="pull-left m-r-10"><img class="img-responsive" style="max-height:40px; max-width:40px;" src="' . $src . '"></div><div class="clearfix"><a title="' . sprintf($locale['go_profile'], $data['user_name']) . '" class="strong profile-link m-b-5" href="' . BASEDIR . 'profile.php?lookup=' . $data['user_id'] . '">' . $data['user_name'] . '</a><br/><small>' . getuserlevel($data['user_level']) . '</small></div>';
         $content = '<a class="btn btn-sm btn-block btn-default strong" href="' . BASEDIR . 'messages.php?msg_send=' . $data['user_id'] . '"><i class="fa fa-envelope fa-fw"></i> ' . $locale['send_message'] . '</a>';
         $html = "<a class='strong pointer' tabindex='0' role='button' data-html='true' data-trigger='focus' data-placement='top' data-toggle='user-tooltip' title='" . $title . "' data-content='" . $content . "'>";
         $html .= "<span class='user-label'>" . $m[0] . "</span>";
         $html .= "</a>";
         return $html;
     }
     return $m[0];
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:24,代码来源:render_functions.php

示例12: Chan

| Filename: users.json.php
| Author : Frederick MC Chan (Hien)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once dirname(__FILE__) . '../../../maincore.php';
if (!defined("IN_FUSION")) {
    die("Access Denied");
}
$q = $_GET['q'];
// since search is on user_name.
$result = dbquery("SELECT user_id, user_name, user_avatar, user_level FROM " . DB_USERS . " WHERE " . (blacklist('user_id') ? blacklist('user_id') . ' AND' : '') . " user_status='0' AND\n    user_name LIKE '{$q}%' AND user_id !='" . $userdata['user_id'] . "'\n    ORDER BY user_level DESC, user_name ASC");
if (dbrows($result) > 0) {
    while ($udata = dbarray($result)) {
        $user_id = $udata['user_id'];
        $user_text = $udata['user_name'];
        $user_avatar = $udata['user_avatar'] && file_exists(IMAGES . "avatars/" . $udata['user_avatar']) ? $udata['user_avatar'] : "noavatar50.png";
        $user_name = $udata['user_name'];
        $user_level = getuserlevel($udata['user_level']);
        $user_opts[] = array('id' => "{$user_id}", 'text' => "{$user_name}", 'avatar' => "{$user_avatar}", "level" => "{$user_level}");
    }
} else {
    $user_opts[] = array('id' => '', 'text' => "No Results Found..", 'avatar' => '', 'level' => '');
}
echo json_encode($user_opts);
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:31,代码来源:users.json.php

示例13: user_search

function user_search($user_id)
{
    $encoded = json_encode(array());
    $user_id = stripinput($user_id);
    $result = dbquery("SELECT user_id, user_name, user_avatar, user_level FROM " . DB_USERS . " WHERE user_status='0' AND user_id='{$user_id}'");
    if (dbrows($result) > 0) {
        while ($udata = dbarray($result)) {
            $user_id = $udata['user_id'];
            $user_avatar = $udata['user_avatar'] ? $udata['user_avatar'] : "noavatar50.png";
            $user_name = $udata['user_name'];
            $user_level = getuserlevel($udata['user_level']);
            $user_opts[] = array('id' => "{$user_id}", 'text' => "{$user_name}", 'avatar' => "{$user_avatar}", "level" => "{$user_level}");
        }
        if (!isset($user_opts)) {
            $user_opts = array();
        }
        $encoded = json_encode($user_opts);
    }
    return $encoded;
}
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:20,代码来源:form_select.php

示例14: elseif

            } elseif ($lastseen < 360) {
                $lastseen = "" . $locale['LSUP_002'] . "";
            } elseif ($iW > 0) {
                if ($iW == 1) {
                    $Text = $locale['LSUP_003'];
                } else {
                    $Text = $locale['LSUP_004'];
                }
                $lastseen = "" . $iW . " " . $Text . "";
            } elseif ($iD > 0) {
                if ($iD == 1) {
                    $Text = $locale['LSUP_005'];
                } else {
                    $Text = $locale['LSUP_006'];
                }
                $lastseen = "" . $iD . " " . $Text . "";
            } else {
                $lastseen = $iH . ":" . $iM . ":" . $iS;
            }
        } else {
            $lastseen = $locale['LSUP_007'];
        }
        echo "<tr>\n<td class='small' align='left'>\n<a href='" . BASEDIR . "" . url("u", $data['user_id'], $data['user_name']) . "'><font color='" . $colors[$data['user_level']] . "' title='" . $data['user_name'] . " | " . getuserlevel($data['user_level'] ? $data['user_level'] : $locale['LSUP_008'], 20) . "'>" . trimlink($data['user_name'], 12) . "</font></a>\n</td>\n<td class='small2' align='right'>" . $lastseen . "</td>\n</tr>";
        $user_count++;
    }
}
echo "</table>";
if ($user_count > $min) {
    echo "</div>\n";
}
closesidex();
开发者ID:simplyianm,项目名称:clububer,代码行数:31,代码来源:last_seen_users_panel.php

示例15: replace_user

        /**
         * The callback function for parseUser()
         * @global array $locale
         * @param string $m The message
         * @return string
         */
        function replace_user($m)
        {
            global $locale;
            add_to_jquery("\$('[data-toggle=\"user-tooltip\"]').popover();");
            $user = str_replace('@', '', $m[0]);
            $result = dbquery("SELECT user_id, user_name, user_level, user_status, user_avatar FROM " . DB_USERS . " WHERE user_name='" . $user . "' or user_name='" . ucwords($user) . "' or user_name='" . strtolower($user) . "' AND user_status='0' LIMIT 1");
            if (dbrows($result) > 0) {
                $data = dbarray($result);
                $src = $data['user_avatar'] && file_exists(IMAGES . "avatars/" . $data['user_avatar']) ? $src = IMAGES . "avatars/" . $data['user_avatar'] : IMAGES . "avatars/noavatar50.png";
                $title = '<div class="user-tooltip">
				<div class="pull-left m-r-10"><img class="img-responsive" style="max-height:40px; max-width:40px;" src="' . $src . '"></div>
				<div class="overflow-hide">
				<a title="' . sprintf($locale['go_profile'], $data['user_name']) . '" " class="strong text-bigger" href="' . BASEDIR . 'profile.php?lookup=' . $data['user_id'] . '">' . $data['user_name'] . '</a><br/>
				<span class="text-smaller">' . getuserlevel($data['user_level']) . '</span>
				</div>';
                $content = '<a class="btn btn-sm btn-block btn-primary" href="' . BASEDIR . 'messages.php?msg_send=' . $data['user_id'] . '">' . $locale['send_message'] . '</a>';
                $html = "<a class='strong pointer' tabindex='0' role='user-profile' data-html='true' data-placement='top' data-toggle='user-tooltip' data-trigger='focus' title='" . $title . "' data-content='" . $content . "'>";
                $html .= $m[0];
                $html .= "</a>\n";
                return $html;
            }
            return $m[0];
        }
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:29,代码来源:core_functions_include.php


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