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


PHP get_reputation函数代码示例

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


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

示例1: userlogin

function userlogin()
{
    global $INSTALLER09, $mc1, $CURBLOCK, $mood, $whereis;
    unset($GLOBALS["CURUSER"]);
    $dt = TIME_NOW;
    $ip = getip();
    $nip = ip2long($ip);
    $ipf = $_SERVER['REMOTE_ADDR'];
    if (isset($CURUSER)) {
        return;
    }
    if (!$INSTALLER09['site_online'] || !get_mycookie('uid') || !get_mycookie('pass') || !get_mycookie('hashv')) {
        return;
    }
    $id = 0 + get_mycookie('uid');
    if (!$id or strlen(get_mycookie('pass')) != 32 or get_mycookie('hashv') != hashit($id, get_mycookie('pass'))) {
        return;
    }
    // let's cache $CURUSER - pdq
    if (($row = $mc1->get_value('MyUser_' . $id)) === false) {
        // $row not found
        $user_fields = 'id, username, passhash, secret, passkey, email, status, added, ' . 'last_login, last_access, curr_ann_last_check, curr_ann_id, editsecret, privacy, stylesheet, ' . 'info, acceptpms, ip, class, override_class, language, avatar, av_w, av_h, ' . 'title, country, notifs, enabled, donor, warned, torrentsperpage, topicsperpage, ' . 'postsperpage, deletepms, savepms, reputation, time_offset, dst_in_use, auto_correct_dst, ' . 'show_shout, show_staffshout, shoutboxbg, chatpost, smile_until, vip_added, vip_until, ' . 'freeslots, free_switch, invites, invitedby, invite_rights, anonymous, uploadpos, forumpost, ' . 'downloadpos, immunity, leechwarn, disable_reason, clear_new_tag_manually, last_browse, sig_w, ' . 'sig_h, signatures, signature, forum_access, highspeed, hnrwarn, hit_and_run_total, donoruntil, ' . 'donated, total_donated, vipclass_before, parked, passhint, hintanswer, avatarpos, support, ' . 'supportfor, sendpmpos, invitedate, invitees, invite_on, subscription_pm, gender, anonymous_until, ' . 'viewscloud, tenpercent, avatars, offavatar, pirate, king, hidecur, ssluse, signature_post, forum_post, ' . 'avatar_rights, offensive_avatar, view_offensive_avatar, paranoia, google_talk, msn, aim, yahoo, website, ' . 'icq, show_email, parked_until, gotgift, hash1, suspended, bjwins, bjlosses, warn_reason, onirc, irctotal, ' . 'birthday, got_blocks, last_access_numb, onlinetime, pm_on_delete, commentpm, split, browser, hits, ' . 'comments, categorie_icon, reputation, perms, mood, got_moods, pms_per_page, show_pm_avatar, watched_user, game_access, browse_icons';
        $res = sql_query("SELECT " . $user_fields . " " . "FROM users " . "WHERE id = " . sqlesc($id) . " " . "AND enabled='yes' " . "AND status = 'confirmed'") or sqlerr(__FILE__, __LINE__);
        if (mysqli_num_rows($res) == 0) {
            logoutcookie();
            return;
        }
        $row = mysqli_fetch_assoc($res);
        // Do all ints and floats
        $row['id'] = (int) $row['id'];
        $row['added'] = (int) $row['added'];
        $row['last_login'] = (int) $row['last_login'];
        $row['last_access'] = (int) $row['last_access'];
        $row['curr_ann_last_check'] = (int) $row['curr_ann_last_check'];
        $row['curr_ann_id'] = (int) $row['curr_ann_id'];
        $row['stylesheet'] = (int) $row['stylesheet'];
        $row['class'] = (int) $row['class'];
        $row['override_class'] = (int) $row['override_class'];
        $row['av_w'] = (int) $row['av_w'];
        $row['av_h'] = (int) $row['av_h'];
        $row['country'] = (int) $row['country'];
        $row['warned'] = (int) $row['warned'];
        $row['torrentsperpage'] = (int) $row['torrentsperpage'];
        $row['topicsperpage'] = (int) $row['topicsperpage'];
        $row['postsperpage'] = (int) $row['postsperpage'];
        $row['reputation'] = (int) $row['reputation'];
        $row['time_offset'] = (double) $row['time_offset'];
        $row['dst_in_use'] = (int) $row['dst_in_use'];
        $row['auto_correct_dst'] = (int) $row['auto_correct_dst'];
        $row['chatpost'] = (int) $row['chatpost'];
        $row['smile_until'] = (int) $row['smile_until'];
        $row['vip_until'] = (int) $row['vip_until'];
        $row['freeslots'] = (int) $row['freeslots'];
        $row['free_switch'] = (int) $row['free_switch'];
        $row['invites'] = (int) $row['invites'];
        $row['invitedby'] = (int) $row['invitedby'];
        $row['anonymous'] = $row['anonymous'];
        $row['uploadpos'] = (int) $row['uploadpos'];
        $row['forumpost'] = (int) $row['forumpost'];
        $row['downloadpos'] = (int) $row['downloadpos'];
        $row['immunity'] = (int) $row['immunity'];
        $row['leechwarn'] = (int) $row['leechwarn'];
        $row['last_browse'] = (int) $row['last_browse'];
        $row['sig_w'] = (int) $row['sig_w'];
        $row['sig_h'] = (int) $row['sig_h'];
        $row['forum_access'] = (int) $row['forum_access'];
        $row['hit_and_run_total'] = (int) $row['hit_and_run_total'];
        $row['donoruntil'] = (int) $row['donoruntil'];
        $row['donated'] = (int) $row['donated'];
        $row['total_donated'] = (double) $row['total_donated'];
        $row['vipclass_before'] = (int) $row['vipclass_before'];
        $row['passhint'] = (int) $row['passhint'];
        $row['avatarpos'] = (int) $row['avatarpos'];
        $row['language'] = (int) $row['language'];
        $row['sendpmpos'] = (int) $row['sendpmpos'];
        $row['invitedate'] = (int) $row['invitedate'];
        $row['anonymous_until'] = (int) $row['anonymous_until'];
        $row['pirate'] = (int) $row['pirate'];
        $row['king'] = (int) $row['king'];
        $row['ssluse'] = (int) $row['ssluse'];
        $row['paranoia'] = (int) $row['paranoia'];
        $row['parked_until'] = (int) $row['parked_until'];
        $row['bjwins'] = (int) $row['bjwins'];
        $row['bjlosses'] = (int) $row['bjlosses'];
        $row['irctotal'] = (int) $row['irctotal'];
        $row['last_access_numb'] = (int) $row['last_access_numb'];
        $row['onlinetime'] = (int) $row['onlinetime'];
        $row['categorie_icon'] = (int) $row['categorie_icon'];
        $row['perms'] = (int) $row['perms'];
        $row['mood'] = (int) $row['mood'];
        $row['watched_user'] = (int) $row['watched_user'];
        $row['pms_per_page'] = (int) $row['pms_per_page'];
        $row['game_access'] = (int) $row['game_access'];
        $row['rep'] = get_reputation($row);
        $mc1->cache_value('MyUser_' . $id, $row, $INSTALLER09['expires']['curuser']);
        unset($res);
    }
    //==
    if (get_mycookie('pass') !== md5($row["passhash"] . $_SERVER["REMOTE_ADDR"])) {
        logoutcookie();
//.........这里部分代码省略.........
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:101,代码来源:bittorrent.php

示例2: count

             $att_str = count(array_unique($likes)) . ' others like this';
         }
     }
 }
 $wht = !empty($likes) && count(array_unique($likes)) > 0 && in_array($CURUSER['id'], $likes) ? 'unlike' : 'like';
 // --------------- likes end------
 $lpr = (int) $arr['last_post_read'];
 $postid = (int) $arr["id"];
 $postadd = (int) $arr['added'];
 $posterid = (int) $arr['user_id'];
 $posticon = $arr["icon"] > 0 ? "<img src=\"{$INSTALLER09['pic_base_url']}post_icons/icon" . htmlsafechars($arr["icon"]) . ".gif\" style=\"padding-left:3px;\" alt=\"post icon\" title=\"post icon\" />" : "&nbsp;";
 $added = get_date($arr['added'], 'DATE', 1, 0) . " GMT <font class='small'>(" . get_date($arr['added'], 'LONG', 1, 0) . ")</font>";
 // ---- Get poster details
 $uploaded = mksize($arr['uploaded']);
 $downloaded = mksize($arr['downloaded']);
 $member_reputation = $arr['uusername'] != '' ? get_reputation($arr, 'posts', TRUE, $postid) : '';
 $last_access = get_date($arr['last_access'], 'DATE', 1, 0);
 $Ratio = member_ratio($arr['uploaded'], $INSTALLER09['ratio_free'] ? '0' : $arr['downloaded']);
 if ($postid > $lpr && $postadd > TIME_NOW - $INSTALLER09['readpost_expiry']) {
     $newp = "&nbsp;&nbsp;<span class='badge btn btn-danger disabled' style='color:#fff'><b></b>NEW</b></span>";
 }
 $moodname = isset($mood['name'][$arr['mood']]) ? htmlsafechars($mood['name'][$arr['mood']]) : 'is feeling neutral';
 $moodpic = isset($mood['image'][$arr['mood']]) ? htmlsafechars($mood['image'][$arr['mood']]) : 'noexpression.gif';
 $signature = $CURUSER['signatures'] == 'yes' ? format_comment($arr['signature']) : '';
 $user_stuff = $arr;
 $user_stuff['id'] = (int) $arr['uid'];
 $postername = format_username($user_stuff, true);
 $width = '75';
 $avatar = $CURUSER["avatars"] == "yes" ? $arr['p_anon'] == 'yes' && $CURUSER['class'] < UC_STAFF ? '<img style="max-width:' . $width . 'px;" src="' . $INSTALLER09['pic_base_url'] . 'anonymous_1.jpg" alt="avatar" />' : avatar_stuff($arr) : "";
 $title2 = !empty($postername) ? empty($arr['title']) ? "(" . get_user_class_name($arr['class']) . ")" : "(" . htmlsafechars($arr['title']) . ")" : '';
 $title = $arr['p_anon'] == 'yes' ? '<i>' . "Anonymous" . '</i>' : htmlsafechars($title2);
开发者ID:Bigjoos,项目名称:U-232-V5,代码行数:31,代码来源:view_topic.php

示例3: htmlspecialchars

}
//==End
/* Flush all torrents mod */
if ($CURUSER['class'] >= UC_STAFF) {
    $un = $user["username"];
    $HTMLOUT .= "<tr><td class='rowhead' width='1%'>{$lang['userdetails_flush']}</td><td align='left' width='99%'>" . ("{$lang['userdetails_flush1']}<a href='{$INSTALLER09['baseurl']}/staffpanel.php?tool=flush&amp;action=flush&amp;id={$id}'><b>" . htmlspecialchars($un) . "</b></a>\n") . "</td></tr>";
}
$HTMLOUT .= "<tr><td class='rowhead' width='1%'>{$lang['userdetails_joined']}</td><td align='left' width='99%'>{$joindate}</td></tr>\r\n    <tr><td class='rowhead'>{$lang['userdetails_seen']}</td><td align='left'>{$lastseen}</td></tr>";
//== Online time
//if($user['onlinetime'] > 0)
$onlinetime = time_return($user['onlinetime']);
//else
//$onlinetime = "This user has no online time recorded";
$HTMLOUT .= "<tr><td class='rowhead' width='1%'>Total Online</td><td align='left' width='99%'>{$onlinetime}</td></tr>";
// end
$member_reputation = get_reputation($user, 'users');
$HTMLOUT .= "<tr><td class='rowhead' valign='top' align='right' width='1%'>{$lang['userdetails_rep']}</td><td align='left' width='99%'>{$member_reputation}<br />\r\n    </td></tr>";
//==09 Birthday mod
$age = $birthday = '';
if ($user['birthday'] != "0000-00-00") {
    $current = gmdate("Y-m-d", time());
    list($year2, $month2, $day2) = explode('-', $current);
    $birthday = $user["birthday"];
    $birthday = date("Y-m-d", strtotime($birthday));
    list($year1, $month1, $day1) = explode('-', $birthday);
    if ($month2 < $month1) {
        $age = $year2 - $year1 - 1;
    }
    if ($month2 == $month1) {
        if ($day2 < $day1) {
            $age = $year2 - $year1 - 1;
开发者ID:CharlieHD,项目名称:U-232-V2,代码行数:31,代码来源:userdetails.php

示例4: build_users_view


//.........这里部分代码省略.........
            $user['view']['usergroup'] = htmlspecialchars_uni($usergroups[$user['usergroup']]['title']);
            if ($user['additionalgroups']) {
                $additional_groups = explode(",", $user['additionalgroups']);
                foreach ($additional_groups as $group) {
                    $groups_list .= $comma . htmlspecialchars_uni($usergroups[$group]['title']);
                    $comma = $lang->comma;
                }
            }
            if (!$groups_list) {
                $groups_list = $lang->none;
            }
            $user['view']['additionalgroups'] = "<small>{$groups_list}</small>";
            $user['view']['email'] = "<a href=\"mailto:" . htmlspecialchars_uni($user['email']) . "\">" . htmlspecialchars_uni($user['email']) . "</a>";
            $user['view']['regdate'] = my_date($mybb->settings['dateformat'], $user['regdate']) . ", " . my_date($mybb->settings['timeformat'], $user['regdate']);
            $user['view']['lastactive'] = my_date($mybb->settings['dateformat'], $user['lastactive']) . ", " . my_date($mybb->settings['timeformat'], $user['lastactive']);
            // Build popup menu
            $popup = new PopupMenu("user_{$user['uid']}", $lang->options);
            $popup->add_item($lang->edit_profile_and_settings, "index.php?module=user-users&amp;action=edit&amp;uid={$user['uid']}");
            $popup->add_item($lang->ban_user, "index.php?module=user-banning&amp;uid={$user['uid']}#username");
            if ($user['usergroup'] == 5) {
                if ($user['coppauser']) {
                    $popup->add_item($lang->approve_coppa_user, "index.php?module=user-users&amp;action=activate_user&amp;uid={$user['uid']}&amp;my_post_key={$mybb->post_code}{$from_bit}");
                } else {
                    $popup->add_item($lang->approve_user, "index.php?module=user-users&amp;action=activate_user&amp;uid={$user['uid']}&amp;my_post_key={$mybb->post_code}{$from_bit}");
                }
            }
            $popup->add_item($lang->delete_user, "index.php?module=user-users&amp;action=delete&amp;uid={$user['uid']}&amp;my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->user_deletion_confirmation}')");
            $popup->add_item($lang->show_referred_users, "index.php?module=user-users&amp;action=referrers&amp;uid={$user['uid']}");
            $popup->add_item($lang->show_ip_addresses, "index.php?module=user-users&amp;action=ipaddresses&amp;uid={$user['uid']}");
            $popup->add_item($lang->show_attachments, "index.php?module=forum-attachments&amp;results=1&amp;username=" . urlencode(htmlspecialchars_uni($user['username'])));
            $user['view']['controls'] = $popup->fetch();
            // Fetch the reputation for this user
            if ($usergroups[$user['usergroup']]['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1) {
                $user['view']['reputation'] = get_reputation($user['reputation']);
            } else {
                $reputation = "-";
            }
            if ($mybb->settings['enablewarningsystem'] != 0 && $usergroups[$user['usergroup']]['canreceivewarnings'] != 0) {
                $warning_level = round($user['warningpoints'] / $mybb->settings['maxwarningpoints'] * 100);
                if ($warning_level > 100) {
                    $warning_level = 100;
                }
                $user['view']['warninglevel'] = get_colored_warning_level($warning_level);
            }
            if ($user['avatar'] && !stristr($user['avatar'], 'http://')) {
                $user['avatar'] = "../{$user['avatar']}";
            }
            if ($view['view_type'] == "card") {
                $scaled_avatar = fetch_scaled_avatar($user, 80, 80);
            } else {
                $scaled_avatar = fetch_scaled_avatar($user, 34, 34);
            }
            if (!$user['avatar']) {
                $user['avatar'] = "styles/{$page->style}/images/default_avatar.gif";
            }
            $user['view']['avatar'] = "<img src=\"" . htmlspecialchars_uni($user['avatar']) . "\" alt=\"\" width=\"{$scaled_avatar['width']}\" height=\"{$scaled_avatar['height']}\" />";
            if ($view['view_type'] == "card") {
                $users .= build_user_view_card($user, $view, $i);
            } else {
                build_user_view_table($user, $view, $table);
            }
        }
        // If card view, we need to output the results
        if ($view['view_type'] == "card") {
            $table->construct_cell($users);
            $table->construct_row();
开发者ID:GeorgeLVP,项目名称:mybb,代码行数:67,代码来源:users.php

示例5: commenttable

function commenttable($rows, $variant = 'torrent')
{
    require_once INCL_DIR . 'html_functions.php';
    global $CURUSER, $TBDEV;
    $lang = load_language('torrenttable_functions');
    $htmlout = '';
    $count = 0;
    $variant_options = array('torrent' => 'details', 'request' => 'viewrequests');
    if (isset($variant_options[$variant])) {
        $locale_link = $variant_options[$variant];
    } else {
        return;
    }
    $extra_link = $variant == 'request' ? '&type=request' : '';
    $htmlout .= begin_main_frame();
    $htmlout .= begin_frame();
    foreach ($rows as $row) {
        $htmlout .= "<p class='sub'>#{$row["id"]} {$lang["commenttable_by"]} ";
        if (isset($row["username"])) {
            if ($row['anonymous'] == 'yes') {
                $htmlout .= ($CURUSER['class'] >= UC_MODERATOR ? 'Anonymous - 
                Posted by: <b>' . htmlspecialchars($row['username']) . '</b> 
                ID: ' . $row['user'] . '' : 'Anonymous') . ' ';
            } else {
                $title = $row["title"];
                if ($title == "") {
                    $title = get_user_class_name($row["class"]);
                } else {
                    $title = htmlspecialchars($title);
                }
                $htmlout .= "<a name='comm{$row["id"]}' href='userdetails.php?id={$row["user"]}'><b>" . htmlspecialchars($row["username"]) . "</b></a>" . ($row["donor"] == "yes" ? "<img src='{$TBDEV['pic_base_url']}star.gif' alt='" . $lang["commenttable_donor_alt"] . "' />" : "") . ($row["warned"] == "yes" ? "<img src=" . "'{$TBDEV['pic_base_url']}warned.gif' alt='" . $lang["commenttable_warned_alt"] . "' />" : "") . " ({$title})\n";
            }
        } else {
            $htmlout .= "<a name='comm{$row["id"]}'><i>(" . $lang["commenttable_orphaned"] . ")</i></a>\n";
        }
        $htmlout .= get_date($row['added'], '');
        $htmlout .= ($row["user"] == $CURUSER["id"] || $CURUSER["class"] >= UC_STAFF ? "- [<a href='comment.php?action=edit&amp;cid=" . $row['id'] . $extra_link . "&amp;tid=" . $row[$variant] . "'>" . $lang["commenttable_edit"] . "</a>]" : "") . ($CURUSER["class"] >= UC_VIP ? " - [<a href='report.php?type=Comment&amp;id=" . $row['id'] . "'>Report this Comment</a>]" : "") . ($CURUSER["class"] >= UC_STAFF ? " - [<a href='comment.php?action=delete&amp;cid=" . $row['id'] . $extra_link . "&amp;tid=" . $row[$variant] . "'>" . $lang["commenttable_delete"] . "</a>]" : "") . ($row["editedby"] && $CURUSER["class"] >= UC_STAFF ? "- [<a href='comment.php?action=vieworiginal&amp;cid=" . $row['id'] . $extra_link . "&amp;tid=" . $row[$variant] . "'>" . $lang["commenttable_view_original"] . "</a>]" : "") . "</p>\n";
        $avatar = $CURUSER["avatars"] == "all" ? htmlspecialchars($row["avatar"]) : ($CURUSER["avatars"] == "some" && $row["offavatar"] == "no" ? htmlspecialchars($row["avatar"]) : "");
        if (!$avatar) {
            $avatar = "{$TBDEV['pic_base_url']}forumicons/default_avatar.gif";
        }
        $text = format_comment($row["text"]);
        if ($row["editedby"]) {
            $text .= "<p><font size='1' class='small'>" . $lang["commenttable_last_edited_by"] . " <a href='userdetails.php?id={$row['editedby']}'><b>{$row['username']}</b></a> " . $lang["commenttable_last_edited_at"] . " " . get_date($row['editedat'], 'DATE') . "</font></p>\n";
        }
        $htmlout .= begin_table(true);
        $htmlout .= "<tr valign='top'>\n";
        $htmlout .= "<td align='center' width='150' style='padding: 0px'><img width='{$row['av_w']}' height='{$row['av_h']}' src='{$avatar}' alt='' /><br />" . get_reputation($row, 'comments') . "</td>\n";
        $htmlout .= "<td class='text'>{$text}</td>\n";
        $htmlout .= "</tr>\n";
        $htmlout .= end_table();
    }
    $htmlout .= end_frame();
    $htmlout .= end_main_frame();
    return $htmlout;
}
开发者ID:thefkboss,项目名称:U-232,代码行数:56,代码来源:torrenttable_functions.php

示例6: tr

$HTMLOUT .= tr("Rating", getRate($id, "torrent"), 1);
$HTMLOUT .= tr("{$lang['details_last_seeder']}", "{$lang['details_last_activity']}" . get_date($l_a['lastseed'], '', 0, 1));
$HTMLOUT .= tr("{$lang['details_size']}", mksize($torrents["size"]) . " (" . number_format($torrents["size"]) . " {$lang['details_bytes']})");
$HTMLOUT .= tr("{$lang['details_added']}", get_date($torrents['added'], "{$lang['details_long']}"));
$HTMLOUT .= tr("{$lang['details_views']}", (int) $torrents["views"]);
$HTMLOUT .= tr("{$lang['details_hits']}", (int) $torrents["hits"]);
$XBT_Or_Default = XBT_TRACKER == true ? 'snatches_xbt.php?id=' : 'snatches.php?id=';
$HTMLOUT .= tr("{$lang['details_snatched']}", $torrents["times_completed"] > 0 ? "<a href='{$INSTALLER09["baseurl"]}/{$XBT_Or_Default}{$id}'>{$torrents['times_completed']} {$lang['details_times']}</a>" : "0 {$lang['details_times']}", 1);
$HTMLOUT .= "<tr><td class='rowhead'>Status update</td><td><input type='button' onclick='status_showbox(\"{$CURUSER['username']} is viewing details for torrent {$INSTALLER09['baseurl']}/details.php?id=" . (int) $torrents['id'] . "\")' value='do it!'/></td></tr>";
$HTMLOUT .= "</table>\n<table align='center' class='table table-bordered span9'>";
//==Report Torrent Link
$HTMLOUT .= tr("Report Torrent", "<form action='report.php?type=Torrent&amp;id={$id}' method='post'><input class='btn btn-primary' type='submit' name='submit' value='Report This Torrent' />&nbsp;&nbsp;<strong><em class='label label-primary'>For breaking the&nbsp;<a href='rules.php'>rules</a></em></strong></form>", 1);
//== Tor Reputation by pdq
if ($torrent_cache['rep']) {
    $torrents = array_merge($torrents, $torrent_cache['rep']);
    $member_reputation = get_reputation($torrents, 'torrents', $torrents['anonymous']);
    $HTMLOUT .= '<tr>
		        <td class="heading" valign="top" align="right" width="1%">Reputation</td>
			<td align="left" width="99%">' . $member_reputation . ' (counts towards uploaders Reputation)<br /></td>
		</tr>';
}
//==Anonymous
$rowuser = isset($torrents['username']) ? "<a href='userdetails.php?id=" . (int) $torrents['owner'] . "'><b>" . htmlsafechars($torrents['username']) . "</b></a>" : "{$lang['details_unknown']}";
$uprow = $torrents['anonymous'] == 'yes' ? ($CURUSER['class'] < UC_STAFF && $torrents['owner'] != $CURUSER['id'] ? '' : $rowuser . ' - ') . "<i>{$lang['details_anon']}</i>" : $rowuser;
if ($owned) {
    $uprow .= " {$spacer}<{$editlink}><b>{$lang['details_edit']}</b></a>";
}
$HTMLOUT .= tr("Upped by", $uprow, 1);
//==pdq's Torrent Moderation
if ($CURUSER['class'] >= UC_STAFF) {
    if (!empty($torrents['checked_by'])) {
开发者ID:CharlieHD,项目名称:U-232-V4,代码行数:31,代码来源:details.php

示例7: StatusBar

function StatusBar()
{
    global $CURUSER, $INSTALLER09, $lang, $rep_is_on, $mc1, $msgalert;
    if (!$CURUSER) {
        return "";
    }
    $upped = mksize($CURUSER['uploaded']);
    $downed = mksize($CURUSER['downloaded']);
    //==Memcache unread pms
    $PMCount = 0;
    $unread1 = $mc1->get_value('inbox_new_sb_' . $CURUSER['id']);
    if ($unread1 === false) {
        $res1 = sql_query("SELECT COUNT(id) FROM messages WHERE receiver='" . $CURUSER['id'] . "' AND unread = 'yes' AND location='1'") or sqlerr(__LINE__, __FILE__);
        list($PMCount) = mysql_fetch_row($res1);
        $PMCount = (int) $PMCount;
        $unread1 = $mc1->cache_value('inbox_new_sb_' . $CURUSER['id'], $PMCount, $INSTALLER09['expires']['unread']);
    }
    $inbox = $unread1 == 1 ? "{$unread1}&nbsp;{$lang['gl_msg_singular']}" : "{$unread1}&nbsp;{$lang['gl_msg_plural']}";
    //==Memcache peers
    $MyPeersCache = $mc1->get_value('MyPeers_' . $CURUSER['id']);
    if ($MyPeersCache == false) {
        $seed['yes'] = $seed['no'] = 0;
        $seed['conn'] = 3;
        $r = sql_query("select count(id) as count, seeder, connectable FROM peers WHERE userid=" . $CURUSER['id'] . " group by seeder");
        while ($a = mysql_fetch_assoc($r)) {
            $key = $a['seeder'] == 'yes' ? 'yes' : 'no';
            $seed[$key] = number_format(0 + $a['count']);
            $seed['conn'] = $a['connectable'] == 'no' ? 1 : 2;
        }
        $mc1->cache_value('MyPeers_' . $CURUSER['id'], $seed, $INSTALLER09['expires']['MyPeers_']);
        unset($r, $a);
    } else {
        $seed = $MyPeersCache;
    }
    // for display connectable  1 / 2 / 3
    if (!empty($seed['conn'])) {
        switch ($seed['conn']) {
            case 1:
                $connectable = "<img src='{$INSTALLER09['pic_base_url']}notcon.png' alt='Not Connectable' title='Not Connectable' />";
                break;
            case 2:
                $connectable = "<img src='{$INSTALLER09['pic_base_url']}yescon.png' alt='Connectable' title='Connectable' />";
                break;
            default:
                $connectable = "N/A";
        }
    } else {
        $connectable = 'N/A';
    }
    //////////// REP SYSTEM /////////////
    $member_reputation = get_reputation($CURUSER);
    ////////////// REP SYSTEM END //////////
    $usrclass = "";
    if ($CURUSER['override_class'] != 255) {
        $usrclass = "&nbsp;<b>(" . get_user_class_name($CURUSER['class']) . ")</b>&nbsp;";
    } else {
        if ($CURUSER['class'] >= UC_STAFF) {
            $usrclass = "&nbsp;<a href='./setclass.php'><b>(" . get_user_class_name($CURUSER['class']) . ")</b></a>&nbsp;";
        }
    }
    $StatusBar = '';
    $StatusBar = "\r\n       <!-- Installer09 Source - Print Statusbar/User Menu -->\r\n       <script type='text/javascript'>\r\n       //<![CDATA[\r\n       function showSlidingDiv(){\r\n       \$('#slidingDiv').animate({'height': 'toggle'}, { duration: 1000 });\r\n       }\r\n       //]]>\r\n       </script>\r\n      <div id='base_header_fly'>\r\n       <div id='base_usermenu'>{$lang['gl_msg_welcome']},&nbsp;" . format_username($CURUSER) . "<span class='base_usermenu_arrow'><a href='#' onclick='showSlidingDiv(); return false;'><img src='templates/1/images/usermenu_arrow.png' alt='' /></a></span></div>\r\n        <div id='slidingDiv'>\r\n         <div class='slide_head'>:: Personal Stats</div>\r\n         <div class='slide_a'>User Class</div><div class='slide_b'>{$usrclass}</div>\r\n         <div class='slide_c'>Reputation</div><div class='slide_d'>{$member_reputation}</div>\r\n         <div class='slide_a'>Invites</div><div class='slide_b'><a href='./invite.php'>{$CURUSER['invites']}</a></div>\r\n         <div class='slide_c'>Bonus Points</div><div class='slide_d'><a href='./mybonus.php'>{$CURUSER['seedbonus']}</a></div>\r\n         <div class='slide_head'>:: Torrent Stats</div>\r\n         <div class='slide_a'>Share Ratio</div><div class='slide_b'>" . member_ratio($CURUSER['uploaded'], $CURUSER['downloaded']) . "</div>\r\n         <div class='slide_c'>Uploaded</div><div class='slide_d'>{$upped}</div>\r\n         <div class='slide_a'>Downloaded</div><div class='slide_b'>{$downed}</div>\r\n         <div class='slide_c'>Uploading Files</div><div class='slide_d'>{$seed['yes']}</div>\r\n         <div class='slide_a'>Downloading Files</div><div class='slide_b'>{$seed['no']}</div>\r\n         <div class='slide_c'>Connectable</div><div class='slide_d'>{$connectable}</div>\r\n         <div class='slide_head'>:: Games &amp; Playhouse</div>\r\n         <div class='slide_a'>Play Blackjack</div><div class='slide_b'><a href='./blackjack.php'>Play here</a></div>\r\n         <div class='slide_c'>Play Casino</div><div class='slide_d'><a href='./casino.php'>Play here</a></div>\r\n         <div class='slide_head'>:: Information</div>\r\n         <div class='slide_a'>Contact Staff</div><div class='slide_b'><a href='./contactstaff.php'>Send Message</a></div>\r\n         <div class='slide_c'>Change Theme</div><div class='slide_d'><a href='#' onclick='themes();'>Click here</a></div>\r\n         <div class='slide_a'>Radio</div><div class='slide_b'><a href='#' onclick='radio();'>Click here</a></div>\r\n         <div class='slide_c'>Donate us</div><div class='slide_d'><a href='./donate.php'>Click here</a></div>\r\n         <div class='slide_a'>Torrent Freak News</div><div class='slide_b'><a href='./rsstfreak.php'>Click here</a></div>\r\n         " . (isset($CURUSER) && $CURUSER['class'] <= UC_VIP ? "\r\n         <div class='slide_c'>Uploader App</div><div class='slide_d'><a href='uploadapp.php'>Send Application</a></div>" : "") . "\r\n        " . (isset($CURUSER) && $CURUSER['got_blocks'] == 'yes' ? "\r\n         <div class='slide_head'>:: Site Config</div>\r\n         <div class='slide_a'>My Blocks</div><div class='slide_b'><a href='./user_blocks.php'>Click here</a></div>" : "") . "\r\n         </div>\r\n         <div id='base_icons'>\r\n         <ul class='um_menu'>\r\n         <li><a href='messages.php'><img src='templates/1/images/main.jpg' alt='' title='Your Private Messages' /></a></li>\r\n         <li><a href='usercp.php'><img src='templates/1/images/settings.jpg' alt='Settings' title='Personal Settings' /></a></li>\r\n         " . (isset($CURUSER) && $CURUSER['class'] >= UC_STAFF ? "<li><a href='staffpanel.php'><img src='templates/1/images/staff.png' alt='Staff' title='Staffpanel' /></a></li>" : "") . "\r\n        <li><a href='logout.php'><img src='templates/1/images/signout.jpg' alt='Logout' title='SignOut' /></a></li>\r\n        </ul>\r\n       </div>\r\n      </div>";
    return $StatusBar;
}
开发者ID:CharlieHD,项目名称:U-232-V2,代码行数:64,代码来源:template.php

示例8: round

     $percent = $mybb->user['postnum'] * 100 / $posts;
     $percent = round($percent, 2);
 }
 $colspan = 2;
 $lang->posts_day = $lang->sprintf($lang->posts_day, my_number_format($perday), $percent);
 $regdate = my_date('relative', $mybb->user['regdate']);
 $useravatar = format_avatar($mybb->user['avatar'], $mybb->user['avatardimensions'], '100x100');
 eval("\$avatar = \"" . $templates->get("usercp_currentavatar") . "\";");
 $usergroup = htmlspecialchars_uni($groupscache[$mybb->user['usergroup']]['title']);
 if ($mybb->user['usergroup'] == 5 && $mybb->settings['regtype'] != "admin") {
     eval("\$usergroup .= \"" . $templates->get("usercp_resendactivation") . "\";");
 }
 // Make reputations row
 $reputations = '';
 if ($mybb->usergroup['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1) {
     $reputation_link = get_reputation($mybb->user['reputation']);
     eval("\$reputation = \"" . $templates->get("usercp_reputation") . "\";");
 }
 $latest_warnings = '';
 if ($mybb->settings['enablewarningsystem'] != 0 && $mybb->settings['canviewownwarning'] != 0) {
     if ($mybb->settings['maxwarningpoints'] < 1) {
         $mybb->settings['maxwarningpoints'] = 10;
     }
     $warning_level = round($mybb->user['warningpoints'] / $mybb->settings['maxwarningpoints'] * 100);
     if ($warning_level > 100) {
         $warning_level = 100;
     }
     if ($mybb->user['warningpoints'] > $mybb->settings['maxwarningpoints']) {
         $mybb->user['warningpoints'] = $mybb->settings['maxwarningpoints'];
     }
     if ($warning_level > 0) {
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:usercp.php

示例9: StatusBar

function StatusBar()
{
    global $CURUSER, $TBDEV, $lang, $rep_is_on, $mc;
    if (!$CURUSER) {
        return "";
    }
    $upped = mksize($CURUSER['uploaded']);
    $downed = mksize($CURUSER['downloaded']);
    $ratio = $CURUSER['downloaded'] > 0 ? $CURUSER['uploaded'] / $CURUSER['downloaded'] : 0;
    $ratio = number_format($ratio, 2);
    $color = get_ratio_color($ratio);
    if ($color) {
        $ratio = "<font color='{$color}'>{$ratio}</font>";
    }
    $res1 = @sql_query("SELECT count(id) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND unread='yes'") or sqlerr(__LINE__, __FILE__);
    $arr1 = mysql_fetch_row($res1);
    $unread = $arr1[0];
    $inbox = $unread == 1 ? "{$unread}&nbsp;{$lang['gl_msg_singular']}" : "{$unread}&nbsp;{$lang['gl_msg_plural']}";
    $res2 = @sql_query("SELECT seeder, count(*) AS pCount FROM peers WHERE userid=" . $CURUSER['id'] . " GROUP BY seeder") or sqlerr(__LINE__, __FILE__);
    $seedleech = array('yes' => '0', 'no' => '0');
    while ($row = mysql_fetch_assoc($res2)) {
        if ($row['seeder'] == 'yes') {
            $seedleech['yes'] = $row['pCount'];
        } else {
            $seedleech['no'] = $row['pCount'];
        }
    }
    /////////////// REP SYSTEM /////////////
    $member_reputation = get_reputation($CURUSER);
    ////////////// REP SYSTEM END //////////
    $usrclass = "";
    if ($CURUSER['override_class'] != 255) {
        $usrclass = "&nbsp;<b>(" . get_user_class_name($CURUSER['class']) . ")</b>&nbsp;";
    } else {
        if ($CURUSER['class'] >= UC_STAFF) {
            $usrclass = "&nbsp;<a href='./setclass.php'><b>(" . get_user_class_name($CURUSER['class']) . ")</b></a>&nbsp;";
        }
    }
    $StatusBar = '';
    $StatusBar = "" . "<div style='float:left; width:500px;'>\r\n        {$lang['gl_msg_welcome']}, \r\n\t\t" . format_username($CURUSER) . "&nbsp;{$usrclass}&nbsp;&nbsp;|&nbsp;&nbsp;\r\n        Ratio:&nbsp{$ratio}" . "&nbsp;&nbsp;|&nbsp;&nbsp;Upload:&nbsp;{$upped}" . "<br />\r\n        Bonus:&nbsp;<a href='./mybonus.php'>{$CURUSER['seedbonus']}</a>&nbsp;&nbsp;|&nbsp;&nbsp;Invites:&nbsp;<a href='./invite.php'>{$CURUSER['invites']}</a>&nbsp;&nbsp;|&nbsp;&nbsp;\r\n\t\tMailbox: <a href='./messages.php'>{$inbox}</a></div>\r\n        <div>" . "</div>";
    return $StatusBar;
}
开发者ID:thefkboss,项目名称:U-232,代码行数:42,代码来源:template.php

示例10: commenttable

function commenttable($rows)
{
    global $CURUSER, $HTTP_SERVER_VARS;
    // === get smilie based on ratio
    begin_main_frame();
    begin_frame();
    $count = 0;
    foreach ($rows as $row) {
        $querie = sql_query("SELECT anonymous FROM comments WHERE id =" . unsafeChar($row['id']) . "");
        $arraya = mysql_fetch_assoc($querie);
        echo "<p class=sub>#" . safeChar($row["id"]) . " by ";
        $title = !empty($row["title"]) ? $row["title"] : get_user_class_name($row["class"]);
        if ($arraya['anonymous'] == 'no' && isset($row["username"])) {
            $username = $row["username"];
            $ratres = sql_query("SELECT uploaded, downloaded from users where username='{$username}'");
            $rat = mysql_fetch_array($ratres);
            if ($rat["downloaded"] > 0) {
                $ratio = $rat['uploaded'] / $rat['downloaded'];
                $ratio = number_format($ratio, 3);
                $color = get_ratio_color($ratio);
                if ($color) {
                    $ratio = "<font color={$color}>" . safeChar($ratio) . " " . get_user_ratio_image($ratio) . "</font>";
                }
            } else {
                if ($rat["uploaded"] > 0) {
                    $ratio = "Inf.";
                } else {
                    $ratio = "---";
                }
            }
            echo "<a name=comm" . $row["id"] . " href=userdetails.php?id=" . safeChar($row["user"]) . "><b>" . safeChar($row["username"]) . "</b></a> " . $title . " " . ($row["donor"] == "yes" ? "<img src=pic/star.gif alt='Donor'>" : "") . ($row["warned"] == "yes" ? "<img src=" . "/pic/warned.gif alt=\"Warned\">" : "") . " Ratio: {$ratio}\n";
        } else {
            if (!isset($row["username"])) {
                echo "<a name=\"comm" . $row["id"] . "\"><i>(orphaned)</i></a>\n";
            } else {
                if ($arraya['anonymous'] == 'yes') {
                    echo "<a name=\"comm" . $row["id"] . "\"><font color=blue><b>Anonymous</b></font></a>\n";
                }
            }
        }
        echo " at " . display_date_time($row["added"]) . " GMT" . ($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=comment.php?action=edit&amp;cid={$row['id']}>" . 'Edit' . "</a>] " : "") . (get_user_class() >= UC_VIP ? " - [<a href=report.php?type=Comment&id={$row['id']}>Report this Comment</a>]" : "") . (get_user_class() >= UC_MODERATOR ? "- [<a href=comment.php?action=delete&amp;cid={$row['id']}>" . 'Delete' . "</a>]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? " - [<a href=comment.php?action=vieworiginal&amp;cid={$row['id']}>" . 'View_original' . "</a>]" : "") . "</p>\n";
        $resa = sql_query("SELECT owner, anonymous FROM torrents WHERE owner = {$row['user']}");
        $array = mysql_fetch_assoc($resa);
        if ($row['anonymous'] == 'yes' && $row['user'] == $array['owner']) {
            $avatar = "/pic/default_avatar.gif";
        } else {
            $avatar = $CURUSER["avatars"] == "yes" ? safeChar($row["avatar"]) : "";
        }
        if (!$avatar) {
            $avatar = "/pic/default_avatar.gif";
        }
        begin_table(true);
        echo "<tr valign=top>\n";
        echo "<td align=center width=100 style='padding: 0px'><img width=100 src={$avatar}><br />" . get_reputation($row, 'comments') . "</td>\n";
        echo "<td class=text>" . format_comment($row["text"]) . "</td>\n";
        echo "</tr>\n";
        end_table();
    }
    end_frame();
    end_main_frame();
}
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:61,代码来源:commenttable.php

示例11: getRate

		<tr><td class="forum_head_dark" align="left" width="100"> <img src="' . $INSTALLER09['pic_base_url'] . 'forums/topic_normal.gif" alt="Topic" title="Topic" />&nbsp;&nbsp;Author</td>
		<td class="forum_head_dark" align="left" colspan="2">&nbsp;&nbsp;Topic: ' . $topic_name . '  [ Read ' . $views . ' times ] </td></tr>
		<tr><td class="three" align="left" colspan="3">Topic rating: ' . getRate($topic_id, "topic") . '</td></tr>
      <tr><td class="three" align="left" colspan="3">' . $topic_users . '</td></tr>';
//=== lets start the loop \o/
while ($arr = mysqli_fetch_assoc($res)) {
    //=== change colors
    $colour = ++$colour % 2;
    $class = $colour == 0 ? 'one' : 'two';
    $class_alt = $colour == 0 ? 'two' : 'one';
    $moodname = isset($mood['name'][$arr['mood']]) ? htmlsafechars($mood['name'][$arr['mood']]) : 'is feeling neutral';
    $moodpic = isset($mood['image'][$arr['mood']]) ? htmlsafechars($mood['image'][$arr['mood']]) : 'noexpression.gif';
    $post_icon = $arr['icon'] !== '' ? '<img src="' . $INSTALLER09['pic_base_url'] . 'smilies/' . htmlsafechars($arr['icon']) . '.gif" alt="icon" title="icon" /> ' : '<img src="' . $INSTALLER09['pic_base_url'] . 'forums/topic_normal.gif" alt="icon" title="icon" /> ';
    $post_title = $arr['post_title'] !== '' ? ' <span style="font-weight: bold; font-size: x-small;">' . htmlsafechars($arr['post_title'], ENT_QUOTES) . '</span>' : '';
    $stafflocked = $arr["staff_lock"] == 1 ? "<img src='{$INSTALLER09['pic_base_url']}locked.gif' border='0' alt='Post Locked' title='Post Locked' />" : "";
    $member_reputation = $arr['username'] != '' ? get_reputation($arr, 'posts') : '';
    $edited_by = '';
    if ($arr['edit_date'] > 0) {
        $res_edited = sql_query('SELECT username FROM users WHERE id=' . sqlesc($arr['edited_by']));
        $arr_edited = mysqli_fetch_assoc($res_edited);
        //== Anonymous
        if ($arr['anonymous'] == 'yes') {
            if ($CURUSER['class'] < UC_STAFF && $arr['user_id'] != $CURUSER['id']) {
                $edited_by = '<br /><br /><br /><span style="font-weight: bold; font-size: x-small;">Last edited by Anonymous
				 at ' . get_date($arr['edit_date'], '') . ' GMT ' . ($arr['edit_reason'] !== '' ? ' </span>[ Reason: ' . htmlsafechars($arr['edit_reason']) . ' ] <span style="font-weight: bold; font-size: x-small;">' : '') . '
				 ' . ($CURUSER['class'] >= UC_STAFF && $arr['post_history'] !== '' ? ' <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_post_history&amp;post_id=' . (int) $arr['post_id'] . '&amp;forum_id=' . $forum_id . '&amp;topic_id=' . $topic_id . '">read post history</a></span><br />' : '</span>');
            } else {
                $edited_by = '<br /><br /><br /><span style="font-weight: bold; font-size: x-small;">Last edited by Anonymous [<a class="altlink" href="userdetails.php?id=' . (int) $arr['edited_by'] . '">' . htmlsafechars($arr_edited['username']) . '</a>]
				 at ' . get_date($arr['edit_date'], '') . ' GMT ' . ($arr['edit_reason'] !== '' ? ' </span>[ Reason: ' . htmlsafechars($arr['edit_reason']) . ' ] <span style="font-weight: bold; font-size: x-small;">' : '') . '
				 ' . ($CURUSER['class'] >= UC_STAFF && $arr['post_history'] !== '' ? ' <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_post_history&amp;post_id=' . (int) $arr['post_id'] . '&amp;forum_id=' . $forum_id . '&amp;topic_id=' . $topic_id . '">read post history</a></span><br />' : '</span>');
            }
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:31,代码来源:view_topic.php

示例12: userlogin


//.........这里部分代码省略.........
        $row['invitedby'] = (int) $row['invitedby'];
        $row['anonymous'] = $row['anonymous'];
        $row['uploadpos'] = (int) $row['uploadpos'];
        $row['forumpost'] = (int) $row['forumpost'];
        $row['downloadpos'] = (int) $row['downloadpos'];
        $row['immunity'] = (int) $row['immunity'];
        $row['leechwarn'] = (int) $row['leechwarn'];
        $row['last_browse'] = (int) $row['last_browse'];
        $row['sig_w'] = (int) $row['sig_w'];
        $row['sig_h'] = (int) $row['sig_h'];
        $row['forum_access'] = (int) $row['forum_access'];
        $row['hit_and_run_total'] = (int) $row['hit_and_run_total'];
        $row['donoruntil'] = (int) $row['donoruntil'];
        $row['donated'] = (int) $row['donated'];
        $row['total_donated'] = (double) $row['total_donated'];
        $row['vipclass_before'] = (int) $row['vipclass_before'];
        $row['passhint'] = (int) $row['passhint'];
        $row['avatarpos'] = (int) $row['avatarpos'];
        $row['sendpmpos'] = (int) $row['sendpmpos'];
        $row['invitedate'] = (int) $row['invitedate'];
        $row['anonymous_until'] = (int) $row['anonymous_until'];
        $row['pirate'] = (int) $row['pirate'];
        $row['king'] = (int) $row['king'];
        $row['ssluse'] = (int) $row['ssluse'];
        $row['paranoia'] = (int) $row['paranoia'];
        $row['parked_until'] = (int) $row['parked_until'];
        $row['bjwins'] = (int) $row['bjwins'];
        $row['bjlosses'] = (int) $row['bjlosses'];
        $row['irctotal'] = (int) $row['irctotal'];
        $row['last_access_numb'] = (int) $row['last_access_numb'];
        $row['onlinetime'] = (int) $row['onlinetime'];
        $ratio = $row['downloaded'] > 0 ? $row['uploaded'] / $row['downloaded'] : 0;
        $row['ratio'] = number_format($ratio, 2);
        $row['rep'] = get_reputation($row);
        $mc1->cache_value('MyUser_' . $id, $row, $INSTALLER09['expires']['curuser']);
        // set $Cache
        unset($res);
    }
    if (get_mycookie('pass') !== md5($row["passhash"] . $_SERVER["REMOTE_ADDR"])) {
        return;
    }
    //==Allowed staff
    if ($row["class"] >= UC_STAFF) {
        $allowed_ID = $INSTALLER09['allowed_staff']['id'];
        if (!in_array((int) $row["id"], $allowed_ID, true)) {
            $msg = "Fake Account Detected: Username: " . $row["username"] . " - UserID: " . $row["id"] . " - UserIP : " . getip();
            /** Demote and disable **/
            sql_query("UPDATE users SET enabled = 'no', class = 0 WHERE id =" . sqlesc($row["id"]) . "") or sqlerr(__FILE__, __LINE__);
            write_log($msg);
            autoshout($msg);
            logoutcookie();
        }
    }
    // If curr_ann_id > 0 but curr_ann_body IS NULL, then force a refresh
    if ($row['curr_ann_id'] > 0 and $row['curr_ann_body'] == NULL) {
        $row['curr_ann_id'] = 0;
        $row['curr_ann_last_check'] = '0';
    }
    // If elapsed > 10 minutes, force a announcement refresh.
    if ($row['curr_ann_last_check'] != '0' and $row['curr_ann_last_check'] < time($dt) - 600) {
        $row['curr_ann_last_check'] = '0';
    }
    if ($row['curr_ann_id'] == 0 and $row['curr_ann_last_check'] == '0') {
        // Force an immediate check...
        $query = sprintf('SELECT m.*,p.process_id FROM announcement_main AS m ' . 'LEFT JOIN announcement_process AS p ON m.main_id = p.main_id ' . 'AND p.user_id = %s ' . 'WHERE p.process_id IS NULL ' . 'OR p.status = 0 ' . 'ORDER BY m.main_id ASC ' . 'LIMIT 1', sqlesc($row['id']));
        $result = sql_query($query);
开发者ID:CharlieHD,项目名称:U-232-V2,代码行数:67,代码来源:bittorrent.php

示例13: tr

        }
        $s .= "</select>\n";
        $s .= "<input type=\"submit\" value=\"Vote!\" />";
        $s .= "</form>\n";
    }
}
$s .= "</td></tr></table>";
$HTMLOUT .= tr("Rating", $s, 1);
$HTMLOUT .= tr("{$lang['details_last_seeder']}", "{$lang['details_last_activity']}" . get_date($row['lastseed'], '', 0, 1));
$HTMLOUT .= tr("{$lang['details_size']}", mksize($row["size"]) . " (" . number_format($row["size"]) . "{$lang['details_bytes']})");
$HTMLOUT .= tr("{$lang['details_added']}", get_date($row['added'], "{$lang['details_long']}"));
$HTMLOUT .= tr("{$lang['details_views']}", $row["views"]);
$HTMLOUT .= tr("{$lang['details_hits']}", $row["hits"]);
$HTMLOUT .= tr("{$lang['details_snatched']}", $row["times_completed"] > 0 ? "<a href='./snatches.php?id={$id}'>{$row['times_completed']} {$lang['details_times']}</a>" : "0 {$lang['details_times']}", 1);
//==Reputation
$member_reputation = get_reputation($row, 'torrents');
$HTMLOUT .= "<tr><td class='rowhead' valign='top' align='right' width='1%'>Torrent<br/>{$lang['details_rep']}</td><td align='left' width='99%'>\r\n    {$member_reputation} (counts towards uploaders Reputation)<br />\r\n    </td></tr>";
//==Anonymous
if ($row['anonymous'] == 'yes') {
    if ($CURUSER['class'] < UC_UPLOADER) {
        $uprow = "<i>Anonymous</i>";
    } else {
        $uprow = "<i>Anonymous</i> (<a href='userdetails.php?id={$row['owner']}'><b>{$row['username']}</b></a>)";
    }
} else {
    $uprow = isset($row["username"]) ? "<a href='./userdetails.php?id=" . $row["owner"] . "'><b>" . htmlspecialchars($row["username"]) . "</b></a>" : "<i>{$lang['details_unknown']}</i>";
}
if ($owned) {
    $uprow .= " {$spacer}<{$editlink}><b>{$lang['details_edit']}</b></a>";
}
$HTMLOUT .= tr("Upped by", $uprow, 1);
开发者ID:CharlieHD,项目名称:U-232-V2,代码行数:31,代码来源:details.php

示例14: begin_frame

 begin_frame();
 $res = sql_query("SELECT p.id, p.added, p.userid, p.added, p.body, p.editedby, p.editedat,p.posticon, u.id as uid, u.username as uusername, u.class, u.avatar, u.donor, u.title, u.mood, u.reputation, u.country, u.enabled, u.warned, u.uploaded, u.downloaded, u.signature, u.last_access, (SELECT COUNT(id)  FROM posts WHERE userid = u.id) AS posts_count, u2.username as u2_username " . ($use_attachment_mod ? ", at.id as at_id, at.filename as at_filename, at.postid as at_postid, at.size as at_size, at.downloads as at_downloads, at.owner as at_owner " : "") . ", (SELECT lastpostread FROM readposts WHERE userid = " . sqlesc((int) $CURUSER['id']) . " AND topicid = p.topicid LIMIT 1) AS lastpostread " . "FROM posts AS p " . "LEFT JOIN users AS u ON p.userid = u.id " . ($use_attachment_mod ? "LEFT JOIN attachments AS at ON at.postid = p.id " : "") . "LEFT JOIN users AS u2 ON u2.id = p.editedby " . "WHERE p.topicid = " . sqlesc($topicid) . " ORDER BY id LIMIT {$offset}, {$perpage}") or sqlerr(__FILE__, __LINE__);
 $pc = mysql_num_rows($res);
 $pn = 0;
 while ($arr = mysql_fetch_assoc($res)) {
     ++$pn;
     $lpr = $arr['lastpostread'];
     $postid = (int) $arr["id"];
     $postadd = $arr['added'];
     $posterid = (int) $arr['userid'];
     $posticon = $arr["posticon"] > 0 ? "<img src=\"pic/post_icons/icon" . $arr["posticon"] . ".gif\" style=\"padding-left:3px;\" title=\"post icon\" />" : "&nbsp;";
     $added = $arr['added'] . " GMT <font class=small>(" . get_elapsed_time(sql_timestamp_to_unix_timestamp($arr['added'])) . ")</font>";
     // ---- Get poster details
     $uploaded = prefixed($arr['uploaded']);
     $downloaded = prefixed($arr['downloaded']);
     $member_reputation = $arr['uusername'] != '' ? get_reputation($arr) : '';
     $last_access = $arr['last_access'];
     if ($arr['downloaded'] > 0) {
         $ratio = $arr['uploaded'] / $arr['downloaded'];
         $color = get_ratio_color($ratio);
         $ratio = number_format($ratio, 3);
         if ($color) {
             $ratio = "<font color={$color}>" . $ratio . "</font>";
         }
     } else {
         if ($arr['uploaded'] > 0) {
             $ratio = "&infin;";
         } else {
             $ratio = "---";
         }
     }
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:31,代码来源:forums.php

示例15: Copyright

/**
|--------------------------------------------------------------------------|
|   https://github.com/Bigjoos/                			    |
|--------------------------------------------------------------------------|
|   Licence Info: GPL			                                    |
|--------------------------------------------------------------------------|
|   Copyright (C) 2010 U-232 V4					    |
|--------------------------------------------------------------------------|
|   A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.   |
|--------------------------------------------------------------------------|
|   Project Leaders: Mindless,putyn.					    |
|--------------------------------------------------------------------------|
 _   _   _   _   _     _   _   _   _   _   _     _   _   _   _
/ \ / \ / \ / \ / \   / \ / \ / \ / \ / \ / \   / \ / \ / \ / \
( U | - | 2 | 3 | 2 )-( S | o | u | r | c | e )-( C | o | d | e )
\_/ \_/ \_/ \_/ \_/   \_/ \_/ \_/ \_/ \_/ \_/   \_/ \_/ \_/ \_/
*/
function commenttable($rows, $variant = 'torrent')
{
    require_once INCL_DIR . 'html_functions.php';
    require_once INCL_DIR . 'add_functions.php';
    global $CURUSER, $INSTALLER09, $mood, $mc1;
    $lang = load_language('torrenttable_functions');
    $htmlout = '';
    $count = 0;
    $variant_options = array('torrent' => 'details', 'request' => 'viewrequests');
    if (isset($variant_options[$variant])) {
        $locale_link = $variant_options[$variant];
    } else {
        return;
    }
    $extra_link = $variant == 'request' ? '&type=request' : ($variant == 'offer' ? '&type=offer' : '');
    $htmlout .= begin_main_frame();
    $htmlout .= begin_frame();
    foreach ($rows as $row) {
        $moodname = isset($mood['name'][$row['mood']]) ? htmlsafechars($mood['name'][$row['mood']]) : 'is feeling neutral';
        $moodpic = isset($mood['image'][$row['mood']]) ? htmlsafechars($mood['image'][$row['mood']]) : 'noexpression.gif';
        $htmlout .= "<p class='sub'>#{$row["id"]} {$lang["commenttable_by"]} ";
        // --------------- likes start------
        $att_str = '';
        if (!empty($row['user_likes'])) {
            $likes = explode(',', $row['user_likes']);
        } else {
            $likes = '';
        }
        if (!empty($likes) && count(array_unique($likes)) > 0) {
            if (in_array($CURUSER['id'], $likes)) {
                if (count($likes) == 1) {
                    $att_str = jq('You like this');
                } elseif (count(array_unique($likes)) > 1) {
                    $att_str = jq('You and ') . (count(array_unique($likes)) - 1 == '1' ? '1 other person likes this' : count($likes) - 1 . 'others like this');
                }
            } elseif (!in_array($CURUSER['id'], $likes)) {
                if (count(array_unique($likes)) == 1) {
                    $att_str = '1 other person likes this';
                } elseif (count(array_unique($likes)) > 1) {
                    $att_str = count(array_unique($likes)) . ' others like this';
                }
            }
        }
        $wht = !empty($likes) && count(array_unique($likes)) > 0 && in_array($CURUSER['id'], $likes) ? 'unlike' : 'like';
        // --------------- likes end------
        if (isset($row["username"])) {
            if ($row['anonymous'] == 'yes') {
                //$htmlout.= '/*<![CDATA[*/';
                $htmlout .= ($CURUSER['class'] >= UC_STAFF ? 'Anonymous - Posted by: <b>' . htmlsafechars($row['username']) . '</b> ID: ' . (int) $row['user'] . '' : 'Anonymous') . ' ';
            } else {
                $title = $row["title"];
                if ($title == "") {
                    $title = get_user_class_name($row["class"]);
                } else {
                    $title = htmlsafechars($title);
                }
                $username = htmlsafechars($row['username']);
                $avatar1 = $row['anonymous'] == 'yes' ? "<img src=\\'{$INSTALLER09['pic_base_url']}anonymous_1.jpg\\' width=\\'150\\' height=\\'150\\' border=\\'0\\' alt=\\'Avatar\\' title=\\'Avatar\\' />" : "<img src=\\'" . htmlsafechars($row['avatar']) . "\\' width=\\'150\\' height=\\'150\\' border=\\'0\\' alt=\\'Avatar\\' title=\\'Avatar\\' />";
                if (!$avatar1) {
                    $avatar1 = "{$INSTALLER09['pic_base_url']}default_avatar.gif";
                }
                $htmlout .= "<a name='comm" . (int) $row["id"] . "' onmouseover=\"Tip('<b>{$username}</b><br />{$avatar1}');\" onmouseout=\"UnTip();\" href='userdetails.php?id=" . (int) $row["user"] . "'><b>" . htmlsafechars($row["username"]) . "</b></a>" . ($row["donor"] == "yes" ? "<img src='{$INSTALLER09['pic_base_url']}star.gif' alt='" . $lang["commenttable_donor_alt"] . "' />" : "") . ($row["warned"] == "yes" ? "<img src='{$INSTALLER09['pic_base_url']}warned.gif' alt='" . $lang["commenttable_warned_alt"] . "' />" : "") . " ({$title})\n";
                $htmlout .= '<a href="javascript:;" onclick="PopUp(\'usermood.php\',\'Mood\',530,500,1,1);">
    <span class="tool"><img src="' . $INSTALLER09['pic_base_url'] . 'smilies/' . $moodpic . '" alt="' . $moodname . '" border="0" />
    <span class="tip">' . ($row['anonymous'] == 'yes' ? '<i>Anonymous</i>' : htmlsafechars($row['username'])) . ' ' . $moodname . ' !</span></span></a>';
            }
        } else {
            $htmlout .= "<a name='comm" . (int) $row["id"] . "'><i>(" . $lang["commenttable_orphaned"] . ")</i></a>\n";
        }
        $htmlout .= get_date($row['added'], '');
        $htmlout .= ($row["user"] == $CURUSER["id"] || $CURUSER["class"] >= UC_STAFF ? "- [<a href='comment.php?action=edit&amp;cid=" . (int) $row['id'] . $extra_link . "&amp;tid=" . $row[$variant] . "'>" . $lang["commenttable_edit"] . "</a>]" : "") . ($CURUSER["class"] >= UC_VIP ? " - [<a href='report.php?type=Comment&amp;id=" . (int) $row['id'] . "'>Report this Comment</a>]" : "") . ($CURUSER["class"] >= UC_STAFF ? " - [<a href='comment.php?action=delete&amp;cid=" . (int) $row['id'] . $extra_link . "&amp;tid=" . $row[$variant] . "'>" . $lang["commenttable_delete"] . "</a>]" : "") . ($row["editedby"] && $CURUSER["class"] >= UC_STAFF ? "- [<a href='comment.php?action=vieworiginal&amp;cid=" . (int) $row['id'] . $extra_link . "&amp;tid=" . $row[$variant] . "'>" . $lang["commenttable_view_original"] . "</a>]" : "") . "\n\t\t\n\t\t  <span id='mlike' data-com='" . (int) $row["id"] . "' class='comment {$wht}'>[" . ucfirst($wht) . "]</span><span class='tot-" . (int) $row["id"] . "' data-tot='" . (!empty($likes) && count(array_unique($likes)) > 0 ? count(array_unique($likes)) : '') . "'>&nbsp;{$att_str}</span></p>\n";
        $avatar = $row['anonymous'] == "yes" ? "{$INSTALLER09['pic_base_url']}anonymous_1.jpg" : htmlsafechars($row["avatar"]);
        if (!$avatar) {
            $avatar = "{$INSTALLER09['pic_base_url']}default_avatar.gif";
        }
        $text = format_comment($row["text"]);
        if ($row["editedby"]) {
            $text .= "<p><font size='1' class='small'>" . $lang["commenttable_last_edited_by"] . " <a href='userdetails.php?id=" . (int) $row['editedby'] . "'><b>" . htmlsafechars($row['edit_name']) . "</b></a> " . $lang["commenttable_last_edited_at"] . " " . get_date($row['editedat'], 'DATE') . "</font></p>\n";
        }
        $htmlout .= begin_table(true);
        $htmlout .= "<tr valign='top'>\n";
        $htmlout .= "<td align='center' width='150' style='padding: 0px'><img width='150' height='150' src='{$avatar}' alt='' /><br />" . get_reputation($row, 'comments') . "</td>\n";
        $htmlout .= "<td class='text'>{$text}</td>\n";
//.........这里部分代码省略.........
开发者ID:UniversalAdministrator,项目名称:U-232-V4,代码行数:101,代码来源:comment_functions.php


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