Probier mal das:
PHP-Code:
<?
if ($_POST['update'] == 'Update!'){
db_query('UPDATE '.$db_prefix.'_framespider_config SET
passwort="'.$_POST['passwort'].'",
popups = '.(INT)$_POST['popups'].',
virus = '.(INT)$_POST['virus'].',
ladezeit = '.(INT)$_POST['ladezeit'].',
framebrecher = '.(INT)$_POST['framebrecher'].'
LIMIT 1');
}
$spider_config = mysql_fetch_assoc(db_query('SELECT * FROM '.$db_prefix.'_framespider_config LIMIT 1'));
head('Banner-Spider Konfiguration');?>
<table border="0" width="100%">
<form action="" method="POST">
<tr>
<td>Passwort:</td>
<td><input type="text" name="passwort" value="<?=$spider_config['passwort'];?>"></td>
</tr>
<tr>
<td colspan="2" align="center"> </td>
</tr>
<tr>
<td colspan="2" align="left"><b>Löschen bei...</b></td>
</tr>
<tr>
<td>... zu vielen Popups?</td>
<td><input type="checkbox" name="popups" value="1" <?=($spider_config['popups'] == 0 ? "" : "checked");?>></td>
</tr>
<tr>
<td>... Virus?</td>
<td><input type="checkbox" name="virus" value="1" <?=($spider_config['virus'] == 0 ? "" : "checked");?>></td>
</tr>
<tr>
<td>... zu langer Ladezeit?</td>
<td><input type="checkbox" name="ladezeit" value="1" <?=($spider_config['ladezeit'] == 0 ? "" : "checked");?>></td>
</tr>
<tr>
<td>... Framebrecher?</td>
<td><input type="checkbox" name="framebrecher" value="1" <?=($spider_config['framebrecher'] == 0 ? "" : "checked");?>></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="update" value="Update!"></td>
</tr>
</table>
<b>Statistik:</b><br>
Der Spider hat bislang <?=number_format($spider_config['c_pop']+$spider_config['c_vir']+$spider_config['c_load']+$spider_config['c_frame'],0,',','.');?> Kampagnen gemeldet:<br>
- <?=number_format($spider_config['c_pop'],0,',','.');?> Kampagnen hatten zuviele Popups.<br>
- <?=number_format($spider_config['c_vir'],0,',','.');?> Kampagnen hatten einen Virus.<br>
- <?=number_format($spider_config['c_load'],0,',','.');?> Kampagnen hatten eine zulange Ladezeit.<br>
- <?=number_format($spider_config['c_frame'],0,',','.');?> Kampagnen hatten einen Framebrecher.<br>
<?foot();?>
<?head('Gemeldete Kampagnen (<a href="?content=/spider&reset=true">Log leeren</a>)');?>
<table border="0" CELLPADDING="3" CELLSPACING="0" width="100%">
<tr class="tr_head">
<td align="center"><b>Tan</b></td>
<td align="center"><b>Url</b></td>
<td align="center"><b>Sponsor</b></td>
<td align="center"><b>Grund</b></td>
<td align="center"><b>Zeit</b></td>
</tr>
<?
if ($_GET['reset'] == TRUE) db_query('TRUNCATE '.$db_prefix.'_framespider_log');
$gemeldete = db_query('SELECT g.sponsor,l.tan,l.url,l.grund,l.zeit FROM
'.$db_prefix.'_framespider_log AS l
LEFT JOIN '.$db_prefix.'_gebuchte_werbung AS g ON g.tan = l.tan ORDER BY l.zeit DESC');
if (mysql_num_rows($gemeldete)){
while ($gemeldet = mysql_fetch_assoc($gemeldete)){
$i++;
$col = ($i % 2 == 0 ? "tr_row1" : "tr_row2");
echo '
<tr class="'.$col.'">
<td align="center">'.$gemeldet['tan'].'</td>
<td align="center"><a href="'.$gemeldet['url'].'" target="_blank">[Link]</a></td>
<td align="center">'.$gemeldet['sponsor'].'</td>
<td align="center">'.$gemeldet['grund'].'</td>
<td align="center">'.date("d.m.Y - H:i",$gemeldet['zeit']).'</td>
</tr>
';
}
}else{
echo '
<tr>
<td colspan="4" align="center">- bislang keine Meldungen -</td>
</tr>
';
}
?>
</form>
</table>
<?foot();?>
adminforce/content/spider.php