tunad |
28th December 2008 14:44 |
tbdev.net (netmaniack's edition) 1.5 freeleech.php
apears this error when i make a torrent freeleech
what can i do?
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
this is my freeleech.php
PHP Code:
<center> <?php
ob_start("ob_gzhandler"); require_once("include/bittorrent.php");
dbconn(); loggedinorreturn();
$akcija = $_GET['akcija']; $napaka = (int)$_GET['napaka']; $odstraniid = (int)$_GET['odstraniid'];
stdhead("Free Leech");
begin_main_frame();
if (get_user_class() < UC_VIP) { stdmsg("Error", "No access."); end_main_frame(); stdfoot(); exit; }
echo "<h1 align=center>Free Leech</h1>\n";
if ($napaka == 1) { echo "<font color=\"red\">Torrent with this ID doesn't exist!</font>"; }
if ($napaka == 2) { echo "<font color=\"red\">This torrent is now free leech!</font>"; }
if ($napaka == 3) { echo "<font color=\"red\">This torrent isn't free leech anymore!</font>"; }
if ($napaka == 4) { echo "<font color=\"red\">This torren't isn't freeleech!</font>"; }
echo "<form name=\"freeleech\" method=\"post\" action=\"freeleech.php?akcija=poslji\">
Torrent ID:
<input name=\"id\" type=\"text\" value=\"\" />
(You need to enter id of the torrent you want to make free leech)
<input type=\"submit\" value=\"Send\"></form>";
if ($akcija == "poslji") { $id = (int)$_POST['id']; $rezultat = mysql_query("SELECT * FROM torrents WHERE id = '$id'");
if (mysql_num_rows($rezultat) < 1) { header("Location: freeleech.php?napaka=1"); die(); } else { mysql_query("UPDATE torrents SET freeleech = '1' WHERE id = '$id'"); }
header("Location: freeleech.php?napaka=2"); }
echo "<div align=\"center\"><h1>Free leech torrents</h1>";
$rezultat = mysql_query("SELECT * FROM torrents WHERE freeleech = '1'");
if (mysql_num_rows($rezultat) > 0) { echo "<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\" class=\"main\"> <tr> <td class=rowhead><center>Id</center></td> <td class=rowhead><center>Name</center></td> <td class=rowhead><center>FreeLeech</center></td> </tr>";
while ($vrstica = mysql_fetch_array($rezultat)) { echo " <tr> <td><center>$vrstica[id]</center></td> <td><center><a href=\"details.php?id=$vrstica[id]\" target=\"_blank\">".format_comment($vrstica[name])."</a></center></td> <td><center><a href=\"freeleech.php?akcija=odstrani&odstraniid=$vrstica[id]\">Remove</a></center></td> </tr>"; } } else { echo "No free leech torrents!"; }
echo "</table>bluefile</div>";
if ($akcija == "odstrani") { $rezultat = mysql_query("SELECT * FROM torrents WHERE id = '$odstraniid' AND freeleech = '1'");
if (mysql_num_rows($rezultat) < 1) { header("Location: freeleech.php?napaka=4"); die(); } else { mysql_query("UPDATE torrents SET freeleech = '0' WHERE id = '$odstraniid'"); }
header("Location: freeleech.php?napaka=3"); }
end_main_frame(); stdfoot(); die(); ?> </center>
|