forked from mkay/Exim4UI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sitechangerelaysubmit.php
25 lines (21 loc) · 1002 Bytes
/
sitechangerelaysubmit.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
<?php
include_once dirname(__FILE__) . "/config/variables.php";
include_once dirname(__FILE__) . "/config/authsite.php";
include_once dirname(__FILE__) . "/config/functions.php";
include_once dirname(__FILE__) . "/config/httpheaders.php";
if (isset($_POST['spamassassin'])) {$_POST['spamassassin'] = 1;} else {$_POST['spamassassin'] = 0;}
$query = "UPDATE domains SET relay_address='{$_POST['relaydest']}',
sa_tag='" . ((isset($_POST['sa_tag'])) ? $_POST['sa_tag'] : 0) . "',
sa_refuse='" .((isset($_POST['sa_refuse'])) ? $_POST['sa_refuse'] : 0) . "',
spamassassin='{$_POST['spamassassin']}' WHERE domain_id='{$_POST['domain_id']}'";
$result = $db->query($query);
if (!DB::isError($result)) {
header ("Location: site.php?updated={$_POST['domain']}");
die;
} else {
header ("Location: site.php?failupdated={$_POST['domain']}");
die;
}
# Just-in-case catchall
header ("Location: site.php?failupdated={$_POST['domain']}");
?>