in my announce.php i only find this :
PHP Code:
if ($upthis > 0 || $downthis > 0)
// Initial sanity check xMB/s for 1 second
if($upthis > 2097152)
{
//Work out time difference
$endtime = time();
$starttime = $self['ts'];
$diff = ($endtime - $starttime);
//Normalise to prevent divide by zero.
$rate = ($upthis / ($diff + 1));
//Currently 2MB/s. Increase to 5MB/s once finished testing.
if ($rate > 2097152)
{
if ($class < UC_MODERATOR)
{
$rate = mksize($rate);
$client = $agent;
$userip = getip();
auto_enter_cheater($userid, $rate, $upthis, $diff, $torrentid, $client, $userip, $last_up);
}
}
}
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error 3");
}
what i should replace?
Bump: i have done it....it works....thanks a lot
what i can do to show me an icon instead of [Freeleech]
what i must do to show me user rank near the username ?
my edit.php is not working......is not updating my data
this is it:
PHP Code:
<?
require_once("include/bittorrent.php");
if (!mkglobal("id"))
die();
$id = 0 + $id;
if (!$id)
die();
dbconn();
loggedinorreturn();
$res = mysql_query("SELECT * FROM torrents WHERE id = $id");
$row = mysql_fetch_array($res);
if (!$row)
die();
stdhead("Edit torrent \"" . $row["name"] . "\"");
if (!isset($CURUSER) || ($CURUSER["id"] != $row["owner"] && get_user_class() < UC_MODERATOR)) {
print("<h1>Can't edit this torrent</h1>\n");
print("<p>You're not the rightful owner, or you're not <a href=\"login.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&nowarn=1\">logged in</a> properly.</p>\n");
}
else {
print("<form name=editupload method=post action=takeedit.php enctype=multipart/form-data>\n");
print("<input type=\"hidden\" name=\"id\" value=\"$id\">\n");
if (isset($_GET["returnto"]))
print("<input type=\"hidden\" name=\"returnto\" value=\"" . htmlspecialchars($_GET["returnto"]) . "\" />\n");
print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"10\">\n");
tr("Torrent name", "<input type=\"text\" name=\"name\" value=\"" . htmlspecialchars($row["name"]) . "\" size=\"80\" />", 1);
tr("Small Description", "<input type =\"text\" name=\"description\" size=\"80\" value=\"" .htmlspecialchars($row["description"]). "\"><br>Short description of the file you are uploading (I.E. Great action movie from the 90's)<br>This is shown in the browse.php below the torrent name.", 1);
tr("NFO file", "<input type=radio name=nfoaction value='keep' checked>Keep current<br>".
"<input type=radio name=nfoaction value='update'>Update:<br><input type=file name=nfo size=80>", 1);
if ((strpos($row["ori_descr"], "<") === false) || (strpos($row["ori_descr"], "<") !== false))
$c = "";
else
$c = " checked";
print("<tr><td class=rowhead style='padding: 10px'>Description</td><td align=center style='padding: 3px'>");
textbbcode("editupload","descr","$row[ori_descr]");
print("</td>\n");
$s = "<select name=\"type\">\n";
$cats = genrelist();
foreach ($cats as $subrow) {
$s .= "<option value=\"" . $subrow["id"] . "\"";
if ($subrow["id"] == $row["category"])
$s .= " selected=\"selected\"";
$s .= ">" . htmlspecialchars($subrow["name"]) . "</option>\n";
}
$s .= "</select>\n";
tr("Type", $s, 1);
tr("Visible", "<input type=\"checkbox\" name=\"visible\"" . (($row["visible"] == "yes") ? " checked=\"checked\"" : "" ) . " value=\"1\" /> Visible on main page<br /><table border=0 cellspacing=0 cellpadding=0 width=420><tr><td class=embedded>Note that the torrent will automatically become visible when there's a seeder, and will become automatically invisible (dead) when there has been no seeder for a while. Use this switch to speed the process up manually. Also note that invisible (dead) torrents can still be viewed or searched for, it's just not the default.</td></tr></table>", 1);
if ($CURUSER["admin"] == "yes")
tr("Banned", "<input type=\"checkbox\" name=\"banned\"" . (($row["banned"] == "yes") ? " checked=\"checked\"" : "" ) . " value=\"1\" /> Banned", 1);
print("<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value='Edit it!' style='height: 25px; width: 100px'> <input type=reset value='Revert changes' style='height: 25px; width: 100px'></td></tr>\n");
print("</table>\n");
print("</form>\n");
print("<p>\n");
print("<form method=\"post\" action=\"delete.php\">\n");
print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n");
print("<tr><td class=embedded style='background-color: #F5F4EA;padding-bottom: 5px' colspan=\"2\"><b>Delete torrent.</b> Reason:</td></tr>");
print("<td><input name=\"reasontype\" type=\"radio\" value=\"1\"> Dead </td><td> 0 seeders, 0 leechers = 0 peers total</td></tr>\n");
print("<tr><td><input name=\"reasontype\" type=\"radio\" value=\"2\"> Dupe</td><td><input type=\"text\" size=\"40\" name=\"reason[]\"></td></tr>\n");
print("<tr><td><input name=\"reasontype\" type=\"radio\" value=\"3\"> Nuked</td><td><input type=\"text\" size=\"40\" name=\"reason[]\"></td></tr>\n");
print("<tr><td><input name=\"reasontype\" type=\"radio\" value=\"4\"> TB rules</td><td><input type=\"text\" size=\"40\" name=\"reason[]\">(req)</td></tr>");
print("<tr><td><input name=\"reasontype\" type=\"radio\" value=\"5\" checked> Other:</td><td><input type=\"text\" size=\"40\" name=\"reason[]\">(req)</td></tr>\n");
print("<input type=\"hidden\" name=\"id\" value=\"$id\">\n");
if (isset($_GET["returnto"]))
print("<input type=\"hidden\" name=\"returnto\" value=\"" . htmlspecialchars($_GET["returnto"]) . "\" />\n");
print("<td colspan=\"2\" align=\"center\"><input type=submit value='Delete it!' style='height: 25px'></td></tr>\n");
print("</table>");
print("</form>\n");
print("</p>\n");
}
stdfoot();
?>
Bump: I did it with user rank
i added
PHP Code:
$usrclass = get_user_class_name($CURUSER['class']);
print "$usrclass";
Bump: but my edit.php is stil not working......is not updating my data
Bump: i have a problem with my freeleech.php
Warning: Cannot modify header information - headers already sent by (output started at /home/bluefile/public_html/freeleech.php:2) in /home/bluefile/public_html/freeleech.php on line 75
still freeleech is working but why apears that?