diff options
author | doktornotor <notordoktor@gmail.com> | 2015-09-24 19:13:29 +0200 |
---|---|---|
committer | doktornotor <notordoktor@gmail.com> | 2015-09-24 19:13:29 +0200 |
commit | f25d84fc6ab5ddd9a4746ccdc02c50decb8de68d (patch) | |
tree | 69463abf8504b2966e440976b309b2bd3c8acfe0 /config/squid3 | |
parent | 458d92c27ad0aaee40763689a0f644c848ebe465 (diff) | |
download | pfsense-packages-f25d84fc6ab5ddd9a4746ccdc02c50decb8de68d.tar.gz pfsense-packages-f25d84fc6ab5ddd9a4746ccdc02c50decb8de68d.tar.bz2 pfsense-packages-f25d84fc6ab5ddd9a4746ccdc02c50decb8de68d.zip |
squid3 - code style fixes
Diffstat (limited to 'config/squid3')
-rw-r--r-- | config/squid3/34/squid_clwarn.php | 80 |
1 files changed, 38 insertions, 42 deletions
diff --git a/config/squid3/34/squid_clwarn.php b/config/squid3/34/squid_clwarn.php index 8de016f3..5ddf8171 100644 --- a/config/squid3/34/squid_clwarn.php +++ b/config/squid3/34/squid_clwarn.php @@ -1,22 +1,20 @@ <?php -/* ========================================================================== */ /* squid_clwarn.php - part of pfSense (http://www.pfSense.com) + part of pfSense (https://www.pfSense.org/) Copyright (C) 2015 Marcello Coutinho + Copyright (C) 2015 ESF, LLC All rights reserved. - */ -/* ========================================================================== */ -/* + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY @@ -28,49 +26,46 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -/* ========================================================================== */ +*/ $VERSION = '6.10'; - $url = $_REQUEST['url']; -$virus=($_REQUEST['virus']?$_REQUEST['virus']:$_REQUEST['malware']); -$source = preg_replace("@/-@","",$_REQUEST['source']); +$url = $_REQUEST['url']; +$virus = ($_REQUEST['virus'] ? $_REQUEST['virus'] : $_REQUEST['malware']); +$source = preg_replace("@/-@", "", $_REQUEST['source']); $user = $_REQUEST['user']; - -$TITLE_VIRUS = "SquidClamAv $VERSION: Virus detected!"; +$TITLE_VIRUS = "SquidClamav $VERSION: Virus detected!"; $subtitle = 'Virus name'; $errorreturn = 'This file cannot be downloaded.'; $urlerror = 'contains a virus'; -if (preg_match("/Safebrowsing/",$virus)) { - $TITLE_VIRUS = "SquidClamAv $VERSION: Unsafe Browsing detected"; - $subtitle = 'Malware / pishing type'; +if (preg_match("/Safebrowsing/", $virus)) { + $TITLE_VIRUS = "SquidClamav $VERSION: Unsafe Browsing detected"; + $subtitle = 'Malware / phishing type'; $urlerror = 'is listed as suspicious'; - $errorreturn = 'This page can not be displayed'; + $errorreturn = 'This page cannot be displayed'; } -# Remove clamd infos +// Remove clamd infos $vp[0]="/stream: /"; $vp[1]="/ FOUND/"; $vr[0]=""; $vr[1]=""; -$virus = preg_replace($vp,$vr,$virus); - -error_log(date("Y-m-d H:i:s")." | VIRUS FOUND | ".$virus." | ".$url." | ".$source." | ".$user."\n", 3, "/var/log/c-icap/virus.log"); +$virus = preg_replace($vp, $vr, $virus); +error_log(date("Y-m-d H:i:s") . " | VIRUS FOUND | " . $virus . " | " . $url . " | " . $source . " | " . $user . "\n", 3, "/var/log/c-icap/virus.log"); ?> <style type="text/css"> .visu { border:1px solid #C0C0C0; color:#FFFFFF; - position: relative; - min-width: 13em; - max-width: 52em; - margin: 4em auto; - border: 1px solid ThreeDShadow; - border-radius: 10px; - padding: 3em; - -moz-padding-start: 30px; + position: relative; + min-width: 13em; + max-width: 52em; + margin: 4em auto; + border: 1px solid ThreeDShadow; + border-radius: 10px; + padding: 3em; + -moz-padding-start: 30px; background-color: #8b0000; } .visu h2, .visu h3, .visu h4 { @@ -80,17 +75,18 @@ error_log(date("Y-m-d H:i:s")." | VIRUS FOUND | ".$virus." | ".$url." | ".$sourc font-weight:bolder; } </style> - <div class="visu"> +<div class="visu"> <h2><?=$TITLE_VIRUS?></h2> - <hr> + <hr /> <p> - The requested URL <?=$url?> <?=$urlerror?><br> + The requested URL <?=$url?> <?=$urlerror?><br/> <?=$subtitle?>: <?=$virus?> - <p> + </p><p> <?=$errorreturn?> - <p> + </p><p> Origin: <?=$source?> / <?=$user?> - <p> - <hr> - <font color="blue"> Powered by <a href="http://squidclamav.darold.net/">SquidClamAv <?=$VERSION?></a>.</font> - </div> + </p><p> + <hr /> + <font color="blue"> Powered by <a href="http://squidclamav.darold.net/">SquidClamav <?=$VERSION?></a>.</font> + </p> +</div> |