You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-10-24 12:19:19 +03:00
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/tags/postfixadmin-1.3.7@1 a1433add-5e2c-0410-b055-b7f2511e0802
51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<?
|
|
include "my_lib.php";
|
|
|
|
$sessid = check_session();
|
|
|
|
$url = "main.php?" . session_name() . "=" . session_id();
|
|
$check_id = "domain";
|
|
$table = $_GET[table];
|
|
$where = $_GET[where];
|
|
$delete = $_GET[delete];
|
|
|
|
if ($table == "alias") {
|
|
$query = "DELETE FROM alias WHERE address='$delete' AND domain='$sessid[$check_id]'";
|
|
$result = db_query ("$query");
|
|
if ($result[rows] == 1) {
|
|
header("Location: $url");
|
|
} else {
|
|
print_header();
|
|
print "<hr>\n";
|
|
print "<p class=error>\n";
|
|
print "<b>Unable</b> to delete entry $delete from the $table table!\n";
|
|
print_footer();
|
|
}
|
|
}
|
|
|
|
if ($table == "mailbox") {
|
|
$query = "DELETE FROM mailbox WHERE username='$delete' AND domain='$sessid[$check_id]'";
|
|
$result = db_query ("$query");
|
|
if ($result[rows] != 1) {
|
|
print_header();
|
|
print "<hr>\n";
|
|
print "<p class=error>\n";
|
|
print "<b>Unable</b> to delete entry $delete from the $table table!\n";
|
|
print_footer();
|
|
}
|
|
|
|
$query = "DELETE FROM alias WHERE address='$delete' AND domain='$sessid[$check_id]'";
|
|
$result = db_query ("$query");
|
|
if ($result[rows] == 1) {
|
|
header("Location: $url");
|
|
} else {
|
|
print_header();
|
|
print "<hr>\n";
|
|
print "<p class=error>\n";
|
|
print "<b>Unable</b> to delete entry $delete from the $table table!\n";
|
|
print_footer();
|
|
}
|
|
|
|
}
|
|
?>
|