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

PHP my_number_format函数代码示例

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

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



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

示例1: asb_statistics_build_template

function asb_statistics_build_template($args)
{
    extract($args);
    global ${$template_var}, $mybb, $cache, $templates, $lang;
    // Load global and custom language phrases
    if (!$lang->asb_addon) {
        $lang->load('asb_addon');
    }
    // get forum statistics
    $statistics = $cache->read("stats");
    $statistics['numthreads'] = my_number_format($statistics['numthreads']);
    $statistics['numposts'] = my_number_format($statistics['numposts']);
    $statistics['numusers'] = my_number_format($statistics['numusers']);
    $newestmember = "<strong>{$lang->asb_stats_no_one}</strong>";
    if ($statistics['lastusername']) {
        if ($settings['format_username']) {
            $last_user = get_user($statistics['lastuid']);
            $last_username = format_name($last_user['username'], $last_user['usergroup'], $last_user['displaygroup']);
        } else {
            $last_username = $statistics['lastusername'];
        }
        $newestmember = build_profile_link($last_username, $statistics['lastuid']);
    }
    eval("\$" . $template_var . " = \"" . $templates->get('asb_statistics') . "\";");
    return true;
}
开发者ID:badboy4life91,项目名称:Advanced-Sidebox,代码行数:26,代码来源:statistics.php


示例2: usercp_menu_misc

/**
 * Constructs the usercp misc menu.
 *
 */
function usercp_menu_misc()
{
    global $db, $mybb, $templates, $theme, $usercpmenu, $lang, $collapsed, $collapsedimg;
    $draftstart = $draftend = $draftcount = '';
    $query = $db->simple_select("posts", "COUNT(*) AS draftcount", "visible='-2' AND uid='" . $mybb->user['uid'] . "'");
    $count = $db->fetch_array($query);
    if ($count['draftcount'] > 0) {
        $draftstart = "<strong>";
        $draftend = "</strong>";
        $draftcount = "(" . my_number_format($count['draftcount']) . ")";
    }
    $profile_link = get_profile_link($mybb->user['uid']);
    eval("\$usercpmenu .= \"" . $templates->get("usercp_nav_misc") . "\";");
}
开发者ID:ThinhNguyenVB,项目名称:Gradient-Studios-Website,代码行数:18,代码来源:functions_user.php


示例3: build_user_view_card

function build_user_view_card($user, $view, &$i)
{
    global $user_view_fields;
    ++$i;
    if ($i == 3) {
        $i = 1;
    }
    // Loop through fields user wants to show
    foreach ($view['fields'] as $field) {
        if (!$user_view_fields[$field]) {
            continue;
        }
        $view_field = $user_view_fields[$field];
        // Special conditions for avatar
        if ($field == "avatar") {
            $avatar = $user['view']['avatar'];
        } else {
            if ($field == "controls") {
                $controls = $user['view']['controls'];
            } else {
                if ($field != "username") {
                    if (isset($user['view'][$field])) {
                        $value = $user['view'][$field];
                    } else {
                        $value = $user[$field];
                    }
                    if ($field == "postnum") {
                        $value = my_number_format($value);
                    }
                    $user_details[] = "<strong>{$view_field['title']}:</strong> {$value}";
                }
            }
        }
    }
    // Floated to the left or right?
    if ($i == 1) {
        $float = "left";
    } else {
        $float = "right";
    }
    // And build the final card
    $card = "<fieldset id=\"uid_{$user['uid']}\" style=\"width: 47%; float: {$float};\">\n";
    $card .= "<legend><input type=\"checkbox\" class=\"checkbox\" name=\"inlinemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"\$('uid_{$user['uid']}').toggleClassName('inline_selected');\" /> {$user['view']['username']}</legend>\n";
    if ($avatar) {
        $card .= "<div class=\"user_avatar\">{$avatar}</div>\n";
    }
    if ($user_details) {
        $card .= "<div class=\"user_details\">" . implode("<br />", $user_details) . "</div>\n";
    }
    if ($controls) {
        $card .= "<div class=\"float_right\" style=\"padding: 4px;\">{$controls}</div>\n";
    }
    $card .= "</fieldset>";
    return $card;
}
开发者ID:GeorgeLVP,项目名称:mybb,代码行数:55,代码来源:users.php


示例4: redirect

    redirect("private.php", $lang->redirect_pmfoldersupdated);
}
if ($mybb->input['action'] == "empty") {
    if ($mybb->user['totalpms'] == 0) {
        error($lang->error_nopms);
    }
    $plugins->run_hooks("private_empty_start");
    $foldersexploded = explode("\$%%\$", $mybb->user['pmfolders']);
    $folderlist = '';
    foreach ($foldersexploded as $key => $folders) {
        $folderinfo = explode("**", $folders, 2);
        $fid = $folderinfo[0];
        $foldername = get_pm_folder_name($fid, $folderinfo[1]);
        $query = $db->simple_select("privatemessages", "COUNT(*) AS pmsinfolder", " folder='{$fid}' AND uid='" . $mybb->user['uid'] . "'");
        $thing = $db->fetch_array($query);
        $foldercount = my_number_format($thing['pmsinfolder']);
        eval("\$folderlist .= \"" . $templates->get("private_empty_folder") . "\";");
    }
    $plugins->run_hooks("private_empty_end");
    eval("\$folders = \"" . $templates->get("private_empty") . "\";");
    output_page($folders);
}
if ($mybb->input['action'] == "do_empty" && $mybb->request_method == "post") {
    // Verify incoming POST request
    verify_post_check($mybb->get_input('my_post_key'));
    $plugins->run_hooks("private_do_empty_start");
    $emptyq = '';
    $mybb->input['empty'] = $mybb->get_input('empty', MyBB::INPUT_ARRAY);
    $keepunreadq = '';
    if ($mybb->get_input('keepunread', MyBB::INPUT_INT) == 1) {
        $keepunreadq = " AND status!='0'";
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:private.php


示例5: array

     if ($nummodqueuethreads > 0 || $mybb->usergroup['issupermod'] == 1) {
         $query = $db->simple_select("threads", "COUNT(tid) AS unapprovedthreads", "visible='0' {$flist_queue_threads}");
         $unapproved_threads = $db->fetch_field($query, "unapprovedthreads");
         if ($unapproved_threads > 0) {
             $query = $db->simple_select("threads", "tid, subject, uid, username, dateline", "visible='0' {$flist_queue_threads}", array('order_by' => 'dateline', 'order_dir' => 'DESC', 'limit' => 1));
             $thread = $db->fetch_array($query);
             $thread['date'] = my_date('relative', $thread['dateline']);
             $thread['profilelink'] = build_profile_link($thread['username'], $thread['uid']);
             $thread['link'] = get_thread_link($thread['tid']);
             $thread['subject'] = $thread['fullsubject'] = $parser->parse_badwords($thread['subject']);
             if (my_strlen($thread['subject']) > 25) {
                 $post['subject'] = my_substr($thread['subject'], 0, 25) . "...";
             }
             $thread['subject'] = htmlspecialchars_uni($thread['subject']);
             $thread['fullsubject'] = htmlspecialchars_uni($thread['fullsubject']);
             $unapproved_threads = my_number_format($unapproved_threads);
             eval("\$latest_thread = \"" . $templates->get("modcp_lastthread") . "\";");
         } else {
             eval("\$latest_thread = \"" . $templates->get("modcp_awaitingmoderation_none") . "\";");
         }
         eval("\$awaitingthreads = \"" . $templates->get("modcp_awaitingthreads") . "\";");
     }
     if (!empty($awaitingattachments) || !empty($awaitingposts) || !empty($awaitingthreads)) {
         eval("\$awaitingmoderation = \"" . $templates->get("modcp_awaitingmoderation") . "\";");
     }
 }
 $latestfivemodactions = '';
 if (($nummodlogs > 0 || $mybb->usergroup['issupermod'] == 1) && $mybb->usergroup['canviewmodlogs'] == 1) {
     $where = '';
     if ($tflist_modlog) {
         $where = "WHERE (t.fid <> 0 {$tflist_modlog}) OR (!l.fid)";
开发者ID:olada,项目名称:mybbintegrator,代码行数:31,代码来源:modcp.php


示例6: htmlspecialchars_uni

 }
 $join_requests = '';
 if ($joinrequests[$usergroup['gid']] > 1 && $usergroup['type'] == 4) {
     $join_requests = " <small><a href=\"index.php?module=user-groups&amp;action=join_requests&amp;gid={$usergroup['gid']}\"><span style=\"color: red;\">({$joinrequests[$usergroup['gid']]} {$lang->outstanding_join_request})</span></a></small>";
 } else {
     if ($joinrequests[$usergroup['gid']] == 1 && $usergroup['type'] == 4) {
         $join_requests = " <small><a href=\"index.php?module=user-groups&amp;action=join_requests&amp;gid={$usergroup['gid']}\"><span style=\"color: red;\">({$joinrequests[$usergroup['gid']]} {$lang->outstanding_join_request})</span></a></small>";
     }
 }
 $form_container->output_cell("<div class=\"float_right\">{$icon}</div><div><strong><a href=\"index.php?module=user-groups&amp;action=edit&amp;gid={$usergroup['gid']}\">" . htmlspecialchars_uni($usergroup['title']) . "</a></strong>{$join_requests}<br /><small>" . htmlspecialchars_uni($usergroup['description']) . "{$leaders_list}</small></div>");
 if (!$primaryusers[$usergroup['gid']]) {
     $primaryusers[$usergroup['gid']] = 0;
 }
 $numusers = $primaryusers[$usergroup['gid']];
 $numusers += $secondaryusers[$usergroup['gid']];
 $form_container->output_cell(my_number_format($numusers), array("class" => "align_center"));
 if ($usergroup['showforumteam'] == 1) {
     $form_container->output_cell("<input type=\"text\" name=\"disporder[{$usergroup['gid']}]\" value=\"{$usergroup['disporder']}\" class=\"text_input align_center\" style=\"width: 80%;\" />", array("class" => "align_center"));
 } else {
     $form_container->output_cell("&nbsp;", array("class" => "align_center"));
 }
 $popup = new PopupMenu("usergroup_{$usergroup['gid']}", $lang->options);
 $popup->add_item($lang->edit_group, "index.php?module=user-groups&amp;action=edit&amp;gid={$usergroup['gid']}");
 $popup->add_item($lang->list_users, "index.php?module=user-users&amp;action=search&amp;results=1&amp;conditions[usergroup]={$usergroup['gid']}");
 if ($joinrequests[$usergroup['gid']] > 0 && $usergroup['type'] == 4) {
     $popup->add_item($lang->join_requests, "index.php?module=user-groups&amp;action=join_requests&amp;gid={$usergroup['gid']}");
 }
 $popup->add_item($lang->group_leaders, "index.php?module=user-groups&amp;action=leaders&amp;gid={$usergroup['gid']}");
 if ($usergroup['type'] > 1) {
     $popup->add_item($lang->delete_group, "index.php?module=user-groups&amp;action=delete&amp;gid={$usergroup['gid']}&amp;my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_group_deletion}')");
 }
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:groups.php


示例7: build_user_view_table

/**
 * @param array $user
 * @param array $view
 * @param DefaultTable $table
 */
function build_user_view_table($user, $view, &$table)
{
    global $user_view_fields;
    foreach ($view['fields'] as $field) {
        if (!$user_view_fields[$field]) {
            continue;
        }
        $view_field = $user_view_fields[$field];
        $field_options = array();
        if ($view_field['align']) {
            $field_options['class'] = "align_" . $view_field['align'];
        }
        if ($user['view'][$field]) {
            $value = $user['view'][$field];
        } else {
            $value = $user[$field];
        }
        if ($field == "postnum") {
            $value = my_number_format($user[$field]);
        }
        $table->construct_cell($value, $field_options);
    }
    $table->construct_cell("<input type=\"checkbox\" class=\"checkbox\" name=\"inlinemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"\$('#uid_{$user['uid']}').toggleClass('inline_selected');\" />");
    $table->construct_row();
}
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:30,代码来源:users.php


示例8: elseif

 // Format the user's 'total' reputation
 if ($user['reputation'] < 0) {
     $total_class = "_minus";
 } elseif ($user['reputation'] > 0) {
     $total_class = "_plus";
 } else {
     $total_class = "_neutral";
 }
 // Figure out how many reps have come from posts / 'general'
 // Posts
 $query = $db->simple_select("reputation", "COUNT(rid) AS rep_posts", "uid = '" . $user['uid'] . "' AND pid > 0");
 $rep_post_count = $db->fetch_field($query, "rep_posts");
 $rep_posts = my_number_format($rep_post_count);
 // General
 // We count how many reps in total, then subtract the reps from posts
 $rep_members = my_number_format($total_reputation - $rep_post_count);
 // Is negative reputation disabled? If so, tell the user
 if ($mybb->settings['negrep'] == 0) {
     $neg_rep_info = $lang->neg_rep_disabled;
 }
 if ($mybb->settings['posrep'] == 0) {
     $pos_rep_info = $lang->pos_rep_disabled;
 }
 if ($mybb->settings['neurep'] == 0) {
     $neu_rep_info = $lang->neu_rep_disabled;
 }
 $perpage = (int) $mybb->settings['repsperpage'];
 if ($perpage < 1) {
     $perpage = 15;
 }
 // Check if we're browsing a specific page of results
开发者ID:styv300,项目名称:ToRepublic2.5,代码行数:31,代码来源:reputation.php


示例9: array

 }
 if ($session->ipaddress == $data['ip'] || $mybb->user['regip'] == $data['ip'] || $mybb->user['lastip'] == $data['ip']) {
     $isyou = "(You)";
 } else {
     $isyou = "";
 }
 if (isset($mybb->input['page']) && $mybb->input['page'] !== 1) {
     $num = $mybb->input['page'] * 10;
 } else {
     $num = 0;
 }
 $i = ++$number + $num;
 $table->construct_cell("<strong>" . $i . "</strong>", array('width' => '1%'));
 $table->construct_cell("<a href=\"index.php?module=cloudflare-whois&amp;action=lookup&amp;server=" . $data['ip'] . "\" target=\"_blank\">" . $data['ip'] . "</a> " . $isyou, array('width' => '25%'));
 $table->construct_cell($data['classification'], array('width' => '25%'));
 $table->construct_cell(my_number_format($data['hits']), array('width' => '25%'));
 if (function_exists('geoip_record_by_name')) {
     $ip_record = @geoip_record_by_name($data['ip']);
     if ($ip_record) {
         $ipaddress_location = null;
         if ($ip_record['city']) {
             $ipaddress_location .= htmlspecialchars_uni($ip_record['city']) . $lang->comma . ' ';
         }
         $ipaddress_location .= htmlspecialchars_uni($ip_record['country_name']);
         $table->construct_cell('<a href="https://maps.google.com/maps?q=' . urlencode($ipaddress_location) . '" target="_blank">' . $ipaddress_location . '</a>', array('width' => '25%'));
     } else {
         $table->construct_cell('N/A', array('width' => '25%'));
     }
 }
 if ($mybb->settings['cloudflare_showdns'] == "1") {
     $table->construct_cell(gethostbyaddr($data['ip']), array('width' => '25%'));
开发者ID:EspialWires,项目名称:MyBB-CloudFlare-Manager,代码行数:31,代码来源:cloudflare_recent_visitors.php


示例10: COUNT

    $query = $db->query("\n\t\tSELECT COUNT(p.pid) AS posts, p.username AS postusername, u.uid, u.username, u.usergroup, u.displaygroup\n\t\tFROM " . TABLE_PREFIX . "posts p\n\t\tLEFT JOIN " . TABLE_PREFIX . "users u ON (u.uid=p.uid)\n\t\tWHERE tid='" . $tid . "' AND {$show_posts}\n\t\tGROUP BY u.uid, p.username, u.uid, u.username, u.usergroup, u.displaygroup\n\t\t" . $sortsql . "\n\t");
    while ($poster = $db->fetch_array($query)) {
        if ($poster['username'] == '') {
            $poster['username'] = $poster['postusername'];
        }
        $poster_name = format_name($poster['username'], $poster['usergroup'], $poster['displaygroup']);
        if ($poster['uid']) {
            $onclick = "opener.location.href='" . get_profile_link($poster['uid']) . "'; return false;";
        }
        $profile_link = build_profile_link($poster_name, $poster['uid'], '_blank', $onclick);
        $numposts += $poster['posts'];
        eval("\$whoposted .= \"" . $templates->get("misc_whoposted_poster") . "\";");
        $altbg = alt_trow();
    }
    $numposts = my_number_format($numposts);
    $poster['posts'] = my_number_format($poster['posts']);
    eval("\$whop = \"" . $templates->get("misc_whoposted", 1, 0) . "\";");
    echo $whop;
    exit;
} elseif ($mybb->input['action'] == "smilies") {
    $smilies = '';
    if (!empty($mybb->input['popup']) && !empty($mybb->input['editor'])) {
        // make small popup list of smilies
        $editor = preg_replace('#([^a-zA-Z0-9_-]+)#', '', $mybb->get_input('editor'));
        $e = 1;
        $class = "trow1";
        $smilies = "<tr>";
        $smilies_cache = $cache->read("smilies");
        if (is_array($smilies_cache)) {
            $extra_class = ' smilie_pointer';
            foreach ($smilies_cache as $smilie) {
开发者ID:olada,项目名称:mybbintegrator,代码行数:31,代码来源:misc.php


示例11: htmlspecialchars_uni

        // Show avatar
        if ($user['avatar'] != '') {
            $user['avatar'] = htmlspecialchars_uni($user['avatar']);
            $avatar_dimensions = explode("|", $user['avatardimensions']);
            if ($avatar_dimensions[0] && $avatar_dimensions[1]) {
                list($max_width, $max_height) = explode("x", my_strtolower($mybb->settings['memberlistmaxavatarsize']));
                if ($avatar_dimensions[0] > $max_width || $avatar_dimensions[1] > $max_height) {
                    require_once MYBB_ROOT . "inc/functions_image.php";
                    $scaled_dimensions = scale_image($avatar_dimensions[0], $avatar_dimensions[1], $max_width, $max_height);
                    $avatar_width_height = "width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\"";
                } else {
                    $avatar_width_height = "width=\"{$avatar_dimensions[0]}\" height=\"{$avatar_dimensions[1]}\"";
                }
            }
            eval("\$user['avatar'] = \"" . $templates->get("memberlist_user_avatar") . "\";");
        } else {
            $user['avatar'] = "";
        }
        $user['regdate'] = my_date($mybb->settings['dateformat'], $user['regdate']) . ", " . my_date($mybb->settings['timeformat'], $user['regdate']);
        $user['lastvisit'] = my_date($mybb->settings['dateformat'], $user['lastactive']) . ", " . my_date($mybb->settings['timeformat'], $user['lastactive']);
        $user['postnum'] = my_number_format($user['postnum']);
        eval("\$users .= \"" . $templates->get("memberlist_user") . "\";");
    }
    // Do we have no results?
    if (!$users) {
        $users = "<tr>\n<td colspan=\"" . $colspan . "\" align=\"center\" class=\"trow1\">{$lang->error_no_members}</td>\n</tr>";
    }
    $plugins->run_hooks("memberlist_end");
    eval("\$memberlist = \"" . $templates->get("memberlist") . "\";");
    output_page($memberlist);
}
开发者ID:GeorgeLVP,项目名称:mybb,代码行数:31,代码来源:memberlist.php


示例12: generate_growth_string

function generate_growth_string($number)
{
    global $lang, $cp_style;
    if ($number === null) {
        return "";
    }
    $number = (int) $number;
    $friendly_number = my_number_format(abs($number));
    if ($number > 0) {
        $growth_string = "(<img src=\"./styles/{$cp_style}/images/icons/increase.png\" alt=\"{$lang->increase}\" title=\"{$lang->increase}\" style=\"vertical-align: middle; margin-top: -2px;\" /> {$friendly_number})";
    } elseif ($number == 0) {
        $growth_string = "(<img src=\"./styles/{$cp_style}/images/icons/no_change.png\" alt=\"{$lang->no_change}\" title=\"{$lang->no_change}\" style=\"vertical-align: middle; margin-top: -2px;\" /> {$friendly_number})";
    } else {
        $growth_string = "(<img src=\"./styles/{$cp_style}/images/icons/decrease.png\" alt=\"{$lang->decrease}\" title=\"{$lang->decrease}\" style=\"vertical-align: middle; margin-top: -2px;\" /> {$friendly_number})";
    }
    return $growth_string;
}
开发者ID:olada,项目名称:mybbintegrator,代码行数:17,代码来源:statistics.php


示例13: get_user_info_func


//.........这里部分代码省略.........
                $lang->tyl_total_tyls_rcvd = $lang->tyl_total_thanks_rcvd;
            }
        }
        $daysreg = (TIME_NOW - $memprofile['regdate']) / (24 * 3600);
        $tylpd = $memprofile['tyl_unumtyls'] / $daysreg;
        $tylpd = round($tylpd, 2);
        if ($tylpd > $memprofile['tyl_unumtyls']) {
            $tylpd = $memprofile['tyl_unumtyls'];
        }
        $tylrcvpd = $memprofile['tyl_unumrcvtyls'] / $daysreg;
        $tylrcvpd = round($tylrcvpd, 2);
        if ($tylrcvpd > $memprofile['tyl_unumrcvtyls']) {
            $tylrcvpd = $memprofile['tyl_unumrcvtyls'];
        }
        // Get total tyl and percentage
        $options = array("limit" => 1);
        $query = $db->simple_select($prefix . "stats", "*", "title='total'", $options);
        $total = $db->fetch_array($query);
        if ($total['value'] == 0) {
            $percent = "0";
            $percent_rcv = "0";
        } else {
            $percent = $memprofile['tyl_unumtyls'] * 100 / $total['value'];
            $percent = round($percent, 2);
            $percent_rcv = $memprofile['tyl_unumrcvtyls'] * 100 / $total['value'];
            $percent_rcv = round($percent_rcv, 2);
        }
        if ($percent > 100) {
            $percent = 100;
        }
        if ($percent_rcv > 100) {
            $percent_rcv = 100;
        }
        $memprofile['tyl_unumtyls'] = my_number_format($memprofile['tyl_unumtyls']);
        $memprofile['tyl_unumrcvtyls'] = my_number_format($memprofile['tyl_unumrcvtyls']);
        $tylpd_percent_total = $lang->sprintf($lang->tyl_tylpd_percent_total, my_number_format($tylpd), $tyl_thankslikes_given, $percent);
        $tylrcvpd_percent_total = $lang->sprintf($lang->tyl_tylpd_percent_total, my_number_format($tylrcvpd), $tyl_thankslikes_rcvd, $percent_rcv);
        addCustomField($lang->tyl_total_tyls_given, "{$memprofile['tyl_unumtyls']} ({$tylpd_percent_total})", $custom_fields_list);
        addCustomField($lang->tyl_total_tyls_rcvd, "{$memprofile['tyl_unumrcvtyls']} ({$tylrcvpd_percent_total})", $custom_fields_list);
    }
    if ($memprofile['timeonline'] > 0) {
        $timeonline = nice_time($memprofile['timeonline']);
        addCustomField($lang->timeonline, $timeonline, $custom_fields_list);
    }
    if ($mybb->settings['usereferrals'] == 1 && $memprofile['referrals'] > 0) {
        addCustomField($lang->members_referred, $memprofile['referrals'], $custom_fields_list);
    }
    if ($memperms['usereputationsystem'] == 1 && $displaygroup['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1 && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep'])) {
        addCustomField($lang->reputation, $memprofile['reputation'], $custom_fields_list);
    }
    if ($mybb->settings['enablewarningsystem'] != 0 && $memperms['canreceivewarnings'] != 0 && ($mybb->usergroup['canwarnusers'] != 0 || $mybb->user['uid'] == $memprofile['uid'] && $mybb->settings['canviewownwarning'] != 0)) {
        $warning_level = round($memprofile['warningpoints'] / $mybb->settings['maxwarningpoints'] * 100);
        if ($warning_level > 100) {
            $warning_level = 100;
        }
        addCustomField($lang->warning_level, $warning_level . '%', $custom_fields_list);
    }
    if ($memprofile['website']) {
        $memprofile['website'] = htmlspecialchars_uni($memprofile['website']);
        addCustomField($lang->homepage, $memprofile['website'], $custom_fields_list);
    }
    if ($memprofile['icq']) {
        addCustomField($lang->icq_number, $memprofile['icq'], $custom_fields_list);
    }
    if ($memprofile['aim']) {
        addCustomField($lang->aim_screenname, $memprofile['aim'], $custom_fields_list);
开发者ID:dthiago,项目名称:tapatalk-mybb,代码行数:67,代码来源:get_user_info.php


示例14: ceil

                 $progress = ceil($email['sentcount'] / $email['totalcount'] * 100);
                 if ($progress > 100) {
                     $progress = 100;
                 }
                 $status = "{$lang->delivering} ({$progress}%)";
             }
         }
     }
     $table->construct_cell($status, array("class" => "align_center"));
     if ($email['status'] != 0) {
         $delivery_date = my_date($mybb->settings['dateformat'], $email['senddate']);
     } else {
         $delivery_date = $lang->na;
     }
     $table->construct_cell($delivery_date, array("class" => "align_center"));
     $table->construct_cell(my_number_format($email['totalcount']), array("class" => "align_center"));
     if (TIME_NOW >= $email['senddate'] && $email['status'] > 1) {
         $table->construct_cell("<a href=\"index.php?module=user-mass_mail&amp;action=cancel&amp;mid={$email['mid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->mass_mail_cancel_confirmation}')\">{$lang->cancel}</a>", array("width" => 100, "colspan" => 2, "class" => "align_center"));
     } else {
         $table->construct_cell("<a href=\"index.php?module=user-mass_mail&amp;action=edit&amp;mid={$email['mid']}\">{$lang->edit}</a>", array("width" => 100, "class" => "align_center"));
         $table->construct_cell("<a href=\"index.php?module=user-mass_mail&amp;action=delete&amp;mid={$email['mid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->mass_mail_deletion_confirmation}')\">{$lang->delete}</a>", array("width" => 100, "class" => "align_center"));
     }
     $table->construct_row();
 }
 if ($table->num_rows() == 0) {
     $table->construct_cell($lang->no_unsent_messages, array('colspan' => 6));
     $table->construct_row();
     $no_results = true;
 }
 $table->output($lang->mass_mail_queue);
 $page->output_footer();
开发者ID:Nidrax,项目名称:ppm-1.6,代码行数:31,代码来源:mass_mail.php


示例15: get_forum_unapproved

/**
 * Fetch the number of unapproved posts, formatted, from a forum
 *
 * @param array Array of information about the forum
 * @return array Array containing formatted string for posts and string for threads
 */
function get_forum_unapproved($forum)
{
    global $lang;
    $unapproved_threads = $unapproved_posts = '';
    // If the user is a moderator we need to fetch the count
    if (is_moderator($forum['fid'])) {
        // Forum has one or more unaproved posts, format language string accordingly
        if ($forum['unapprovedposts']) {
            if ($forum['unapprovedposts'] > 1) {
                $unapproved_posts_count = $lang->sprintf($lang->forum_unapproved_posts_count, $forum['unapprovedposts']);
            } else {
                $unapproved_posts_count = $lang->sprintf($lang->forum_unapproved_post_count, 1);
            }
            $unapproved_posts = " <span title=\"{$unapproved_posts_count}\">(" . my_number_format($forum['unapprovedposts']) . ")</span>";
        }
        // Forum has one or more unapproved threads, format language string accordingly
        if ($forum['unapprovedthreads']) {
            if ($forum['unapprovedthreads'] > 1) {
                $unapproved_threads_count = $lang->sprintf($lang->forum_unapproved_threads_count, $forum['unapprovedthreads']);
            } else {
                $unapproved_threads_count = $lang->sprintf($lang->forum_unapproved_thread_count, 1);
            }
            $unapproved_threads = " <span title=\"{$unapproved_threads_count}\">(" . my_number_format($forum['unapprovedthreads']) . ")</span>";
        }
    }
    return array("unapproved_posts" => $unapproved_posts, "unapproved_threads" => $unapproved_threads);
}
开发者ID:benn0034,项目名称:SHIELDsite2.old,代码行数:33,代码来源:functions_forumlist.php


示例16: my_number_format

    ?>
" <?php 
    if (!$odetail->is_returned) {
        ?>
selected="selected"<?php 
    }
    ?>
>No</option>
									</select>
								</td>
								<td>$<?php 
    echo my_number_format($odetail->amount);
    ?>
</td>
								<td>$<?php 
    echo my_number_format($odetail->refunded_amount);
    ?>
</td>
								<td><?php 
    echo $odetail->name;
    ?>
</td>
							</tr>
					<?php 
}
?>
					<tr><td>&nbsp;</td></tr>
					<tr><td colspan="4"><input type="checkbox" name="notify" value="<?php 
echo $object->email;
?>
" checked="checked"/> Notify customer of these refunds <span class="help_text">(E-mail will be sent to <?php 
开发者ID:reesretuta,项目名称:beauty-mx,代码行数:31,代码来源:refundview.php


示例17: my_date

                    $folder_label .= $lang->icon_hot;
                }
                // Is our thread visible?
                if ($thread['visible'] == 0) {
                    $bgcolor = 'trow_shaded';
                }
                if ($thread['closed'] == 1) {
                    $folder .= "lock";
                    $folder_label .= $lang->icon_lock;
                }
                $folder .= "folder";
                $lastpostdate = my_date('relative', $thread['lastpost']);
                $lastposter = $thread['lastposter'];
                $lastposteruid = $thread['lastposteruid'];
                if ($lastposteruid == 0) {
                    $lastposterlink = $lastposter;
                } else {
                    $lastposterlink = build_profile_link($lastposter, $lastposteruid);
                }
                $thread['replies'] = my_number_format($thread['replies']);
                $thread['views'] = my_number_format($thread['views']);
                $thread['author'] = build_profile_link($thread['username'], $thread['uid']);
                eval("\$latest_threads_threads .= \"" . $templates->get("usercp_latest_threads_threads") . "\";");
            }
        }
        eval("\$latest_threads = \"" . $templates->get("usercp_latest_threads") . "\";");
    }
    $plugins->run_hooks("usercp_end");
    eval("\$usercp = \"" . $templates->get("usercp") . "\";");
    output_page($usercp);
}
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:usercp.php


示例18: my_number_format

}
if ($mybb->settings['awactialert'] == 1 && $mybb->usergroup['cancp'] == 1) {
    $awaitingusers = $cache->read('awaitingactivation');
    if (isset($awaitingusers['time']) && $awaitingusers['time'] + 86400 < TIME_NOW) {
        $cache->update_awaitingactivation();
        $awaitingusers = $cache->read('awaitingactivation');
    }
    if (!empty($awaitingusers['users'])) {
        $awaitingusers = (int) $awaitingusers['users'];
    } else {
        $awaitingusers = 0;
    }
    if ($awaitingusers < 1) {
        $awaitingusers = 0;
    } else {
        $awaitingusers = my_number_format($awaitingusers);
    }
    if ($awaitingusers > 0) {
        if ($awaitingusers == 1) {
            $awaiting_message = $lang->awaiting_message_single;
        } else {
            $awaiting_message = $lang->sprintf($lang->awaiting_message_plural, $awaitingusers);
        }
        if ($admincplink) {
            $awaiting_message .= $lang->sprintf($lang->awaiting_message_link, $mybb->settings['bburl'], $admin_dir);
        }
        eval('$awaitingusers = "' . $templates->get('global_awaiting_activation') . '";');
    } else {
        $awaitingusers = '';
    }
}
开发者ID:sammykumar,项目名称:TheVRForums,代码行数:31,代码来源:global.php


示例19: get_post_attachments

/**
 * Fetch the attachments for a specific post and parse inline [attachment=id] code.
 * Note: assumes you have $attachcache, an array of attachments set up.
 *
 * @param int $id The ID of the item.
 * @param array $post The post or item passed by reference.
 */
function get_post_attachments($id, &$post)
{
    global $attachcache, $mybb, $theme, $templates, $forumpermissions, $lang;
    $validationcount = 0;
    $tcount = 0;
    $post['attachmentlist'] = $post['thumblist'] = $post['imagelist'] = '';
    if (isset($attachcache[$id]) && is_array($attachcache[$id])) {
        // This post has 1 or more attachments
        foreach ($attachcache[$id] as $aid => $attachment) {
            if ($attachment['visible']) {
                // There is an attachment thats visible!
                $attachment['filename'] = htmlspecialchars_uni($attachment['filename']);
                $attachment['filesize'] = get_friendly_size($attachment['filesize']);
                $ext = get_extension($attachment['filename']);
                if ($ext == "jpeg" || $ext == "gif" || $ext == "bmp" || $ext == "png" || $ext == "jpg") {
                    $isimage = true;
                } else {
                    $isimage = false;
                }
                $attachment['icon'] = get_attachment_icon($ext);
                $attachment['downloads'] = my_number_format($attachment['downloads']);
                if (!$attachment['dateuploaded']) {
                    $attachment['dateuploaded'] = $attachment['dateline'];
                }
                $attachdate = my_date('relative', $attachment['dateuploaded']);
                // Support for [attachment=id] code
                if (stripos($post['message'], "[attachment=" . $attachment['aid'] . "]") !== false) {
                    // Show as thumbnail IF image is big && thumbnail exists && setting=='thumb'
                    // Show as full size image IF setting=='fullsize' || (image is small && permissions allow)
                    // Show as download for all other cases
                    if ($attachment['thumbnail'] != "SMALL" && $attachment['thumbnail'] != "" && $mybb->settings['attachthumbnails'] == "yes") {
                        eval("\$attbit = \"" . $templates->get("postbit_attachments_thumbnails_thumbnail") . "\";");
                    } elseif (($attachment['thumbnail'] == "SMALL" && $forumpermissions['candlattachments'] == 1 || $mybb->settings['attachthumbnails'] == "no") && $isimage) {
                        eval("\$attbit = \"" . $templates->get("postbit_attachments_images_image") . "\";");
                    } else {
                        eval("\$attbit = \"" . $templates->get("postbit_attachments_attachment") . "\";");
                    }
                    $post['message'] = preg_replace("#\\[attachment=" . $attachment['aid'] . "]#si", $attbit, $post['message']);
                } else {
                    // Show as thumbnail IF image is big && thumbnail exists && setting=='thumb'
                    // Show as full size image IF setting=='fullsize' || (image is small && permissions allow)
                    // Show as download for all other cases
                    if ($attachment['thumbnail'] != "SMALL" && $attachment['thumbnail'] != "" && $mybb->settings['attachthumbnails'] == "yes") {
                        eval("\$post['thumblist'] .= \"" . $templates->get("postbit_attachments_thumbnails_thumbnail") . "\";");
                        if ($tcount == 5) {
                            $thumblist .= "<br />";
                            $tcount = 0;
                        }
                        ++$tcount;
                    } elseif (($attachment['thumbnail'] == "SMALL" && $forumpermissions['candlattachments'] == 1 || $mybb->settings['attachthumbnails'] == "no") && $isimage) {
                        eval("\$post['imagelist'] .= \"" . $templates->get("postbit_attachments_images_image") . "\";");
                    } else {
                        eval("\$post['attachmentlist'] .= \"" . $templates->get("postbit_attachments_attachment") . " 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP my_object_select_tag函数代码示例发布时间:2022-05-15
下一篇:
PHP my_mysqli_real_connect函数代码示例发布时间: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