$val) {
Sql_Query(sprintf('delete from %s where id = %d',$GLOBALS['tables']['bounceregex'],$key));
}
break;
case "activate":
foreach ($_POST['tagged'] as $key => $val) {
Sql_Query(sprintf('update %s set status = "active" where id = %d',$GLOBALS['tables']['bounceregex'],$key));
}
break;
case "deactivate":
foreach ($_POST['tagged'] as $key => $val) {
Sql_Query(sprintf('update %s set status = "candidate" where id = %d',$GLOBALS['tables']['bounceregex'],$key));
}
break;
}
Redirect('bouncerules'.$url);
}
if (isset($_POST['listorder']) && is_array($_POST['listorder'])) {
foreach ($_POST['listorder'] as $ruleid => $order) {
Sql_Query(sprintf('update %s set listorder = %d where id = %d',$GLOBALS['tables']['bounceregex'],$order,$ruleid));
}
}
if (isset($_GET['del']) && $_GET['del']) {
Sql_Query(sprintf('delete from %s where id = %d',$GLOBALS['tables']['bounceregex'],$_GET['del']));
Redirect('bouncerules'.$url);
}
if (isset($_POST['newrule']) && $_POST['newrule']) {
Sql_Query(sprintf('insert into %s (regex,action,comment,admin,status) values("%s","%s","%s",%d,"active")',
$GLOBALS['tables']['bounceregex'],$_POST['newrule'],$_POST['action'],$_POST['comment'],$_SESSION['logindetails']['id']),1);
$num = Sql_Affected_Rows();
if ($num < 0) {
print '