<?php if (!isset($_GET['tan'])) $_GET['tan'] = ""; if (!isset($_GET['loeschen'])) $_GET['loeschen'] = ""; if ($_GET['loeschen'] == 'true') { db_query("DELETE FROM " . $db_prefix . "_paidmails_versendet WHERE tan='" . $_GET['tan'] . "'"); db_query("DELETE FROM " . $db_prefix . "_paidmails_empfaenger WHERE tan='" . $_GET['tan'] . "'"); } $mails = db_query("SELECT * FROM " . $db_prefix . "_paidmails_versendet ORDER BY gesendet DESC"); while ($history = mysql_fetch_array($mails)) { head('Paidmail: ' . $history['beschreibung']); echo '<b>Tan:</b> ' . $history['tan'] . '<br> <b>Menge:</b> ' . $history['menge'] . '<br> <b>Bestätigt:</b> ' . $history['bestaedigt'] . ' (' . @round($history['bestaedigt'] / $history['menge'] * 100, 2) . ' %)<br> <b>Userverdienst:</b> ' . $history['verdienst'] . '<br> <b>Gültig bis:</b> ' . date("d.m.Y - H:i", $history['gueltig']) . '<br> <b>Gesendet am:</b> ' . date("d.m.Y - H:i", $history['gesendet']) . ' <br> <b>Aufenthalt:</b> ' . $history['aufendhalt'] . ' Sek.<br> <p align="center"><textarea style="width:100%">' . $history['mailtext'] . '</textarea></p>'; if ($history['gueltig'] <= time() or $history['menge'] == $history['bestaedigt']) { echo ' <br><br><a href="?content=/werbesystem/paidmail_hist&tan=' . $history['tan'] . '&loeschen=true"><b>Löschen!</b></a> '; } foot(); } if (!mysql_num_rows($mails)) { head("Information"); echo 'Noch keine Paidmails vorhanden!'; foot(); }