$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'] = '******'; } $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>';
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>";
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>";
$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']; }
$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"] = "******"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;
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();
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";
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();
$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="******"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="******"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>");
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>";
} 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"; }
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>"; } } }
} 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"] = "******"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"] = "******"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 {
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();
$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"; }
$pc = count($res); $pn = 0; $posts = array(); $page = isset($page) ? $page > 0 ? max(1, $page) : 1 : 1; $post_number = $postsperpage * ($page - 1) + 1; foreach ($res as $id => $arr) { $posterid = $arr["userid"]; // DT immunity if ($arr["immunity"] == 'yes') { $imm = "<img src='images/shield.png' alt='User Have Immunity !' title='User Have Immunity !' />"; } else { $imm = ""; } // DT immunity if ($arr["username"]) { $posts[$pn]["username"] = ($arr["userid"] > 1 ? "<a href=\"index.php?page=userdetails&id=" . $arr["userid"] . "\">" . unesc($arr["prefixcolor"]) . unesc($arr["username"]) . unesc($arr["suffixcolor"]) . "</a>" : unesc($arr["username"])) . get_user_icons($arr) . warn($arr) . $imm; } else { $posts[$pn]["username"] = $language["MEMBER"] . "[" . $arr["userid"] . "]"; } // DT reputation system start $reput = do_sqlquery("SELECT * FROM {$TABLE_PREFIX}reputation_settings WHERE id =1"); $setrep = mysqli_fetch_array($reput); $forumtpl->set("forum_reputation", $setrep["rep_is_online"] == "true" ? TRUE : FALSE, TRUE); if ($setrep["rep_is_online"] == 'false') { //do nothing } else { if ($arr["reputation"] == 0) { $reput = "<img src='images/rep/reputation_balance.gif' alt='" . $setrep["no_level"] . "' title='" . $setrep["no_level"] . "' />"; } if ($arr["reputation"] >= 1) { $reput = "<img src='images/rep/reputation_pos.gif' alt='" . $setrep["good_level"] . "' title='" . $setrep["good_level"] . "' />";
} if ($row["up_med"] >= 3) { $upl = "<img src='images/goblet/medaille_or.gif' alt='Gold Medal' title='Gold Medal' />"; } // DT Uploader Medals // DT arcade if ($row["trophy"] == 0) { $rra = ""; } if ($row["trophy"] == 1) { $rra = "<img src='images/crown.gif' alt='Arcade King' title='Arcade King' />"; } // DT arcade $style = style_list(); $langue = language_list(); print "\n<form name=\"jump\" method=\"post\" action=\"index.php\">\n<table class=\"poller\" width=\"100%\" cellspacing=\"0\">\n<tr><td align=\"center\">" . $language["USER_NAME"] . ":<a href='index.php?page=userdetails&id=" . $CURUSER["uid"] . "'> " . user_with_color(unesc($CURUSER["username"] . immunity($CURUSER) . get_user_icons($CURUSER)), $CURUSER["prefixcolor"], $CURUSER["suffixcolor"]) . $rra . $upl . warn($CURUSER) . "</a></td></tr>\n"; print "<tr><td align=\"center\">" . $language["USER_LEVEL"] . ": " . $CURUSER["level"] . "</td></tr>\n"; // DT reputation system start $reput = do_sqlquery("SELECT * FROM {$TABLE_PREFIX}reputation_settings WHERE id =1"); $setrep = mysqli_fetch_array($reput); if ($setrep["rep_is_online"] == 'false') { //do nothing } else { if ($row["reputation"] == 0) { $rep = "<img src='images/rep/reputation_balance.gif' alt='" . $setrep["no_level"] . "' title='" . $setrep["no_level"] . "' />"; } if ($row["reputation"] >= 1) { $rep = "<img src='images/rep/reputation_pos.gif' alt='" . $setrep["good_level"] . "' title='" . $setrep["good_level"] . "' />"; } if ($row["reputation"] <= -1) { $rep = "<img src='images/rep/reputation_neg.gif' alt='" . $setrep["bad_level"] . "' title='" . $setrep["bad_level"] . "' />";
} if ($arr["downloaded"] != 0) { $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3); } else { $ratio = "---"; } $ratio = "<font color=" . get_ratio_color($ratio) . ">{$ratio}</font>"; $uploaded = mksize($arr["uploaded"]); $downloaded = mksize($arr["downloaded"]); $added = substr($arr['added'], 0, 10); $last_access = substr($arr['last_access'], 0, 10); if ($uc % 2 == 0) { $utc = ""; } else { $utc = " bgcolor=\"ECE9D8\""; } /*$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'] . "'>" . get_user_class_color($arr['class'], $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><span style=\"font-weight: bold;\">{$arr['ip']}</span></td>\n<td align=center>" . ($arr['peer_count'] > 0 ? "<span style=\"color: red; font-weight: bold;\">Да</span>" : "<span style=\"color: green; font-weight: bold;\">Нет</span>") . "</td></tr>\n"; $ip = $arr["ip"]; } } } } } else { print "<br /><table width=60% border=1 cellspacing=0 cellpadding=9><tr><td align=center>"; print "<h2>Извините, только для администрации</h2></table></td></tr>"; } end_frame(); end_table(); stdfoot();
} $expectdetailstpl->set("NO_COMMENTS", true, TRUE); } else { $expectdetailstpl->set("NO_COMMENTS", false, TRUE); if ($CURUSER["uid"] > 1) { $expectdetailstpl->set("INSERT_COMMENT", TRUE, TRUE); } else { $expectdetailstpl->set("INSERT_COMMENT", false, TRUE); } $comments = array(); $count = 0; foreach ($subres as $iid => $subrow) { $level = do_sqlquery("SELECT level FROM {$TABLE_PREFIX}users_level WHERE id_level='{$subrow['id_level']}'"); $lvl = mysqli_fetch_assoc($level); $title = "" . $lvl['level'] . ""; $comments[$count]["user"] = "******"index.php?page=userdetails&id=" . $subrow["uid"] . "\">" . user_with_color($subrow["user"]) . get_user_icons($row) . "</a> .::. " . $title; $comments[$count]["date"] = date("d/m/Y H.i.s", $subrow["data"] - $offset); // only users able to delete torrents can delete comments... if ($CURUSER["delete_torrents"] == "yes") { $comments[$count]["delete"] = "<a onclick=\"return confirm('" . str_replace("'", "\\'", $language["DELETE_CONFIRM"]) . "')\" href=\"index.php?page=offer_comment&id={$id}&cid=" . $subrow["id"] . "&action=delete\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>"; } $comments[$count]["comment"] = format_comment($subrow["text"]); $comments[$count]["elapsed"] = "(" . get_elapsed_time($subrow["data"]) . " ago)"; $comments[$count]["avatar"] = "<img onload=\"resize_avatar(this);\" src=\"" . ($subrow["avatar"] && $subrow["avatar"] != "" ? htmlspecialchars($subrow["avatar"]) : "{$STYLEURL}/images/default_avatar.gif") . "\" alt=\"\" />"; $comments[$count]["ratio"] = "<img src=\"images/arany.png\"> " . (intval($subrow['downloaded']) > 0 ? number_format($subrow['uploaded'] / $subrow['downloaded'], 2) : "---"); $comments[$count]["uploaded"] = "<img src=\"images/speed_up.png\"> " . makesize($subrow["uploaded"]); $comments[$count]["downloaded"] = "<img src=\"images/speed_down.png\"> " . makesize($subrow["downloaded"]); $count++; } unset($subrow); unset($subres);
} $message = '<h1>Success! <b>' . $arr_name['username'] . '</b> deleted from your shit list!</h1>'; } // === default page stdhead("Shit list for " . $CURUSER['username']); echo $message . '<br><table width=750 border=0 cellspacing=0 cellpadding=0><tr><td class=colhead align=center valigh=top><h1>Shit List for ' . $CURUSER['username'] . '</h1>' . '<img src=pic/smilies/shit.gif alt=shit> shittiest at the top <img src=pic/smilies/shit.gif alt=shit></td></tr>' . '<tr><td class=embedded><table width=750 border=1 cellspacing=0 cellpadding=5><tr><td>'; $i = 0; $res = mysql_query("SELECT s.suspect as id, s.text, s.shittyness, s.added AS shit_list_added, u.username AS name, u.added, u.class, u.avatar, u.donor, u.warned, u.enabled, u.last_access FROM shit_list AS s LEFT JOIN users as u ON s.suspect = u.id WHERE userid={$CURUSER['id']} ORDER BY shittyness DESC") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($res) == 0) { $shit_list = '<p align=center>Your shit list is empty.</p>'; } else { while ($shit_list = mysql_fetch_array($res)) { $class_name = get_user_class_name($shit_list['class']); $poop = 1; while ($poop <= $shit_list['shittyness']) { $shit .= ' <img src=pic/smilies/shit.gif title="' . $shit_list['shittyness'] . ' out of 10 on the sittyness scale">'; $poop++; } $main = '<a class=altlink href=userdetails.php?id=' . $shit_list['id'] . '><b>' . $shit_list['name'] . '</b></a>' . get_user_icons($shit_list) . '<b> [ ' . $class_name . ' ]</b> ' . $shit . '<br><b>joined:</b> ' . $shit_list['added'] . ' [ ' . get_elapsed_time(sql_timestamp_to_unix_timestamp($shit_list['added'])) . ' ago ]' . '<br><b>added to shit list:</b> ' . $shit_list['shit_list_added'] . ' [ ' . get_elapsed_time(sql_timestamp_to_unix_timestamp($shit_list['shit_list_added'])) . ' ago ]<br>' . '<b>last seen:</b> ' . display_date_time($shit_list['last_access']) . ' [ ' . get_elapsed_time(sql_timestamp_to_unix_timestamp($shit_list['last_access'])) . ' ago ]<hr>' . format_comment($shit_list['text']); $buttons = '<br><a class=altlink href=?action=delete&shit_list_id=' . $shit_list['id'] . '>remove</a>' . '<br><br><a class=altlink href=sendmessage.php?receiver=' . $shit_list['id'] . '>PM</a>'; $avatar = !$shit_list['avatar'] ? 'pic/default_avatar.gif' : safechar($shit_list['avatar']); $avatar = $CURUSER['avatars'] == 'yes' ? $avatar : ''; echo $i % 2 == 0 ? '<table width=100% hight=100%><tr><td width=50% align=center>' : '<td width=50% align=center hight=100%>'; echo '<table width=100% hight=100%><tr valign=top><td width=80 align=center valign=top>' . ($avatar ? '<img width=80px src=' . $avatar . '>' : '') . '</td><td><table width=420 hight=100%><tr><td class=embedded>' . $main . '</td>' . '<td class=embedded valign=top align=center>' . $buttons . '</td></tr></table></td></tr></td></tr></table>'; echo $i % 2 == 1 ? '</td></tr></table>' : '</td>'; $shit = ''; $i++; } } echo ($i % 2 == 1 ? '<td width=50%> </td></tr></table>' : '') . $shit_list . '</td></tr></table>' . '</td></tr></table><p align=center><a class=altlink href=users.php><b>Find User/Browse User List</b></a></p>'; stdfoot();
$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>Listinn þinn yfir hunsaða notendur er tómur</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>" . $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=5><tr><td class=embedded>"); print("<h2 align=left><a name=\"blocks\">Hunsaðir notendur</a></h2></td></tr>"); print("<tr class=tableb><td style='padding: 10px;'>"); print("$blocks\n"); print("</td></tr></table>\n"); print("</td></tr></table>\n"); print("<p><a href=users.php><b>Finna notanda/skoða notendalista</b></a></p>"); stdfoot();
} if ($month2 == $month1) { if ($day2 < $day1) { $age = $year2 - $year1 - 1; } else { $age = $year2 - $year1; } } if ($month2 > $month1) { $age = $year2 - $year1; } } // /////////////// Birthday mod///////////////////// stdhead("Details for " . $user["username"]); $enabled = $user["enabled"] == 'yes'; echo "<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>{$gender}{$parked}{$anonymous}{$chatpost}{$downloadpos}{$uploadpos}{$forumpost}{$country}</tr></table></p>\n"; if (!$enabled) { echo "<p><b>This account has been disabled</b></p>\n"; } if ($user["showfriends"] == "yes" || get_user_class() >= UC_USER) { if ($CURUSER["id"] != $user["id"]) { echo "<p>(<a href=" . $DEFAULTBASEURL . "/usercomment.php?action=add&userid={$id}>add comment</a>)"; $r = sql_query("SELECT id, friendid FROM friends WHERE (userid={$CURUSER['id']} OR userid={$id}) AND (friendid={$id} OR friendid={$CURUSER['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) { echo " - (<a href=" . $DEFAULTBASEURL . "/friends.php?action=delete&type=friend&targetid={$id}>remove from friends</a>)\n"; } elseif ($block) { echo " - (<a href=" . $DEFAULTBASEURL . "/friends.php?action=delete&type=block&targetid={$id}>remove from blocks</a>)\n"; } else {
} else { $ipstr = "---"; } $auxres = mysql_query("SELECT SUM(uploaded) AS pul, SUM(downloaded) AS pdl FROM peers WHERE userid = " . $user['id']) or sqlerr(__FILE__, __LINE__); $array = mysql_fetch_array($auxres); $pul = $array['pul']; $pdl = $array['pdl']; $auxres = mysql_query("SELECT COUNT(DISTINCT p.id) FROM posts AS p LEFT JOIN topics as t ON p.topicid = t.id\r\n \tLEFT JOIN forums AS f ON t.forumid = f.id WHERE p.userid = " . $user['id'] . " AND f.minclassread <= " . $CURUSER['class']) or sqlerr(__FILE__, __LINE__); $n = mysql_fetch_row($auxres); $n_posts = $n[0]; $auxres = mysql_query("SELECT COUNT(id) FROM comments WHERE user = "******"SELECT COUNT(c.id) FROM comments AS c LEFT JOIN torrents as t ON c.torrent = t.id WHERE c.user = '******'id']."'") or sqlerr(__FILE__, __LINE__); $n = mysql_fetch_row($auxres); $n_comments = $n[0]; 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>\r\n <td>" . $ipstr . "</td><td>" . $user['email'] . "</td>\r\n <td><div align=center>" . $user['added'] . "</div></td>\r\n <td><div align=center>" . $user['last_access'] . "</div></td>\r\n <td><div align=center>" . $user['status'] . "</div></td>\r\n <td><div align=center>" . $user['enabled'] . "</div></td>\r\n <td><div align=center>" . ratios($pul, $pdl) . "</div></td>" . "<td><div align=right>" . prefixed($pul) . "</div></td>\r\n <td><div align=right>" . prefixed($pdl) . "</div></td>\r\n <td><div align=center>" . ($n_posts ? "<a href=/userhistory.php?action=viewposts&id=" . $user['id'] . ">{$n_posts}</a>" : $n_posts) . "|" . ($n_comments ? "<a href=/userhistory.php?action=viewcomments&id=" . $user['id'] . ">{$n_comments}</a>" : $n_comments) . "</div></td></tr>\n"; } echo "</table>"; if ($count > $perpage) { echo "{$pagerbottom}"; } ?> <br><br> <form method=post action=/new_announcement.php> <table border="1" cellpadding="5" cellspacing="0"> <tr> <td> <div align="center"> <input name="n_pms" type="hidden" value="<?php print $count; ?>
if($arr["downloaded"] != 0) $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3); else $ratio="---"; $ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>"; $uploaded = mksize($arr["uploaded"]); $downloaded = mksize($arr["downloaded"]); $added = substr($arr['added'],0,10); $last_access = substr($arr['last_access'],0,10); if($uc%2 == 0) $utc = "a08f74"; else $utc = "bbaf9b"; echo '<tr bgcolor="#'.$utc.'"><td align=left><b><a href="userdetails.php?id=' . $arr['id'] . '">' . $arr['username'].'</b></a>' . get_user_icons($arr) . '</td> <td align=center>'.$arr[email].'</td> <td align=center>'.$added.'</td> <td align=center>'.$last_access.'</td> <td align=center>'.$downloaded.'</td> <td align=center>'.$uploaded.'</td> <td align=center>'.$ratio.'</td> <td align=center>'.gethostbyaddr_with_cache($arr[ip]).'</td></tr>'."\n"; $ip = $arr[ip]; } } } } } else {
} else { $ipstr = "<a href='/testip.php?ip=" . $user['last_ip'] . "'><font color='#FF0000'><b>" . $user['last_ip'] . "</b></font></a>"; } } else { $ipstr = "---"; } $resip = mysql_query("SELECT ip FROM iplog WHERE userid=" . $user['id'] . " GROUP BY userid") or sqlerr(__FILE__, __LINE__); $iphistory = mysql_num_rows($resip); if ($user["invited_by"] > 0) { $auxres = mysql_query("SELECT username FROM users WHERE id={$user['invited_by']}"); $array = mysql_fetch_array($auxres); $invited_by = $array["username"]; if ($invited_by == "") { $invited_by = "<i>[Deleted]</i>"; } else { $invited_by = "<a href=userdetails.php?id={$user['invited_by']}>{$invited_by}</a>"; } } else { $invited_by = "--"; } 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>\r\n<td>" . $user['email'] . "</td><td>" . $ipstr . "</td>\r\n<td><div align=center>" . $user['last_access'] . "</div></td>\r\n<td><div align=center><b><a href=iphistory.php?id=" . $user['id'] . ">" . $iphistory . "</a></b></div></td>\r\n<td><div align=center>" . $user['access'] . "</div></td>\r\n<td><div align=center>" . $user['added'] . "</div></td>\r\n<td><div align=center>" . $invited_by . "</div></td>\r\n</tr>\n"; } echo "</table>"; if ($count > $perpage) { echo $pagerbottom; } end_frame(); } end_main_frame(); stdfoot(); die;
$res3 = mysql_query("SELECT * FROM peers WHERE torrent=$_GET[id] AND userid=$arr[userid]"); $arr3 = mysql_fetch_assoc($res3); if ($arr["downloaded"] > 0) { $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3); $ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>"; } else if ($arr["uploaded"] > 0) $ratio = "Inf."; else $ratio = "---"; $uploaded =mksize($arr["uploaded"]); $downloaded = mksize($arr["downloaded"]); print("<tr><td><a href=userdetails.php?id=$arr[userid]><b>$arr[username]</b></a></td><td align=left>$uploaded</td><td align=left>$downloaded</td><td align=left>$ratio</td><td><form method=get action=sendmessage.php><input type=hidden name=receiver value=" . $arr[userid]."><input type=submit value=\"P M: $arr[username]\" style='height: 22px'></form><form method=post action=report.php?user=$arr[userid]></td><td align=left><input type=submit value=\"Report: $arr[username]\" style='height: 23px'></form></td><td align=center>" . get_user_icons($arr2, true) . " ".("'".$arr2['last_access']."'">$dt?"<img src=".$pic_base_url."online.gif border=0 alt=\"Online\">":"<img src=".$pic_base_url."offline.gif border=0 alt=\"Offline\">" )."</td>"." <td align=center>" . ($arr3["seeder"] == "yes" ? "<b><font color=green>Yes</font>" : "<font color=red>No</font></b>") . "</td></tr>\n"); } print("</table>\n"); echo $pagerbottom; } stdfoot(); ?>
// === Action: Delete subscription if ($_GET["delete"]) { if (!isset($_POST[deletesubscription])) { stderr("Error", "Nothing selected"); } $checked = $_POST['deletesubscription']; foreach ($checked as $delete) { sql_query("DELETE FROM subscriptions WHERE userid = {$CURUSER['id']} AND topicid=" . sqlesc($delete)); } header("Refresh: 0; url={$DEFAULTBASEURL}/subscriptions.php?deleted=1"); } // ===end $res = sql_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 class=altlink href=userdetails.php?id={$userid}><b>{$arr['username']}</b></a>" . get_user_icons($arr, true); } else { $subject = "unknown[{$userid}]"; } $where_is = "p.userid = {$userid} AND f.minclassread <= " . $CURUSER['class']; $order_is = "t.id DESC"; $from_is = "subscriptions AS p LEFT JOIN topics as t ON p.topicid = t.id LEFT JOIN forums AS f ON t.forumid = f.id LEFT JOIN readposts as r ON p.topicid = r.topicid AND p.userid = r.userid"; $select_is = "f.id AS f_id, f.name, t.id AS t_id, t.subject, t.lastpost, r.lastpostread, p.topicid"; $query = "SELECT {$select_is} FROM {$from_is} WHERE {$where_is} ORDER BY {$order_is} {$limit}"; $res = mysql_query($query) or sqlerr(__FILE__, __LINE__); stdhead("Subscriptions"); echo "<h4>Subscribed Forums for {$subject}</h4><p align=center>To be notified via PM when there is a new post, go to your <a class=altlink href=my.php>profile</a> and set <b><i>PM on Subscriptions</i></b> to yes</p>\n"; if ($_GET["deleted"]) { print "<h1>subscription(s) Deleted</h1>"; } // ------ Print table
} if ($subrow["warn"] == "yes") { $war = "<img src='images/warn.gif'>"; } else { $war = ""; } $level = do_sqlquery("SELECT level FROM {$TABLE_PREFIX}users_level WHERE id_level='{$subrow['id_level']}'"); $lvl = mysqli_fetch_assoc($level); if (!$subrow[uid]) { $title = "orphaned"; } elseif (!"{$subrow['custom_title']}") { $title = "" . $lvl['level'] . ""; } else { $title = unesc($subrow["custom_title"]); } $comments[$count]["user"] = "******"index.php?page=userdetails&id=" . $subrow["uid"] . "\">" . user_with_color(unesc($subrow["user"])) . get_user_icons($subrow) . $spp . $war; $comments[$count]["user"] .= "</a><br>Rank: " . $title; // DT reputation system start $reput = do_sqlquery("SELECT * FROM {$TABLE_PREFIX}reputation_settings WHERE id =1"); $setrep = mysqli_fetch_array($reput); $torrenttpl->set("comments_reputation", $setrep["rep_is_online"] == "true" ? TRUE : FALSE, TRUE); if ($setrep["rep_is_online"] == 'false') { //do nothing } else { if ($subrow["reputation"] == 0) { $reput = "<img src='images/rep/reputation_balance.gif' alt='" . $setrep["no_level"] . "' title='" . $setrep["no_level"] . "' />"; } if ($subrow["reputation"] >= 1) { $reput = "<img src='images/rep/reputation_pos.gif' alt='" . $setrep["good_level"] . "' title='" . $setrep["good_level"] . "' />"; } if ($subrow["reputation"] <= -1) {
} if ($rowuser["reputation"] >= 1) { $rep = "<a href=index.php?page=reputationpage > Reputace <img src='images/rep/reputation_pos.gif' border='0' alt='" . $setrep["good_level"] . "' title='" . $setrep["good_level"] . "' /></a>"; } if ($rowuser["reputation"] <= -1) { $rep = "<a href=index.php?page=reputationpage > Reputace <img src='images/rep/reputation_neg.gif'border='0' alt='" . $setrep["bad_level"] . "' title='" . $setrep["bad_level"] . "' /></a>"; } if ($rowuser["reputation"] >= 101) { $rep = "<a href=index.php?page=reputationpage > Reputace <img src='images/rep/reputation_highpos.gif' border='0' alt='" . $setrep["best_level"] . "' title='" . $setrep["best_level"] . "' /></a>"; } if ($rowuser["reputation"] <= -101) { $rep = "<a href=index.php?page=reputationpage > Reputace <img src='images/rep/reputation_highneg.gif'border='0' alt='" . $setrep["worse_level"] . "' title='" . $setrep["worse_level"] . "' /></a>"; } } // DT end reputation system print "<td class=\"blocklist\" align=\"center\" style=\"text-align:left;\">" . $language["WELCOME_BACK"] . "<a href='index.php?page=userdetails&id=" . $CURUSER["uid"] . "'> " . user_with_color($CURUSER["username"], $CURUSER["prefixcolor"], $CURUSER["suffixcolor"]) . get_user_icons($CURUSER) . warn($CURUSER) . $rra . $upr . $udo . $udob . $ubir . $umal . $ufem . $uban . $uwar . $upar . $ubot . $utrmu . $utrmo . $uvimu . $uvimo . $ufrie . $ujunk . $ustaf . $usys . " </a> \n"; if ($CURUSER["announce"] == "yes") { print "<td class=\"blocklist\" align=\"left\" style=\"text-align:left;\"><a href=\"index.php?page=announcement&uid=" . $CURUSER["uid"] . "\"><img src=\"images/ann.png\"></a></td>\n"; } print "<td class=\"blocklist\" align=\"left\" style=\"text-align:left;\">" . $rep . " \n"; print "<td class=\"blocklist\" align=\"left\" style=\"text-align:left;\">" . $col . "<font color='{$freec}'>{$till}" . ucfirst($post) . "</font> {$pic}</td>\n"; print "<td class=\"blocklist\" align=\"left\" style=\"text-align:center;\"><a class=\"mainmenu\" href=\"logout.php\"><img src=\"images/logout.png \" /></a></td>\n"; ?> </tr> </table> <?php if (!$CURUSER || $CURUSER["view_torrents"] == "no") { // do nothing } else { if ($XBTT_USE) { $res = get_result("select count(*) as tot, sum(f.seeds)+sum(ifnull(x.seeders,0)) as seeds, sum(f.leechers)+sum(ifnull(x.leechers,0)) as leechs FROM {$TABLE_PREFIX}files f LEFT JOIN xbt_files x ON f.bin_hash=x.info_hash", true, $btit_settings['cache_duration']);
# format posts foreach ($lastPosts as $post) { # get username $user = get_result('SELECT u.donor,u.warn,u.immunity,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'] = '******'; } if ($user["immunity"] == "yes") { $spp = "<img src='images/shield.png'>"; } else { $spp = ""; } $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'] . warn($user) . get_user_icons($user) . $spp . '</a><br />On ' . get_date_time($post['added']) . '</td></tr>'; } } } else { $postsList = '<tr><td class="lista">' . $language['NO_TOPIC'] . '</td></tr>'; } ?> <table cellpadding="4" cellspacing="1" width="100%"> <tr> <td class="lista"> <table width="100%" cellspacing="2" cellpadding="2"> <tr> <td><?php echo $language['TOPICS']; ?> :</td>