ich habe ein kleines Problem. Ich habe 2 Tabellen für PaySafeCards. Die eine ist für offene Anfragen (die noch nicht bearbeitet wurden) und die andere für bereits bearbeitete. Was ich möchte? Die bearbeiteten Anfragen, sollen auch in der dafür vorgesehenen Tabelle stehen. Bis jetzt stehen alle Anfragen in beiden Tabellen.
Script:
PHP Code:
<div style="padding: 10px; margin:10px;" class="fui">
<p style="margin:7px 0px; background:url(images/ui/fui.png); -moz-border-radius:5px; padding:5px; ">
<b>Unbearbeitete Spenden</b><p>
<?php
$don_mysql = mysql_connect(ZENSIERT);
if (!$don_mysql) {
die('Verbindung zur Datenbank fehlgeschlagen!<br><br>' . mysql_error());
}
if(!empty($_GET['delete'])) {
$delete = mysql_query("UPDATE account.spenden SET done = 'Erledigt' WHERE id = ".$_GET['delete']." LIMIT 1");
if($delete) {
echo 'Der Status wurde geändert.';
} else {
echo 'Der Status konnte nicht geändert werden.';
}
}
?>
<table width="98%" border="0" style="margin:0 auto;">
<tr>
<td width="124"><b>Account</b></td>
<td width="146"><b>Paysafecard</b></td>
<td width="58"><b>Passwort</b></td>
<td width="37"><b>Wert</b></td>
<td width="99"><b>Status</b></td>
<td width="30"></td>
</tr>
</table>
<hr />
<hr />
<?php
$sQry = mysql_query("SELECT * FROM account.spenden");
while($srow = mysql_fetch_object($sQry)) {
?>
<table width="98%" border="0" style="margin:0 auto;">
<tr>
<td width="124"><a href="index.php?src=admin&acp=users&user=<?php echo $srow->login; ?>"><?php echo $srow->login; ?></a></td>
<td width="146"><?php echo $srow->code; ?></td>
<td width="58"><?php if(empty($srow->password)) { echo 'Keines'; } else { echo $srow->password; } ?></td>
<td width="37"><?php echo $srow->wert; ?></td>
<td width="99"><?php echo $srow->done ?></td>
<td width="30">(<a class="show-tooltip" title="Erledigt" href="index.php?src=admin&acp=spenden&delete=<?php echo $srow->id; ?>">x</a>)</td>
</tr>
</table>
<?php
}
mysql_close($don_mysql);
?>
</div>
<div style="padding: 10px; margin:10px;" class="fui">
<p style="margin:7px 0px; background:url(images/ui/fui.png); -moz-border-radius:5px; padding:5px; ">
<b>Erledigte Spenden</b><p>
<?php
$don_mysql = mysql_connect(ZENSIERT);
if (!$don_mysql) {
die('Verbindung zur Datenbank fehlgeschlagen!<br><br>' . mysql_error());
}
if(!empty($_GET['delete'])) {
$delete = mysql_query("UPDATE account.spenden SET done = 'Erledigt' WHERE id = ".$_GET['delete']." LIMIT 1");
if($delete) {
echo 'Der Status wurde geändert.';
} else {
echo 'Der Status konnte nicht geändert werden.';
}
}
?>
<table width="98%" border="0" style="margin:0 auto;">
<tr>
<td width="124"><b>Account</b></td>
<td width="146"><b>Paysafecard</b></td>
<td width="58"><b>Passwort</b></td>
<td width="37"><b>Wert</b></td>
<td width="99"><b>Status</b></td>
<td width="30"></td>
</tr>
</table>
<hr />
<hr />
<?php
$sQry = mysql_query("SELECT * FROM account.spenden");
while($srow = mysql_fetch_object($sQry)) {
?>
<table width="98%" border="0" style="margin:0 auto;">
<tr>
<td width="124"><a href="index.php?src=admin&acp=users&user=<?php echo $srow->login; ?>"><?php echo $srow->login; ?></a></td>
<td width="146"><?php echo $srow->code; ?></td>
<td width="58"><?php if(empty($srow->password)) { echo 'Keines'; } else { echo $srow->password; } ?></td>
<td width="37"><?php echo $srow->wert; ?></td>
<td width="99"><?php echo $srow->done ?></td>
<td width="30">(<a class="show-tooltip" title="Erledigt" href="index.php?src=admin&acp=spenden&delete=<?php echo $srow->id; ?>">x</a>)</td>
</tr>
</table>
<?php
}
mysql_close($don_mysql);
?>
</div>
Verbesserungen, etc. erwünscht
MfG






.