forked from web-cyradm/web-cyradm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
delete_catchall.php
49 lines (47 loc) · 1.15 KB
/
delete_catchall.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
if (!defined('WC_BASE')) define('WC_BASE', dirname(__FILE__));
$ref=WC_BASE."/index.php";
if ($ref!=$_SERVER['SCRIPT_FILENAME']){
header("Location: index.php");
exit();
}
?>
<!-- #################### delete_catchall.php start #################### -->
<tr>
<td width="10"> </td>
<td valign="top">
<?php
if ($authorized) {
if (!empty($_GET['confirmed']) AND empty($_GET['cancel'])){
$query = "DELETE from `virtual` WHERE alias='@".$_GET['domain']."'";
$result = $handle->query($query);
if (DB::isError($result)) {
die (_("Database error (delete_catchall 20)"));
} else {
?>
<h3>
<?php print _("successfully deleted from the Database");?>
</h3>
<?php
include WC_BASE . "/browseaccounts.php";
}
} elseif (!empty($_GET['cancel'])){
?>
<h3>
<?php print _("Cancelled");?>
</h3>
<?php
include WC_BASE . "/browseaccounts.php";
}
} else {
?>
<h3>
<?php print $err_msg;?>
</h3>
<a href="index.php?action=accounts&domain=<?php echo $_GET['domain'];?>"><?php print _("Back");?></a>
<?php
}
?>
</td>
</tr>
<!-- #################### delete_catchall.php end #################### -->