<?php
$file="include/func.inc.php";
if (file_exists($file)){include_once($file);}else{inc lude_once("../".$file);}sitetest();
if (isset($_POST['submit']))
{
mysql_select_db($mysql_db1);
if ($_POST['submit'] == "Entbannen")
{
$id=$_POST['id'];
$sql="UPDATE account set status = 'OK' where id = '$id'";
mysql_query($sql) or die("Fehler".mysql_error());
}
else
{
$id=$_POST['id'];
$sql="UPDATE account set status = 'BANNED' where id = '$id'";
mysql_query($sql) ;
}
}
?>
<table width="600" border="0">
<tr>
<td height="56" background="styles/default/content_images/admin/ban.png" style="background-repeat:no-repeat; background-position:center;"></td>
</tr>
</table>
<table width="600" border="0" cellspacing="2" cellpadding="0">
<tr>
<td class="listaa"><b>Acc-ID</b></td>
<td class="listab"> <b>Acc-Name</b></td>
<td class="listac" align="center"> <b>Löschcode</b></td>
<td class="listae" align="center"> <b>Status</b></td>
<td class="listad" align="center"> <b>Bann/Entbannen</b></td>
</tr>
<tr>
<td height="5px"></td>
<td height="5px"></td>
<td height="5px"></td>
<td height="5px"></td>
<td height="5px"></td>
</tr>
<?php
mysql_connect($mysql_host, $mysql_user, $mysql_pass) OR
die("Es konnte keine Verbindung zur Datenbank hergestellt werden.<br /> Fehlermeldung: ".mysql_error());
mysql_select_db($mysql_db1) OR
die("Die Datenbank konnte nicht benutzt werden.<br /> Fehlermeldung: ".mysql_error());
$sql = "SELECT * FROM account ORDER by login";
$adressen_query = mysql_query($sql) or die("Anfrage nicht erfolgreich!");
$anzahl = mysql_num_rows($adressen_query);
?>
<?php
while ($adr = mysql_fetch_array($adressen_query)){
?>
<tr>
<td valign="top" class="listaa"><?=$adr['id'] ?> </td>
<td valign="top"> <?=$adr['login']?></td>
<td valign="top" align="center"> <?=$adr['social_id']?></td>
<td valign="top" align="center">
<?php
if($adr['status'] =="OK")
{
echo '<font color="green">'.$adr['status'].'</font>';
}
else
{
echo '<font color="red">'.$adr['status'].'</font>';
}?>
</td>
<td valign="top" align="center">
<?php
if($adr['status'] =="OK")
{
echo '<form action="index.php?site=sys/acc_tool" method="post">
<input type="hidden" name="id" value="'.$adr['id'].'">
<input type="submit" name="submit" value="Bannen"></form>';
}
else
{
echo '<form action="index.php?site=sys/acc_tool" method="post" >
<input type="hidden" name="id" value="'.$adr['id'].'">
<input type="submit" name="submit" value="Entbannen"></form>';
}?>
</td>
</tr>
<?php
}
?>
</table>
</div>
$file="include/func.inc.php";
if (file_exists($file)){include_once($file);}else{inc lude_once("../".$file);}sitetest();
if (isset($_POST['submit']))
{
mysql_select_db($mysql_db1);
if ($_POST['submit'] == "Entbannen")
{
$id=$_POST['id'];
$sql="UPDATE account set status = 'OK' where id = '$id'";
mysql_query($sql) or die("Fehler".mysql_error());
}
else
{
$id=$_POST['id'];
$sql="UPDATE account set status = 'BANNED' where id = '$id'";
mysql_query($sql) ;
}
}
?>
<table width="600" border="0">
<tr>
<td height="56" background="styles/default/content_images/admin/ban.png" style="background-repeat:no-repeat; background-position:center;"></td>
</tr>
</table>
<table width="600" border="0" cellspacing="2" cellpadding="0">
<tr>
<td class="listaa"><b>Acc-ID</b></td>
<td class="listab"> <b>Acc-Name</b></td>
<td class="listac" align="center"> <b>Löschcode</b></td>
<td class="listae" align="center"> <b>Status</b></td>
<td class="listad" align="center"> <b>Bann/Entbannen</b></td>
</tr>
<tr>
<td height="5px"></td>
<td height="5px"></td>
<td height="5px"></td>
<td height="5px"></td>
<td height="5px"></td>
</tr>
<?php
mysql_connect($mysql_host, $mysql_user, $mysql_pass) OR
die("Es konnte keine Verbindung zur Datenbank hergestellt werden.<br /> Fehlermeldung: ".mysql_error());
mysql_select_db($mysql_db1) OR
die("Die Datenbank konnte nicht benutzt werden.<br /> Fehlermeldung: ".mysql_error());
$sql = "SELECT * FROM account ORDER by login";
$adressen_query = mysql_query($sql) or die("Anfrage nicht erfolgreich!");
$anzahl = mysql_num_rows($adressen_query);
?>
<?php
while ($adr = mysql_fetch_array($adressen_query)){
?>
<tr>
<td valign="top" class="listaa"><?=$adr['id'] ?> </td>
<td valign="top"> <?=$adr['login']?></td>
<td valign="top" align="center"> <?=$adr['social_id']?></td>
<td valign="top" align="center">
<?php
if($adr['status'] =="OK")
{
echo '<font color="green">'.$adr['status'].'</font>';
}
else
{
echo '<font color="red">'.$adr['status'].'</font>';
}?>
</td>
<td valign="top" align="center">
<?php
if($adr['status'] =="OK")
{
echo '<form action="index.php?site=sys/acc_tool" method="post">
<input type="hidden" name="id" value="'.$adr['id'].'">
<input type="submit" name="submit" value="Bannen"></form>';
}
else
{
echo '<form action="index.php?site=sys/acc_tool" method="post" >
<input type="hidden" name="id" value="'.$adr['id'].'">
<input type="submit" name="submit" value="Entbannen"></form>';
}?>
</td>
</tr>
<?php
}
?>
</table>
</div>
So nun ist mein Problem das es in der HP nur Bannen und den OK Status anzeigt ->
Bitte schnell um Hilfe
lg