Initial Import in SourceForge

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/tags/postfixadmin-1.5.2@1 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
Mischa Peters committed 2007-03-24 07:27:00 +00:00
commit 6b2420c94b
32 files changed
+1996

No files matched your search

+50
View File
@@ -0,0 +1,50 @@
<?php
require "config.inc.php";
require "my_lib.php";
$sessid = check_session();
$check_id = "domain";
$table = $_GET['table'];
$where = $_GET['where'];
$delete = $_GET['delete'];
$url = "main.php?" . session_name() . "=" . session_id();
if ($table == "alias") {
$query = "DELETE FROM alias WHERE address='$delete' AND domain='$sessid[$check_id]'";
$result = db_query ("$query");
if ($result['rows'] != 1) {
print_error ("Unable to delete entry <b>$delete</b> from the $table table!", "YES", "MENU");
}
$query = "SELECT * FROM mailbox WHERE username='$delete' AND domain='$sessid[$check_id]'";
$result = db_query ("$query");
if ($result['rows'] == 1) {
$query = "DELETE FROM mailbox WHERE username='$delete' AND domain='$sessid[$check_id]'";
$result = db_query ("$query");
if ($result['rows'] == 1) {
header("Location: $url");
} else {
print_error ("Unable to delete entry <b>$delete</b> from the $table table!", "YES", "MENU");
}
}
header("Location: $url");
}
if ($table == "mailbox") {
$query = "DELETE FROM mailbox WHERE username='$delete' AND domain='$sessid[$check_id]'";
$result = db_query ("$query");
if ($result['rows'] != 1) {
print_error ("Unable to delete entry <b>$delete</b> from the $table table!", "YES", "MENU");
}
$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_error ("Unable to delete entry <b>$delete</b> from the $table table!", "YES", "MENU");
}
}
?>