Keep format

master
andryyy 2017-05-06 08:09:40 +02:00
parent 1501df6e42
commit b3a161f930
1 changed files with 16 additions and 6 deletions

View File

@ -32,6 +32,11 @@ catch (PDOException $e) {
?> ?>
settings { settings {
<?php <?php
/*
// Start whitelist for forwarding hosts
*/
try { try {
$stmt = $pdo->query("SELECT `host` FROM `forwarding_hosts`"); $stmt = $pdo->query("SELECT `host` FROM `forwarding_hosts`");
$rows = $stmt->fetchAll(PDO::FETCH_COLUMN); $rows = $stmt->fetchAll(PDO::FETCH_COLUMN);
@ -39,16 +44,16 @@ try {
catch (PDOException $e) { catch (PDOException $e) {
$rows = array(); $rows = array();
} }
if (!empty($rows)) {
if ($rows)
{
?> ?>
whitelist_forwarding_hosts { whitelist_forwarding_hosts {
priority = high; priority = high;
<?php <?php
foreach ($rows as $host) { foreach ($rows as $host):
echo "\t\t" . 'ip = "' . $host . '";' . "\n"; ?>
} ip = "<?=$host;?>";
<?php
endforeach;
?> ?>
apply "default" { apply "default" {
actions { actions {
@ -61,6 +66,11 @@ foreach ($rows as $host) {
} }
<?php <?php
} }
/*
// Start custom scores for users
*/
$stmt = $pdo->query("SELECT DISTINCT `object` FROM `filterconf` WHERE `option` = 'highspamlevel' OR `option` = 'lowspamlevel'"); $stmt = $pdo->query("SELECT DISTINCT `object` FROM `filterconf` WHERE `option` = 'highspamlevel' OR `option` = 'lowspamlevel'");
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);