-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdelist.php
25 lines (23 loc) · 988 Bytes
/
delist.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
require_once('config.php');
require_once('function.php');
$typedesc=$_POST['type'];
$value = iconv(mb_detect_encoding($_POST['value'], mb_detect_order('ISO-8859-15, ISO-8859-1')), "UTF-8", $_POST['value']);
$type = $tables["$typedesc"]['field'];
$table = ($tables["$typedesc"]['milter']) ? milterTable($type) : $tables["$typedesc"]['name'];
$cl = ($tables["$typedesc"]['milter']) ? 10 : 9;
?>
<td colspan="<?php echo $cl; ?>" style="text-align: center">
<?php
openlog($tag, LOG_PID, $fac);
$user = username();
if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE )
exit ($user.': Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error);
if (changestatus($mysqli,username(),$value,'0',$type,$table))
print 'OK '.$_POST["type"].' <'.htmlentities($value).'> delisted.';
else
print 'ERROR in delist <'.htmlentities($value).'>; check log';
print '</td>';
$mysqli->close();
closelog();
?>