">
0?number_format(($curuseruploaded + $curuserseederbonusupload) / $curuserdownloaded, 3):"Inf.");
$res99 = mysql_query("SELECT seedbonus FROM users WHERE id=$CURUSER[id]") or sqlerr(__FILE__, __LINE__);
$arr99 = mysql_fetch_assoc($res99);
$bonus = number_format($arr99['seedbonus'], 1);
//Messages
$res = mysql_query("SELECT COUNT(*) FROM `messages` WHERE `folder_in` AND `receiver`=" . $CURUSER["id"]) or die("0");
$arr = mysql_fetch_row($res);
$inbox = $arr[0];
$res = mysql_query("SELECT COUNT(*) FROM `messages` WHERE `folder_out` AND `sender`=" . $CURUSER["id"]) or die("0");
$arr = mysql_fetch_row($res);
$sentbox = $arr[0];
//connectable anzeige start
$res5 = mysql_query("SELECT connectable FROM peers WHERE userid=" . $CURUSER["id"] . "")or sqlerr(__FILE__, __LINE__);
if($row = mysql_fetch_row($res5)){
$connect = $row[0];
if($connect == "yes"){
$connectable = "Yes ;)";
$connectable_color = "green";
}else{
$connectable = "Du bist nicht Connectable";
$connectable_color = "red";
}
}else{
$connectable ="Keine Connections zur Zeit";
$connectable_color = "blue";
}
$seedsarr = @mysql_fetch_assoc(mysql_query("SELECT COUNT(*) AS `cnt` FROM `peers` WHERE `userid`=" . $CURUSER["id"] . " AND `seeder`='yes'"));
$seeds = $seedsarr["cnt"];
$leechesarr = @mysql_fetch_assoc(mysql_query("SELECT COUNT(*) AS `cnt` FROM `peers` WHERE `userid`=" . $CURUSER["id"] . " AND `seeder`='no'"));
$leeches = $leechesarr["cnt"];
$tlimits = get_torrent_limits($CURUSER);
if ($ratio < 0.5) {
$ratiowarn = " style=\"background-color:red;color:white;\"";
} elseif ($ratio < 0.75) {
$ratiowarn = " style=\"background-color:#FFFF00;color:black;\"";
}
if ($tlimits["seeds"] >= 0) {
if ($tlimits["seeds"] - $seeds < 1)
$seedwarn = " style=\"background-color:red;color:white;\"";
$tlimits["seeds"] = " / " . $tlimits["seeds"];
} else
$tlimits["seeds"] = "";
if ($tlimits["leeches"] >= 0) {
if ($tlimits["leeches"] - $leeches < 1)
$leechwarn = " style=\"background-color:red;color:white;\"";
$tlimits["leeches"] = " / " . $tlimits["leeches"];
} else
$tlimits["leeches"] = "";
if ($tlimits["total"] >= 0) {
if ($tlimits["total"] - $leeches + $seeds < 1)
$totalwarn = " style=\"background-color:red;color:white;\"";
$tlimits["total"] = " / " . $tlimits["total"];
} else
$tlimits["total"] = "";
}
?>
|