<?
require "include/bittorrent.php";
dbconn(false);
stdhead("Alle auf Freeleech");

if (get_user_class() >= UC_SYSOP) {

$res1 = mysql_query("SELECT torrents.freeleech FROM torrents WHERE allfreeleech='yes'") or sqlerr();
//$row1 = mysql_fetch_assoc($res1);

if (mysql_num_rows($res1) == 0)
{
?>
<table cellpadding="0" cellspacing="0" border="0" style="width:30%" class="tableinborder">
 <tr class="tabletitle" width="100%">
<form method=post action=takeallfreeleech.php>
<input type=hidden name=action value=yes>
<?
begin_frame("<b><center>Torrents auf Freeleech</center>", false , "30%;");
?>
<tr>
<td class=tablea><center><h2>Status</h2></center><center><h2><font color=green>Nein</center></font></h2></td>
<tr><td class=tablea colspan=3 align=center><center><input type=submit class=button value='Einschalten'></center></td></tr>
</form>
<?
end_frame();
}
else
{
?>
<table cellpadding="0" cellspacing="0" border="0" style="width:30%" class="tableinborder">
 <tr class="tabletitle" width="100%">
<form method=post action=takeallfreeleech.php>
<input type=hidden name=action value=no>

<?
begin_frame("<b><center>Alle Torrents auf Freeleech</center>", false , "30%;");
?>
<tr>
<td class=tablea><center><h2>Status</h2></center><center><h2><font color=red>Ja</center></font></h2></td>
<tr><td class=tablea colspan=3 align=center><center><input type=submit class=button value='Ausschalten'></center></td></tr>
</table>
</form>
<?
end_frame();
?>
<?
}
}
else
print("<p style=\"text-align:center;font-size:12pt;\"><b>Dir ist es nicht erlaubt, hier zuzugreifen</b></p>");
?>