aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-05-29 23:36:05 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-05-29 23:36:05 +0000
commit743d4b63c9fb26cb1601e2e81a2c2d583d18a8b6 (patch)
tree865d8e2155de0870f9e2d88288a355624e2d1d85
parenta2e245e5a0d44c100fea836b04fac1ad73c75c18 (diff)
downloadpfsense-packages-743d4b63c9fb26cb1601e2e81a2c2d583d18a8b6.tar.gz
pfsense-packages-743d4b63c9fb26cb1601e2e81a2c2d583d18a8b6.tar.bz2
pfsense-packages-743d4b63c9fb26cb1601e2e81a2c2d583d18a8b6.zip
Beginning of lightsquid package.
-rw-r--r--packages/lightsquid/lightsquid.inc392
-rw-r--r--packages/lightsquid/lightsquid.xml183
2 files changed, 575 insertions, 0 deletions
diff --git a/packages/lightsquid/lightsquid.inc b/packages/lightsquid/lightsquid.inc
new file mode 100644
index 00000000..eb9d4a9a
--- /dev/null
+++ b/packages/lightsquid/lightsquid.inc
@@ -0,0 +1,392 @@
+<?php
+/*
+ lightsquid.inc
+ Copyright (C) 2006 Serg Dvorianceev
+ 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.
+*/
+
+require_once('globals.inc');
+require_once('config.inc');
+require_once('util.inc');
+require_once('pfsense-utils.inc');
+require_once('pkg-utils.inc');
+require_once('filter.inc');
+require_once('service-utils.inc');
+
+// enable GUI debug
+define('LS_GUI_DEBUG', 'on');
+define('LS_LOG_FILE', '/tmp/lightsquid_gui.log');
+
+// configuration settings !-- CHECK THIS --!
+define('LS_CONFIGPATH', '/usr/local/etc/lightsquid');
+define('LS_CONFIGFILE', 'lightsquid.cfg');
+define('LS_CONFIGFILE_DIST', 'lightsquid.cfg.dist');
+define('LS_TEMPLATEPATH', '/usr/local/www/lightsquid/tpl');
+define('LS_LANGPATH', '/usr/local/share/lightsquid/lang');
+define('LS_REPORTPATH', '/var/lightsquid/report');
+define('LS_SQUIDLOGPATH', '/var/squid/log');
+define('LS_SQUIDLOG', 'access.log');
+define('LS_IP2NAMEPATH', '/usr/local/libexec/lightsquid');
+
+define('CRONTAB_FILE', '/var/cron/tabs/root');
+define('CRONTAB_LS_TEMPLATE', '/usr/bin/perl /usr/local/www/lightsquid/lightparser.pl');
+define('CRONTAB_LS_JOBKEY', '/lightparser.pl');
+define('CRONTAB_SQUID_TEMPLATE', '/usr/local/etc/squid /usr/local/sbin/squid -k rotate > /dev/null');
+define('CRONTAB_SQUID_JOBKEY', '/squid -k rotate');
+
+// default values
+define('LS_DEF_IP2NAME', 'dns');
+define('LS_DEF_SQUIDLOGTYPE', '0');
+define('LS_DEF_SKIPURL', 'zzz\.zzz');
+define('LS_DEF_LANG', 'en');
+define('LS_DEF_TEMPLATE', 'base');
+define('LS_DEF_BARCOLOR', 'orange');
+
+// variable names
+define('LS_VAR_CFGPATH', 'cfgpath');
+define('LS_VAR_LOGPATH', 'logpath');
+define('LS_VAR_TPLPATH', 'tplpath');
+define('LS_VAR_LANGPATH', 'langpath');
+define('LS_VAR_LANG', 'lang');
+define('LS_VAR_REPORTPATH', 'reportpath');
+define('LS_VAR_SQUIDLOGTYPE', 'squidlogtype');
+define('LS_VAR_SKIPURL', 'skipurl');
+define('LS_VAR_IP2NAMEPATH', 'ip2namepath');
+define('LS_VAR_IP2NAME', 'ip2name');
+define('LS_VAR_TEMPLATE', 'templatename');
+define('LS_VAR_BARCOLOR', 'barcolor');
+
+// xml variables
+define('LS_XML_LANG', 'lightsquid_lang');
+define('LS_XML_SKIPURL', 'lightsquid_skipurl');
+define('LS_XML_IP2NAME', 'lightsquid_ip2name');
+define('LS_XML_TEMPLATE', 'lightsquid_template');
+define('LS_XML_BARCOLOR', 'lightsquid_barcolor');
+define('LS_XML_SHEDULERTIME', 'lightsquid_refreshsheduler_time');
+define('LS_XML_SQUID_SHEDULERTIME', 'lightsquid_squidrotatelog_sheduler_time');
+
+function lightsquid_install() {
+ update_log("lightsquid_install: started");
+ // create lightsquid report catalog
+ if (!file_exists(LS_REPORTPATH)) {
+ update_log("lightsquid_install: Create report dir " . LS_REPORTPATH);
+ mwexec("mkdir -p " . LS_REPORTPATH);
+ }
+ update_log("lightsquid_install: stopped");
+}
+
+function lightsquid_deinstall() {
+ update_log("lightsquid_deinstall: started");
+
+ // delete cron task's
+ ls_setup_cron("lightsquid_squid_rotate", "", "", false);
+ ls_setup_cron("lightsquid_parser", "", "", false);
+ // control shoot to head :)
+ mwexec("pkg_delete lightsquid-1.7.1");
+
+ update_log("lightsquid_deinstall: stopped");
+}
+
+function lightsquid_resync() {
+ global $config;
+ $tm = '';
+ $tm_squid = '';
+
+ // debug
+ $light_test = array();
+ if (($_POST['Submit'] === 'Save') or !isset($_POST['Submit'])) {
+ $lsconf_var = array();
+
+ // variables for update
+ $lsconf_var[LS_VAR_CFGPATH] = "\"" . LS_CONFIGPATH . "\"";
+ $lsconf_var[LS_VAR_LOGPATH] = "\"" . LS_SQUIDLOGPATH . "\"";
+ $lsconf_var[LS_VAR_TPLPATH] = "\"" . LS_TEMPLATEPATH . "\"";
+ $lsconf_var[LS_VAR_LANGPATH] = "\"" . LS_LANGPATH . "\"";
+ $lsconf_var[LS_VAR_REPORTPATH] = "\"" . LS_REPORTPATH . "\"";
+ $lsconf_var[LS_VAR_IP2NAMEPATH] = "\"" . LS_IP2NAMEPATH . "\"";
+
+ $lsconf_var[LS_VAR_LANG] = "\"" . LS_DEF_LANG . "\"";
+ $lsconf_var[LS_VAR_TEMPLATE] = "\"" . LS_DEF_TEMPLATE . "\"";
+ $lsconf_var[LS_VAR_IP2NAME] = "\"" . LS_DEF_IP2NAME . "\"";
+ $lsconf_var[LS_VAR_SKIPURL] = "\"" . LS_DEF_SKIPURL . "\"";
+ $lsconf_var[LS_VAR_SQUIDLOGTYPE] = LS_DEF_SQUIDLOGTYPE;
+
+ // update variables from package GUI config
+ if(isset($config['installedpackages']['lightsquid']['config'][0])) {
+ $cfg = $config['installedpackages']['lightsquid']['config'][0];
+
+ $tm = $cfg[LS_XML_SHEDULERTIME];
+ $tm_squid = $cfg[LS_XML_SQUID_SHEDULERTIME];
+
+ if (isset($cfg[LS_XML_LANG]) and !empty($cfg[LS_XML_LANG]))
+ $lsconf_var[LS_VAR_LANG] = "\"" . $cfg[LS_XML_LANG] . "\";";
+
+ if (isset($cfg[LS_XML_SKIPURL]) and !empty($cfg[LS_XML_SKIPURL]))
+ $lsconf_var[LS_VAR_SKIPURL] = "\"" . $cfg[LS_XML_SKIPURL] . "\";";
+
+ if (isset($cfg[LS_XML_IP2NAME]) and !empty($cfg[LS_XML_IP2NAME] ))
+ $lsconf_var[LS_VAR_IP2NAME] = "\"" . $cfg[LS_XML_IP2NAME] . "\";";
+
+ if (isset($cfg[LS_XML_TEMPLATE]) and !empty($cfg[LS_XML_TEMPLATE]))
+ $lsconf_var[LS_VAR_TEMPLATE] = "\"" . $cfg[LS_XML_TEMPLATE] . "\";";
+
+ if (isset($cfg[LS_XML_BARCOLOR]) and !empty($cfg[LS_XML_BARCOLOR]))
+ $lsconf_var[LS_VAR_BARCOLOR] = "\"" . $cfg[LS_XML_BARCOLOR] . "\";";
+ }
+
+ $lsconf = "";
+ $lsconf_file = LS_CONFIGPATH . "/" . LS_CONFIGFILE;
+ // open lightsquid config
+ if (file_exists($lsconf_file)) {
+ $lsconf = file_get_contents($lsconf_file);
+ update_log("Load config file $lsconf_file");
+ } else {
+ update_log("Error loading config file $lsconf_file");
+ // or open from 'lightsquid.cfg.dist'
+ $lsconf_dist_file = LS_CONFIGPATH . "/" . LS_CONFIGFILE_DIST;
+ if (file_exists($lsconf_dist_file)) {
+ $lsconf = file_get_contents($lsconf_dist_file);
+ update_log("Load config dist. file $lsconf_dist_file");
+ } else update_log("Error loading config dist. file $lsconf_dist_file");
+ }
+
+ // update lightsquid config
+ if (!empty($lsconf)) {
+ $lsconf = explode("\n", $lsconf);
+ foreach ($lsconf_var as $key => $val) {
+ for($i = 0; $i < count($lsconf); $i++) {
+ $s = trim($lsconf[$i]);
+ $e_key = "^[$]" . $key . "[ ]*[=]+";
+# update_log("Regular: eregi(\"$e_key," . "'$s')"); // debug regular template
+ if (eregi($e_key, $s)) {
+# update_log("Regular PASSED: eregi(\"$e_key," . "'$s')"); // debug regular template
+ $lsconf[$i] = '$' . "$key = $val;";
+ update_log("Update config: $key=$val");
+ }
+ }
+ }
+
+ $lsconf = implode("\n", $lsconf);
+ $fl = file_put_contents($lsconf_file, $lsconf);
+ update_log("Save config file $lsconf_file ($fl)");
+ }
+
+ // set shedule - refresh data job
+ if ($tm) {
+ $on = false;
+ $opt = array("*", "*", "*", "*", "*", "root", CRONTAB_LS_TEMPLATE);
+ switch($tm) {
+ case 'lhp_none': $on = false; break;
+ case 'lhp_10m': $on = true; $opt[0]= "*/10"; break;
+ case 'lhp_20m': $on = true; $opt[0]= "*/20"; break;
+ case 'lhp_30m': $on = true; $opt[0]= "*/30"; break;
+ case 'lhp_40m': $on = true; $opt[0]= "*/40"; break;
+ case 'lhp_50m': $on = true; $opt[0]= "*/50"; break;
+ case 'lhp_60m': $on = true; $opt[0]= "*/60"; break;
+ case 'lhp_2h': $on = true; $opt[0]= "0"; $opt[1]= "*/2"; break;
+ case 'lhp_3h': $on = true; $opt[0]= "0"; $opt[1]= "*/3"; break;
+ case 'lhp_4h': $on = true; $opt[0]= "0"; $opt[1]= "*/4"; break;
+ case 'lhp_6h': $on = true; $opt[0]= "0"; $opt[1]= "*/6"; break;
+ case 'lhp_8h': $on = true; $opt[0]= "0"; $opt[1]= "*/8"; break;
+ case 'lhp_12h': $on = true; $opt[0]= "0"; $opt[1]= "*/12"; break;
+ case 'lhp_24h': $on = true; $opt[0]= "0"; $opt[1]= "*/24"; break;
+ }
+ ls_setup_cron("lightsquid_parser", $opt, CRONTAB_LS_JOBKEY, $on);
+ } else
+ ls_setup_cron("lightsquid_parser", "", "", false);
+
+ // set shedule - squid rotate
+ if ($tm_squid) {
+ $on = false;
+ $opt = array("0", "0", "*", "*", "*", "root", CRONTAB_SQUID_TEMPLATE);
+ switch($tm_squid) {
+ // day of month
+ case 'lsr_none':$on = false; break;
+ case 'lsr_d1': $on = true; $opt[2]= "*/1"; break;
+ case 'lsr_d2': $on = true; $opt[2]= "*/2"; break;
+ case 'lsr_d3': $on = true; $opt[2]= "*/3"; break;
+ case 'lsr_d4': $on = true; $opt[2]= "*/4"; break;
+ case 'lsr_d5': $on = true; $opt[2]= "*/5"; break;
+ case 'lsr_d6': $on = true; $opt[2]= "*/6"; break;
+ case 'lsr_d10': $on = true; $opt[2]= "*/10"; break;
+ case 'lsr_d15': $on = true; $opt[2]= "*/15"; break;
+ case 'lsr_d20': $on = true; $opt[2]= "*/20"; break;
+ case 'lsr_d25': $on = true; $opt[2]= "*/25"; break;
+ case 'lsr_d30': $on = true; $opt[2]= "*/30"; break;
+ // day of week
+ case 'lsr_w1': $on = true; $opt[4]= "*/1"; break;
+ case 'lsr_w2': $on = true; $opt[4]= "*/1"; break;
+ case 'lsr_w3': $on = true; $opt[4]= "*/1"; break;
+ case 'lsr_w4': $on = true; $opt[4]= "*/1"; break;
+ case 'lsr_w5': $on = true; $opt[4]= "*/1"; break;
+ case 'lsr_w6': $on = true; $opt[4]= "*/1"; break;
+ case 'lsr_w7': $on = true; $opt[4]= "*/1"; break;
+ }
+ ls_setup_cron("lightsquid_squid_rotate", $opt, CRONTAB_SQUID_JOBKEY, $on);
+ } else
+ ls_setup_cron("lightsquid_squid_rotate", "", "", false);
+ }
+
+ if ($_POST['Submit'] === 'Refresh now') refresh_now();
+ if ($_POST['Submit'] === 'Refresh full') refresh_full();
+}
+
+// setup cron tasks
+// original source from '/etc/inc/pfsense-utils.inc' function 'tdr_install_cron'
+// this function safe for other tasks
+// *****************************************************************************
+// - $task_name: cron task name (for config identification) /for searching my cron tasks/
+// - $options: array=[0:minute][1:hour][2:mday][3:month][4:wday][5:who][6:cmd]
+// - $task_key: cron command key for searching
+// - $on_off: true-'on task', false-'off' task
+// required: $task_nameand $on_off
+// *****************************************************************************
+define('FIELD_TASKNAME', 'task_name');
+
+function ls_setup_cron($task_name, $options, $task_key, $on_off) {
+ global $config;
+ update_log("ls_setup_cron: start task_name=$task_name, task_key=$task_key, on_off=$on_off");
+
+ // check input params
+ if(!$task_name) {
+ update_log("ls_setup_cron: exit - uncomplete input params.");
+ return;
+ }
+ // search cron config settings
+ if(!$config['cron']['item']) {
+ update_log("ls_setup_cron: exit - 'config.xml'->[cron]->[items] not found.");
+ return;
+ }
+
+ // searching task
+ $x_name='';
+ $x=0;
+ foreach($config['cron']['item'] as $item) {
+ if($item[FIELD_TASKNAME] and $task_name and ($item[FIELD_TASKNAME]==$task_name)) {
+ update_log("ls_setup_cron: found cron task with name=$task_name on [$x_name].");
+ $x_name = $x;
+ }
+ $x++;
+ }
+ unset($x);
+
+ // install cron:
+ // - if not found with such name and not found 'task_key', when install task
+ // - if found task with such name, when renew this item (delete and add new with all check's)
+ // deinstall cron:
+ // - deinstall only, if found such name
+ switch($on_off) {
+ case true:
+ if($task_key) {
+ // searching task
+ $x=0;
+ $x_task='';
+ foreach($config['cron']['item'] as $item) {
+ if(strstr($item['command'], $task_key)) {
+ $x_task = $x;
+ update_log("ls_setup_cron: found cron task with key=$task_key on [$x].");
+ }
+ $x++;
+ }
+ unset($x);
+
+ if($x_task and (!$x_name or ($x_task != $x_name))) { // other task with $task_key alredy installed
+ update_log("ls_setup_cron: can't add cron task, while such task exists $task_key");
+ break;
+ } else {
+ if(is_array($options)) {
+
+ // delete this item (by name)
+ if($x_name > 0)
+ unset($config['cron']['item'][$x_name]);
+ // and add new
+ $cron_item = array();
+ $cron_item[FIELD_TASKNAME] = $task_name;
+ $cron_item['minute'] = $options[0];
+ $cron_item['hour'] = $options[1];
+ $cron_item['mday'] = $options[2];
+ $cron_item['month'] = $options[3];
+ $cron_item['wday'] = $options[4];
+ $cron_item['who'] = $options[5];
+ $cron_item['command'] = $options[6];
+ // check options
+ if(!$cron_item['who']) $cron_item['who'] = "nobody";
+ $config['cron']['item'][] = $cron_item;
+ write_config("Installed cron task '$task_name' for 'lightsquid' package");
+ configure_cron();
+ // log
+ update_log("ls_setup_cron: add cron task '$task_name'='" . $cron_item['command'] . "'");
+ }
+ }
+ } else
+ // log
+ update_log("ls_setup_cron: input prm 'task_key' not defined");
+ break;
+ case false:
+ // delete cron task with only name $task_name
+ if($x_name > 0) {
+ unset($config['cron']['item'][$x_name]);
+ write_config();
+ // log
+ update_log("ls_setup_cron: delete cron task '$task_name'");
+ }
+ break;
+ }
+ configure_cron();
+ update_log("ls_setup_cron: end");
+}
+
+function update_log($log) {
+ if (LS_GUI_DEBUG === 'on') {
+ $t_ls_log = '';
+ if (file_exists(LS_LOG_FILE))
+ $t_ls_log = file_get_contents(LS_LOG_FILE);
+ $t_ls_log .= "\n$log";
+ file_put_contents(LS_LOG_FILE, $t_ls_log);
+ }
+}
+
+function refresh_now() {
+ $cmd = CRONTAB_LS_TEMPLATE;
+ update_log("refresh_now: execute command '$cmd'");
+ mwexec_bg($cmd);
+}
+
+function refresh_full() {
+ $cmd = CRONTAB_LS_TEMPLATE;
+ $log_name = LS_SQUIDLOG;
+ update_log("refresh_full: start");
+ for ($i=0; $i<100; $i++) {
+ $lg = LS_SQUIDLOG . ".$i";
+ if (file_exists(LS_SQUIDLOGPATH . "/$lg")) {
+ update_log("refresh_full: execute command '$cmd $lg'");
+ mwexec_bg("$cmd $lg");
+ } else
+ // really go <= 10 cycles
+ break;
+ }
+ update_log("refresh_full: stop");
+}
+
+?>
diff --git a/packages/lightsquid/lightsquid.xml b/packages/lightsquid/lightsquid.xml
new file mode 100644
index 00000000..7b7ee8a2
--- /dev/null
+++ b/packages/lightsquid/lightsquid.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<packagegui>
+ <name>lightsquid</name>
+ <title>Services: Proxy server Report(LightSquid) -> Settings</title>
+ <category>Status</category>
+ <version>1.7.1</version>
+ <include_file>lightsquid.inc</include_file>
+
+ <!-- Installation -->
+ <menu>
+ <name>Proxy server report</name>
+ <tooltiptext>Proxy filter statistic report</tooltiptext>
+ <section>Services</section>
+ <url>/pkg_edit.php?xml=lightsquid.xml&amp;id=0</url>
+ </menu>
+ <additional_files_needed>
+ <item>http://www.pfsense.com/packages/config/lightsquid/lightsquid.inc</item>
+ </additional_files_needed>
+ <tabs>
+ <tab>
+ <text>Settings</text>
+ <url>/pkg_edit.php?xml=lightsquid.xml&amp;id=0</url>
+ <active/>
+ </tab>
+ <tab>
+ <text>Lightsquid Report</text>
+ <url>/lightsquid/index.cgi</url>
+ </tab>
+ </tabs>
+ <fields>
+ <field>
+ <fieldname>lightsquid_lang</fieldname>
+ <fielddescr>Language</fielddescr>
+ <description>Select report language</description>
+ <type>select</type>
+ <value>lang_eng</value>
+ <options>
+ <option><value>bg</value><name>Bulgarian</name></option>
+ <option><value>cz</value><name>Czech</name></option>
+ <option><value>eng</value><name>English</name></option>
+ <option><value>fr</value><name>French</name></option>
+ <option><value>hu</value><name>Hungarian</name></option>
+ <option><value>it</value><name>Italian</name></option>
+ <option><value>pt_br</value><name>Portuguese - Brazil</name></option>
+ <option><value>ru</value><name>Russian</name></option>
+ <option><value>ru-koi8</value><name>Russian KOI-8</name></option>
+ <option><value>sp</value><name>Spanish</name></option>
+ <option><value>ua</value><name>Ukrainian</name></option>
+ </options>
+ </field>
+
+ <field>
+ <fieldname>lightsquid_barcolor</fieldname>
+ <fielddescr>Bar color</fielddescr>
+ <description>Select bar color</description>
+ <type>select</type>
+ <value>orange</value>
+ <options>
+ <option><value>orange</value><name>Orange</name></option>
+ <option><value>blue</value><name>Blue</name></option>
+ <option><value>green</value><name>Green</name></option>
+ <option><value>yellow</value><name>Yellow</name></option>
+ <option><value>brown</value><name>Brown</name></option>
+ <option><value>red</value><name>Red</name></option>
+ </options>
+ </field>
+
+ <field>
+ <fieldname>lightsquid_template</fieldname>
+ <fielddescr>Report scheme</fielddescr>
+ <description>Select report scheme</description>
+ <type>select</type>
+ <value>base</value>
+ <options>
+ <option><value>base</value><name>Base</name></option>
+ <option><value>text</value><name>Text</name></option>
+ </options>
+ </field>
+
+ <field>
+ <fieldname>lightsquid_ip2name</fieldname>
+ <fielddescr>IP resolve method (future)</fielddescr>
+ <description>Select IP to Name resolve method</description>
+ <type>select</type>
+ <value>dns</value>
+ <options>
+ <option><value>dns</value><name>DNS</name></option>
+ <option><value>simple</value><name>Simple</name></option>
+ </options>
+ </field>
+
+ <field>
+ <fieldname>lightsquid_refreshsheduler_time</fieldname>
+ <fielddescr>Refresh sheduler</fielddescr>
+ <description>
+ Select data refresh period. System will execute task every XX time as from 00:00 hours. &lt;br&gt;
+ For example: if selected 2h - system wil start task at 0-2-4-..-24h. &lt;br&gt;
+ Note: (!),(*) - use only for powerful system; (+) - recomended. &lt;br&gt;
+ Press button below for start background refresh (this take some time). &lt;br&gt;
+ &lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Refresh now&quot;&gt;&lt;br&gt;
+ &lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Refresh full&quot;&gt;
+ </description>
+ <type>select</type>
+ <value>lhp_none</value>
+ <options>
+ <option><value>lhp_none</value><name>none</name></option>
+ <option><value>lhp_10m</value><name>10min(!)</name></option>
+ <option><value>lhp_20m</value><name>20min(*)</name></option>
+ <option><value>lhp_35m</value><name>30min(+)</name></option>
+ <option><value>lhp_40m</value><name>40min(+)</name></option>
+ <option><value>lhp_50m</value><name>50min(+)</name></option>
+ <option><value>lhp_60m</value><name>60min(+)</name></option>
+ <option><value>lhp_2h</value><name>2h</name></option>
+ <option><value>lhp_3h</value><name>3h</name></option>
+ <option><value>lhp_4h</value><name>4h</name></option>
+ <option><value>lhp_6h</value><name>6h</name></option>
+ <option><value>lhp_8h</value><name>8h</name></option>
+ <option><value>lhp_12h</value><name>12h</name></option>
+ <option><value>lhp_24h</value><name>24(00)h</name></option>
+ </options>
+ </field>
+ <field>
+ <fieldname>lightsquid_squidrotatelog_sheduler_time</fieldname>
+ <fielddescr>Squid rotate log sheduler</fielddescr>
+ <description>
+ Select squid log rotate period. System will execute task every XX time as from 00:00 hours. &lt;br&gt;
+ This option will allow the updating of the faster &lt;br&gt;
+ For example: if selected '2 day' - system wil start task every 2 day of month. &lt;br&gt;
+ This option will allow the updating of the faster &lt;br&gt;
+ Note: You must choose from that the rate of filling dialogue access.log squid; &lt;br&gt;
+ The more customers, the more often it should be the job.
+ </description>
+ <type>select</type>
+ <value>lsr_none</value>
+ <options>
+ <option><value>lsr_none</value><name>none</name></option>
+ <option><value>lsr_d1</value><name>every 1 day</name></option>
+ <option><value>lsr_d2</value><name>every 2 day</name></option>
+ <option><value>lsr_d3</value><name>every 3 day</name></option>
+ <option><value>lsr_d4</value><name>every 4 day</name></option>
+ <option><value>lsr_d5</value><name>every 5 day</name></option>
+ <option><value>lsr_d6</value><name>every 6 day</name></option>
+ <option><value>lsr_w1</value><name>weekly at Monday</name></option>
+ <option><value>lsr_w2</value><name>weekly at Tuesday</name></option>
+ <option><value>lsr_w3</value><name>weekly at Wednesday</name></option>
+ <option><value>lsr_w4</value><name>weekly at Thursday</name></option>
+ <option><value>lsr_w5</value><name>weekly at Friday</name></option>
+ <option><value>lsr_w6</value><name>weekly at Saturday</name></option>
+ <option><value>lsr_w7</value><name>weekly at Sunday</name></option>
+ <option><value>lsr_d10</value><name>every 10 day</name></option>
+ <option><value>lsr_d15</value><name>every 15 day</name></option>
+ <option><value>lsr_d20</value><name>every 20 day</name></option>
+ <option><value>lsr_d25</value><name>every 25 day</name></option>
+ <option><value>lsr_d30</value><name>every 30 day</name></option>
+ </options>
+ </field>
+ <field>
+ <fieldname>lightsquid_skipurl</fieldname>
+ <fielddescr>Skip url</fielddescr>
+ <description>
+ If you want skip some sites from stat, example our local www server
+ Example, if you want skip LOCAL site, put it here
+ zdd.com|192.168.1.|cnn.com
+ </description>
+ <type>textarea</type>
+ <cols>60</cols>
+ <rows>5</rows>
+ </field>
+ </fields>
+ <custom_add_php_command>
+ </custom_add_php_command>
+ <custom_php_resync_config_command>
+ lightsquid_resync();
+ </custom_php_resync_config_command>
+ <custom_php_install_command>
+ lightsquid_install();
+ lightsquid_resync();
+ </custom_php_install_command>
+ <custom_php_deinstall_command>
+ lightsquid_deinstall();
+ </custom_php_deinstall_command>
+</packagegui> \ No newline at end of file