aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authordvserg <dv_serg@mail.ru>2011-02-17 06:15:45 +0300
committerdvserg <dv_serg@mail.ru>2011-02-17 06:15:45 +0300
commit8633628b5abe10a03528ee8d0f3da12451d5f9e4 (patch)
tree372a6ce792c6214e99e14222348385be7a386f9e /config
parent5793cd080d1ba0ad5cd7b16f2d6680ce61150afd (diff)
downloadpfsense-packages-8633628b5abe10a03528ee8d0f3da12451d5f9e4.tar.gz
pfsense-packages-8633628b5abe10a03528ee8d0f3da12451d5f9e4.tar.bz2
pfsense-packages-8633628b5abe10a03528ee8d0f3da12451d5f9e4.zip
squidGuard log changes
Diffstat (limited to 'config')
-rw-r--r--config/squidGuard/squidguard.inc136
-rw-r--r--config/squidGuard/squidguard.php109
-rw-r--r--config/squidGuard/squidguard.xml2
-rw-r--r--config/squidGuard/squidguard_blacklist.php18
-rw-r--r--config/squidGuard/squidguard_configurator.inc7
-rw-r--r--config/squidGuard/squidguard_log.php271
-rw-r--r--config/squidGuard/squidguard_log.xml136
7 files changed, 316 insertions, 363 deletions
diff --git a/config/squidGuard/squidguard.inc b/config/squidGuard/squidguard.inc
index fe903b39..c1680adb 100644
--- a/config/squidGuard/squidguard.inc
+++ b/config/squidGuard/squidguard.inc
@@ -1257,6 +1257,88 @@ function squidguard_adt_safesrch_add($rewrite_item)
return $rewrite_item;
}
+# log dump
+function squidguard_logdump($filename, $lnoffset, $lncount, $reverse)
+{
+ define('LOGSHOW_BUFSIZE', '65536');
+ $cnt = '';
+
+ if (file_exists($filename)) {
+ $fh = fopen($filename, "r");
+ if ($fh) {
+ $fsize = filesize($filename);
+
+ # take LOGSHOW_BUFSIZE bytes from end
+ if ($fsize > LOGSHOW_BUFSIZE)
+ fseek($fh, -LOGSHOW_BUFSIZE, SEEK_END);
+ $cnt = fread($fh, LOGSHOW_BUFSIZE);
+
+ fclose($fh);
+ }
+ }
+
+ $cnt = explode( "\n", $cnt );
+
+ # delete broken first element
+ array_shift($cnt);
+
+ # offset must be >= 0 and can't be > count($cnt)
+ $lnoffset = $lnoffset >= 0 ? $lnoffset : 0;
+ $lnoffset = ($lnoffset + $lncount) < count($cnt) ? $lnoffset : 0;
+
+ $pos = ($lncount + $lnoffset);
+
+ # take elements from end of array
+ $cnt = array_slice($cnt, -$pos, $lncount);
+
+ # reverse array order
+ if ($reverse) $cnt = array_reverse( $cnt );
+
+ return $cnt;
+}
+
+# dump SG log
+function squidguard_filterdump($lnoffset, $lncount, $reverse)
+{
+ $res = array();
+ $cont = squidguard_logdump(SQUIDGUARD_LOGDIR . '/squidGuard.log', &$lnoffset, $lncount, $reverse);
+
+ foreach($cont as $cn) {
+ $cn = explode(" ", trim($cn), 4);
+ $res[] = array( "{$cn[0]} {$cn[1]}", $cn[3] );
+ }
+
+ return $res;
+}
+
+# dump SG Gui log
+function squidguard_guidump($lnoffset, $lncount, $reverse)
+{
+ $res = array();
+ $cont = squidguard_logdump(SQUIDGUARD_LOGDIR . SQUIDGUARD_CONFLOGFILE, &$lnoffset, $lncount, $reverse);
+
+ foreach($cont as $cn) {
+ $cn = explode(" ", trim($cn), 4);
+ $res[] = array( "{$cn[0]} {$cn[1]}", $cn[3] );
+ }
+
+ return $res;
+}
+
+# dump SG blocked
+function squidguard_blockdump($lnoffset, $lncount, $reverse)
+{
+ $res = array();
+ $cont = squidguard_logdump(SQUIDGUARD_LOGDIR . '/' . SQUIDGUARD_LOGFILE, &$lnoffset, $lncount, $reverse);
+
+ foreach($cont as $cn) {
+ $cn = explode(" ", trim($cn), 9);
+ $res[] = array( "{$cn[0]} {$cn[1]}", $cn[5], $cn[4], "{$cn[3]} {$cn[6]} {$cn[7]} {$cn[8]}");
+ }
+
+ return $res;
+}
+
# get squid config list
function squidguard_squid_conflist( )
{
@@ -1283,60 +1365,6 @@ function squidguard_conflist( )
return $res;
}
-# get squidguard log report
-
-define('LOGSHOW_BUFSIZE', '16384');
-
-function squidguard_logrep( $filename, $lncount, $reverse )
-{
- $res = "";
-
- $lncount = $lncount ? $lncount : 50;
- $reverse = $reverse ? $reverse : false;
-
- if (file_exists($filename)) {
- $fh = fopen($filename, "r");
- if ($fh) {
- $fsize = filesize($filename);
- # take LOGSHOW_BUFSIZE bytes from end
- if ($fsize > LOGSHOW_BUFSIZE)
- fseek($fh, -LOGSHOW_BUFSIZE, SEEK_END);
- $cont = fread($fh, LOGSHOW_BUFSIZE);
- fclose($fh);
- }
-
- $cont = explode( "\n", $cont );
- $cont = array_slice($cont, -$lncount);
-
- if ($reverse) $cont = array_reverse( $cont );
-
- $res .= "<table class='tabcont' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
- $res .= "<tr><td nowrap class='listtopic' colspan='2'>Last {$lncount} entries</td></tr>\n";
- foreach($cont as $cn) {
- $cn = trim($cn);
- if ($cn) {
- $cn = explode(" ", $cn, 4);
-
- # split strings
- $p = 0;
- $pstep = 15;
- $str = $cn[3];
- $cn[3] = "";
- for ( $p = 0; $p < strlen($str); $p += $pstep ) {
- $s = substr( $str, $p, $pstep );
- if ( !$s ) break;
- $cn[3] .= $s . "<wbr/>";
- }
-
- $res .= "<tr><td nowrap class='listlr'>{$cn[0]} {$cn[1]}</td><td class='listr'>{$cn[3]}</td></tr>";
- }
- }
- $res .= "</table>";
- }
-
- return $res;
-}
-
# get blacklist list
function squidguard_blacklist_list()
{
diff --git a/config/squidGuard/squidguard.php b/config/squidGuard/squidguard.php
deleted file mode 100644
index b6c36a87..00000000
--- a/config/squidGuard/squidguard.php
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-/* $Id$ */
-/*
- sg_log.inc
- 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.
-
- 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
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- 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.
-*/
-
-$pgtitle = "Proxy filter SquidGuard";
-
-require_once('globals.inc');
-require_once('config.inc');
-require_once("guiconfig.inc");
-require_once('util.inc');
-require_once('pfsense-utils.inc');
-require_once('pkg-utils.inc');
-require_once('service-utils.inc');
-
-include("head.inc");
-
-if (file_exists("/usr/local/pkg/squidguard.inc")) {
- require_once("/usr/local/pkg/squidguard.inc");
-}
-
-$selfpath = "/squidGuard/squidguard.php";
-
-?>
-
-<!-- HTML -->
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
-<form action="sg_log.php" method="post">
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
-<!-- Tabs -->
- <tr>
- <td>
-<?php
-/* $tab_array = array();
- $tab_array[] = array(gettext("Proxy Filter"), true, "$selfpath");
- $tab_array[] = array(gettext("General settings"), false, "/pkg_edit.php?xml=squidguard.xml&amp;id=0");
- $tab_array[] = array(gettext("Default"), false, "/pkg_edit.php?xml=squidguard_default.xml&amp;id=0");
- $tab_array[] = array(gettext("ACL"), false, "/pkg.php?xml=squidguard_acl.xml");
- $tab_array[] = array(gettext("Destinations"), false, "/pkg.php?xml=squidguard_dest.xml");
- $tab_array[] = array(gettext("Times"), false, "/pkg.php?xml=squidguard_time.xml");
- $tab_array[] = array(gettext("Rewrites"), false, "/pkg.php?xml=squidguard_rewr.xml");
- display_top_tabs($tab_array);
-*/
- require_once("/usr/local/www/squidGuard/squidguard_tabs.inc");
- squidguard_tabs_show( 0 );
-?>
- </td>
- </tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
-<!-- Service -->
- <tr>
- <td class="listhdrr">Service</td>
- <td class="listhdrr">Status </td>
- <td class="listhdrr">&nbsp; </td>
- <td class="listhdrr">Version</td>
- </tr>
-</table>
-
- </td>
- </tr>
- <tr>
- <td>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
-</table>
-</form>
-
-<?php include("fend.inc"); ?>
-
-<script type="text/javascript">
- NiftyCheck();
- Rounded("div#mainarea","bl br","#FFF","#eeeeee","smooth");
-</script>
-</body>
-</html> \ No newline at end of file
diff --git a/config/squidGuard/squidguard.xml b/config/squidGuard/squidguard.xml
index 5ca3a65f..61bdf146 100644
--- a/config/squidGuard/squidguard.xml
+++ b/config/squidGuard/squidguard.xml
@@ -6,7 +6,7 @@
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
<name>squidguardgeneral</name>
- <version>1.3_1 pkg v.1.8</version>
+ <version>1.3_1 pkg v.1.9</version>
<title>Proxy filter SquidGuard: General settings</title>
<include_file>/usr/local/pkg/squidguard.inc</include_file>
<!-- Installation -->
diff --git a/config/squidGuard/squidguard_blacklist.php b/config/squidGuard/squidguard_blacklist.php
index 3bf4d17b..54699928 100644
--- a/config/squidGuard/squidguard_blacklist.php
+++ b/config/squidGuard/squidguard_blacklist.php
@@ -192,7 +192,7 @@ function getactivity(action) {
var myAjax = new Ajax.Request( url,
{
- method: 'post',
+ method: 'get',
parameters: pars,
onComplete: activitycallback
});
@@ -211,23 +211,7 @@ function activitycallback(transport) {
//alert(transport.responseText);
}
-//document.observe('dom:loaded', function() {
- // refresh
-// setTimeout('getactivity()', 150);
-//});
-
-//document.observe('dom:loaded', function() {
- // refresh
-// setTimeout('getactivity()', 150);
-//});
-
window.setTimeout('getactivity()', 150);
-//if(!ajaxStarted) {
-// try {
-// window.setTimeout('getactivity()', 150);
-// var ajaxStarted = true;
-// }catch(e){}
-//}
</script>
diff --git a/config/squidGuard/squidguard_configurator.inc b/config/squidGuard/squidguard_configurator.inc
index 5315d508..7db0f8ff 100644
--- a/config/squidGuard/squidguard_configurator.inc
+++ b/config/squidGuard/squidguard_configurator.inc
@@ -1849,9 +1849,12 @@ function acl_remove_blacklist_items($items)
# -----------------------------------------------------------------------------
# sg_script_logrotate
+# truncate SG logfile to $lines
# -----------------------------------------------------------------------------
function sg_script_logrotate()
{
+ $lines = 1000; # SG logfile truncate lines count
+
global $squidguard_config;
$sglogname = $squidguard_config[F_LOGDIR] . "/" . SQUIDGUARD_LOGFILE;
$res =
@@ -1859,9 +1862,9 @@ function sg_script_logrotate()
#!/bin/sh
#
# This file generated automaticly with SquidGuard configurator
+tail -{$lines} {$sglogname} > {$sglogname}.0
+tail -{$lines} {$sglogname}.0 > {$sglogname}
rm -f {$sglogname}.0
-cp -f {$sglogname} {$sglogname}.0
-echo '' > {$sglogname}
EOD;
return $res;
}
diff --git a/config/squidGuard/squidguard_log.php b/config/squidGuard/squidguard_log.php
index 9532c44d..e5f19407 100644
--- a/config/squidGuard/squidguard_log.php
+++ b/config/squidGuard/squidguard_log.php
@@ -30,31 +30,237 @@
$pgtitle = "Proxy filter SquidGuard: Log page";
-require_once('globals.inc');
-require_once('config.inc');
-require_once("guiconfig.inc");
-require_once('util.inc');
-require_once('pfsense-utils.inc');
-require_once('pkg-utils.inc');
-require_once('service-utils.inc');
-
-include("head.inc");
-
+require_once('guiconfig.inc');
+require_once('notices.inc');
if (file_exists("/usr/local/pkg/squidguard.inc")) {
require_once("/usr/local/pkg/squidguard.inc");
}
-$mode = $_GET["mode"];
+# ------------------------------------------------------------------------------
+# defines
+# ------------------------------------------------------------------------------
$selfpath = "/squidGuard/squidguard_log.php";
-if (!in_array( $mode, array("blocked", "fgui", "flog", "pconf", "fconf"))) $mode = "blocked";
+# ------------------------------------------------------------------------------
+# Requests
+# ------------------------------------------------------------------------------
+if ($_REQUEST['getactivity'])
+{
+ header("Content-type: text/javascript");
+ echo squidguard_log_AJAX_response( $_REQUEST );
+ exit;
+}
+
+# ------------------------------------------------------------------------------
+# Functions
+# ------------------------------------------------------------------------------
+
+function squidguard_log_AJAX_response( $request )
+{
+ $res = '';
+ $offset = $request['offset'] ? $request['offset'] : 0;
+ $reverse = $request['reverse'] == 'yes'? true : false;
+ $pcaption = '&nbsp;';
+
+ # Actions
+ switch($request['rep']) {
+ case 'filterconf':
+ if (function_exists("squidguard_conflist"))
+ $cont = squidguard_conflist( );
+ else $cont = "Function 'squidguard_conflist' not found.";
+ $res = squidguard_prep_textareacont($cont);
+ break;
+ case 'proxyconf':
+ if (function_exists("squidguard_squid_conflist"))
+ $cont = squidguard_squid_conflist( );
+ else $cont = "Function 'squidguard_squid_conflist' not found.";
+ $res = squidguard_prep_textareacont($cont);
+ break;
+ case 'guilog':
+ $res = squidguard_logrep(squidguard_guidump( &$offset, 50, true));
+ break;
+ case 'filterlog':
+ $res = squidguard_logrep(squidguard_filterdump( &$offset, 50, true));
+ break;
+ case "blocked":
+ default:
+ $res = squidguard_logrep(squidguard_blockdump( &$offset, 50, true));
+ break;
+ }
+
+ $res .= "el('offset').value = {$offset};";
+ $res .= "el('showoffset').innerHTML = {$offset};";
+ return $res;
+}
+
+function squidguard_logrep( $dump )
+{
+ $res = '';
+
+ if (!empty($dump)) {
+ if (is_array($dump)) {
+ $acount = count($dump[0]) ? count($dump[0]) : 1;
+ $res = "<table class=\'tabcont\' width=\'100%\' border=\'0\' cellpadding=\'0\' cellspacing=\'0\'>";
+ $res .= "<tr><td class=\'listtopic\' colspan=\'$acount\' nowrap>Show top 50 entries. List from the line:&nbsp;" .
+ "<span style=\'cursor: pointer;\' onclick=\'report_down();\'>&lt;&lt;</span>" .
+ "&nbsp;<span id='showoffset' >0</span>&nbsp;" .
+ "<span style=\'cursor: pointer;\' onclick=\'report_up();\'>&gt;&gt;</span>&nbsp;" .
+ "</td></tr>";
+
+ foreach($dump as $dm) {
+ if (!$dm[0] || !$dm[1]) continue;
+ # datetime
+ $dm[0] = date("d.m.Y H:i:s", strtotime($dm[0]));
+ $res .= "<tr><td class=\'listlr\' nowrap>{$dm[0]}</td>";
+
+ # col 1
+ $dm[1] = htmlentities($dm[1]);
+ $dm[1] = squidguard_html_autowrap($dm[1]);
+ $res .= "<td class=\'listr\'>{$dm[1]}</td>";
+
+ # for blocked rep
+ if (count($dm) > 2) {
+ $dm[2] = htmlentities($dm[2]);
+ $dm[2] = squidguard_html_autowrap($dm[2]);
+ $res .= "<td class=\'listr\' width=\'*\'>{$dm[2]}</td>";
+ $res .= "<td class=\'listr\'>{$dm[3]}</td>";
+ }
+ $res .= "</tr>";
+ }
+ $res .= "</table>";
+ }
+ else $res = "{$dump}";
+ } else {
+ $res = "No data.";
+ }
+
+ $res = "el(\"reportarea\").innerHTML = \"{$res}\";";
+ return $res;
+}
+
+function squidguard_prepfor_JS($cont)
+{
+ # replace for JS
+ $cont = str_replace("\n", "\\n", $cont);
+ $cont = str_replace("\r", "\\r", $cont);
+ $cont = str_replace("\t", "\\t", $cont);
+ $cont = str_replace("\"", "\'", $cont);
+ return $cont;
+}
+
+function squidguard_prep_textareacont($cont)
+{
+ $cont = squidguard_prepfor_JS($cont);
+ return
+ "el('reportarea').innerHTML = \"<br><center><textarea rows=25 cols=70 id='pconf' name='pconf' wrap='hard' readonly></textarea></center>\";" .
+ "el('pconf').innerHTML = '$cont';";
+}
+
+function squidguard_html_autowrap($cont)
+{
+ # split strings
+ $p = 0;
+ $pstep = 25;
+ $str = $cont;
+ $cont = '';
+ for ( $p = 0; $p < strlen($str); $p += $pstep ) {
+ $s = substr( $str, $p, $pstep );
+ if ( !$s ) break;
+ $cont .= $s . "<wbr/>";
+ }
+
+ return $cont;
+}
+
+# ------------------------------------------------------------------------------
+# HTML Page
+# ------------------------------------------------------------------------------
+include("head.inc");
+echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/prototype.js\"></script>\n";
?>
+<!-- Ajax Script -->
+<script type="text/javascript">
+
+function el(id) {
+ return document.getElementById(id);
+}
+
+function getactivity(action) {
+ var url = "./squidguard_log.php";
+ var pars = 'getactivity=yes';
+ var act = action;
+ var offset = 0;
+ var reverse = 'yes';
+
+ if (action == 'report_up') {
+ act = el('reptype').value;
+ offset = parseInt(el('offset').value);
+ offset = offset + 50;
+ } else
+ if (action == 'report_down') {
+ act = el('reptype').value;
+ offset = parseInt(el('offset').value);
+ offset = offset - 50;
+ offset = offset >= 0 ? offset : 0;
+ } else {
+ el('reptype').value = action ? action : 'blocklog';
+ el('offset').value = 0;
+ offset = 0;
+ }
+
+ pars = pars + '&rep=' + act + '&reverse=' + reverse + '&offset=' + offset;
+
+ var myAjax = new Ajax.Request( url,
+ {
+ method: 'get',
+ parameters: pars,
+ onComplete: activitycallback
+ });
+}
+
+function activitycallback(transport) {
+
+ if (200 == transport.status) {
+ result = transport.responseText;
+ } else {
+ el('reportarea').innerHTML = 'Error! Returned code ' + transport.status + ' ' + transport.responseText;
+ }
+ sethdtab_selected();
+}
+
+function report_up()
+{
+ getactivity('report_up');
+}
+
+function report_down()
+{
+ getactivity('report_down');
+}
+
+function sethdtab_selected()
+{
+ var sel = "hd_" + el('reptype').value;
+
+ el('hd_blocklog').style.fontWeight = (sel == 'hd_blocklog') ? 'bold' : '';
+ el('hd_guilog').style.fontWeight = (sel == 'hd_guilog') ? 'bold' : '';
+ el('hd_filterlog').style.fontWeight = (sel == 'hd_filterlog') ? 'bold' : '';
+ el('hd_proxyconf').style.fontWeight = (sel == 'hd_proxyconf') ? 'bold' : '';
+ el('hd_filterconf').style.fontWeight = (sel == 'hd_filterconf') ? 'bold' : '';
+}
+
+window.setTimeout('getactivity()', 150);
+
+</script>
+
<!-- HTML -->
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
<form action="sg_log.php" method="post">
+<input type="hidden" id="reptype" val="">
+<input type="hidden" id="offset" val="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!-- Tabs -->
<tr>
@@ -84,47 +290,24 @@ if (!in_array( $mode, array("blocked", "fgui", "flog", "pconf", "fconf"))) $mode
# Subtabs
$mode = $mode ? $mode : "blocked";
$tab_array = array();
- $tab_array[] = array(gettext("Blocked"), ($mode == "blocked"), "{$selfpath}?mode=blocked");
- $tab_array[] = array(gettext("Filter GUI log"), ($mode == "fgui"), "{$selfpath}?mode=fgui");
- $tab_array[] = array(gettext("Filter log"), ($mode == "flog"), "{$selfpath}?mode=flog");
- $tab_array[] = array(gettext("Proxy config"), ($mode == "pconf"), "{$selfpath}?mode=pconf");
- $tab_array[] = array(gettext("Filter config"), ($mode == "fconf"), "{$selfpath}?mode=fconf");
+ $tab_array[] = array(gettext("Blocked"), ($mode == "blocked"), "blocklog");
+ $tab_array[] = array(gettext("Filter GUI log"), ($mode == "fgui"), "guilog");
+ $tab_array[] = array(gettext("Filter log"), ($mode == "flog"), "filterlog");
+ $tab_array[] = array(gettext("Proxy config"), ($mode == "pconf"), "proxyconf");
+ $tab_array[] = array(gettext("Filter config"), ($mode == "fconf"), "filterconf");
echo "<big>| ";
foreach ($tab_array as $ta) {
- $bl = $ta[1] ? "<b>" : "";
- $br = $ta[1] ? "</b>" : "";
- echo "<a href=\"{$ta[2]}\">$bl{$ta[0]}$br</a> | ";
+ $id = "hd_{$ta[2]}";
+ $bb = $ta[1] ? "font-weight: bold;" : '';
+ echo "<span id='{$id}' style='cursor: pointer; {$bb}' onclick=\"getactivity('{$ta[2]}');\">{$ta[0]}</span> | ";
}
echo "</big>";
?>
</td>
</tr>
<tr>
- <td>
-<?php
- $cont = "";
- switch( $mode ) {
- case "pconf": if (function_exists("squidguard_squid_conflist"))
- $cont = squidguard_squid_conflist( );
- else $cont = "Function 'squidguard_squid_conflist' not found.";
- echo "<br><center><textarea rows='30' cols='70' name='pconf' wrap='hard' readonly>{$cont}</textarea></center>" ;
- break;
- case "fconf": if (function_exists("squidguard_conflist"))
- $cont = squidguard_conflist( );
- else $cont = "Function 'squidguard_conflist' not found.";
- echo "<br><center><textarea rows='30' cols='70' name='pconf' wrap='hard' readonly>{$cont}</textarea></center>" ;
- break;
- case "flog": if (function_exists( "squidguard_logrep" )) echo squidguard_logrep( SQUIDGUARD_LOGDIR . '/squidGuard.log', 50, false );
- break;
- case "fgui": if (function_exists( "squidguard_logrep" )) echo squidguard_logrep( SQUIDGUARD_LOGDIR . SQUIDGUARD_CONFLOGFILE, 50, false );
- break;
- case "blocked":
- default: if (function_exists( "squidguard_logrep" )) echo squidguard_logrep( SQUIDGUARD_LOGDIR . '/' . SQUIDGUARD_LOGFILE, 50, false );
- break;
- }
-?>
- </td>
+ <td id="reportarea" name="reportarea"></td>
</tr>
</table>
</div>
diff --git a/config/squidGuard/squidguard_log.xml b/config/squidGuard/squidguard_log.xml
deleted file mode 100644
index 13477bed..00000000
--- a/config/squidGuard/squidguard_log.xml
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
-<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
-<packagegui>
- <description>Describe your package here</description>
- <requirements>Describe your package requirements here</requirements>
- <faq>Currently there are no FAQ items provided.</faq>
- <name>squidguardlog</name>
- <version>none</version>
- <title>Proxy filter SquidGuard: Log</title>
- <include_file>/usr/local/pkg/squidguard.inc</include_file>
- <delete_string>A proxy server user has been deleted.</delete_string>
- <addedit_string>A proxy server user has been created/modified.</addedit_string>
- <tabs>
- <tab>
- <text>General settings</text>
- <url>/pkg_edit.php?xml=squidguard.xml&amp;id=0</url>
- </tab>
- <tab>
- <text>Common ACL</text>
- <url>/pkg_edit.php?xml=squidguard_default.xml&amp;id=0</url>
- </tab>
- <tab>
- <text>Groups ACL</text>
- <url>/pkg.php?xml=squidguard_acl.xml</url>
- </tab>
- <tab>
- <text>Target categories</text>
- <url>/pkg.php?xml=squidguard_dest.xml</url>
- </tab>
- <tab>
- <text>Times</text>
- <url>/pkg.php?xml=squidguard_time.xml</url>
- </tab>
- <tab>
- <text>Rewrites</text>
- <url>/pkg.php?xml=squidguard_rewr.xml</url>
- </tab>
- <tab>
- <text>Blacklist</text>
- <url>/squidGuard/squidguard_blacklist.php</url>
- </tab>
- <tab>
- <text>Log</text>
- <url>/squidGuard/squidguard_log.php</url>
- <active/>
- </tab>
- </tabs>
-<advanced_options>enabled</advanced_options>
- <fields>
- <field>
- <fielddescr>Log type</fielddescr>
- <fieldname>logtype</fieldname>
- <description></description>
- <type>input</type>
- <value>access_log</value>
- <options>
- <option><name>Blocked URL's log</name><value>block_log</value></option>
- <option><name>Configurator log</name><value>configurator_log</value></option>
- <option><name>squidGuard log</name><value>squidguard_log</value></option>
- <option><name>squid config</name><value>squid_config</value></option>
- <option><name>squidGuard config</name><value>squidguard_config</value></option>
- </options>
- </field>
- <field>
- <fielddescr>Log type</fielddescr>
- <fieldname>logtype</fieldname>
- <description></description>
- <type>listtopic</type>
-<name>Ext</name>
- <value>access_log</value>
- <options>
- <option><name>Blocked URL's log</name><value>block_log</value></option>
- <option><name>Configurator log</name><value>configurator_log</value></option>
- <option><name>squidGuard log</name><value>squidguard_log</value></option>
- <option><name>squid config</name><value>squid_config</value></option>
- <option><name>squidGuard config</name><value>squidguard_config</value></option>
- </options>
- </field>
- <field>
- <fielddescr>Log type</fielddescr>
- <fieldname>logtype</fieldname>
- <description></description>
- <type>input</type>
- <value>access_log</value>
- <options>
- <option><name>Blocked URL's log</name><value>block_log</value></option>
- <option><name>Configurator log</name><value>configurator_log</value></option>
- <option><name>squidGuard log</name><value>squidguard_log</value></option>
- <option><name>squid config</name><value>squid_config</value></option>
- <option><name>squidGuard config</name><value>squidguard_config</value></option>
- </options>
-<advancedfield/>
- </field>
- <field>
- <fielddescr>Log type</fielddescr>
- <fieldname>logtype2</fieldname>
- <description></description>
- <type>input</type>
- <value>access_log</value>
- <options>
- <option><name>Blocked URL's log</name><value>block_log</value></option>
- <option><name>Configurator log</name><value>configurator_log</value></option>
- <option><name>squidGuard log</name><value>squidguard_log</value></option>
- <option><name>squid config</name><value>squid_config</value></option>
- <option><name>squidGuard config</name><value>squidguard_config</value></option>
- </options>
-<advancedfield/>
- </field>
- <field>
- <fielddescr>Log type</fielddescr>
- <fieldname>logtype1</fieldname>
- <description></description>
- <type>input</type>
- <value>access_log</value>
- <options>
- <option><name>Blocked URL's log</name><value>block_log</value></option>
- <option><name>Configurator log</name><value>configurator_log</value></option>
- <option><name>squidGuard log</name><value>squidguard_log</value></option>
- <option><name>squid config</name><value>squid_config</value></option>
- <option><name>squidGuard config</name><value>squidguard_config</value></option>
- </options>
-<advancedfield/>
- </field>
- </fields>
- <custom_php_command_before_form>
- squidguard_before_form_log(&amp;$pkg);
- </custom_php_command_before_form>
- <custom_php_after_form_command>
- squidGuard_print_javascript();
- </custom_php_after_form_command>
- <custom_php_validation_command>
- </custom_php_validation_command>
- <custom_php_resync_config_command>
- </custom_php_resync_config_command>
-</packagegui> \ No newline at end of file