#!/usr/bin/perl -wT

#----------------------------------------------------------------------
# heading     : Configuration 
# description : WEB_FILTERING
# navigation  : 6000 6950
#----------------------------------------------------------------------
# Copyright (C) 2011-2012 Firewall Services
# daniel@firewall-services.com
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#               
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#               
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
# 

use strict;
use esmith::FormMagick;
use esmith::FormMagick::Panel::webfilter;
my $f = esmith::FormMagick::Panel::webfilter->new();
$f->display();


__DATA__
<form title="FORM_TITLE" header="/etc/e-smith/web/common/head.tmpl" footer="/etc/e-smith/web/common/foot.tmpl">
    <page name="First" pre-event="print_status_message()" post-event="change_settings()">
    <description>PAGE_DESCRIPTION</description>

        <field type="select"
            id="url_filter_status"
            options="'disabled' => 'DISABLED', 'enabled' => 'ENABLED'"
            value="get_prop('squidguard', 'status')">
            <description>DESC_URL_FILTER_STATUS</description>
            <label>LABEL_URL_FILTER_STATUS</label>
        </field>

        <field type="select"
            id="av_filter_status"
            options="'disabled' => 'DISABLED', 'enabled' => 'ENABLED'"
            value="get_prop('squidclamav','status')">
            <description>DESC_AV_FILTER_STATUS</description>
            <label>LABEL_AV_FILTER_STATUS</label>
        </field>

        <field type="literal" id="blocked_desc" value="">
            <description>DESC_BLOCKED_CATEGORIES</description>
        </field>

        <subroutine src="print_categories()"/>

        <field type="textarea" id="unrestricted" cols="60" rows="10"
            value="get_list('squidguard','UnrestrictedIP')" validation="valid_ip_list()">
            <description>DESC_UNRESTRICTED</description>
            <label>LABEL_UNRESTRICTED</label>
        </field>

        <field type="textarea" id="black" cols="60" rows="10"
            value="get_wbl('black')">
            <description>DESC_BLACK</description>
            <label>LABEL_BLACK</label>
        </field>
        <field type="textarea" id="white" cols="60" rows="10"
            value="get_wbl('white')">
            <description>DESC_WHITE</description>
            <label>LABEL_WHITE</label>
        </field>

        <subroutine src="print_button('SAVE')" />
  </page>
</form>
