• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP format_username函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _myu_user_dropdown

function _myu_user_dropdown()
{
    global $user;
    global $language;
    $items = array();
    if ($user->uid === 0) {
        $login_link = l('<span>' . t('Login') . '</span>', '', array('attributes' => array('class' => 'login dropdown-toggle', 'data-toggle' => 'modal'), 'fragment' => 'login', 'external' => TRUE, 'html' => TRUE));
        return '<ul class="menu nav navbar-nav user"><li class="dropdown dropdown-user">' . $login_link . '</li></ul>';
    } else {
        $username = '';
        if (!empty($user->picture)) {
            $fid = $user->picture;
            $file = file_load($fid);
            $username = theme('image_style', array('path' => $file->uri, 'style_name' => '29x29', 'attributes' => array('class' => 'img-circle')));
        }
        $username .= '<span class="username username-hide-on-mobile">' . format_username($GLOBALS['user']) . '</span><i class="fa fa-angle-down"></i>';
        $username_link = l($username, 'javascript:;', array('html' => TRUE, 'language' => $language, 'external' => TRUE, 'attributes' => array('class' => 'dropdown-toggle', 'data-close-others' => 'true', 'data-hover' => 'dropdown', 'data-toggle' => 'dropdown')));
        $user_menu = menu_tree('user-menu');
        foreach ($user_menu as $menu_link) {
            if (isset($menu_link['#original_link'])) {
                $items[] = l($menu_link['#original_link']['title'], $menu_link['#original_link']['href'], array('language' => $language));
            }
        }
        $user_menu_list = theme('item_list', array('items' => $items, 'type' => 'ul', 'attributes' => array('class' => 'dropdown-menu dropdown-menu-default')));
        return '<ul class="menu nav navbar-nav user"><li class="dropdown dropdown-user">' . $username_link . $user_menu_list . '</li></ul>';
    }
}
开发者ID:verbruggenalex,项目名称:mediayoutubeupload,代码行数:27,代码来源:page.vars.php


示例2: simpleclean_preprocess_node

/**
 * Format submitted by in articles
 */
function simpleclean_preprocess_node(&$vars)
{
    $node = $vars['node'];
    $vars['date'] = format_date($node->created, 'custom', 'd M Y');
    if (variable_get('node_submitted_' . $node->type, TRUE)) {
        $vars['display_submitted'] = TRUE;
        $vars['submitted'] = t('By @username on !datetime', array('@username' => strip_tags(theme('username', array('account' => $node))), '!datetime' => $vars['date']));
        $vars['user_picture'] = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', array('account' => $node)) : '';
        // Add a footer for post
        $account = user_load($vars['node']->uid);
        $vars['simpleclean_postfooter'] = '';
        if (!empty($account->signature)) {
            $postfooter = "<div class='post-footer'>" . $vars['user_picture'] . "<h3>" . check_plain(format_username($account)) . "</h3>";
            $cleansignature = strip_tags($account->signature);
            $postfooter .= "<p>" . check_plain($cleansignature) . "</p>";
            $postfooter .= "</div>";
            $vars['simpleclean_postfooter'] = $postfooter;
        }
    } else {
        $vars['display_submitted'] = FALSE;
        $vars['submitted'] = '';
        $vars['user_picture'] = '';
    }
    // Remove Add new comment from teasers on frontpage
    if ($vars['is_front']) {
        unset($vars['content']['links']['comment']['#links']['comment-add']);
        unset($vars['content']['links']['comment']['#links']['comment_forbidden']);
    }
}
开发者ID:casivaagustin,项目名称:drupal-services,代码行数:32,代码来源:template.php


示例3: adminlte_preprocess_page

/**
 * Implement hook_preprocess_page()
 */
function adminlte_preprocess_page(&$vars, $hook)
{
    global $user;
    global $base_url;
    $vars['front_page'] = $base_url;
    $theme_path = drupal_get_path('theme', 'adminlte');
    // Fontawesome 4.5.0
    drupal_add_css('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css', array('type' => 'external', 'scope' => 'header'));
    // Ionicons 2.0.1
    drupal_add_css('https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css', array('type' => 'external', 'scope' => 'header'));
    // jQuery 2.2.3
    drupal_add_js($theme_path . '/plugins/jQuery/jQuery-2.2.3.min.js', array('type' => 'file', 'scope' => 'footer'));
    // Bootstrap 3.3.5
    drupal_add_js($theme_path . '/bootstrap/js/bootstrap.min.js', array('type' => 'file', 'scope' => 'footer'));
    // jQuery UI
    drupal_add_js('https://code.jquery.com/ui/1.11.4/jquery-ui.min.js', array('type' => 'external', 'scope' => 'footer'));
    // FastClick
    drupal_add_js($theme_path . '/plugins/fastclick/fastclick.min.js', array('type' => 'file', 'scope' => 'footer'));
    // AdminLTE App
    drupal_add_js($theme_path . '/dist/js/app.min.js', array('type' => 'file', 'scope' => 'footer'));
    // Moment
    drupal_add_js('https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js', array('type' => 'external', 'scope' => 'footer'));
    // Fullcalendar
    drupal_add_js($theme_path . '/plugins/fullcalendar/fullcalendar.min.js', array('type' => 'file', 'scope' => 'footer'));
    // Additional js for theme.
    drupal_add_js($theme_path . '/assets/js/script.js', array('type' => 'file', 'scope' => 'footer'));
    $vars['logout'] = '/user/logout';
    $vars['profile'] = 'user/' . $user->uid;
    $roles = end($user->roles);
    $vars['role'] = ucfirst($roles);
    reset($user->roles);
    // Check if user is login
    if (user_is_logged_in()) {
        $account = user_load($user->uid);
        $avatar_uri = drupal_get_path('theme', 'adminlte') . '/img/avatar.png';
        $alt = t("@user's picture", array('@user' => format_username($user)));
        // Display profile picture.
        if (!empty($account->picture)) {
            $user_picture = theme('image_style', array('style_name' => 'thumbnail', 'path' => $account->picture->uri, 'alt' => $alt, 'title' => $alt, 'attributes' => array('class' => 'img-circle')));
            $user_picture_m = theme('image_style', array('style_name' => 'thumbnail', 'path' => $account->picture->uri, 'alt' => $alt, 'title' => $alt, 'attributes' => array('class' => 'user-image')));
        } else {
            $user_picture_config = array('style_name' => 'thumbnail', 'path' => $avatar_uri, 'alt' => $alt, 'title' => $alt, 'attributes' => array('class' => 'img-circle'));
            $user_picture_m_config = array('style_name' => 'thumbnail', 'path' => $avatar_uri, 'alt' => $alt, 'title' => $alt, 'attributes' => array('class' => 'user-image'));
            $user_picture = adminlte_image_style($user_picture_config);
            $user_picture_m = adminlte_image_style($user_picture_m_config);
        }
        // Assign profile picture in variables.
        $vars['avatar'] = $user_picture;
        $vars['avatarsm'] = $user_picture_m;
        // Display history of member.
        $vars['history'] = 'Member for ' . format_interval(time() - $user->created);
        // Display username or you can change this to set the fullname of user login.
        $vars['fullname'] = $account->name;
    }
}
开发者ID:umandalroald,项目名称:adminlte,代码行数:58,代码来源:template.php


示例4: townsquare_bootstrap_preprocess_page

/**
 * Implements theme_preprocess_page().
 */
function townsquare_bootstrap_preprocess_page(&$vars)
{
    global $user;
    $vars['primary_local_tasks'] = menu_primary_local_tasks();
    $vars['secondary_local_tasks'] = menu_secondary_local_tasks();
    // The following menu stuff is lame
    foreach ($vars['main_menu'] as $item => $options) {
        $vars['main_menu'][$item]['html'] = TRUE;
        $vars['main_menu'][$item]['attributes']['id'] = 'menu-link-' . drupal_clean_css_identifier($options['href']);
    }
    $admin_menu = menu_tree_all_data('management');
    $children = array_pop($admin_menu);
    if ($children) {
        foreach ($children['below'] as $key => $value) {
            $children['below'][$key]['below'] = array();
        }
        $vars['admin_menu'] = menu_tree_output($children['below']);
    }
    // Add user picture if logged in
    if ($user->uid) {
        $vars['user_name'] = check_plain($user->name);
        if (!empty($user->picture)) {
            if (is_numeric($user->picture)) {
                $user->picture = file_load($user->picture);
            }
            if (!empty($user->picture->uri)) {
                $filepath = $user->picture->uri;
            }
        } elseif (variable_get('user_picture_default', '')) {
            $filepath = variable_get('user_picture_default', '');
        }
        if (isset($filepath)) {
            $alt = t("@user's picture", array('@user' => format_username($user)));
            if (module_exists('image') && file_valid_uri($filepath) && ($style = variable_get('user_picture_style', ''))) {
                $vars['user_picture'] = theme('image_style', array('style_name' => $style, 'path' => $filepath, 'alt' => $alt, 'title' => $alt));
            } else {
                $vars['user_picture'] = theme('image', array('path' => $filepath, 'alt' => $alt, 'title' => $alt));
            }
        } else {
            $vars['user_picture'] = '<i class="icon-user"></i>';
        }
    } else {
        unset($vars['secondary_menu']);
        $vars['login'] = drupal_get_form('user_login_block');
    }
    // Add Bootstrap
    $path = libraries_get_path('bootstrap');
    drupal_add_css($path . '/css/bootstrap.css');
    drupal_add_css($path . '/css/bootstrap-responsive.css');
    drupal_add_js($path . '/js/bootstrap.js');
    $path = libraries_get_path('font-awesome');
    drupal_add_css($path . '/css/font-awesome.css');
}
开发者ID:nningego,项目名称:townsquare,代码行数:56,代码来源:template.php


示例5: nesi_bootstrap_menu_tree__menu_researcher_menu

function nesi_bootstrap_menu_tree__menu_researcher_menu($variables)
{
    global $user;
    $user_data = user_load($user->uid);
    $output = '';
    $output .= '<ul id="user-menu" class="menu nav dropdown">';
    $output .= '<li>';
    $output .= '<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-target="#">' . format_username($user_data) . '<span class="caret"></span></a>';
    $output .= '<ul class="dropdown-menu">' . $variables['tree'] . '</ul>';
    $output .= '</li>';
    $output .= '</ul>';
    return $output;
}
开发者ID:nesi,项目名称:nesi-webportal,代码行数:13,代码来源:template.php


示例6: defaultDatas

 /**
  * {@inheritDoc}
  * @see ReactComponentInterface::defaultDatas()
  */
 public function defaultDatas($route)
 {
     global $user, $pager_page_array, $pager_total;
     $pager_element = 0;
     $options = $this->getOptions();
     $node = node_load($options['nid']);
     $data_model = $this->dataModel($route);
     $datas = array('user' => $data_model['user'], 'comments' => array());
     if ($user->uid) {
         $datas['user']['uid'] = $user->uid;
         $datas['user']['name'] = format_username($user);
         $datas['user']['url'] = url('user/' . $user->uid);
     }
     if ($options['pager']) {
         $page = isset($_GET['offset']) ? round($_GET['offset'] / $options['limit']) : 0;
         $datas['pager'] = array('total' => $pager_total[$pager_element], 'current' => $pager_page_array[$pager_element] + 1, 'visiblePages' => 3, 'limit' => $options['limit']);
     }
     $datas['user']['deleteAccess'] = user_access('administer comments') && user_access('post comments');
     $datas['user']['editAccess'] = user_access('administer comments') && user_access('post comments') || comment_access('edit', $comment) && user_access('post comments');
     $datas['user']['postAccess'] = $node->comment == COMMENT_NODE_OPEN && (user_access('administer comments') || user_access('post comments'));
     $datas['user']['moderateAccess'] = user_access('administer comments') && user_access('post comments');
     $datas['user']['postWithoutApprovalAccess'] = user_access('administer comments') && user_access('post comments') || user_access('skip comment approval');
     $comments = array();
     foreach ($this->elements() as $comment) {
         $data = $data_model['comment'];
         $data['body'] = $comment->comment_body[LANGUAGE_NONE][0]['value'];
         $data['author'] = $comment->name;
         if (!empty($comment->uid)) {
             $author = user_load($comment->uid);
             if (is_object($author)) {
                 $data['author'] = format_username($author);
                 $data['authorURL'] = url('user/' . $author->uid);
             }
         }
         $data['subject'] = $comment->subject;
         $data['pid'] = $comment->pid;
         $data['body'] = $comment->comment_body[LANGUAGE_NONE][0]['value'];
         $data['id'] = $comment->cid;
         $data['new'] = $comment->new != MARK_READ ? 1 : 0;
         $data['date'] = $date = !empty($comment->date) ? $comment->date : format_date($comment->created, 'custom', 'Y-m-d H:i O');
         $data['status'] = $comment->status == COMMENT_NOT_PUBLISHED ? 0 : 1;
         $comments[$comment->cid] = $data;
     }
     $result = $this->_sortCommentsChildrens($comments);
     $datas['comments'] = $result;
     return $datas;
 }
开发者ID:TommyTran1,项目名称:excelpoint,代码行数:51,代码来源:ReactComponentCommentBox.class.php


示例7: _bootstrap_theme_get_participants_html

function _bootstrap_theme_get_participants_html($participants)
{
    global $user;
    if (!empty($participants)) {
        $participants = _privatemsg_generate_user_array($participants);
    } else {
        $participants = array($user);
    }
    $output = '';
    foreach ($participants as $account) {
        if (!empty($output)) {
            $output .= ', ';
        }
        $output .= '<a href="' . url('user/' . $account->uid) . '">' . format_username($account) . '</a>';
    }
    return $output;
}
开发者ID:episolve,项目名称:clasnetworkdev,代码行数:17,代码来源:page.messages.php


示例8: parse

 /**
  * {@inheritdoc}
  */
 public function parse(ContextInterface $context, InlineParserContext $inline_context)
 {
     $cursor = $inline_context->getCursor();
     // The @ symbol must not have any other characters immediately prior.
     $previous_char = $cursor->peek(-1);
     if ($previous_char !== NULL && $previous_char !== ' ') {
         // peek() doesn't modify the cursor, so no need to restore state first.
         return FALSE;
     }
     // Save the cursor state in case we need to rewind and bail.
     $previous_state = $cursor->saveState();
     // Advance past the @ symbol to keep parsing simpler.
     $cursor->advance();
     // Parse the handle.
     $text = $cursor->match('/^[^\\s]+/');
     $url = '';
     $title = '';
     $type = $this->getSetting('type');
     if ($type === 'user') {
         $user = user_load_by_name($text);
         if ((!$user || !$user->uid) && is_numeric($text)) {
             $user = user_load((int) $text);
         }
         if ($user && $user->uid) {
             $url = url("user/{$user->uid}", ['absolute' => TRUE]);
             $title = t('View user profile.');
             if ($this->getSetting('format_username')) {
                 $text = format_username($user);
             }
         } else {
             $text = FALSE;
         }
     } elseif ($type === 'url' && ($url = $this->getSetting('url')) && strpos($url, '[text]') !== FALSE) {
         $url = str_replace('[text]', $text, $url);
     } else {
         $text = FALSE;
     }
     // Regex failed to match; this isn't a valid @ handle.
     if (empty($text) || empty($url)) {
         $cursor->restoreState($previous_state);
         return FALSE;
     }
     $inline_context->getInlines()->add(new Link($url, '@' . $text, $title));
     return TRUE;
 }
开发者ID:unicorn-fail,项目名称:commonmark.unicorn.fail,代码行数:48,代码来源:AtAutolinker.php


示例9: submit_preview

function submit_preview($subject, $abstract, $article, $section)
{
    global $allowed_html, $theme, $user;
    include "includes/story.inc";
    $output .= "<FORM ACTION=\"submit.php\" METHOD=\"post\">\n";
    $output .= "<B>" . t("Your name") . ":</B><BR>\n";
    $output .= format_username($user->userid) . "<P>";
    $output .= "<B>" . t("Subject") . ":</B><BR>\n";
    $output .= "<INPUT TYPE=\"text\" NAME=\"subject\" SIZE=\"50\" MAXLENGTH=\"60\" VALUE=\"" . check_textfield($subject) . "\"><P>\n";
    $output .= "<B>" . t("Section") . ":</B><BR>\n";
    foreach ($sections = section_get() as $value) {
        $options .= "  <OPTION VALUE=\"{$value}\"" . ($section == $value ? " SELECTED" : "") . ">{$value}</OPTION>\n";
    }
    $output .= "<SELECT NAME=\"section\">{$options}</SELECT><P>\n";
    $output .= "<B>" . t("Abstract") . ":</B><BR>\n";
    $output .= "<TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"abstract\">" . check_textarea($abstract) . "</TEXTAREA><BR>\n";
    $output .= "<SMALL><I>" . t("Allowed HTML tags") . ": " . htmlspecialchars($allowed_html) . ".</I></SMALL><P>\n";
    $output .= "<B>" . t("Extended story") . ":</B><BR>\n";
    $output .= "<TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"15\" NAME=\"article\">" . check_textarea($article) . "</TEXTAREA><BR>\n";
    $output .= "<SMALL><I>" . t("Allowed HTML tags") . ": " . htmlspecialchars($allowed_html) . ".</I></SMALL><P>\n";
    $duplicate = db_result(db_query("SELECT COUNT(id) FROM stories WHERE subject = '" . check_input($subject) . "'"));
    if (empty($subject)) {
        $output .= "<FONT COLOR=\"red\">" . t("Warning: you did not supply a subject.") . "</FONT><P>\n";
        $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"" . t("Preview submission") . "\">\n";
    } else {
        if (empty($abstract)) {
            $output .= "<FONT COLOR=\"red\">" . t("Warning: you did not supply an abstract.") . "</FONT><P>\n";
            $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"" . t("Preview submission") . "\">\n";
        } else {
            if ($duplicate) {
                $output .= "<FONT COLOR=\"red\">" . t("Warning: there is already a story with that subject.") . "</FONT><P>\n";
                $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"" . t("Preview submission") . "\">\n";
            } else {
                $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"" . t("Preview submission") . "\">\n";
                $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"" . t("Submit submission") . "\">\n";
            }
        }
    }
    $output .= "</FORM>\n";
    $theme->header();
    $theme->story(new Story($user->userid, $subject, $abstract, $article, $section, time()), "[ " . t("reply to this story") . " ]");
    $theme->box(t("Submit a story"), $output);
    $theme->footer();
}
开发者ID:phpepe,项目名称:drupal2,代码行数:44,代码来源:submit.php


示例10: _bootstrap_theme_pending_approval_reported_contents

function _bootstrap_theme_pending_approval_reported_contents()
{
    $header = array('Contribution Data');
    $rows = array();
    foreach (bootstrap_theme_get_contributions(NODE_NOT_PUBLISHED) as $contribution) {
        $contribution = node_load($contribution->nid);
        $collection = node_load($contribution->og_group_ref[$contribution->language][0]['target_id']);
        $row = array();
        $html = '';
        $html .= '<div class="ctb-title"><a href="' . url('node/' . $collection->nid) . '">' . $collection->title . ': <a href="' . url('node/' . $contribution->nid) . '">' . $contribution->title . '</a></div>';
        $html .= '<div class="ctb-added">' . date('F d Y', $contribution->created) . ' by ' . '<a href="' . url('user/' . $contribution->uid) . '" class="ctb-author">' . format_username(user_load($contribution->uid)) . '</a>' . '</div>';
        $html .= '<div class="ctb-desc">' . $contribution->body[$contribution->language][0]['value'] . '...</div>';
        $row[] = array('data' => $html);
        $rows[] = $row;
    }
    $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('class' => array('data-table-reported-contents'))));
    $output .= theme('pager');
    return $output;
}
开发者ID:episolve,项目名称:clasnetworkdev,代码行数:19,代码来源:page.dashboard.pending_approval.php


示例11: menu_get_object

print $attributes;
?>
>
<?php 
$account = menu_get_object('user');
$r_profile = profile2_load_by_user($account->uid);
?>
  <div class="module-wrapper module-wrapper-first">
    <h2>Account information</h2>
    <div class="module module-account">
      <div class="account-photo"><?php 
print render($user_profile['user_picture']);
?>
</div>
      <div class="account-name"><?php 
print format_username($account);
?>
</div>
      <div class="account-mail"><?php 
print $account->mail;
?>
</div>
      <div class="account-history"><?php 
print render($user_profile['summary']['member_for']);
?>
</div>
    </div>
  </div>

  <div class="module-wrapper">
    <h2>Researcher information</h2>
开发者ID:nesi,项目名称:nesi-webportal,代码行数:31,代码来源:user-profile.tpl.php


示例12: pager

$pager = pager($perpage, $count1, 'admin.php?action=shistory&amp;');
$res = sql_query("SELECT s.id, s.userid, s.date , s.text, s.to_user, u.username, u.pirate, u.king, u.enabled, u.class, u.donor, u.warned, u.leechwarn, u.chatpost FROM shoutbox as s LEFT JOIN users as u ON s.userid=u.id ORDER BY s.date DESC " . $pager['limit'] . "") or sqlerr(__FILE__, __LINE__);
if ($count1 > $perpage) {
    $HTMLOUT .= $pager['pagertop'];
}
$HTMLOUT .= begin_main_frame();
if (mysql_num_rows($res) == 0) {
    $HTMLOUT .= "No shouts here";
} else {
    $HTMLOUT .= "<table align='center' border='0' cellspacing='0' cellpadding='2' width='100%' class='small'>\n";
    while ($arr = mysql_fetch_assoc($res)) {
        if ($arr['to_user'] != $CURUSER['id'] && $arr['to_user'] != 0 && $arr['userid'] != $CURUSER['id']) {
            continue;
        }
        if ($arr['to_user'] == $CURUSER['id'] || $arr['userid'] == $CURUSER['id'] && $arr['to_user'] != 0) {
            $private = "<img src='{$TBDEV['pic_base_url']}private-shout.png' alt='Private shout' title='Private shout!' width='16' style='padding-left:2px;padding-right:2px;' border='0' />";
        } else {
            $private = "<img src='{$TBDEV['pic_base_url']}group.png' alt='Public shout' title='Public shout!' width='16' style='padding-left:2px;padding-right:2px;' border='0' />";
        }
        $date = get_date($arr["date"], 0, 1);
        $user_stuff = $arr;
        $user_stuff['id'] = $arr['userid'];
        $HTMLOUT .= "<tr style='background-color:grey;'><td><span class='size1' style='color:white; '>[{$date}]&nbsp;[{$private}]</span>\n " . format_username($user_stuff) . "<span class='size2' style='color:white;'> " . format_comment($arr["text"]) . "\n</span></td></tr>\n";
    }
    $HTMLOUT .= "</table>";
}
if ($count1 > $perpage) {
    $HTMLOUT .= $pager['pagerbottom'];
}
$HTMLOUT .= end_main_frame();
print stdhead('Shout History') . $HTMLOUT . stdfoot();
开发者ID:thefkboss,项目名称:U-232,代码行数:31,代码来源:shistory.php


示例13: foreach

        foreach ($shouts as $arr) {
            if ($arr['to_user'] != $CURUSER['id'] && $arr['to_user'] != 0 && $arr['userid'] != $CURUSER['id']) {
                continue;
            }
            $private = '';
            if ($arr['to_user'] == $CURUSER['id'] && $arr['to_user'] > 0) {
                $private = "<a href=\"javascript:private_reply('" . htmlsafechars($arr['username']) . "')\"><img src=\"{$INSTALLER09['pic_base_url']}private-shout.png\" alt=\"Private shout\" title=\"Private shout! click to reply to " . htmlsafechars($arr['username']) . "\" width=\"16\" style=\"padding-left:2px;padding-right:2px;\" border=\"0\" /></a>";
            }
            $edit = $CURUSER['class'] >= UC_STAFF || $arr['userid'] == $CURUSER['id'] && ($CURUSER['class'] >= UC_POWER_USER && $CURUSER['class'] <= UC_STAFF) ? "<a href='{$INSTALLER09['baseurl']}/shoutbox.php?edit=" . (int) $arr['id'] . "&amp;user=" . (int) $arr['userid'] . "'><img src='{$INSTALLER09['pic_base_url']}button_edit2.gif' border='0' alt=\"Edit Shout\"  title=\"Edit Shout\" /></a> " : "";
            $del = $CURUSER['class'] >= UC_STAFF ? "<a href='./shoutbox.php?del=" . (int) $arr['id'] . "'><img src='{$INSTALLER09['pic_base_url']}button_delete2.gif' border='0' alt=\"Delete Single Shout\" title=\"Delete Single Shout\" /></a> " : "";
            $delall = $CURUSER['class'] == UC_MAX ? "<a href='./shoutbox.php?delall' onclick=\"confirm_delete(); return false;\"><img src='{$INSTALLER09['pic_base_url']}del.png' border='0' alt=\"Empty Shout\" title=\"Empty Shout\" /></a> " : "";
            //$delall
            $pm = $CURUSER['id'] != $arr['userid'] ? "<span class='date' style=\"color:{$dtcolor}\"><a target='_blank' href='./pm_system.php?action=send_message&amp;receiver=" . (int) $arr['userid'] . "'><img src='{$INSTALLER09['pic_base_url']}button_pm2.gif' border='0' alt=\"Pm User\" title=\"Pm User\" /></a></span>\n" : "";
            $date = get_date($arr["date"], 0, 1);
            $reply = $CURUSER['id'] != $arr['userid'] ? "<a href=\"javascript:window.top.SmileIT('[b][i]=>&nbsp;[color=#" . get_user_class_color($arr['class']) . "]" . ($arr['perms'] & bt_options::PERMS_STEALTH ? "UnKnown" : htmlsafechars($arr['username'])) . "[/color]&nbsp;-[/i][/b]','shbox','shbox_text')\"><img height='10' src='{$INSTALLER09['pic_base_url']}reply.gif' title='Reply' alt='Reply' style='border:none;' /></a>" : "";
            $user_stuff = $arr;
            $user_stuff['id'] = $arr['perms'] & bt_options::PERMS_STEALTH ? "" . ($user_stuff['id'] = $INSTALLER09['bot_id'] . "") : "" . ($user_stuff['id'] = (int) $arr['userid'] . "");
            $user_stuff['username'] = $arr['perms'] & bt_options::PERMS_STEALTH ? "" . ($user_stuff['username'] = 'UnKn0wn' . "") : "" . ($user_stuff['username'] = htmlsafechars($arr['username']) . "");
            $HTMLOUT .= "<tr style='background-color:{$bg};'><td><span class='size1' style='color:{$fontcolor};'>[{$date}]</span>\n{$del}{$edit}{$pm}{$reply}{$private} " . format_username($user_stuff, true) . "<span class='size2' style='color:{$fontcolor};'>" . format_comment($arr["text"]) . "\n</span></td></tr>\n";
        }
        $HTMLOUT .= "</table>";
    } else {
        //== If there are no shouts
        if (empty($shouts)) {
            $HTMLOUT .= "<tr style='background-color:{$bg};'><td><span class='size1' style='color:{$fontcolor};'>No shouts here</span></td></tr>\n";
        }
        $HTMLOUT .= "</table>";
    }
}
$HTMLOUT .= "</body></html>";
echo $HTMLOUT;
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:31,代码来源:shoutbox.php


示例14: header

                     $HTMLOUT .= "<p>Saved.</p>\n";
                     header("Refresh: 2; url=staffpanel.php?tool=events");
                 }
             }
         }
     }
 }
 if ($count1 > $perpage) {
     $HTMLOUT .= $pager['pagertop'];
 }
 $HTMLOUT .= "<p><strong> Events Schedular </strong> (eZERO) - <strong> <font color='red'>BETA</font> </strong> </p>\n<form action='' method='post'>\n<table width='80%' cellpadding='6'>\n<tr><th>User</th><th>Text</th><th>Start</th><th>End</th><th>Freeleech?</th><th>DUpload?</th><th>halfdownload?</th><th>Show Dates?</th><th>&nbsp;</th></tr>";
 foreach ($scheduled_events as $scheduled_event) {
     $id = (int) $scheduled_event['id'];
     $users = $scheduled_event;
     $users['id'] = (int) $scheduled_event['userid'];
     $username = format_username($users);
     $text = htmlsafechars($scheduled_event['overlayText']);
     $start = get_date((int) $scheduled_event['startTime'], 'DATE');
     $end = get_date((int) $scheduled_event['endTime'], 'DATE');
     $freeleech = (bool) (int) $scheduled_event['freeleechEnabled'];
     $doubleUpload = (bool) (int) $scheduled_event['duploadEnabled'];
     $halfdownload = (bool) (int) $scheduled_event['hdownEnabled'];
     if ($freeleech) {
         $freeleech = "<img src=\"{$INSTALLER09['pic_base_url']}on.gif\" alt=\"Freeleech Enabled\" title=\"Enabled\" />";
     } else {
         $freeleech = "<img src=\"{$INSTALLER09['pic_base_url']}off.gif\" alt=\"Freeleech Disabled\" title=\"Disabled\" />";
     }
     if ($doubleUpload) {
         $doubleUpload = "<img src=\"{$INSTALLER09['pic_base_url']}on.gif\" alt=\"Double Upload Enabled\" title=\"Enabled\" />";
     } else {
         $doubleUpload = "<img src=\"{$INSTALLER09['pic_base_url']}off.gif\" alt=\"Double Upload Disabled\" title=\"Disabled\" />";
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:31,代码来源:events.php


示例15: format_username

		<tr class="colhead">
			<td>User</td>
			<td>IP</td>
			<td>Dupes</td>
			<td>Registered</td>
		</tr>
<?
	while(list($UserID, $IP, $Username, $PermissionID, $Enabled, $Donor, $Warned, $Joined, $Uses)=$DB->next_record()) {
	$Row = ($Row == 'b') ? 'a' : 'b';
?>
		<tr class="row<?php 
echo $Row;
?>
">
			<td><?php 
echo format_username($UserID, $Username, $Donor, $Warned, $Enabled, $PermissionID);
?>
</td>
			<td><span style="float:left;"><?php 
echo display_str($IP);
?>
</span><span style="float:right;">[<a href="userhistory.php?action=ips&amp;userid=<?php 
echo $UserID;
?>
" title="History">H</a>|<a href="user.php?action=search&amp;ip_history=on&amp;ip=<?php 
echo display_str($IP);
?>
" title="Search">S</a>]</span></td>
			<td><?php 
echo display_str($Uses);
?>
开发者ID:4play,项目名称:gazelle2,代码行数:31,代码来源:dupe_ip.php


示例16: sql_query

    if (!empty($_POST["desact"])) {
        sql_query("UPDATE users SET enabled = 'no' WHERE id IN (" . implode(", ", array_map("sqlesc", $_POST["desact"])) . ")") or sqlerr(__FILE__, __LINE__);
    }
}
$HTMLOUT .= "<div class='row'><div class='col-md-12'>";
$HTMLOUT .= "<h2>{$lang['cheaters_users']}</h2>";
$res = sql_query("SELECT COUNT(*) FROM cheaters") or sqlerr(__FILE__, __LINE__);
$row = mysqli_fetch_array($res);
$count = $row[0];
$perpage = 15;
$pager = pager($perpage, $count, "staffpanel.php?tool=cheaters&amp;action=cheaters&amp;");
$HTMLOUT .= "<form action='staffpanel.php?tool=cheaters&amp;action=cheaters' method='post'>\n<script type='text/javascript'>\n/*<![CDATA[*/\nfunction klappe(id)\n{var klappText=document.getElementById('k'+id);var klappBild=document.getElementById('pic'+id);if(klappText.style.display=='none'){klappText.style.display='block';}\nelse{klappText.style.display='none';}}\nfunction klappe_news(id)\n{var klappText=document.getElementById('k'+id);var klappBild=document.getElementById('pic'+id);if(klappText.style.display=='none'){klappText.style.display='block';klappBild.src='{$INSTALLER09['pic_base_url']}minus.gif';}\nelse{klappText.style.display='none';klappBild.src='{$INSTALLER09['pic_base_url']}plus.gif';}}\t\n</script>\n<script type='text/javascript'>\nvar checkflag = 'false';\nfunction check(field) {\nif (checkflag == 'false') {\nfor (i = 0; i < field.length; i++) {\nfield[i].checked = true;}\ncheckflag = 'true';\nreturn 'Uncheck All Disable'; }\nelse {\nfor (i = 0; i < field.length; i++) {\nfield[i].checked = false; }\ncheckflag = 'false';\nreturn 'Check All Disable'; }\n}\nfunction check2(field) {\nif (checkflag == 'false') {\nfor (i = 0; i < field.length; i++) {\nfield[i].checked = true;}\ncheckflag = 'true';\nreturn 'Uncheck All Remove'; }\nelse {\nfor (i = 0; i < field.length; i++) {\nfield[i].checked = false; }\ncheckflag = 'false';\nreturn 'Check All Remove'; }\n}\n/*]]>*/\n</script>";
if ($count > $perpage) {
    $HTMLOUT .= $pager['pagertop'];
}
$HTMLOUT .= "<table class='table table-bordered'>\n<tr>\n<td>#</td>\n<td>{$lang['cheaters_uname']}</td>\n<td>{$lang['cheaters_d']}</td>\n<td>{$lang['cheaters_r']}</td></tr>\n";
$res = sql_query("SELECT c.id as cid, c.added, c.userid, c.torrentid, c.client, c.rate, c.beforeup, c.upthis, c.timediff, c.userip, u.id, u.username, u.class, u.downloaded, u.uploaded, u.chatpost, u.leechwarn, u.warned, u.pirate, u.king, u.donor, u.enabled, t.id AS tid, t.name AS tname FROM cheaters AS c LEFT JOIN users AS u ON u.id=c.userid LEFT JOIN torrents AS t ON t.id=c.torrentid ORDER BY added DESC " . $pager['limit']) or sqlerr(__FILE__, __LINE__);
while ($arr = mysqli_fetch_assoc($res)) {
    $torrname = htmlsafechars(CutName($arr["tname"], 80));
    $users = $arr;
    $users['id'] = (int) $arr['userid'];
    $cheater = "<b><a href='{$INSTALLER09['baseurl']}/userdetails.php?id=" . (int) $arr['id'] . "'>" . format_username($users) . "</a></b>{$lang['cheaters_hbcc']}<br />\n    <b>{$lang['cheaters_torrent']} <a href='{$INSTALLER09['baseurl']}/details.php?id=" . (int) $arr['tid'] . "' title='{$torrname}'>{$torrname}</a></b>\n<br />{$lang['cheaters_upped']} <b>" . mksize((int) $arr['upthis']) . "</b><br />{$lang['cheaters_speed']} <b>" . mksize((int) $arr['rate']) . "/s</b><br />{$lang['cheaters_within']} <b>" . (int) $arr['timediff'] . " {$lang['cheaters_sec']}</b><br />{$lang['cheaters_uc']} <b>" . htmlsafechars($arr['client']) . "</b><br />{$lang['cheaters_ipa']} <b>" . htmlsafechars($arr['userip']) . "</b>";
    $HTMLOUT .= "<tr><td>" . (int) $arr['cid'] . "</td>\n    <td>" . format_username($users) . "<a href=\"javascript:klappe('a1" . (int) $arr['cid'] . "')\"> {$lang['cheaters_added']}" . get_date($arr['added'], 'DATE') . "</a>\n    <div id=\"ka1" . (int) $arr['cid'] . "\" style=\"display: none;\"><font color=\"black\">{$cheater}</font></div></td>\n    <td><input type=\"checkbox\" name=\"desact[]\" value=\"" . (int) $arr["id"] . "\"/></td>\n    <td><input type=\"checkbox\" name=\"remove[]\" value=\"" . (int) $arr["cid"] . "\"/></td></tr>";
}
$HTMLOUT .= "<tr>\n<td>\n<input type=\"button\" value=\"{$lang['cheaters_cad']}\" onclick=\"this.value=check(this.form.elements['desact[]'])\"/> <input type=\"button\" value=\"{$lang['cheaters_car']}\" onclick=\"this.value=check(this.form.elements['remove[]'])\"/> <input type=\"hidden\" name=\"nowarned\" value=\"nowarned\" /><input type=\"submit\" name=\"submit\" value=\"{$lang['cheaters_ac']}\" />\n</td>\n</tr>\n</table></form>";
if ($count > $perpage) {
    $HTMLOUT .= $pager['pagerbottom'];
}
$HTMLOUT .= "</div></div>";
echo stdhead($lang['cheaters_stdhead']) . $HTMLOUT . stdfoot();
die;
开发者ID:Bigjoos,项目名称:U-232-V5,代码行数:31,代码来源:cheaters.php


示例17: format_username

         $doubleUpload = "<img src=\"{$TBDEV['pic_base_url']}on.gif\" alt=\"Double Upload Enabled\" title=\"Enabled\" />";
     } else {
         $doubleUpload = "<img src=\"{$TBDEV['pic_base_url']}off.gif\" alt=\"Double Upload Disabled\" title=\"Disabled\" />";
     }
     if ($halfdownload) {
         $halfdownload = "<img src=\"{$TBDEV['pic_base_url']}on.gif\" alt=\"Halfdownload Enabled\" title=\"Enabled\" />";
     } else {
         $halfdownload = "<img src=\"{$TBDEV['pic_base_url']}off.gif\" alt=\"Halfdownload Disabled\" title=\"Disabled\" />";
     }
     $showdates = (bool) (int) $scheduled_event['displayDates'];
     if ($showdates) {
         $showdates = "<img src=\"{$TBDEV['pic_base_url']}on.gif\" alt=\"Showing of Dates Enabled\" title=\"Enabled\" />";
     } else {
         $showdates = "<img src=\"{$TBDEV['pic_base_url']}off.gif\" alt=\"Showing of Dates Disabled\" title=\"Disabled\" />";
     }
     $HTMLOUT .= "<tr><td align=\"center\">" . format_username($username) . "</td><td align=\"center\">{$text}</td><td align=\"center\">{$start}</td><td align=\"center\">{$end}</td><td align=\"center\">{$freeleech}</td><td align=\"center\">{$doubleUpload}</td><td align=\"center\">{$halfdownload}</td><td align=\"center\">{$showdates}</td><td align=\"center\"><input type=\"submit\" name=\"editEvent_{$id}\" value=\"Edit\" /> <input type=\"submit\" onclick=\"return checkAllGood('{$text}')\" name=\"removeEvent_{$id}\" value=\"Remove\" /></td></tr>";
 }
 $HTMLOUT .= "<tr><td colspan='9' align='right'><input type='submit' name='editEvent_-1' value='Add Event' /></td></tr></table>";
 foreach ($_POST as $key => $value) {
     if (gettype($pos = strpos($key, "_")) != 'boolean') {
         $id = (int) substr($key, $pos + 1);
         if (gettype(strpos($key, "editEvent_")) != 'boolean') {
             if ($id == -1) {
                 $HTMLOUT .= "<table>\r\n<tr><th align='right'>Userid</th><td><input type='text' name='userid' value='{$CURUSER[" 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP format_warning函数代码示例发布时间:2022-05-15
下一篇:
PHP format_user_name函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap