0) { $torrents = "\n" . "\n"; while ($a = mysql_fetch_assoc($r)) { $r2 = sql_query("SELECT name, image FROM categories WHERE id=$a[category]") or sqlerr(__FILE__, __LINE__); $a2 = mysql_fetch_assoc($r2); $cat = "\"$a2[name]\""; $torrents .= "" . "\n"; } $torrents .= "
".str12."".str13."".str14."".str15."
$cat" . htmlspecialchars($a["name"]) . "$a[seeders]$a[leechers]
"; } if ($user["ip"] && (get_user_class() >= UC_MODERATOR || $user["id"] == $CURUSER["id"])) { $r = sql_query("SELECT snatched.torrent_name as name, snatched.torrentid as id, snatched.torrent_category as category, snatched.uploaded, snatched.downloaded, snatched.completedat, snatched.last_action, torrents.seeders, torrents.leechers FROM snatched JOIN torrents ON torrents.id = snatched.torrentid WHERE snatched.finished='yes' AND userid=$id ORDER BY torrent_name") or sqlerr(); if (mysql_num_rows($r) > 0) { $completed = "\n" . "\n"; while ($a = mysql_fetch_assoc($r)) { $r2 = sql_query("SELECT name, image FROM categories WHERE id=$a[category]") or sqlerr(__FILE__, __LINE__); $a2 = mysql_fetch_assoc($r2); if ($a["downloaded"] > 0) { $ratio = number_format($a["uploaded"] / $a["downloaded"], 3); $ratio = "$ratio"; } else if ($a["uploaded"] > 0) $ratio = "Inf."; else $ratio = "---"; $uploaded =mksize($a["uploaded"]); $downloaded = mksize($a["downloaded"]); $cat = "\"$a2[name]\""; $completed .= "" . "\n"; } $completed .= "
".str16."".str17."".str18."".str19."".str20."".str21."".str22."".str23."".str24."
$cat" . htmlspecialchars($a["name"]) . "$a[seeders]$a[leechers]$uploaded$downloaded$ratio$a[completedat]$a[last_action]
"; } $ip = $user["ip"]; $dom = @gethostbyaddr($user["ip"]); if ($dom == $user["ip"] || @gethostbyname($dom) != $user["ip"]) $addr = $ip; else { $dom = strtoupper($dom); $domparts = explode(".", $dom); $domain = $domparts[count($domparts) - 2]; if ($domain == "COM" || $domain == "CO" || $domain == "NET" || $domain == "NE" || $domain == "ORG" || $domain == "OR" ) $l = 2; else $l = 1; $addr = "$ip ($dom)"; } } if ($user[added] == "0000-00-00 00:00:00") $joindate = 'N/A'; else $joindate = "$user[added] (" . get_elapsed_time(sql_timestamp_to_unix_timestamp($user["added"])) . " ago)"; $lastseen = $user["last_access"]; if ($lastseen == "0000-00-00 00:00:00") $lastseen = str25; else { $lastseen .= " (" . get_elapsed_time(sql_timestamp_to_unix_timestamp($lastseen)) . " ago)"; } $res = sql_query("SELECT COUNT(*) FROM comments WHERE user=" . $user[id]) or sqlerr(); $arr3 = mysql_fetch_row($res); $torrentcomments = $arr3[0]; $res = sql_query("SELECT COUNT(*) FROM posts WHERE userid=" . $user[id]) or sqlerr(); $arr3 = mysql_fetch_row($res); $forumposts = $arr3[0]; $res = sql_query("SELECT name FROM clientselect WHERE id=$user[clientselect] LIMIT 1") or sqlerr(); if (mysql_num_rows($res) == 1) { $arr = mysql_fetch_assoc($res); $clientselect = "$arr[name]"; } $res = sql_query("SELECT name,flagpic FROM countries WHERE id=$user[country] LIMIT 1") or sqlerr(); if (mysql_num_rows($res) == 1) { $arr = mysql_fetch_assoc($res); $country = "\"$arr[name]\""; } $res = sql_query("SELECT name FROM downloadspeed WHERE id=$user[download] LIMIT 1") or sqlerr(); if (mysql_num_rows($res) == 1) { $arr = mysql_fetch_assoc($res); $download = "\"".str26.": $arr[name]"; } $res = sql_query("SELECT name FROM uploadspeed WHERE id=$user[upload] LIMIT 1") or sqlerr(); if (mysql_num_rows($res) == 1) { $arr = mysql_fetch_assoc($res); $upload = "\"".str27.": $arr[name]"; } if ($user["gender"] == "Male") $gender = "".str28.""; elseif ($user["gender"] == "Female") $gender = "".str29.""; elseif ($user["gender"] == "N/A") $gender = "".str30.""; $res = sql_query("SELECT torrent,added,uploaded,downloaded,torrents.name as torrentname,categories.name as catname,size,image,category,seeders,leechers FROM peers LEFT JOIN torrents ON peers.torrent = torrents.id LEFT JOIN categories ON torrents.category = categories.id WHERE userid=$id AND seeder='no'") or sqlerr(); if (mysql_num_rows($res) > 0) $leeching = maketable($res); $res = sql_query("SELECT torrent,added,uploaded,downloaded,torrents.name as torrentname,categories.name as catname,size,image,category,seeders,leechers FROM peers LEFT JOIN torrents ON peers.torrent = torrents.id LEFT JOIN categories ON torrents.category = categories.id WHERE userid=$id AND seeder='yes'") or sqlerr(); if (mysql_num_rows($res) > 0) $seeding = maketable($res); stdhead(str31." " . $user["username"]); $enabled = $user["enabled"] == 'yes'; print("

". "$country

$user[username]" . get_user_icons($user, true) . "

\n"); if (!$enabled) print("

".str32."

\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("

(".str33.")

\n"); elseif($block) print("

(".str34.")

\n"); else { print("

(".str35.")"); print(" - (".str36.")

\n"); } } begin_main_frame('100%'); ?> = UC_MODERATOR) OR $CURUSER[id] == $user[id]){ if ($CURUSER[id] == $user[id] || get_user_class() >= UC_ADMINISTRATOR) print("

".str37." ".str38."

\n"); if ($CURUSER[id] == $user[id] || get_user_class() >= UC_ADMINISTRATOR) if ($user["invites"] <= 0) print("\n"); else print("\n"); else if ($CURUSER[id] != $user[id] || get_user_class() != UC_ADMINISTRATOR) if ($user["invites"] <= 0) print("\n"); else print("\n"); if ($user["invited_by"] > 0) { $get_inveter_name = sql_query("SELECT username FROM users WHERE id = ".sqlesc($user[invited_by])) or sqlerr(__FILE__, __LINE__); $inviter_name = mysql_fetch_assoc($get_inveter_name); print("\n"); } ?> = UC_MODERATOR OR $user["privacy"] == "low") { print("\n"); } ?> = UC_MODERATOR) { $ip_res = sql_query("SELECT * FROM ips WHERE userid = $id") or die(mysql_error()); print("\n"); if ($addr) print("\n"); $resip = sql_query("SELECT ip FROM iplog WHERE userid =$id GROUP BY ip") or sqlerr(__FILE__, __LINE__); $iphistory = mysql_num_rows($resip); if ($iphistory > 0) print("\n"); } if ($user["clientselect"] > 0) print("\n"); ?> 0) { $sr = $user["uploaded"] / $user["downloaded"]; if ($sr >= 4) $s = "w00t"; else if ($sr >= 2) $s = "grin"; else if ($sr >= 1) $s = "smile1"; else if ($sr >= 0.5) $s = "noexpression"; else if ($sr >= 0.25) $s = "sad"; else $s = "cry"; $sr = floor($sr * 1000) / 1000; $sr = "
".str39."".str40."
".str39."$user[invites]
".str39."".str40."
".str39."$user[invites]
".str41."$inviter_name[username]
".str45."$user[email]
$user[icq]
\n"); if ($user["msn"]) print("msn $user[msn]
\n"); if ($user["aim"]) print("aim $user[aim]
\n"); if ($user["yahoo"]) print("yahoo $user[yahoo]
\n"); if ($user["skype"]) print(" $user[skype]\n"); ?>
".str47.""); while ($arr = mysql_fetch_assoc($ip_res)) { echo " $arr[ip] ::"; } print("
".str48."$addr
".str49."".str50." " . $iphistory. " ".str51."
".str52."$clientselect
" . number_format($sr, 3) . "  
"; print("".str55."$sr\n"); } if ($user["download"] && $user["upload"]) print("".str56."$download $upload\n"); print("".str57."$gender\n"); if ($user['donated'] > 0 && (get_user_class() >= UC_MODERATOR || $CURUSER["id"] == $user["id"])) print("".str58."$".htmlspecialchars($user[donated])."\n"); if ($user["avatar"]) print("".str59."\n"); $uclass = get_user_class_name($user['class']); print("".str60." ".($user[title]!=="" ? " (Title: ".htmlspecialchars(trim($user["title"])).")" : "" )."\n"); print("Torrent comments"); if ($torrentcomments && (($user["class"] >= UC_POWER_USER && $user["id"] == $CURUSER["id"]) || get_user_class() >= UC_MODERATOR)) print("$torrentcomments\n"); else print("$torrentcomments\n"); print("Forum posts"); if ($forumposts && (($user["class"] >= UC_POWER_USER && $user["id"] == $CURUSER["id"]) || get_user_class() >= UC_MODERATOR)) { print("$forumposts\n"); print("Karma Points:" . htmlspecialchars($user[seedbonus]) . "\n"); } else print("$forumposts\n"); if ($torrents) print("Uploaded Torrents\"Show/Hide\" [Show/Hide]

$torrents

\n"); if ($seeding) print("Current Seeds\"Show/Hide\" [Show/Hide]

$seeding

\n"); if ($leeching) print("Current Leechs\"Show/Hide\" [Show/Hide]

$leeching

\n"); if ($completed) print("Completed Torrents\"Show/Hide\" [Show/Hide]

$completed

\n"); if ($user["info"]) print("" . format_comment($user["info"]) . "\n"); }else { print("Sorry, public access denied by $user[username]. He/She want to protect his details.\n"); } if ($CURUSER["id"] != $user["id"]) if (get_user_class() >= UC_MODERATOR) $showpmbutton = 1; elseif ($user["acceptpms"] == "yes") { $r = sql_query("SELECT id FROM blocks WHERE userid=$user[id] AND blockid=$CURUSER[id]") or sqlerr(__FILE__,__LINE__); $showpmbutton = (mysql_num_rows($r) == 1 ? 0 : 1); } elseif ($user["acceptpms"] == "friends") { $r = sql_query("SELECT id FROM friends WHERE userid=$user[id] AND friendid=$CURUSER[id]") or sqlerr(__FILE__,__LINE__); $showpmbutton = (mysql_num_rows($r) == 1 ? 1 : 0); } print(""); if ($showpmbutton) print(""); print(""); $q = sql_query("SELECT minclasstoedit,maxclasstoedit FROM usergroups WHERE id = $user[class]"); $q = mysql_fetch_assoc($q); if($q['minclasstoedit'] <= get_user_class() AND $q['maxclasstoedit'] >= get_user_class()) echo ""; print(""); print("\n"); end_main_frame(); stdfoot(); ?>