| @@ 65-66 (lines=2) @@ | ||
| 62 | syslog(LOG_INFO, "$user: milter $log"); |
|
| 63 | ||
| 64 | /* Store new values */ |
|
| 65 | if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE ) |
|
| 66 | exit ($user.': Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error); |
|
| 67 | ||
| 68 | if (changeMilter ($mysqli,$user,$values,$col,$_POST['miltId'])) |
|
| 69 | print 'OK milter setting changed.'; |
|
| @@ 14-15 (lines=2) @@ | ||
| 11 | openlog($tag, LOG_PID, $fac); |
|
| 12 | $user = username(); |
|
| 13 | ||
| 14 | if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE ) |
|
| 15 | exit ($user.': Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error); |
|
| 16 | ||
| 17 | if (changestatus($mysqli,username(),$_POST['value'],'0',$type,$table)) |
|
| 18 | print 'OK '.$_POST["type"].' <'.$_POST['value'].'> delisted.'; |
|
| @@ 15-16 (lines=2) @@ | ||
| 12 | $user = username(); |
|
| 13 | $err = NULL; |
|
| 14 | ||
| 15 | if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE ) |
|
| 16 | exit ($user.': Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error); |
|
| 17 | ||
| 18 | if (addtolist ($mysqli,$user,$_POST['value'],$tables["$typedesc"],$_POST['unit'],$_POST['quantity'],$_POST['reason'],$err)) |
|
| 19 | print 'OK '.$_POST["type"].' <'.$_POST['value'].'> first time listed for '.$_POST['quantity'].$_POST['unit'].'.'; |
|
| @@ 17-18 (lines=2) @@ | ||
| 14 | exit('ERROR: <'.htmlentities($_POST['reason'],ENT_COMPAT | ENT_HTML401, 'ISO-8859-1').'> contains NON ASCII chars.</td>'); |
|
| 15 | $user = username(); |
|
| 16 | ||
| 17 | if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE ) |
|
| 18 | exit ($user.': Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error); |
|
| 19 | ||
| 20 | if (isFull($mysqli,$typedesc,$tables)) die("ERROR in relist: ".htmlspecialchars("$typedesc has reached maximum value of ".$tables["$typedesc"]['limit'].' listed items.') ); |
|
| 21 | if (relist ($mysqli,username(),$_POST['value'],$type,$table,$_POST['unit'],$_POST['quantity'],$_POST['reason'])) |
|
| @@ 12-13 (lines=2) @@ | ||
| 9 | openlog($tag, LOG_PID, $fac); |
|
| 10 | $user = username(); |
|
| 11 | ||
| 12 | if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE ) |
|
| 13 | exit ($user.': Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error); |
|
| 14 | if (remove ($mysqli,$user,$_POST['value'],$type,$table)) |
|
| 15 | print 'OK '.$typedesc.' <'.$_POST['value'].'> permanently REMOVED!'; |
|
| 16 | else |
|
| @@ 54-55 (lines=2) @@ | ||
| 51 | openlog($tag, LOG_PID, $fac); |
|
| 52 | $user = username(); |
|
| 53 | ||
| 54 | if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $_, $user)) === FALSE ) |
|
| 55 | exit ('Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error); |
|
| 56 | ||
| 57 | rlookup($mysqli,username(),$admins,$_POST['Value'],$_POST['genere'],$tables); |
|
| 58 | $mysqli->close(); |
|