if ($days > 1) { $dayposts = round($forumposts / $days, 1); } if (!($postcount = $Cache->get_value('total_posts_count'))) { $postcount = get_row_count("posts"); $Cache->cache_value('total_posts_count', $postcount, 96400); } $percentages = round($forumposts * 100 / $postcount, 3) . "%"; } ?> <table border="0" cellspacing="0" cellpadding="5" width="940"> <?php tr_small($lang_usercp['row_join_date'], $joindate, 1); tr_small($lang_usercp['row_email_address'], $CURUSER['email'], 1); if ($enablelocation_tweak == 'yes') { list($loc_pub, $loc_mod) = get_ip_location($CURUSER["ip"]); tr_small($lang_usercp['row_ip_location'], $CURUSER["ip"] . " <span title='" . $loc_mod . "'>[" . $loc_pub . "]</span>", 1); } else { tr_small($lang_usercp['row_ip_location'], $CURUSER["ip"], 1); } if ($CURUSER["avatar"]) { tr_small($lang_usercp['row_avatar'], "<img src=\"" . $CURUSER["avatar"] . "\" border=0>", 1); } tr_small($lang_usercp['row_passkey'], $CURUSER["passkey"], 1); // CC98 ID if ($CURUSER["cc98id"]) { $cc98id_str = MessageFormatter::formatMessage('', '<a href="http://www.cc98.org/dispuser.asp?name={0}">{0}</a> <a href="/cc98id.php?action=edit">[{1}]</a> <a href="/cc98id.php?action=delete">[{2}]</a>', array($CURUSER["cc98id"], $res['cc98_id_action_edit'], $res['cc98_id_action_delete'])); } else { $cc98id_str = MessageFormatter::formatMessage('', '<span style="color: gray">{0}</span> <a href="/cc98id.php?action=new">[{1}]</a>', array($res['cc98_id_text_none'], $res['cc98_id_action_create'])); } tr_small($res['cc98_id_association_title'], $cc98id_str, 1);
$location['City'] = $city; $location["Longitude"] = $new_long; $location["Latitude"] = $new_lat; if ($new_lat == '') { include "logerror.php"; } else { $haydirec = true; } } // } // //Si el usuario no tiene direccion o si no la encontró por GEO, intentar localizar ip. if (!$haydirec && $_COOKIE["qcms_geo"] == "no") { include 'locate_ip_cache.php'; $location_data = get_ip_location($ip); $location['City'] = $location_data['City']; $location["CountryCode"] = $location_data["CountryCode"]; $location["Longitude"] = $location_data["Longitude"]; $location["Latitude"] = $location_data["Latitude"]; } // //Si hay direccion por GEO, procesala: if ($_COOKIE["qcms_lat"] && !$haydirec) { $location["Latitude"] = $_COOKIE["qcms_lat"]; $location["Longitude"] = $_COOKIE["qcms_lon"]; include 'get_city_gl.php'; $ver_city = ver_cit($location["Latitude"], $location["Longitude"]); $location['City'] = $ver_city["LocalityNamee"]; } //
function dltable($name, $arr, $torrent) { global $lang_viewpeerlist, $viewanonymous_class, $userprofile_class, $enablelocation_tweak; global $CURUSER; $s = "<b>" . count($arr) . " {$name}</b>\n"; if (!count($arr)) { return $s; } $s .= "\n"; $s .= "<table width=825 class=main border=1 cellspacing=0 cellpadding=3>\n"; $s .= "<tr><td class=colhead align=center width=1%>" . $lang_viewpeerlist['col_user_ip'] . "</td>" . ($enablelocation_tweak == 'yes' || get_user_class() >= $userprofile_class ? "<td class=colhead align=center width=1%>" . $lang_viewpeerlist['col_location'] . "</td>" : "") . "<td class=colhead align=center width=1%>" . $lang_viewpeerlist['col_connectable'] . "</td>" . "<td class=colhead align=center width=1%>" . $lang_viewpeerlist['col_uploaded'] . "</td>" . "<td class=colhead align=center width=1%>" . $lang_viewpeerlist['col_rate'] . "</td>" . "<td class=colhead align=center width=1%>" . $lang_viewpeerlist['col_downloaded'] . "</td>" . "<td class=colhead align=center width=1%>" . $lang_viewpeerlist['col_rate'] . "</td>" . "<td class=colhead align=center width=1%>" . $lang_viewpeerlist['col_ratio'] . "</td>" . "<td class=colhead align=center width=1%>" . $lang_viewpeerlist['col_complete'] . "</td>" . "<td class=colhead align=center width=1%>" . $lang_viewpeerlist['col_connected'] . "</td>" . "<td class=colhead align=center width=1%>" . $lang_viewpeerlist['col_idle'] . "</td>" . "<td class=colhead align=center width=1%>" . $lang_viewpeerlist['col_client'] . "</td></tr>\n"; $now = time(); foreach ($arr as $e) { $privacy = get_single_value("users", "privacy", "WHERE id=" . sqlesc($e['userid'])); ++$num; $highlight = $CURUSER["id"] == $e['userid'] ? " bgcolor=#BBAF9B" : ""; $s .= "<tr{$highlight}>\n"; if ($privacy == "strong" || $torrent['anonymous'] == 'yes' && $e['userid'] == $torrent['owner']) { if (get_user_class() >= $viewanonymous_class || $e['userid'] == $CURUSER['id']) { $s .= "<td class=rowfollow align=left width=1%><i>" . $lang_viewpeerlist['text_anonymous'] . "</i><br />(" . get_username($e['userid']) . ")"; } else { $s .= "<td class=rowfollow align=left width=1%><i>" . $lang_viewpeerlist['text_anonymous'] . "</i></a></td>\n"; } } else { $s .= "<td class=rowfollow align=left width=1%>" . get_username($e['userid']); } $secs = max(1, $e["la"] - $e["st"]); if ($enablelocation_tweak == 'yes') { list($loc_pub, $loc_mod) = get_ip_location($e["ip"]); $location = get_user_class() >= $userprofile_class ? "<div title='" . $loc_mod . "'>" . $loc_pub . "</div>" : $loc_pub; $s .= "<td class=rowfollow align=center width=1%><nobr>" . $location . "</nobr></td>\n"; } elseif (get_user_class() >= $userprofile_class) { $location = $e["ip"]; $s .= "<td class=rowfollow align=center width=1%><nobr>" . $location . "</nobr></td>\n"; } else { $location = ""; } $s .= "<td class=rowfollow align=center width=1%><nobr>" . ($e[connectable] == "yes" ? $lang_viewpeerlist['text_yes'] : "<font color=red>" . $lang_viewpeerlist['text_no'] . "</font>") . "</nobr></td>\n"; $s .= "<td class=rowfollow align=center width=1%><nobr>" . mksize($e["uploaded"]) . "</nobr></td>\n"; $s .= "<td class=rowfollow align=center width=1%><nobr>" . mksize(($e["uploaded"] - $e["uploadoffset"]) / $secs) . "/s</nobr></td>\n"; $s .= "<td class=rowfollow align=center width=1%><nobr>" . mksize($e["downloaded"]) . "</nobr></td>\n"; if ($e["seeder"] == "no") { $s .= "<td class=rowfollow align=center width=1%><nobr>" . mksize(($e["downloaded"] - $e["downloadoffset"]) / $secs) . "/s</nobr></td>\n"; } else { $s .= "<td class=rowfollow align=center width=1%><nobr>" . mksize(($e["downloaded"] - $e["downloadoffset"]) / max(1, $e["finishedat"] - $e[st])) . "/s</nobr></td>\n"; } if ($e["downloaded"]) { $ratio = floor($e["uploaded"] / $e["downloaded"] * 1000) / 1000; $s .= "<td class=rowfollow align=\"center\" width=1%><font color=" . get_ratio_color($ratio) . "><nobr>" . number_format($ratio, 3) . "</nobr></font></td>\n"; } elseif ($e["uploaded"]) { $s .= "<td class=rowfollow align=center width=1%>" . $lang_viewpeerlist['text_inf'] . "</td>\n"; } else { $s .= "<td class=rowfollow align=center width=1%>---</td>\n"; } $s .= "<td class=rowfollow align=center width=1%><nobr>" . sprintf("%.2f%%", 100 * (1 - $e["to_go"] / $torrent["size"])) . "</nobr></td>\n"; $s .= "<td class=rowfollow align=center width=1%><nobr>" . mkprettytime($now - $e["st"]) . "</nobr></td>\n"; $s .= "<td class=rowfollow align=center width=1%><nobr>" . mkprettytime($now - $e["la"]) . "</nobr></td>\n"; $s .= "<td class=rowfollow align=center width=1%><nobr>" . htmlspecialchars(get_agent($e["peer_id"], $e["agent"])) . "</nobr></td>\n"; $s .= "</tr>\n"; } $s .= "</table>\n"; return $s; }
if ($where_tweak == "yes") { tr_small($lang_userdetails['row_last_seen_location'], $user[page], 1); } if (get_user_class() >= $userprofile_class or $user["privacy"] == "low") { tr_small($lang_userdetails['row_email'], "<a href=\"mailto:" . $user[email] . "\">" . $user[email] . "</a>", 1); } if (get_user_class() >= $userprofile_class) { $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) { tr_small($lang_userdetails['row_ip_history'], $lang_userdetails['text_user_earlier_used'] . "<b><a href=\"iphistory.php?id=" . $user['id'] . "\">" . $iphistory . $lang_userdetails['text_different_ips'] . add_s($iphistory, true) . "</a></b>", 1); } } if (get_user_class() >= $userprofile_class || $user["id"] == $CURUSER["id"]) { if ($enablelocation_tweak == 'yes') { list($loc_pub, $loc_mod) = get_ip_location($user[ip]); $locationinfo = "<span title=\"" . $loc_mod . "\">[" . $loc_pub . "]</span>"; } else { $locationinfo = ""; } tr_small($lang_userdetails['row_ip_address'], $user[ip] . $locationinfo, 1); } $res = sql_query("SELECT agent, peer_id, ip, port FROM peers WHERE userid = {$user['id']} GROUP BY agent") or sqlerr(); if (mysql_num_rows($res) > 0) { $first = true; $clientselect = ""; while ($arr = mysql_fetch_assoc($res)) { $clientselect .= ($first == true ? "" : " ; ") . get_agent($arr["peer_id"], $arr["agent"]); $first = false; if (get_user_class() >= $userprofile_class || $user["id"] == $CURUSER["id"]) { $clientselect .= " (" . $arr["ip"] . ":" . $arr["port"] . ")";
} if (!class_exists("insert_log_data")) { class insert_log_data { function insert_data($tbl, $data) { global $wpdb; $wpdb->insert($tbl, $data); } } } if (isset($_REQUEST["captcha_challenge_field"])) { $setting_value = array(); $ipAddress = getIpAddress(); $date_time = date("Y-m-d H:i:s"); $log_data = get_ip_location($ipAddress); $insert = new insert_log_data(); $setting_value["username"] = $_REQUEST["log"]; $setting_value["ip_address"] = $ipAddress; if ($log_data->city == "" || $log_data->country_name == "") { $setting_value["geo_location"] = $log_data->city . $log_data->country_name; } else { $setting_value["geo_location"] = $log_data->city . ", " . $log_data->country_name; } $setting_value["latitude"] = $log_data->latitude; $setting_value["longitude"] = $log_data->longitude; $setting_value["date_time"] = $date_time; if ($captcha_case_sensitive == "1") { $captcha_challenge_field = trim($_REQUEST["captcha_challenge_field"]); } else { $captcha_challenge_field = strtolower(trim($_REQUEST["captcha_challenge_field"]));