-
Notifications
You must be signed in to change notification settings - Fork 10
/
remove.php
21 lines (20 loc) · 872 Bytes
/
remove.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
require_once('config.php');
require_once('function.php');
$typedesc=$_POST['type'];
$type = $tables["$typedesc"]['field'];
$table = ($tables["$typedesc"]['milter']) ? milterTable($type) : $tables["$typedesc"]['name'];
$cl = ($tables["$typedesc"]['milter']) ? 10 : 9;
printf('<td colspan="%d" style="text-align: center">', $cl);
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 (remove ($mysqli,$user,$_POST['value'],$type,$table))
print 'OK '.$typedesc.' <'.$_POST['value'].'> permanently REMOVED!';
else
print 'Delete operation ERROR on '.$typedesc.' <'.$_POST['value'].'>; check log.';
print '</td>';
$mysqli->close();
closelog();
?>