本文整理汇总了PHP中get_user_icons函数的典型用法代码示例。如果您正苦于以下问题:PHP get_user_icons函数的具体用法?PHP get_user_icons怎么用?PHP get_user_icons使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_user_icons函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_result
$sqlquery .= "fm.id ";
$sqlquery .= "FROM {$ipb_prefix}topics tp ";
$sqlquery .= "LEFT JOIN {$ipb_prefix}forums fm ON fm.id = tp.forum_id ";
$sqlquery .= "WHERE tp.state!='link' ";
$sqlquery .= $exclude . " ORDER BY last_post DESC " . $limit;
$tres = get_result($sqlquery, true, $btit_settings["cache_duration"]);
// --- Lets grab their time offset so that we can offset the post time appropriately
include "include/offset.php";
foreach ($tres as $post) {
$title = $post["title"];
# cut it if necessary
$head = wordwrap($title, 25, "\n", true);
$post['title'] = $head;
$href = "href='" . $btit_settings["url"] . "/index.php?page=forum&action=viewtopic&topicid=" . $post["tid"] . "'";
$href2 = "href='" . $btit_settings["url"] . "/index.php?page=forum&action=showuser&userid=" . $post["last_poster_id"] . "'";
$postsList .= '<tr><td class="lista"><b><a title="' . $language['FIRST_UNREAD'] . ': ' . $post['title'] . '" ' . $href . '>' . $post['title'] . '</a></b><br />' . $language['LAST_POST_BY'] . ' <a ' . $href2 . '>' . $post['last_poster_name'] . ($btit_settings["fmhack_simple_donor_display"] == "enabled" ? get_user_icons($user) : "") . ($btit_settings["fmhack_simple_donor_display"] == "enabled" ? get_user_icons($post) : "") . '</a><br />On ' . date('d/m/Y H:i:s', $post['last_post']) . '</td></tr>';
}
} else {
# get posts based if can read
$lastPosts = get_result('SELECT p.topicid as tid, p.id as pid, t.subject, p.added, p.body, p.userid FROM ' . $topicsTable . ' as t LEFT JOIN ' . $postsTable . ' as p ON p.topicid=t.id LEFT JOIN ' . $TABLE_PREFIX . 'forums as f ON f.id=t.forumid WHERE f.minclassread<=' . $CURUSER['id_level'] . ($realLastPosts ? '' : ' AND p.id=t.lastpost') . ' ORDER BY p.added DESC ' . $limit, true, $btit_settings['cache_duration']);
# format posts
foreach ($lastPosts as $post) {
# get username
$user = get_result('SELECT ul.prefixcolor, u.username, ul.suffixcolor FROM ' . $TABLE_PREFIX . 'users_level as ul LEFT JOIN ' . $TABLE_PREFIX . 'users as u ON u.id_level=ul.id WHERE u.id=' . $post['userid'] . ' LIMIT 1;', true, $btit_settings['cache_duration']);
if (isset($user[0])) {
$user = $user[0];
$post['username'] = unesc($user['prefixcolor'] . $user['username'] . $user['suffixcolor']);
} else {
$post['username'] = '[DELETED USER]';
}
$postsList .= '<tr><td class="lista"><b><a class="forum" href="' . $btit_settings['url'] . '/index.php?page=forum&action=viewtopic&topicid=' . $post['tid'] . '&msg=' . $post['pid'] . '#' . $post['pid'] . '">' . htmlspecialchars(unesc($post['subject'])) . '</a></b><br />' . $language['LAST_POST_BY'] . ' <a class="forum" href="' . $btit_settings['url'] . '/index.php?page=userdetails&id=' . $post['userid'] . '">' . $post['username'] . '</a><br />On ' . get_date_time($post['added']) . '</td></tr>';
示例2: mysql_query
if ($i % 2 == 1) {
print "<td class='bottom' width='50%'> </td></tr></table>\n";
}
//print($friends);
print "</td></tr></table>\n";
$res = mysql_query("SELECT b.blockid as id, u.username AS name, u.donor, u.warned, u.enabled, u.last_access FROM blocks AS b LEFT JOIN users as u ON b.blockid = u.id WHERE userid={$userid} ORDER BY name") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 0) {
$blocks = "<em>Your blocked users list is empty.</em>";
} else {
$i = 0;
$blocks = "<table width='100%' cellspacing='0' cellpadding='0'>";
while ($block = mysql_fetch_assoc($res)) {
if ($i % 6 == 0) {
$blocks .= "<tr>";
}
$blocks .= "<td style='border: none; padding: 4px; spacing: 0px;'>[<font class='small'><a href='friends.php?id={$userid}&action=delete&type=block&targetid=" . $block['id'] . "'>D</a></font>] <a href='userdetails.php?id=" . $block['id'] . "'><b>" . $block['name'] . "</b></a>" . get_user_icons($block) . "</td>";
if ($i % 6 == 5) {
$blocks .= "</tr>";
}
$i++;
}
print "</table>\n";
}
print "<br /><br />";
print "<table class='main' width='750' border='0' cellspacing='0' cellpadding='10'><tr><td class='embedded'>";
print "<h2 align='left'><a name=\"blocks\">Blocked users list</a></h2></td></tr>";
print "<tr><td style='padding: 10px;background-color: #ECE9D8'>";
print "{$blocks}\n";
print "</td></tr></table>\n";
print "</td></tr></table>\n";
print "<p><a href='users.php'><b>Find User/Browse User List</b></a></p>";
示例3: mysql_query
print "<h2 align=left><a name=\"friends\">" . $user['username'] . " has " . $fcount . " Friend " . ($fcount > 1 ? "s" : "") . "</a></h2>\n";
print "<table width=737 border=1 cellspacing=0 cellpadding=5><tr><td>";
$i = 0;
$res = mysql_query("SELECT f.friendid as id, u.username AS name, u.class, u.avatar, u.title, u.donor, u.warned, u.enabled, u.last_access FROM friends AS f LEFT JOIN users as u ON f.friendid = u.id WHERE userid={$userid} AND f.confirmed='yes' ORDER BY name") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 0) {
$friends = "<em>" . $user['username'] . " has no friends.</em>";
} else {
while ($friend = mysql_fetch_array($res)) {
$pm_pic = "<img src=" . $pic_base_url . "button_pm.gif alt='Send PM' border=0>";
$dt = gmtime() - 180;
$online = $friend["last_access"] >= '' . get_date_time($dt) . '' ? ' <img src=' . $pic_base_url . 'user_online.gif border=0 alt=Online>' : '<img src=' . $pic_base_url . 'user_offline.gif border=0 alt=Offline>';
$title = htmlspecialchars($friend["title"]);
if (!$title) {
$title = get_user_class_name($friend["class"]);
}
$body1 = "<a href=userdetails.php?id=" . $friend['id'] . "><b>" . $friend['name'] . "</b></a>" . get_user_icons($friend) . " ({$title}) {$online}<br /><br />last seen on " . $friend['last_access'] . "<br />(" . get_elapsed_time(sql_timestamp_to_unix_timestamp($friend['last_access'])) . " ago)";
$body2 = $id == $CURUSER['id'] ? "" : "<br /><a href=friends.php?id={$CURUSER['id']}&action=add&type=friend&targetid=" . $friend['id'] . ">Add Friend</a>" . "<br /><br /><a href=sendmessage.php?receiver=" . $friend['id'] . ">" . $pm_pic . "</a>";
$avatar = $CURUSER["avatars"] == "yes" ? htmlspecialchars($friend["avatar"]) : "";
// if (!$avatar)
// $avatar = "".$pic_base_url."default_avatar.gif";
if ($i % 2 == 0) {
print "<table width=737 style='padding: 0px'><tr><td class=bottom style='padding: 5px' width=50% align=center>";
} else {
print "<td class=bottom style='padding: 5px' width=50% align=center>";
}
print "<table class=main width=737 height=75px>";
print "<tr valign=top><td width=75 align=center style='padding: 0px'>" . ($avatar ? "<div style='width:75px;height:75px;overflow: hidden'><img width=75px src=\"{$avatar}\"></div>" : "") . "</td><td>\n";
print "<table class=main>";
print "<tr><td class=embedded style='padding: 5px' width=737>{$body1}</td>\n";
print "<td class=embedded style='padding: 5px' width=20%>{$body2}</td></tr>\n";
print "</table>";
示例4: mysql_query
$select_is = "COUNT(*)";
// LEFT due to orphan comments
$from_is = "comments AS c LEFT JOIN torrents as t\r\n\t ON c.torrent = t.id";
$where_is = "c.user = {$userid}";
$order_is = "c.id DESC";
$query = "SELECT {$select_is} FROM {$from_is} WHERE {$where_is} ORDER BY {$order_is}";
$res = mysql_query($query) or sqlerr(__FILE__, __LINE__);
$arr = mysql_fetch_row($res) or stderr("Error", "No comments found");
$commentcount = $arr[0];
//------ Make page menu
$pager = pager($perpage, $commentcount, "userhistory.php?action=viewcomments&id={$userid}&");
//------ Get user data
$res = mysql_query("SELECT username, donor, warned, enabled FROM users WHERE id={$userid}") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 1) {
$arr = mysql_fetch_assoc($res);
$subject = "<a href='userdetails.php?id={$userid}'><b>{$arr['username']}</b></a>" . get_user_icons($arr, true);
} else {
$subject = "unknown[{$userid}]";
}
//------ Get comments
$select_is = "t.name, c.torrent AS t_id, c.id, c.added, c.text";
$query = "SELECT {$select_is} FROM {$from_is} WHERE {$where_is} ORDER BY {$order_is} {$pager['limit']}";
$res = mysql_query($query) or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 0) {
stderr("Error", "No comments found");
}
stdhead("Comments history");
print "<h1>Comments history for {$subject}</h1>\n";
if ($commentcount > $perpage) {
echo $pager['pagertop'];
}
示例5: unesc
$private = "<img src=\"images/greengo.gif\" title=\"public\">";
}
if ($row_user["profileview"] == 1) {
$private = "<img src=\"images/private2.png\" title=\"private\">";
}
$users[$i]["private"] = $private;
//private profile MrFix
// DT arcade
if ($row_user["trophy"] == 0) {
$rra = "";
}
if ($row_user["trophy"] == 1) {
$rra = "<img src='images/crown.gif' alt='Arcade King' title='Arcade King' />";
}
// DT arcade
$users[$i]["username"] = "<a href=\"index.php?page=userdetails&id=" . $row_user["id"] . "\">" . unesc($row_user["prefixcolor"]) . unesc($row_user["username"]) . $udo . $udob . $ubir . $umal . $ufem . $uban . $uwar . $upar . $ubot . $utrmu . $utrmo . $uvimu . $uvimo . $ufrie . $ujunk . $ustaf . $usys . $banp . $imm . get_user_icons($row_user) . warn($row_user) . booted($row_user) . $upr . $rra . unesc($row_user["suffixcolor"]) . "</a>";
$users[$i]["userlevel"] = $row_user["level"];
$users[$i]["joined"] = $joined;
$users[$i]["lastconnect"] = $lastconnect;
$users[$i]["flag"] = $flag;
//user ratio
if ($row_user["profileview"] == 0 || $CURUSER["uid"] == $row_user["id"]) {
if (intval($row_user["downloaded"]) > 0) {
$ratio = number_format($row_user["uploaded"] / $row_user["downloaded"], 2);
} else {
$ratio = '∞';
}
} else {
$ratio = "<img src=\"images/private2.png\" title=\"private\">";
}
$users[$i]["ratio"] = $ratio;
示例6: mysql_query
if (!$avatar) {
$avatar = "{$TBDEV['pic_base_url']}default_avatar.gif";
}
$friends .= "<div style='border: 1px solid black;padding:5px;'>" . ($avatar ? "<img width='50px' src='{$avatar}' style='float:right;' alt='' />" : "") . "<p >{$userlink}<br /><br />{$delete}{$pm}</p></div><br />";
}
}
//if ($i % 2 == 1)
//$HTMLOUT .= "<td class='bottom' width='50%'> </td></tr></table>\n";
//print($friends);
// $HTMLOUT .= "</td></tr></table>\n";
/////////////////////// FRIENDS BLOCK END///////////////////////////////////////
//////////////////// ENEMIES BLOCK ////////////////////////////
$res = mysql_query("SELECT b.blockid as id, u.username AS name, u.donor, u.warned, u.enabled, u.last_access FROM blocks AS b LEFT JOIN users as u ON b.blockid = u.id WHERE userid={$userid} ORDER BY name") or sqlerr(__FILE__, __LINE__);
$blocks = '';
if (mysql_num_rows($res) == 0) {
$blocks = "{$lang['friends_blocks_empty']}<em>.</em>";
} else {
//$i = 0;
//$blocks = "<table width='100%' cellspacing='0' cellpadding='0'>";
while ($block = mysql_fetch_assoc($res)) {
$blocks .= "<div style='border: 1px solid black;padding:5px;'>";
$blocks .= "<span class='btn' style='float:right;'><a href='friends.php?id={$userid}&action=delete&type=block&targetid={$block['id']}'>{$lang['friends_delete']}</a></span><br />";
$blocks .= "<p><a href='userdetails.php?id={$block['id']}'><b>" . htmlentities($block['name'], ENT_QUOTES) . "</b></a>";
$blocks .= get_user_icons($block) . "</p></div><br />";
}
}
//////////////////// ENEMIES BLOCK END ////////////////////////////
$HTMLOUT .= "<table class='main' border='0' cellspacing='0' cellpadding='0'>" . "<tr><td class='embedded'><h1 style='margin:0px'> {$lang['friends_personal']} " . htmlentities($user['username'], ENT_QUOTES) . "</h1>{$donor}{$warned}</td></tr></table>";
$HTMLOUT .= "<table class='main' width='750' border='0' cellspacing='0' cellpadding='0'>\r\n <tr>\r\n <td class='colhead'><h2 align='left' style='width:50%;'><a name='friends'>{$lang['friends_friends_list']}</a></h2></td>\r\n <td class='colhead'><h2 align='left' style='width:50%;vertical-align:top;'><a name='blocks'>{$lang['friends_blocks_list']}</a></h2></td>\r\n </tr>\r\n <tr>\r\n <td style='padding:10px;background-color:#ECE9D8;width:50%;'>{$friends}</td>\r\n <td style='padding:10px;background-color:#ECE9D8' valign='top'>{$blocks}</td>\r\n </tr>\r\n </table>";
$HTMLOUT .= " <p><a href='users.php'><b>{$lang['friends_user_list']}</b></a></p>";
print stdhead("{$lang['friends_stdhead']} {$user['username']}") . $HTMLOUT . stdfoot();
示例7: mysql_query
echo "<td class=tabletorrent align=center>Last action</td>\n";
echo "<td class=tabletorrent align=center>Completed At</td>\n";
echo "<td class=tabletorrent align=center>Port</td>\n";
echo "<td class=tabletorrent align=center>seeding</td>\n";
echo "<td class=tabletorrent align=center>Announced</td>\n";
echo "</tr>\n";
$res = mysql_query("SELECT s.*, size, username, parked, warned, enabled, donor, timesann, hit_and_run, mark_of_cain FROM snatched AS s INNER JOIN users ON s.userid = users.id INNER JOIN torrents ON s.torrentid = torrents.id WHERE torrentid =" . unsafeChar($id) . " ORDER BY complete_date DESC {$limit}") or sqlerr();
while ($arr = mysql_fetch_assoc($res)) {
$upspeed = $arr["upspeed"] > 0 ? prefixed($arr["upspeed"]) : ($arr["seedtime"] > 0 ? prefixed($arr["uploaded"] / ($arr["seedtime"] + $arr["leechtime"])) : prefixed(0));
$downspeed = $arr["downspeed"] > 0 ? prefixed($arr["downspeed"]) : ($arr["leechtime"] > 0 ? prefixed($arr["downloaded"] / $arr["leechtime"]) : prefixed(0));
$ratio = $arr["downloaded"] > 0 ? number_format($arr["uploaded"] / $arr["downloaded"], 3) : ($arr["uploaded"] > 0 ? "Inf." : "---");
$completed = sprintf("%.2f%%", 100 * (1 - $arr["to_go"] / $arr["size"]));
$res9 = mysql_query("SELECT seeder FROM peers WHERE torrent={$_GET['id']} AND userid={$arr['userid']}");
$arr9 = mysql_fetch_assoc($res9);
echo "<tr>\n";
echo "<td align=left><a href=userdetails.php?id={$arr['userid']}>{$arr['username']}</a>" . get_user_icons($arr) . "</td>\n";
echo "<td align=right>" . safeChar($arr["id"]) . "</td>\n";
echo "<td align=center>" . ($arr["connectable"] == "yes" ? "<img src=/pic/online.gif>" : "<img src=/pic/offline.gif>") . "</td>\n";
echo "<td align=right>" . prefixed($arr["uploaded"]) . "</td>\n";
echo "<td align=right>{$upspeed}/s</td>\n";
echo "<td align=right>" . prefixed($arr["downloaded"]) . "</td>\n";
echo "<td align=right>{$downspeed}/s</td>\n";
echo "<td align=right>{$ratio}</td>\n";
echo "<td align=right>{$completed}</td>\n";
echo "<td align=right>" . safeChar($arr["hit_and_run"]) . "</td>\n";
echo "<td align=right>" . safeChar($arr["mark_of_cain"]) . "</td>\n";
echo "<td align=right><center><b>" . get_snatched_color($arr["seedtime"]) . "</b></center></td>\n";
echo "<td align=right>" . mkprettytime($arr["leechtime"]) . "</td>\n";
echo "<td align=center>{$arr['last_action']}</td>\n";
echo "<td align=center>" . safeChar($arr["complete_date"] == "0000-00-00 00:00:00" ? "Not Complete Yet" : $arr["complete_date"]) . "</td>\n";
echo "<td align=center>" . safeChar($arr[port]) . "</td>\n";
示例8: number_format
if ($arr["downloaded"] != 0) {
$ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);
} else {
$ratio = "---";
}
$ratio = "<font color=" . get_ratio_color($ratio) . ">{$ratio}</font>";
$uploaded = prefixed($arr["uploaded"]);
$downloaded = prefixed($arr["downloaded"]);
$added = substr($arr['added'], 0, 10);
$last_access = substr($arr['last_access'], 0, 10);
if ($uc % 2 == 0) {
$utc = "";
} else {
$utc = " bgcolor=\"purple\"";
}
$peer_res = sql_query("SELECT count(*) FROM peers WHERE ip = " . sqlesc($ras['ip']) . " AND userid = " . $arr['id']);
$peer_row = mysql_fetch_row($peer_res);
print "<tr{$utc}><td align=left><b><a href='userdetails.php?id=" . $arr['id'] . "'>" . $arr['username'] . "</b></a>" . get_user_icons($arr) . "</td>\n<td align=center>{$arr['email']}</td>\n<td align=center>{$added}</td>\n<td align=center>{$last_access}</td>\n<td align=center>{$downloaded}</td>\n<td align=center>{$uploaded}</td>\n<td align=center>{$ratio}</td>\n<td align=center>{$arr['ip']}</td>\n<td align=center>" . ($peer_row[0] ? "Yes" : "No") . "</td></tr>\n";
$ip = $arr["ip"];
}
}
}
}
}
} else {
print "<br><table width=60% border=1 cellspacing=0 cellpadding=9><tr><td align=center>";
print "<h2>Sorry, only for Team</h2></table></td></tr>";
}
end_frame();
end_table();
stdfoot();
示例9: mysqli_query
$userdetailtpl->set("showfriend", "<a href=index.php?page=friends&frid=" . $id . "><img src=images/myspace.gif alt=friendlist /> </a>");
// timed Rank by DT start
$res4 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT level, prefixcolor, suffixcolor FROM {$TABLE_PREFIX}users_level WHERE id ='{$row['old_rank']}'");
$arr4 = mysqli_fetch_assoc($res4);
$oldrank = $arr4[prefixcolor] . $arr4[level] . $arr4[sufixcolor];
$userdetailtpl->set("old_rank", $oldrank);
$opts['name'] = 'level';
$opts['complete'] = true;
$opts['id'] = 'id';
$opts['value'] = 'level';
$opts['default'] = $row['id_level'];
$ranks = rank_list();
$userdetailtpl->set('rank_combo', get_combodt($ranks, $opts));
// timed Rank by DT end
$userdetailtpl->set("language", $language);
$userdetailtpl->set("userdetail_username", unesc($row["prefixcolor"]) . unesc($row["username"]) . $banp . immunity($row) . get_user_icons($row) . warn($row) . booted($row, true) . unesc($row["suffixcolor"]));
if ($CURUSER["uid"] > 1 && $id != $CURUSER["uid"]) {
$userdetailtpl->set("userdetail_send_pm", " <a href=\"index.php?page=usercp&do=pm&action=edit&uid=" . $CURUSER["uid"] . "&what=new&to=" . urlencode(unesc($row["username"])) . "\">" . image_or_link("{$STYLEPATH}/images/pm.png", "", $language["PM"]) . "</a>");
}
if ($CURUSER["id_level"] == "8" or $row["immunity"] == "no") {
if ($CURUSER["edit_users"] == "yes" && $id != $CURUSER["uid"]) {
$userdetailtpl->set("userdetail_edit", "  <a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=users&action=edit&uid={$id}&returnto=index.php?page=userdetails&id={$id}\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>");
}
if ($CURUSER["delete_users"] == "yes" && $id != $CURUSER["uid"]) {
$userdetailtpl->set("userdetail_delete", "  <a onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\" href=index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=users&action=delete&uid={$id}&smf_fid=" . $row["smf_fid"] . "&returnto=" . urlencode("index.php?page=users") . ">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>");
}
if ($CURUSER["delete_users"] == "yes" && $id != $CURUSER["uid"]) {
$userdetailtpl->set("userdetail_banbutton", "  <a href=index.php?page=banbutton&ban_id=" . $id . "><font color=green>" . image_or_link("{$STYLEPATH}/images/trash.png", "", $language["DTBAN"]) . "</a>");
}
if ($CURUSER["delete_users"] == "yes" && $id != $CURUSER["uid"] && $btit_settings["slon"] == true) {
$userdetailtpl->set("userdetail_shit", "  <a href=index.php?page=shitlist&do=add&shit_id=" . $id . "><font color=green>" . image_or_link("images/shit.gif", "", $language["SHIT"]) . "</a>");
示例10: sql_query
if ($i % 2 == 1) {
print "<td class=bottom width=50%> </td></tr></table>\n";
}
print $friends;
print "</td></tr></table>\n";
$res = sql_query("SELECT b.blockid AS id, u.username AS name, u.class, u.donor, u.warned, u.enabled, u.last_access FROM blocks AS b LEFT JOIN users AS u ON b.blockid = u.id WHERE userid = {$userid} ORDER BY name") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 0) {
$blocks = "<em>" . $tracker_lang['no_blocked'] . ".</em>";
} else {
$i = 0;
$blocks = "<table width=100% cellspacing=0 cellpadding=0>";
while ($block = mysql_fetch_array($res)) {
if ($i % 6 == 0) {
$blocks .= "<tr>";
}
$blocks .= "<td style='border: none; padding: 4px; spacing: 0px;'>[<font class=small><a href=friends.php?id={$userid}&action=delete&type=block&targetid=" . $block['id'] . ">D</a></font>] <a href=userdetails.php?id=" . $block['id'] . "><b>" . get_user_class_color($block['class'], $block['name']) . "</b></a>" . get_user_icons($block) . "</td>";
if ($i % 6 == 5) {
$blocks .= "</tr>";
}
$i++;
}
print "</table>\n";
}
print "<br />";
print "<table class=main width=100% border=0 cellspacing=0 cellpadding=5>";
print "<tr><td class=\"colhead\"><a name=\"blocks\">" . $tracker_lang['blocked_list'] . "</a></td></tr>";
print "<tr><td style='padding: 5px;background-color: #ECE9D8'>";
print "{$blocks}\n";
print "</td></tr></table>\n";
print "</td></tr></table>\n";
print "<p><a href=users.php><b>Найти пользователя/Список пользователей</b></a></p>";
示例11: stdhead
}
if ($month2 == $month1) {
if ($day2 < $day1) {
$age = $year2 - $year1 - 1;
} else {
$age = $year2 - $year1;
}
}
if ($month2 > $month1) {
$age = $year2 - $year1;
}
}
///////////////// BIRTHDAY MOD /////////////////////
stdhead("Просмотр профиля " . $user["username"]);
$enabled = $user["enabled"] == 'yes';
print "<p><table class=\"main\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" . "<tr><td class=\"embedded\"><h1 style=\"margin:0px\">{$user['username']}" . get_user_icons($user, true) . "</h1></td>{$country}</tr></table></p>\n";
if (!$enabled) {
print "<p><b>Этот аккаунт отключен</b></p>\n";
} elseif ($CURUSER["id"] != $user["id"]) {
$r = sql_query("SELECT id FROM friends WHERE userid={$CURUSER['id']} AND friendid = {$id}") or sqlerr(__FILE__, __LINE__);
$friend = mysql_num_rows($r);
$r = sql_query("SELECT id FROM blocks WHERE userid={$CURUSER['id']} AND blockid = {$id}") or sqlerr(__FILE__, __LINE__);
$block = mysql_num_rows($r);
if ($friend) {
print "<p>(<a href=\"friends.php?action=delete&type=friend&targetid={$id}\">Убрать из друзей</a>)</p>\n";
} elseif ($block) {
print "<p>(<a href=\"friends.php?action=delete&type=block&targetid={$id}\">Убрать из блокированых</a>)</p>\n";
} else {
print "<p>(<a href=\"friends.php?action=add&type=friend&targetid={$id}\">Добавить в друзья</a>)";
print " - (<a href=\"friends.php?action=add&type=block&targetid={$id}\">Добавить в блокированные</a>)</p>\n";
}
示例12: getData
function getData($lastID)
{
include "include/settings.php";
# getting table prefix
include "include/offset.php";
# discard it if we are editing
$sid = isset($_GET["sid"]) ? $_GET["sid"] : 0;
# get shout id (sid)and set it to zero for bool
$sql = "SELECT * FROM {$TABLE_PREFIX}chat WHERE id > " . $lastID . " AND id != " . $sid . " AND `private`='no' OR (" . $CURUSER['uid'] . " = `toid` OR " . $CURUSER['uid'] . "= `fromid` AND `private`='yes') ORDER BY id DESC";
$conn = his_getDBConnection();
# establishes the connection to the database
$results = mysqli_query($conn, $sql);
# getting the data array
while ($row = mysqli_fetch_array($results)) {
# creating and naming array
$id = $row[id];
$uid = $row[uid];
$time = $row[time];
$rd = mysqli_fetch_row(mysqli_query($GLOBALS["___mysqli_ston"], "SELECT donor,warn,immunity FROM {$TABLE_PREFIX}users WHERE id={$uid}"));
$row["donor"] = $rd[0];
$row["warn"] = $rd[1];
$row["immunity"] = $rd[2];
unset($rd);
if ($row["warn"] == "no" or $uid == 0) {
$st = "";
} else {
$st = "<img src='images/warn.gif'>";
}
if ($row["immunity"] == "no" or $uid == 0) {
$set = "";
} else {
$set = "<img src='images/shield.png'>";
}
$name = user_with_color($row[name]);
$text = $row[text];
$getsbox = @mysqli_fetch_array(@mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM {$TABLE_PREFIX}users WHERE id=" . $uid));
$sbox = "{$getsbox['sbox']}";
if ($sbox == "no" || $uid == "0") {
//make sure system can still post
# if no name is present somehow, $name and $text are set to the strings under
# we assume all must be ok, othervise no post will be made by javascript check
# if ($name == '') { $name = 'Anonymous'; $text = 'No message'; }
//private chat
if ($row["private"] == "yes") {
$name = "<b><font color=orangered>[PM]</font></b> " . user_with_color($row["name"]) . "";
}
$name = $name . $st . $set . get_user_icons($row);
# we lego put together our chat using some conditions and css and javascript this time
print "<span class='name'>" . date("d/m/Y H:i:s", $time - $offset) . " | <a href=\"javascript:windowunder('index.php?page=userdetails&id=" . $uid . "')\">" . $name . "</a>:</span>";
global $CURUSER;
if ($CURUSER["admin_access"] != "yes" && $CURUSER["uid"] != "" . $uid . "") {
} else {
# edit/delete buttons -->
print "<div style='text-align:right;\n margin-top:-13px;\n margin-bottom:-3.5px;\n '>\n <a href='index.php?page=allshout&sid={$id}&edit'><img border='0' class='EditSwap' src='images/canvas.gif' alt='' /></a>\n <a onclick=\"return confirm('" . str_replace("'", "\\'", DELETE_CONFIRM) . "')\" href='index.php?page=allshout&sid={$id}&delete'>\n <img border='0' class='DeleteSwap' src='images/canvas.gif' alt='' /></a>\n </div>";
}
# chat output -->
print "<div class='chatoutput'>" . format_shout($text) . "</div>";
}
}
}
示例13: windowunder
}
if ($resu) {
if ($XBTT_USE) {
$rowuser["username"] = $row["username"];
$rowuser["id"] = $row["uid"];
$rowuser["flagpic"] = $row["flagpic"];
$rowuser["name"] = $row["name"];
} else {
$rowuser = $resu[0];
}
if ($rowuser && $rowuser["id"] > 1) {
if ($GLOBALS["usepopup"]) {
$peers[$i]["USERNAME"] = "<a href=\"javascript: windowunder('index.php?page=userdetails&id=" . $rowuser["id"] . "')\">" . user_with_color(unesc($rowuser["username"])) . get_user_icons($rowuser) . "</a>";
$peers[$i]["PM"] = "<a href=\"javascript: windowunder('index.php?page=usercp&do=pm&action=edit&uid={$CURUSER['uid']}&what=new&to=" . urlencode(unesc($rowuser["username"])) . "')\">" . image_or_link("{$STYLEPATH}/images/pm.png", "", "PM") . "</a>";
} else {
$peers[$i]["USERNAME"] = "<a href=\"index.php?page=userdetails&id=" . $rowuser["id"] . "\">" . user_with_color(unesc($rowuser["username"])) . get_user_icons($rowuser) . "</a>";
$peers[$i]["PM"] = "<a href=\"index.php?page=usercp&do=pm&action=edit&uid=" . $CURUSER["uid"] . "&what=new&to=" . urlencode(unesc($rowuser["username"])) . "\">" . image_or_link("{$STYLEPATH}/images/pm.png", "", "PM") . "</a>";
}
} else {
$peers[$i]["USERNAME"] = $language["GUEST"];
$peers[$i]["PM"] = "";
}
} else {
$peers[$i]["USERNAME"] = $language["GUEST"];
$peers[$i]["PM"] = "";
}
if ($row["flagpic"] != "" && $row["flagpic"] != "unknown.gif") {
$peers[$i]["FLAG"] = "<img src=\"images/flag/" . $row["flagpic"] . "\" alt=\"" . unesc($row["name"]) . "\" />";
} elseif ($rowuser["flagpic"] != "" && !empty($rowuser["flagpic"])) {
$peers[$i]["FLAG"] = "<img src=\"images/flag/" . $rowuser["flagpic"] . "\" alt=\"" . unesc($rowuser["name"]) . "\" />";
} else {
示例14: mysql_query
if ($user["invitari"] > 0)
{
$auxres = mysql_query("SELECT username FROM users WHERE id=$user[invitari]");
$array = mysql_fetch_array($auxres);
$invitari = $array["username"];
if ($invitari == "")
$invitari = "<i>[Deleted]</i>";
else
$invitari = "<a href=userdetails.php?id=$user[invitari]>$invitari</a>";
}
else
$invitari = "--";
echo "<tr><td><b><a href='userdetails.php?id=" . $user['id'] . "'>" .
$user['username']."</a></b>" . get_user_icons($user) . "</td>".
"<td>" . ratios($user['uploaded'], $user['downloaded']) . "</td>
<td>" . $user['email'] . "</td><td>" . $ipstr . "</td>
<td><div align=center>" . $user['last_access'] . "</div></td>
<td><div align=center><b><a href=iphistory.php?id=" . $user['id'] . ">" . $iphistory.
"</a></b></div></td>
<td><div align=center>" . $user['access'] . "</div></td>
<td><div align=center>" . $user['added'] . "</div></td>
<td><div align=center>" . $invitari . "</div></td>
</tr>\n";
}
echo "</table>";
if ($count > $perpage)
echo $pagerbottom;
end_frame();
示例15: mysql_fetch_assoc
$arr = mysql_fetch_assoc($res);
$country = "<td class='embedded'><img src=\"{$TBDEV['pic_base_url']}flag/{$arr['flagpic']}\" alt=\"" . htmlspecialchars($arr['name']) . "\" style='margin-left: 8pt' /></td>";
}
//if ($user["donor"] == "yes") $donor = "<td class='embedded'><img src='{$TBDEV['pic_base_url']}starbig.gif' alt='Donor' style='margin-left: 4pt' /></td>";
//if ($user["warned"] == "yes") $warned = "<td class='embedded'><img src=\"{$TBDEV['pic_base_url']}warnedbig.gif\" alt='Warned' style='margin-left: 4pt' /></td>";
$res = mysql_query("SELECT p.torrent, p.uploaded, p.downloaded, p.seeder, t.added, t.name as torrentname, t.size, t.category, t.seeders, t.leechers, c.name as catname, c.image FROM peers p LEFT JOIN torrents t ON p.torrent = t.id LEFT JOIN categories c ON t.category = c.id WHERE p.userid={$id}") or sqlerr();
while ($arr = mysql_fetch_assoc($res)) {
if ($arr['seeder'] == 'yes') {
$seeding[] = $arr;
} else {
$leeching[] = $arr;
}
}
$HTMLOUT = '';
$enabled = $user["enabled"] == 'yes';
$HTMLOUT .= "<p></p><table class='main' border='0' cellspacing='0' cellpadding='0'>" . "<tr><td class='embedded'><h1 style='margin:0px'>{$user['username']}" . get_user_icons($user, true) . "</h1></td>{$country}</tr></table><p></p>\n";
if (!$enabled) {
$HTMLOUT .= "<p><b>{$lang['userdetails_disabled']}</b></p>\n";
} elseif ($CURUSER["id"] != $user["id"]) {
$r = mysql_query("SELECT id FROM friends WHERE userid={$CURUSER['id']} AND friendid={$id}") or sqlerr(__FILE__, __LINE__);
$friend = mysql_num_rows($r);
$r = mysql_query("SELECT id FROM blocks WHERE userid={$CURUSER['id']} AND blockid={$id}") or sqlerr(__FILE__, __LINE__);
$block = mysql_num_rows($r);
if ($friend) {
$HTMLOUT .= "<p>(<a href='friends.php?action=delete&type=friend&targetid={$id}'>{$lang['userdetails_remove_friends']}</a>)</p>\n";
} elseif ($block) {
$HTMLOUT .= "<p>(<a href='friends.php?action=delete&type=block&targetid={$id}'>{$lang['userdetails_remove_blocks']}</a>)</p>\n";
} else {
$HTMLOUT .= "<p>(<a href='friends.php?action=add&type=friend&targetid={$id}'>{$lang['userdetails_add_friends']}</a>)";
$HTMLOUT .= " - (<a href='friends.php?action=add&type=block&targetid={$id}'>{$lang['userdetails_add_blocks']}</a>)</p>\n";
}