Ok got this finished.
Changes in admin_links.php, just enter under the links for marking
Code:
<a href=# onclick="javascript:window.open('admin_delete.php?time=259200', 'ab 3 Tage löschen', 'width=200, height=100')">delete 3-day old discard</a>
and now make a new file called admin_delete.php
it is maybe to much included, but i works
Code:
<?php
include_once('Smarty.class.php');
$main_smarty = new Smarty;
include('config.php');
include(mnminclude.'html1.php');
include(mnminclude.'link.php');
include(mnminclude.'user.php');
include(mnminclude.'smartyvariables.php');
// require user to log in
force_authentication();
// restrict access to god only
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('god');
// sidebar
$main_smarty = do_sidebar($main_smarty);
if ($canIhaveAccess == 1 && isset($_GET[time])) {
$time = $_GET[time];
$time = date("U") - $time;
$time = date("Y-m-d H:i:s",$time);
$db->query ("DELETE FROM " . table_links . " WHERE link_date < '$time' AND link_status = 'discard'");
echo MYSQL_AFFECTED_ROWS()." rows affected";
}
?>