From: <dot...@us...> - 2011-03-24 05:26:46
|
Revision: 5550 http://ipcop.svn.sourceforge.net/ipcop/?rev=5550&view=rev Author: dotzball Date: 2011-03-24 05:26:36 +0000 (Thu, 24 Mar 2011) Log Message: ----------- Change indentation tabs to spaces. Modified Paths: -------------- ipcop/trunk/html/cgi-bin/proxy.cgi Modified: ipcop/trunk/html/cgi-bin/proxy.cgi =================================================================== --- ipcop/trunk/html/cgi-bin/proxy.cgi 2011-03-23 20:57:13 UTC (rev 5549) +++ ipcop/trunk/html/cgi-bin/proxy.cgi 2011-03-24 05:26:36 UTC (rev 5550) @@ -233,21 +233,21 @@ if (-e "/var/ipcop/updatexlrator/version") { $updaccel_addon = 1; } if ($urlfilter_addon) { - $filtersettings{'CHILDREN'} = '5'; - if (-e "/var/ipcop/urlfilter/settings") { - &General::readhash("/var/ipcop/urlfilter/settings", \%filtersettings); - } - $urlfilterversion = `cat /var/ipcop/urlfilter/version`; - $urlfilterversion =~ s/([^\s]+).*/$1/; + $filtersettings{'CHILDREN'} = '5'; + if (-e "/var/ipcop/urlfilter/settings") { + &General::readhash("/var/ipcop/urlfilter/settings", \%filtersettings); + } + $urlfilterversion = `cat /var/ipcop/urlfilter/version`; + $urlfilterversion =~ s/([^\s]+).*/$1/; } if ($updaccel_addon) { - $updaccelsettings{'CHILDREN'} = '10'; - if (-e "/var/ipcop/updatexlrator/settings") { - &General::readhash("/var/ipcop/updatexlrator/settings", \%updaccelsettings); - } - $updaccelversion = `cat /var/ipcop/updatexlrator/version`; - $updaccelversion =~ s/([^\s]+).*/$1/; + $updaccelsettings{'CHILDREN'} = '10'; + if (-e "/var/ipcop/updatexlrator/settings") { + &General::readhash("/var/ipcop/updatexlrator/settings", \%updaccelsettings); + } + $updaccelversion = `cat /var/ipcop/updatexlrator/version`; + $updaccelversion =~ s/([^\s]+).*/$1/; } &Header::showhttpheaders(); @@ -344,11 +344,11 @@ $proxysettings{'IDENT_USER_ACL'} = 'positive'; if ($urlfilter_addon) { - $proxysettings{'ENABLE_FILTER'} = 'off'; + $proxysettings{'ENABLE_FILTER'} = 'off'; } if ($updaccel_addon) { - $proxysettings{'ENABLE_UPDXLRATOR'} = 'off'; + $proxysettings{'ENABLE_UPDXLRATOR'} = 'off'; } $ncsa_buttontext = $Lang::tr{'NCSA create user'}; @@ -364,349 +364,349 @@ if ($proxysettings{'ACTION'} eq $Lang::tr{'NCSA user management'}) { - $proxysettings{'NCSA_EDIT_MODE'} = 'yes'; + $proxysettings{'NCSA_EDIT_MODE'} = 'yes'; } if ($proxysettings{'ACTION'} eq $Lang::tr{'add'}) { - $proxysettings{'NCSA_EDIT_MODE'} = 'yes'; - if (length($proxysettings{'NCSA_PASS'}) < $proxysettings{'NCSA_MIN_PASS_LEN'}) { - $errormessage = $Lang::tr{'errmsg password length 1'}.$proxysettings{'NCSA_MIN_PASS_LEN'}.$Lang::tr{'errmsg password length 2'}; - } - if (!($proxysettings{'NCSA_PASS'} eq $proxysettings{'NCSA_PASS_CONFIRM'})) { - $errormessage = $Lang::tr{'errmsg passwords different'}; - } - if ($proxysettings{'NCSA_USERNAME'} eq '') { - $errormessage = $Lang::tr{'errmsg no username'}; - } - if (!$errormessage) { - $proxysettings{'NCSA_USERNAME'} =~ tr/A-Z/a-z/; - &adduser($proxysettings{'NCSA_USERNAME'}, $proxysettings{'NCSA_PASS'}, $proxysettings{'NCSA_GROUP'}); - } - $proxysettings{'NCSA_USERNAME'} = ''; - $proxysettings{'NCSA_GROUP'} = ''; - $proxysettings{'NCSA_PASS'} = ''; - $proxysettings{'NCSA_PASS_CONFIRM'} = ''; + $proxysettings{'NCSA_EDIT_MODE'} = 'yes'; + if (length($proxysettings{'NCSA_PASS'}) < $proxysettings{'NCSA_MIN_PASS_LEN'}) { + $errormessage = $Lang::tr{'errmsg password length 1'}.$proxysettings{'NCSA_MIN_PASS_LEN'}.$Lang::tr{'errmsg password length 2'}; + } + if (!($proxysettings{'NCSA_PASS'} eq $proxysettings{'NCSA_PASS_CONFIRM'})) { + $errormessage = $Lang::tr{'errmsg passwords different'}; + } + if ($proxysettings{'NCSA_USERNAME'} eq '') { + $errormessage = $Lang::tr{'errmsg no username'}; + } + if (!$errormessage) { + $proxysettings{'NCSA_USERNAME'} =~ tr/A-Z/a-z/; + &adduser($proxysettings{'NCSA_USERNAME'}, $proxysettings{'NCSA_PASS'}, $proxysettings{'NCSA_GROUP'}); + } + $proxysettings{'NCSA_USERNAME'} = ''; + $proxysettings{'NCSA_GROUP'} = ''; + $proxysettings{'NCSA_PASS'} = ''; + $proxysettings{'NCSA_PASS_CONFIRM'} = ''; } if ($proxysettings{'ACTION'} eq $Lang::tr{'remove'}) { - $proxysettings{'NCSA_EDIT_MODE'} = 'yes'; - &deluser($proxysettings{'ID'}); + $proxysettings{'NCSA_EDIT_MODE'} = 'yes'; + &deluser($proxysettings{'ID'}); } if ($proxysettings{'ACTION'} eq $Lang::tr{'edit'}) { - $proxysettings{'NCSA_EDIT_MODE'} = 'yes'; - $ncsa_buttontext = $Lang::tr{'NCSA update user'}; - @temp = split(/:/,$proxysettings{'ID'}); - $proxysettings{'NCSA_USERNAME'} = $temp[0]; - $proxysettings{'NCSA_GROUP'} = $temp[1]; - $proxysettings{'NCSA_PASS'} = "lEaVeAlOnE"; - $proxysettings{'NCSA_PASS_CONFIRM'} = $proxysettings{'NCSA_PASS'}; + $proxysettings{'NCSA_EDIT_MODE'} = 'yes'; + $ncsa_buttontext = $Lang::tr{'NCSA update user'}; + @temp = split(/:/,$proxysettings{'ID'}); + $proxysettings{'NCSA_USERNAME'} = $temp[0]; + $proxysettings{'NCSA_GROUP'} = $temp[1]; + $proxysettings{'NCSA_PASS'} = "lEaVeAlOnE"; + $proxysettings{'NCSA_PASS_CONFIRM'} = $proxysettings{'NCSA_PASS'}; } if ($proxysettings{'ACTION'} eq $Lang::tr{'save'}) { - if ($proxysettings{'ENABLED_GREEN_1'} !~ /^(on|off)$/ || - $proxysettings{'TRANSPARENT_GREEN_1'} !~ /^(on|off)$/ || - $proxysettings{'ENABLED_BLUE_1'} !~ /^(on|off)$/ || - $proxysettings{'TRANSPARENT_BLUE_1'} !~ /^(on|off)$/ ) { - $errormessage = $Lang::tr{'invalid input'}; - goto ERROR; - } - if (!(&General::validport($proxysettings{'PROXY_PORT'}))) - { - $errormessage = $Lang::tr{'errmsg invalid proxy port'}; - goto ERROR; - } - if (!($proxysettings{'CACHE_SIZE'} =~ /^\d+/) || - ($proxysettings{'CACHE_SIZE'} < 10)) - { - if (!($proxysettings{'CACHE_SIZE'} eq '0')) - { - $errormessage = $Lang::tr{'errmsg hdd cache size'}; - goto ERROR; - } - } - if (!($proxysettings{'CACHE_MEM'} =~ /^\d+/) || - ($proxysettings{'CACHE_MEM'} < 1)) - { - $errormessage = $Lang::tr{'errmsg mem cache size'}; - goto ERROR; - } - my @free = `/usr/bin/free`; - $free[1] =~ m/(\d+)/; - $cachemem = int $1 / 2048; - if ($proxysettings{'CACHE_MEM'} > $cachemem) { - $proxysettings{'CACHE_MEM'} = $cachemem; - } - if (!($proxysettings{'MAX_SIZE'} =~ /^\d+/)) - { - $errormessage = $Lang::tr{'invalid maximum object size'}; - goto ERROR; - } - if (!($proxysettings{'MIN_SIZE'} =~ /^\d+/)) - { - $errormessage = $Lang::tr{'invalid minimum object size'}; - goto ERROR; - } - if (!($proxysettings{'MAX_OUTGOING_SIZE'} =~ /^\d+/)) - { - $errormessage = $Lang::tr{'invalid maximum outgoing size'}; - goto ERROR; - } - if (!($proxysettings{'TIME_TO_HOUR'}.$proxysettings{'TIME_TO_MINUTE'} gt $proxysettings{'TIME_FROM_HOUR'}.$proxysettings{'TIME_FROM_MINUTE'})) - { - $errormessage = $Lang::tr{'errmsg time restriction'}; - goto ERROR; - } - if (!($proxysettings{'MAX_INCOMING_SIZE'} =~ /^\d+/)) - { - $errormessage = $Lang::tr{'invalid maximum incoming size'}; - goto ERROR; - } - if ($proxysettings{'ENABLE_BROWSER_CHECK'} eq 'on') - { - $browser_regexp = ''; - foreach (@useragentlist) - { - chomp; - @useragent = split(/,/); - if ($proxysettings{'UA_'.@useragent[0]} eq 'on') { $browser_regexp .= "@useragent[2]|"; } - } - chop($browser_regexp); - if (!$browser_regexp) - { - $errormessage = $Lang::tr{'errmsg no browser'}; - goto ERROR; - } - } - if (!($proxysettings{'AUTH_METHOD'} eq 'none')) - { - unless (($proxysettings{'AUTH_METHOD'} eq 'ident') && - ($proxysettings{'IDENT_REQUIRED'} eq 'off') && - ($proxysettings{'IDENT_ENABLE_ACL'} eq 'off')) - { - if ($netsettings{'BLUE_COUNT'} >= 1) - { - if ((($proxysettings{'ENABLED_GREEN_1'} eq 'off') || ($proxysettings{'TRANSPARENT_GREEN_1'} eq 'on')) && - (($proxysettings{'ENABLED_BLUE_1'} eq 'off') || ($proxysettings{'TRANSPARENT_BLUE_1'} eq 'on'))) - { - $errormessage = $Lang::tr{'errmsg non-transparent proxy required'}; - goto ERROR; - } - } else { - if (($proxysettings{'ENABLED_GREEN_1'} eq 'off') || ($proxysettings{'TRANSPARENT_GREEN_1'} eq 'on')) - { - $errormessage = $Lang::tr{'errmsg non-transparent proxy required'}; - goto ERROR; - } - } - } - if ((!($proxysettings{'AUTH_MAX_USERIP'} eq '')) && - ((!($proxysettings{'AUTH_MAX_USERIP'} =~ /^\d+/)) || ($proxysettings{'AUTH_MAX_USERIP'} < 1) || ($proxysettings{'AUTH_MAX_USERIP'} > 255))) - { - $errormessage = $Lang::tr{'errmsg max userip'}; - goto ERROR; - } - if (!($proxysettings{'AUTH_CACHE_TTL'} =~ /^\d+/)) - { - $errormessage = $Lang::tr{'errmsg auth cache ttl'}; - goto ERROR; - } - if (!($proxysettings{'AUTH_IPCACHE_TTL'} =~ /^\d+/)) - { - $errormessage = $Lang::tr{'errmsg auth ipcache ttl'}; - goto ERROR; - } - if ((!($proxysettings{'AUTH_MAX_USERIP'} eq '')) && ($proxysettings{'AUTH_IPCACHE_TTL'} eq '0')) - { - $errormessage = $Lang::tr{'errmsg auth ipcache may not be null'}; - goto ERROR; - } - if ((!($proxysettings{'AUTH_CHILDREN'} =~ /^\d+/)) || ($proxysettings{'AUTH_CHILDREN'} < 1) || ($proxysettings{'AUTH_CHILDREN'} > 255)) - { - $errormessage = $Lang::tr{'errmsg auth children'}; - goto ERROR; - } - } - if ($proxysettings{'AUTH_METHOD'} eq 'ncsa') - { - if ((!($proxysettings{'NCSA_MIN_PASS_LEN'} =~ /^\d+/)) || ($proxysettings{'NCSA_MIN_PASS_LEN'} < 1) || ($proxysettings{'NCSA_MIN_PASS_LEN'} > 255)) - { - $errormessage = $Lang::tr{'errmsg password length'}; - goto ERROR; - } - } - if ($proxysettings{'AUTH_METHOD'} eq 'ident') - { - if ((!($proxysettings{'IDENT_TIMEOUT'} =~ /^\d+/)) || ($proxysettings{'IDENT_TIMEOUT'} < 1)) - { - $errormessage = $Lang::tr{'errmsg ident timeout'}; - goto ERROR; - } - } - if ($proxysettings{'AUTH_METHOD'} eq 'ldap') - { - if ($proxysettings{'LDAP_BASEDN'} eq '') - { - $errormessage = $Lang::tr{'errmsg ldap base dn'}; - goto ERROR; - } - if (!&General::validip($proxysettings{'LDAP_SERVER'})) - { - $errormessage = $Lang::tr{'errmsg ldap server'}; - goto ERROR; - } - if (!&General::validport($proxysettings{'LDAP_PORT'})) - { - $errormessage = $Lang::tr{'errmsg ldap port'}; - goto ERROR; - } - if (($proxysettings{'LDAP_TYPE'} eq 'ADS') || ($proxysettings{'LDAP_TYPE'} eq 'NDS')) - { - if (($proxysettings{'LDAP_BINDDN_USER'} eq '') || ($proxysettings{'LDAP_BINDDN_PASS'} eq '')) - { - $errormessage = $Lang::tr{'errmsg ldap bind dn'}; - goto ERROR; - } - } - } - if ($proxysettings{'AUTH_METHOD'} eq 'ntlm') - { - if ($proxysettings{'NTLM_DOMAIN'} eq '') - { - $errormessage = $Lang::tr{'errmsg ntlm domain'}; - goto ERROR; - } - if ($proxysettings{'NTLM_PDC'} eq '') - { - $errormessage = $Lang::tr{'errmsg ntlm pdc'}; - goto ERROR; - } - if (!&General::validhostname($proxysettings{'NTLM_PDC'})) - { - $errormessage = $Lang::tr{'errmsg invalid pdc'}; - goto ERROR; - } - if ((!($proxysettings{'NTLM_BDC'} eq '')) && (!&General::validhostname($proxysettings{'NTLM_BDC'}))) - { - $errormessage = $Lang::tr{'errmsg invalid bdc'}; - goto ERROR; - } + if ($proxysettings{'ENABLED_GREEN_1'} !~ /^(on|off)$/ || + $proxysettings{'TRANSPARENT_GREEN_1'} !~ /^(on|off)$/ || + $proxysettings{'ENABLED_BLUE_1'} !~ /^(on|off)$/ || + $proxysettings{'TRANSPARENT_BLUE_1'} !~ /^(on|off)$/ ) { + $errormessage = $Lang::tr{'invalid input'}; + goto ERROR; + } + if (!(&General::validport($proxysettings{'PROXY_PORT'}))) + { + $errormessage = $Lang::tr{'errmsg invalid proxy port'}; + goto ERROR; + } + if (!($proxysettings{'CACHE_SIZE'} =~ /^\d+/) || + ($proxysettings{'CACHE_SIZE'} < 10)) + { + if (!($proxysettings{'CACHE_SIZE'} eq '0')) + { + $errormessage = $Lang::tr{'errmsg hdd cache size'}; + goto ERROR; + } + } + if (!($proxysettings{'CACHE_MEM'} =~ /^\d+/) || + ($proxysettings{'CACHE_MEM'} < 1)) + { + $errormessage = $Lang::tr{'errmsg mem cache size'}; + goto ERROR; + } + my @free = `/usr/bin/free`; + $free[1] =~ m/(\d+)/; + $cachemem = int $1 / 2048; + if ($proxysettings{'CACHE_MEM'} > $cachemem) { + $proxysettings{'CACHE_MEM'} = $cachemem; + } + if (!($proxysettings{'MAX_SIZE'} =~ /^\d+/)) + { + $errormessage = $Lang::tr{'invalid maximum object size'}; + goto ERROR; + } + if (!($proxysettings{'MIN_SIZE'} =~ /^\d+/)) + { + $errormessage = $Lang::tr{'invalid minimum object size'}; + goto ERROR; + } + if (!($proxysettings{'MAX_OUTGOING_SIZE'} =~ /^\d+/)) + { + $errormessage = $Lang::tr{'invalid maximum outgoing size'}; + goto ERROR; + } + if (!($proxysettings{'TIME_TO_HOUR'}.$proxysettings{'TIME_TO_MINUTE'} gt $proxysettings{'TIME_FROM_HOUR'}.$proxysettings{'TIME_FROM_MINUTE'})) + { + $errormessage = $Lang::tr{'errmsg time restriction'}; + goto ERROR; + } + if (!($proxysettings{'MAX_INCOMING_SIZE'} =~ /^\d+/)) + { + $errormessage = $Lang::tr{'invalid maximum incoming size'}; + goto ERROR; + } + if ($proxysettings{'ENABLE_BROWSER_CHECK'} eq 'on') + { + $browser_regexp = ''; + foreach (@useragentlist) + { + chomp; + @useragent = split(/,/); + if ($proxysettings{'UA_'.@useragent[0]} eq 'on') { $browser_regexp .= "@useragent[2]|"; } + } + chop($browser_regexp); + if (!$browser_regexp) + { + $errormessage = $Lang::tr{'errmsg no browser'}; + goto ERROR; + } + } + if (!($proxysettings{'AUTH_METHOD'} eq 'none')) + { + unless (($proxysettings{'AUTH_METHOD'} eq 'ident') && + ($proxysettings{'IDENT_REQUIRED'} eq 'off') && + ($proxysettings{'IDENT_ENABLE_ACL'} eq 'off')) + { + if ($netsettings{'BLUE_COUNT'} >= 1) + { + if ((($proxysettings{'ENABLED_GREEN_1'} eq 'off') || ($proxysettings{'TRANSPARENT_GREEN_1'} eq 'on')) && + (($proxysettings{'ENABLED_BLUE_1'} eq 'off') || ($proxysettings{'TRANSPARENT_BLUE_1'} eq 'on'))) + { + $errormessage = $Lang::tr{'errmsg non-transparent proxy required'}; + goto ERROR; + } + } else { + if (($proxysettings{'ENABLED_GREEN_1'} eq 'off') || ($proxysettings{'TRANSPARENT_GREEN_1'} eq 'on')) + { + $errormessage = $Lang::tr{'errmsg non-transparent proxy required'}; + goto ERROR; + } + } + } + if ((!($proxysettings{'AUTH_MAX_USERIP'} eq '')) && + ((!($proxysettings{'AUTH_MAX_USERIP'} =~ /^\d+/)) || ($proxysettings{'AUTH_MAX_USERIP'} < 1) || ($proxysettings{'AUTH_MAX_USERIP'} > 255))) + { + $errormessage = $Lang::tr{'errmsg max userip'}; + goto ERROR; + } + if (!($proxysettings{'AUTH_CACHE_TTL'} =~ /^\d+/)) + { + $errormessage = $Lang::tr{'errmsg auth cache ttl'}; + goto ERROR; + } + if (!($proxysettings{'AUTH_IPCACHE_TTL'} =~ /^\d+/)) + { + $errormessage = $Lang::tr{'errmsg auth ipcache ttl'}; + goto ERROR; + } + if ((!($proxysettings{'AUTH_MAX_USERIP'} eq '')) && ($proxysettings{'AUTH_IPCACHE_TTL'} eq '0')) + { + $errormessage = $Lang::tr{'errmsg auth ipcache may not be null'}; + goto ERROR; + } + if ((!($proxysettings{'AUTH_CHILDREN'} =~ /^\d+/)) || ($proxysettings{'AUTH_CHILDREN'} < 1) || ($proxysettings{'AUTH_CHILDREN'} > 255)) + { + $errormessage = $Lang::tr{'errmsg auth children'}; + goto ERROR; + } + } + if ($proxysettings{'AUTH_METHOD'} eq 'ncsa') + { + if ((!($proxysettings{'NCSA_MIN_PASS_LEN'} =~ /^\d+/)) || ($proxysettings{'NCSA_MIN_PASS_LEN'} < 1) || ($proxysettings{'NCSA_MIN_PASS_LEN'} > 255)) + { + $errormessage = $Lang::tr{'errmsg password length'}; + goto ERROR; + } + } + if ($proxysettings{'AUTH_METHOD'} eq 'ident') + { + if ((!($proxysettings{'IDENT_TIMEOUT'} =~ /^\d+/)) || ($proxysettings{'IDENT_TIMEOUT'} < 1)) + { + $errormessage = $Lang::tr{'errmsg ident timeout'}; + goto ERROR; + } + } + if ($proxysettings{'AUTH_METHOD'} eq 'ldap') + { + if ($proxysettings{'LDAP_BASEDN'} eq '') + { + $errormessage = $Lang::tr{'errmsg ldap base dn'}; + goto ERROR; + } + if (!&General::validip($proxysettings{'LDAP_SERVER'})) + { + $errormessage = $Lang::tr{'errmsg ldap server'}; + goto ERROR; + } + if (!&General::validport($proxysettings{'LDAP_PORT'})) + { + $errormessage = $Lang::tr{'errmsg ldap port'}; + goto ERROR; + } + if (($proxysettings{'LDAP_TYPE'} eq 'ADS') || ($proxysettings{'LDAP_TYPE'} eq 'NDS')) + { + if (($proxysettings{'LDAP_BINDDN_USER'} eq '') || ($proxysettings{'LDAP_BINDDN_PASS'} eq '')) + { + $errormessage = $Lang::tr{'errmsg ldap bind dn'}; + goto ERROR; + } + } + } + if ($proxysettings{'AUTH_METHOD'} eq 'ntlm') + { + if ($proxysettings{'NTLM_DOMAIN'} eq '') + { + $errormessage = $Lang::tr{'errmsg ntlm domain'}; + goto ERROR; + } + if ($proxysettings{'NTLM_PDC'} eq '') + { + $errormessage = $Lang::tr{'errmsg ntlm pdc'}; + goto ERROR; + } + if (!&General::validhostname($proxysettings{'NTLM_PDC'})) + { + $errormessage = $Lang::tr{'errmsg invalid pdc'}; + goto ERROR; + } + if ((!($proxysettings{'NTLM_BDC'} eq '')) && (!&General::validhostname($proxysettings{'NTLM_BDC'}))) + { + $errormessage = $Lang::tr{'errmsg invalid bdc'}; + goto ERROR; + } - $proxysettings{'NTLM_DOMAIN'} = lc($proxysettings{'NTLM_DOMAIN'}); - $proxysettings{'NTLM_PDC'} = lc($proxysettings{'NTLM_PDC'}); - $proxysettings{'NTLM_BDC'} = lc($proxysettings{'NTLM_BDC'}); - } - if ($proxysettings{'AUTH_METHOD'} eq 'radius') - { - if (!&General::validip($proxysettings{'RADIUS_SERVER'})) - { - $errormessage = $Lang::tr{'errmsg radius server'}; - goto ERROR; - } - if (!&General::validport($proxysettings{'RADIUS_PORT'})) - { - $errormessage = $Lang::tr{'errmsg radius port'}; - goto ERROR; - } - if ($proxysettings{'RADIUS_SECRET'} eq '') - { - $errormessage = $Lang::tr{'errmsg radius secret'}; - goto ERROR; - } - } + $proxysettings{'NTLM_DOMAIN'} = lc($proxysettings{'NTLM_DOMAIN'}); + $proxysettings{'NTLM_PDC'} = lc($proxysettings{'NTLM_PDC'}); + $proxysettings{'NTLM_BDC'} = lc($proxysettings{'NTLM_BDC'}); + } + if ($proxysettings{'AUTH_METHOD'} eq 'radius') + { + if (!&General::validip($proxysettings{'RADIUS_SERVER'})) + { + $errormessage = $Lang::tr{'errmsg radius server'}; + goto ERROR; + } + if (!&General::validport($proxysettings{'RADIUS_PORT'})) + { + $errormessage = $Lang::tr{'errmsg radius port'}; + goto ERROR; + } + if ($proxysettings{'RADIUS_SECRET'} eq '') + { + $errormessage = $Lang::tr{'errmsg radius secret'}; + goto ERROR; + } + } - # Quick parent proxy error checking of username and password info. If username password don't both exist give an error. - $proxy1 = 'YES'; - $proxy2 = 'YES'; - if (($proxysettings{'UPSTREAM_USER'} eq '')) {$proxy1 = '';} - if (($proxysettings{'UPSTREAM_PASSWORD'} eq '')) {$proxy2 = '';} - if ($proxysettings{'UPSTREAM_USER'} eq 'PASS') {$proxy1=$proxy2='PASS'; $proxysettings{'UPSTREAM_PASSWORD'} = '';} - if (($proxy1 ne $proxy2)) - { - $errormessage = $Lang::tr{'errmsg invalid upstream proxy username or password setting'}; - goto ERROR; - } + # Quick parent proxy error checking of username and password info. If username password don't both exist give an error. + $proxy1 = 'YES'; + $proxy2 = 'YES'; + if (($proxysettings{'UPSTREAM_USER'} eq '')) {$proxy1 = '';} + if (($proxysettings{'UPSTREAM_PASSWORD'} eq '')) {$proxy2 = '';} + if ($proxysettings{'UPSTREAM_USER'} eq 'PASS') {$proxy1=$proxy2='PASS'; $proxysettings{'UPSTREAM_PASSWORD'} = '';} + if (($proxy1 ne $proxy2)) + { + $errormessage = $Lang::tr{'errmsg invalid upstream proxy username or password setting'}; + goto ERROR; + } ERROR: - &check_acls; + &check_acls; - if ($errormessage) { - $proxysettings{'VALID'} = 'no'; } - else { - $proxysettings{'VALID'} = 'yes'; } + if ($errormessage) { + $proxysettings{'VALID'} = 'no'; } + else { + $proxysettings{'VALID'} = 'yes'; } - if ($proxysettings{'VALID'} eq 'yes') - { - &write_acls; + if ($proxysettings{'VALID'} eq 'yes') + { + &write_acls; - delete $proxysettings{'SRC_SUBNETS'}; - delete $proxysettings{'SRC_BANNED_IP'}; - delete $proxysettings{'SRC_BANNED_MAC'}; - delete $proxysettings{'SRC_UNRESTRICTED_IP'}; - delete $proxysettings{'SRC_UNRESTRICTED_MAC'}; - delete $proxysettings{'DST_NOCACHE'}; - delete $proxysettings{'DST_NOAUTH'}; - delete $proxysettings{'PORTS_SAFE'}; - delete $proxysettings{'PORTS_SSL'}; - delete $proxysettings{'MIME_TYPES'}; - delete $proxysettings{'MIME_EXCEPTIONS'}; - delete $proxysettings{'NTLM_ALLOW_USERS'}; - delete $proxysettings{'NTLM_DENY_USERS'}; - delete $proxysettings{'RADIUS_ALLOW_USERS'}; - delete $proxysettings{'RADIUS_DENY_USERS'}; - delete $proxysettings{'IDENT_HOSTS'}; - delete $proxysettings{'IDENT_ALLOW_USERS'}; - delete $proxysettings{'IDENT_DENY_USERS'}; + delete $proxysettings{'SRC_SUBNETS'}; + delete $proxysettings{'SRC_BANNED_IP'}; + delete $proxysettings{'SRC_BANNED_MAC'}; + delete $proxysettings{'SRC_UNRESTRICTED_IP'}; + delete $proxysettings{'SRC_UNRESTRICTED_MAC'}; + delete $proxysettings{'DST_NOCACHE'}; + delete $proxysettings{'DST_NOAUTH'}; + delete $proxysettings{'PORTS_SAFE'}; + delete $proxysettings{'PORTS_SSL'}; + delete $proxysettings{'MIME_TYPES'}; + delete $proxysettings{'MIME_EXCEPTIONS'}; + delete $proxysettings{'NTLM_ALLOW_USERS'}; + delete $proxysettings{'NTLM_DENY_USERS'}; + delete $proxysettings{'RADIUS_ALLOW_USERS'}; + delete $proxysettings{'RADIUS_DENY_USERS'}; + delete $proxysettings{'IDENT_HOSTS'}; + delete $proxysettings{'IDENT_ALLOW_USERS'}; + delete $proxysettings{'IDENT_DENY_USERS'}; - delete $proxysettings{'CRE_GROUPS'}; - delete $proxysettings{'CRE_SVHOSTS'}; + delete $proxysettings{'CRE_GROUPS'}; + delete $proxysettings{'CRE_SVHOSTS'}; - delete $proxysettings{'NCSA_USERNAME'}; - delete $proxysettings{'NCSA_GROUP'}; - delete $proxysettings{'NCSA_PASS'}; - delete $proxysettings{'NCSA_PASS_CONFIRM'}; + delete $proxysettings{'NCSA_USERNAME'}; + delete $proxysettings{'NCSA_GROUP'}; + delete $proxysettings{'NCSA_PASS'}; + delete $proxysettings{'NCSA_PASS_CONFIRM'}; - $proxysettings{'TIME_MON'} = 'off' unless exists $proxysettings{'TIME_MON'}; - $proxysettings{'TIME_TUE'} = 'off' unless exists $proxysettings{'TIME_TUE'}; - $proxysettings{'TIME_WED'} = 'off' unless exists $proxysettings{'TIME_WED'}; - $proxysettings{'TIME_THU'} = 'off' unless exists $proxysettings{'TIME_THU'}; - $proxysettings{'TIME_FRI'} = 'off' unless exists $proxysettings{'TIME_FRI'}; - $proxysettings{'TIME_SAT'} = 'off' unless exists $proxysettings{'TIME_SAT'}; - $proxysettings{'TIME_SUN'} = 'off' unless exists $proxysettings{'TIME_SUN'}; + $proxysettings{'TIME_MON'} = 'off' unless exists $proxysettings{'TIME_MON'}; + $proxysettings{'TIME_TUE'} = 'off' unless exists $proxysettings{'TIME_TUE'}; + $proxysettings{'TIME_WED'} = 'off' unless exists $proxysettings{'TIME_WED'}; + $proxysettings{'TIME_THU'} = 'off' unless exists $proxysettings{'TIME_THU'}; + $proxysettings{'TIME_FRI'} = 'off' unless exists $proxysettings{'TIME_FRI'}; + $proxysettings{'TIME_SAT'} = 'off' unless exists $proxysettings{'TIME_SAT'}; + $proxysettings{'TIME_SUN'} = 'off' unless exists $proxysettings{'TIME_SUN'}; - $proxysettings{'AUTH_ALWAYS_REQUIRED'} = 'off' unless exists $proxysettings{'AUTH_ALWAYS_REQUIRED'}; - $proxysettings{'NTLM_ENABLE_INT_AUTH'} = 'off' unless exists $proxysettings{'NTLM_ENABLE_INT_AUTH'}; + $proxysettings{'AUTH_ALWAYS_REQUIRED'} = 'off' unless exists $proxysettings{'AUTH_ALWAYS_REQUIRED'}; + $proxysettings{'NTLM_ENABLE_INT_AUTH'} = 'off' unless exists $proxysettings{'NTLM_ENABLE_INT_AUTH'}; - &General::writehash("/var/ipcop/proxy/settings", \%proxysettings); + &General::writehash("/var/ipcop/proxy/settings", \%proxysettings); - &writeconfig; - &writepacfile; + &writeconfig; + &writepacfile; - system('/usr/local/bin/restartsquid'); + system('/usr/local/bin/restartsquid'); if (($proxysettings{'ENABLED_GREEN_1'} eq 'on') || ($proxysettings{'ENABLED_BLUE_1'} eq 'on')) { # wait a bit so proxy can start and we can display proper running state sleep(5); } - } + } } if ($proxysettings{'ACTION'} eq $Lang::tr{'clear cache'}) { - system('/usr/local/bin/restartsquid','-f'); + system('/usr/local/bin/restartsquid','-f'); } } # end of ACTION if (!$errormessage) { - if (-e "/var/ipcop/proxy/settings") { - &General::readhash("/var/ipcop/proxy/settings", \%proxysettings); - } - &read_acls; + if (-e "/var/ipcop/proxy/settings") { + &General::readhash("/var/ipcop/proxy/settings", \%proxysettings); + } + &read_acls; } $checked{'ENABLED_GREEN_1'}{'off'} = ''; @@ -844,10 +844,10 @@ $checked{'ENABLE_BROWSER_CHECK'}{$proxysettings{'ENABLE_BROWSER_CHECK'}} = "checked='checked'"; foreach (@useragentlist) { - @useragent = split(/,/); - $checked{'UA_'.@useragent[0]}{'off'} = ''; - $checked{'UA_'.@useragent[0]}{'on'} = ''; - $checked{'UA_'.@useragent[0]}{$proxysettings{'UA_'.@useragent[0]}} = "checked='checked'"; + @useragent = split(/,/); + $checked{'UA_'.@useragent[0]}{'off'} = ''; + $checked{'UA_'.@useragent[0]}{'on'} = ''; + $checked{'UA_'.@useragent[0]}{$proxysettings{'UA_'.@useragent[0]}} = "checked='checked'"; } $checked{'AUTH_METHOD'}{'none'} = ''; @@ -907,15 +907,15 @@ $checked{'IDENT_USER_ACL'}{$proxysettings{'IDENT_USER_ACL'}} = "checked='checked'"; if ($urlfilter_addon) { - $checked{'ENABLE_FILTER'}{'off'} = ''; - $checked{'ENABLE_FILTER'}{'on'} = ''; - $checked{'ENABLE_FILTER'}{$proxysettings{'ENABLE_FILTER'}} = "checked='checked'"; + $checked{'ENABLE_FILTER'}{'off'} = ''; + $checked{'ENABLE_FILTER'}{'on'} = ''; + $checked{'ENABLE_FILTER'}{$proxysettings{'ENABLE_FILTER'}} = "checked='checked'"; } if ($updaccel_addon) { - $checked{'ENABLE_UPDXLRATOR'}{'off'} = ''; - $checked{'ENABLE_UPDXLRATOR'}{'on'} = ''; - $checked{'ENABLE_UPDXLRATOR'}{$proxysettings{'ENABLE_UPDXLRATOR'}} = "checked='checked'"; + $checked{'ENABLE_UPDXLRATOR'}{'off'} = ''; + $checked{'ENABLE_UPDXLRATOR'}{'on'} = ''; + $checked{'ENABLE_UPDXLRATOR'}{$proxysettings{'ENABLE_UPDXLRATOR'}} = "checked='checked'"; } &Header::openpage($Lang::tr{'web proxy configuration'}, 1, ''); @@ -923,18 +923,18 @@ &Header::openbigbox('100%', 'left', '', $errormessage); if ($errormessage) { - &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); - print "<font class='base'>$errormessage </font>\n"; - &Header::closebox(); + &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); + print "<font class='base'>$errormessage </font>\n"; + &Header::closebox(); } if ($squidversion[0] =~ /^Squid\sCache:\sVersion\s/i) { - $squidversion[0] =~ s/^Squid\sCache:\sVersion//i; - $squidversion[0] =~ s/^\s+//g; - $squidversion[0] =~ s/\s+$//g; + $squidversion[0] =~ s/^Squid\sCache:\sVersion//i; + $squidversion[0] =~ s/^\s+//g; + $squidversion[0] =~ s/\s+$//g; } else { - $squidversion[0] = $Lang::tr{'unknown'}; + $squidversion[0] = $Lang::tr{'unknown'}; } # =================================================================== @@ -957,136 +957,136 @@ <td> </td> </tr> <tr> - <td colspan='4' class='base'><hr /></td> + <td colspan='4' class='base'><hr /></td> </tr> <tr> - <td colspan='4' class='base'><b>$Lang::tr{'common settings'}</b></td> + <td colspan='4' class='base'><b>$Lang::tr{'common settings'}</b></td> </tr> <tr> - <td width='25%' class='base'>$Lang::tr{'enabled on'} <span class='ipcop_iface_green' style='font-weight: bold;'>$Lang::tr{'green'}</span>:</td> - <td width='20%'><input type='checkbox' name='ENABLED_GREEN_1' $checked{'ENABLED_GREEN_1'}{'on'} /></td> - <td width='30%' class='base'>$Lang::tr{'transparent on'} <span class='ipcop_iface_green' style='font-weight: bold;'>$Lang::tr{'green'}</span>:</td> - <td width='25%'><input type='checkbox' name='TRANSPARENT_GREEN_1' $checked{'TRANSPARENT_GREEN_1'}{'on'} /></td> + <td width='25%' class='base'>$Lang::tr{'enabled on'} <span class='ipcop_iface_green' style='font-weight: bold;'>$Lang::tr{'green'}</span>:</td> + <td width='20%'><input type='checkbox' name='ENABLED_GREEN_1' $checked{'ENABLED_GREEN_1'}{'on'} /></td> + <td width='30%' class='base'>$Lang::tr{'transparent on'} <span class='ipcop_iface_green' style='font-weight: bold;'>$Lang::tr{'green'}</span>:</td> + <td width='25%'><input type='checkbox' name='TRANSPARENT_GREEN_1' $checked{'TRANSPARENT_GREEN_1'}{'on'} /></td> </tr> END ; if ($netsettings{'BLUE_COUNT'} >= 1) { - print "<tr><td class='base'>$Lang::tr{'enabled on'} <span class='ipcop_iface_blue' style='font-weight: bold;'>$Lang::tr{'blue'}</span>:</td>"; - print "<td><input type='checkbox' name='ENABLED_BLUE_1' $checked{'ENABLED_BLUE_1'}{'on'} /></td>"; - print "<td class='base'>$Lang::tr{'transparent on'} <span class='ipcop_iface_blue' style='font-weight: bold;'>$Lang::tr{'blue'}</span>:</td>"; - print "<td><input type='checkbox' name='TRANSPARENT_BLUE_1' $checked{'TRANSPARENT_BLUE_1'}{'on'} /></td></tr>"; + print "<tr><td class='base'>$Lang::tr{'enabled on'} <span class='ipcop_iface_blue' style='font-weight: bold;'>$Lang::tr{'blue'}</span>:</td>"; + print "<td><input type='checkbox' name='ENABLED_BLUE_1' $checked{'ENABLED_BLUE_1'}{'on'} /></td>"; + print "<td class='base'>$Lang::tr{'transparent on'} <span class='ipcop_iface_blue' style='font-weight: bold;'>$Lang::tr{'blue'}</span>:</td>"; + print "<td><input type='checkbox' name='TRANSPARENT_BLUE_1' $checked{'TRANSPARENT_BLUE_1'}{'on'} /></td></tr>"; } if ((defined($ovpnsettings{'ENABLED_RED_1'}) && $ovpnsettings{'ENABLED_RED_1'} eq 'on') || (defined($ovpnsettings{'ENABLED_BLUE_1'}) && $ovpnsettings{'ENABLED_BLUE_1'} eq 'on')) { - print "<tr><td class='base'>$Lang::tr{'enabled on'} <span class='ipcop_iface_ovpn' style='font-weight: bold;'>OpenVPN</span>:</td>"; - print "<td><input type='checkbox' name='ENABLED_OVPN' $checked{'ENABLED_OVPN'}{'on'} /></td>"; - print "<td class='base'>$Lang::tr{'transparent on'} <span class='ipcop_iface_ovpn' style='font-weight: bold;'>OpenVPN</span>:</td>"; - print "<td><input type='checkbox' name='TRANSPARENT_OVPN' $checked{'TRANSPARENT_OVPN'}{'on'} /></td></tr>"; + print "<tr><td class='base'>$Lang::tr{'enabled on'} <span class='ipcop_iface_ovpn' style='font-weight: bold;'>OpenVPN</span>:</td>"; + print "<td><input type='checkbox' name='ENABLED_OVPN' $checked{'ENABLED_OVPN'}{'on'} /></td>"; + print "<td class='base'>$Lang::tr{'transparent on'} <span class='ipcop_iface_ovpn' style='font-weight: bold;'>OpenVPN</span>:</td>"; + print "<td><input type='checkbox' name='TRANSPARENT_OVPN' $checked{'TRANSPARENT_OVPN'}{'on'} /></td></tr>"; } print <<END <tr> - <td class='base'>$Lang::tr{'proxy port'}:</td> - <td><input type='text' name='PROXY_PORT' value='$proxysettings{'PROXY_PORT'}' size='5' /></td> - <td class='base'>$Lang::tr{'visible hostname'}: <img src='/blob.gif' alt='*' /></td> - <td><input type='text' name='VISIBLE_HOSTNAME' value='$proxysettings{'VISIBLE_HOSTNAME'}' /></td> + <td class='base'>$Lang::tr{'proxy port'}:</td> + <td><input type='text' name='PROXY_PORT' value='$proxysettings{'PROXY_PORT'}' size='5' /></td> + <td class='base'>$Lang::tr{'visible hostname'}: <img src='/blob.gif' alt='*' /></td> + <td><input type='text' name='VISIBLE_HOSTNAME' value='$proxysettings{'VISIBLE_HOSTNAME'}' /></td> </tr> <tr> - <td class='base'>$Lang::tr{'error language'}:</td> - <td class='base'> - <select name='ERR_LANGUAGE'> + <td class='base'>$Lang::tr{'error language'}:</td> + <td class='base'> + <select name='ERR_LANGUAGE'> END ; - foreach (<$errordir/*>) { - if (-d) { - $countrycode = substr($_,rindex($_,"/")+1); - print "<option value='$countrycode' $selected{'ERR_LANGUAGE'}{$countrycode}>$language{$countrycode}</option>\n"; - } - } + foreach (<$errordir/*>) { + if (-d) { + $countrycode = substr($_,rindex($_,"/")+1); + print "<option value='$countrycode' $selected{'ERR_LANGUAGE'}{$countrycode}>$language{$countrycode}</option>\n"; + } + } print <<END - </select> - </td> - <td class='base'>$Lang::tr{'admin mail'}: <img src='/blob.gif' alt='*' /></td> - <td><input type='text' name='ADMIN_MAIL_ADDRESS' value='$proxysettings{'ADMIN_MAIL_ADDRESS'}' /></td> + </select> + </td> + <td class='base'>$Lang::tr{'admin mail'}: <img src='/blob.gif' alt='*' /></td> + <td><input type='text' name='ADMIN_MAIL_ADDRESS' value='$proxysettings{'ADMIN_MAIL_ADDRESS'}' /></td> </tr> <tr> - <td class='base'>$Lang::tr{'error design'}:</td> - <td class='base'><select name='ERR_DESIGN'> - <option value='ipcop' $selected{'ERR_DESIGN'}{'ipcop'}>IPCop</option> - <option value='squid' $selected{'ERR_DESIGN'}{'squid'}>$Lang::tr{'standard'}</option> - </select></td> - <td> </td> - <td> </td> + <td class='base'>$Lang::tr{'error design'}:</td> + <td class='base'><select name='ERR_DESIGN'> + <option value='ipcop' $selected{'ERR_DESIGN'}{'ipcop'}>IPCop</option> + <option value='squid' $selected{'ERR_DESIGN'}{'squid'}>$Lang::tr{'standard'}</option> + </select></td> + <td> </td> + <td> </td> </tr> <tr> - <td class='base'>$Lang::tr{'suppress version'}:</td> - <td><input type='checkbox' name='SUPPRESS_VERSION' $checked{'SUPPRESS_VERSION'}{'on'} /></td> - <td class='base'>$Lang::tr{'squid version'}:</td> - <td class='base'> [ $squidversion[0] ]</td> + <td class='base'>$Lang::tr{'suppress version'}:</td> + <td><input type='checkbox' name='SUPPRESS_VERSION' $checked{'SUPPRESS_VERSION'}{'on'} /></td> + <td class='base'>$Lang::tr{'squid version'}:</td> + <td class='base'> [ $squidversion[0] ]</td> </tr> <tr> - <td colspan='4'><hr size='1'/></td> + <td colspan='4'><hr size='1'/></td> </tr> <tr> - <td colspan='4' class='base'><b>$Lang::tr{'upstream proxy'}</b></td> + <td colspan='4' class='base'><b>$Lang::tr{'upstream proxy'}</b></td> </tr> <tr> - <td class='base'>$Lang::tr{'via forwarding'}:</td> - <td><input type='checkbox' name='FORWARD_VIA' $checked{'FORWARD_VIA'}{'on'} /></td> - <td class='base'>$Lang::tr{'upstream proxy host:port'} <img src='/blob.gif' alt='*' /></td> - <td><input type='text' name='UPSTREAM_PROXY' value='$proxysettings{'UPSTREAM_PROXY'}' /></td> + <td class='base'>$Lang::tr{'via forwarding'}:</td> + <td><input type='checkbox' name='FORWARD_VIA' $checked{'FORWARD_VIA'}{'on'} /></td> + <td class='base'>$Lang::tr{'upstream proxy host:port'} <img src='/blob.gif' alt='*' /></td> + <td><input type='text' name='UPSTREAM_PROXY' value='$proxysettings{'UPSTREAM_PROXY'}' /></td> </tr> <tr> - <td class='base'>$Lang::tr{'client IP forwarding'}:</td> - <td><input type='checkbox' name='FORWARD_IPADDRESS' $checked{'FORWARD_IPADDRESS'}{'on'} /></td> - <td class='base'>$Lang::tr{'upstream username'}: <img src='/blob.gif' alt='*' /></td> - <td><input type='text' name='UPSTREAM_USER' value='$proxysettings{'UPSTREAM_USER'}' /></td> + <td class='base'>$Lang::tr{'client IP forwarding'}:</td> + <td><input type='checkbox' name='FORWARD_IPADDRESS' $checked{'FORWARD_IPADDRESS'}{'on'} /></td> + <td class='base'>$Lang::tr{'upstream username'}: <img src='/blob.gif' alt='*' /></td> + <td><input type='text' name='UPSTREAM_USER' value='$proxysettings{'UPSTREAM_USER'}' /></td> </tr> <tr> - <td class='base'>$Lang::tr{'username forwarding'}:</td> - <td><input type='checkbox' name='FORWARD_USERNAME' $checked{'FORWARD_USERNAME'}{'on'} /></td> - <td class='base'>$Lang::tr{'upstream password'}: <img src='/blob.gif' alt='*' /></td> - <td><input type='password' name='UPSTREAM_PASSWORD' value='$proxysettings{'UPSTREAM_PASSWORD'}' /></td> + <td class='base'>$Lang::tr{'username forwarding'}:</td> + <td><input type='checkbox' name='FORWARD_USERNAME' $checked{'FORWARD_USERNAME'}{'on'} /></td> + <td class='base'>$Lang::tr{'upstream password'}: <img src='/blob.gif' alt='*' /></td> + <td><input type='password' name='UPSTREAM_PASSWORD' value='$proxysettings{'UPSTREAM_PASSWORD'}' /></td> </tr> <tr> - <td class='base'>$Lang::tr{'no connection auth'}:</td> - <td><input type='checkbox' name='NO_CONNECTION_AUTH' $checked{'NO_CONNECTION_AUTH'}{'on'} /></td> - <td> </td> - <td> </td> + <td class='base'>$Lang::tr{'no connection auth'}:</td> + <td><input type='checkbox' name='NO_CONNECTION_AUTH' $checked{'NO_CONNECTION_AUTH'}{'on'} /></td> + <td> </td> + <td> </td> </tr> <tr> - <td colspan='4'><hr size='1'/></td> + <td colspan='4'><hr size='1'/></td> </tr> <tr> - <td colspan='4' class='base'><b>$Lang::tr{'log settings'}</b></td> + <td colspan='4' class='base'><b>$Lang::tr{'log settings'}</b></td> </tr> <tr> - <td class='base'>$Lang::tr{'log enabled'}:</td> - <td><input type='checkbox' name='LOGGING' $checked{'LOGGING'}{'on'} /></td> - <td class='base'>$Lang::tr{'log query'}:</td> - <td><input type='checkbox' name='LOGQUERY' $checked{'LOGQUERY'}{'on'} /></td> + <td class='base'>$Lang::tr{'log enabled'}:</td> + <td><input type='checkbox' name='LOGGING' $checked{'LOGGING'}{'on'} /></td> + <td class='base'>$Lang::tr{'log query'}:</td> + <td><input type='checkbox' name='LOGQUERY' $checked{'LOGQUERY'}{'on'} /></td> </tr> <tr> - <td> </td> - <td> </td> - <td class='base'>$Lang::tr{'log useragent'}:</td> - <td><input type='checkbox' name='LOGUSERAGENT' $checked{'LOGUSERAGENT'}{'on'} /></td> + <td> </td> + <td> </td> + <td class='base'>$Lang::tr{'log useragent'}:</td> + <td><input type='checkbox' name='LOGUSERAGENT' $checked{'LOGUSERAGENT'}{'on'} /></td> </tr> </table> <hr /> <table width='100%'> <tr> - <td class='comment1button'><img src='/blob.gif' align='top' alt='*' /> - <font class='base'>$Lang::tr{'this field may be blank'}</font> - </td> - <td class='button2buttons'><input type='submit' name='ACTION' value='$Lang::tr{'clear cache'}' /></td> - <td class='button2buttons'><input type='submit' name='ACTION' value='$Lang::tr{'save'}' /></td> - <td class='onlinehelp'> + <td class='comment1button'><img src='/blob.gif' align='top' alt='*' /> + <font class='base'>$Lang::tr{'this field may be blank'}</font> + </td> + <td class='button2buttons'><input type='submit' name='ACTION' value='$Lang::tr{'clear cache'}' /></td> + <td class='button2buttons'><input type='submit' name='ACTION' value='$Lang::tr{'save'}' /></td> + <td class='onlinehelp'> <a href='${General::adminmanualurl}/services-webproxy.html' target='_blank'> <img src='/images/web-support.png' alt='$Lang::tr{'online help en'}' title='$Lang::tr{'online help en'}' /></a> - </td> + </td> </tr> </table> @@ -1100,48 +1100,48 @@ print <<END <table width='100%'> <tr> - <td colspan='4'><b>$Lang::tr{'cache management'}</b></td> + <td colspan='4'><b>$Lang::tr{'cache management'}</b></td> </tr> <tr> - <td width='25%'></td> <td width='20%'> </td><td width='25%'> </td><td width='30%'></td> + <td width='25%'></td> <td width='20%'> </td><td width='25%'> </td><td width='30%'></td> </tr> <tr> - <td class='base'>$Lang::tr{'ram cache size'}:</td> - <td><input type='text' name='CACHE_MEM' value='$proxysettings{'CACHE_MEM'}' size='5' /></td> - <td class='base'>$Lang::tr{'hdd cache size'}:</td> - <td><input type='text' name='CACHE_SIZE' value='$proxysettings{'CACHE_SIZE'}' size='5' /></td> + <td class='base'>$Lang::tr{'ram cache size'}:</td> + <td><input type='text' name='CACHE_MEM' value='$proxysettings{'CACHE_MEM'}' size='5' /></td> + <td class='base'>$Lang::tr{'hdd cache size'}:</td> + <td><input type='text' name='CACHE_SIZE' value='$proxysettings{'CACHE_SIZE'}' size='5' /></td> </tr> <tr> - <td class='base'>$Lang::tr{'min size'}:</td> - <td><input type='text' name='MIN_SIZE' value='$proxysettings{'MIN_SIZE'}' size='5' /></td> - <td class='base'>$Lang::tr{'max size'}:</td> - <td><input type='text' name='MAX_SIZE' value='$proxysettings{'MAX_SIZE'}' size='5' /></td> + <td class='base'>$Lang::tr{'min size'}:</td> + <td><input type='text' name='MIN_SIZE' value='$proxysettings{'MIN_SIZE'}' size='5' /></td> + <td class='base'>$Lang::tr{'max size'}:</td> + <td><input type='text' name='MAX_SIZE' value='$proxysettings{'MAX_SIZE'}' size='5' /></td> </tr> <tr> - <td class='base'>$Lang::tr{'number of L1 dirs'}:</td> - <td class='base'><select name='L1_DIRS'> - <option value='16' $selected{'L1_DIRS'}{'16'}>16</option> - <option value='32' $selected{'L1_DIRS'}{'32'}>32</option> - <option value='64' $selected{'L1_DIRS'}{'64'}>64</option> - <option value='128' $selected{'L1_DIRS'}{'128'}>128</option> - <option value='256' $selected{'L1_DIRS'}{'256'}>256</option> - </select></td> - <td colspan='2' rowspan= '5' valign='top' class='base'> - <table cellspacing='0' cellpadding='0'> - <tr> - <!-- intentionally left empty --> - </tr> - <tr> - <td>$Lang::tr{'no cache sites'}: <img src='/blob.gif' alt='*' /></td> - </tr> - <tr> - <!-- intentionally left empty --> - </tr> - <tr> - <!-- intentionally left empty --> - </tr> - <tr> - <td><textarea name='DST_NOCACHE' cols='32' rows='6' wrap='off'> + <td class='base'>$Lang::tr{'number of L1 dirs'}:</td> + <td class='base'><select name='L1_DIRS'> + <option value='16' $selected{'L1_DIRS'}{'16'}>16</option> + <option value='32' $selected{'L1_DIRS'}{'32'}>32</option> + <option value='64' $selected{'L1_DIRS'}{'64'}>64</option> + <option value='128' $selected{'L1_DIRS'}{'128'}>128</option> + <option value='256' $selected{'L1_DIRS'}{'256'}>256</option> + </select></td> + <td colspan='2' rowspan= '5' valign='top' class='base'> + <table cellspacing='0' cellpadding='0'> + <tr> + <!-- intentionally left empty --> + </tr> + <tr> + <td>$Lang::tr{'no cache sites'}: <img src='/blob.gif' alt='*' /></td> + </tr> + <tr> + <!-- intentionally left empty --> + </tr> + <tr> + <!-- intentionally left empty --> + </tr> + <tr> + <td><textarea name='DST_NOCACHE' cols='32' rows='6' wrap='off'> END ; @@ -1149,60 +1149,60 @@ print <<END </textarea></td> - </tr> - </table> - </td> + </tr> + </table> + </td> </tr> <tr> - <td class='base'>$Lang::tr{'memory replacement policy'}:</td> - <td class='base'><select name='MEM_POLICY'> - <option value='LRU' $selected{'MEM_POLICY'}{'LRU'}>LRU</option> - <option value='heap LFUDA' $selected{'MEM_POLICY'}{'heap LFUDA'}>heap LFUDA</option> - <option value='heap GDSF' $selected{'MEM_POLICY'}{'heap GDSF'}>heap GDSF</option> - <option value='heap LRU' $selected{'MEM_POLICY'}{'heap LRU'}>heap LRU</option> - </select></td> + <td class='base'>$Lang::tr{'memory replacement policy'}:</td> + <td class='base'><select name='MEM_POLICY'> + <option value='LRU' $selected{'MEM_POLICY'}{'LRU'}>LRU</option> + <option value='heap LFUDA' $selected{'MEM_POLICY'}{'heap LFUDA'}>heap LFUDA</option> + <option value='heap GDSF' $selected{'MEM_POLICY'}{'heap GDSF'}>heap GDSF</option> + <option value='heap LRU' $selected{'MEM_POLICY'}{'heap LRU'}>heap LRU</option> + </select></td> </tr> <tr> - <td class='base'>$Lang::tr{'cache replacement policy'}:</td> - <td class='base'><select name='CACHE_POLICY'> - <option value='LRU' $selected{'CACHE_POLICY'}{'LRU'}>LRU</option> - <option value='heap LFUDA' $selected{'CACHE_POLICY'}{'heap LFUDA'}>heap LFUDA</option> - <option value='heap GDSF' $selected{'CACHE_POLICY'}{'heap GDSF'}>heap GDSF</option> - <option value='heap LRU' $selected{'CACHE_POLICY'}{'heap LRU'}>heap LRU</option> - </select></td> + <td class='base'>$Lang::tr{'cache replacement policy'}:</td> + <td class='base'><select name='CACHE_POLICY'> + <option value='LRU' $selected{'CACHE_POLICY'}{'LRU'}>LRU</option> + <option value='heap LFUDA' $selected{'CACHE_POLICY'}{'heap LFUDA'}>heap LFUDA</option> + <option value='heap GDSF' $selected{'CACHE_POLICY'}{'heap GDSF'}>heap GDSF</option> + <option value='heap LRU' $selected{'CACHE_POLICY'}{'heap LRU'}>heap LRU</option> + </select></td> </tr> <tr> - <td colspan='2'> </td> + <td colspan='2'> </td> </tr> <tr> - <td class='base'>$Lang::tr{'offline mode'}:</td> - <td><input type='checkbox' name='OFFLINE_MODE' $checked{'OFFLINE_MODE'}{'on'} /></td> + <td class='base'>$Lang::tr{'offline mode'}:</td> + <td><input type='checkbox' name='OFFLINE_MODE' $checked{'OFFLINE_MODE'}{'on'} /></td> </tr> </table> <hr size='1'/> <table width='100%'> <tr> - <td colspan='4'><b>$Lang::tr{'destination ports'}</b></td> + <td colspan='4'><b>$Lang::tr{'destination ports'}</b></td> </tr> <tr> - <td width='25%'></td> <td width='20%'> </td><td width='25%'> </td><td width='30%'></td> + <td width='25%'></td> <td width='20%'> </td><td width='25%'> </td><td width='30%'></td> </tr> <tr> - <td colspan='2' class='base'>$Lang::tr{'standard ports'}:</td> - <td colspan='2' class='base'>$Lang::tr{'ssl ports'}:</td> + <td colspan='2' class='base'>$Lang::tr{'standard ports'}:</td> + <td colspan='2' class='base'>$Lang::tr{'ssl ports'}:</td> </tr> <tr> - <td colspan='2'><textarea name='PORTS_SAFE' cols='32' rows='6' wrap='off'> + <td colspan='2'><textarea name='PORTS_SAFE' cols='32' rows='6' wrap='off'> END ; - if (!$proxysettings{'PORTS_SAFE'}) { print $def_ports_safe; } else { print $proxysettings{'PORTS_SAFE'}; } + if (!$proxysettings{'PORTS_SAFE'}) { print $def_ports_safe; } else { print $proxysettings{'PORTS_SAFE'}; } print <<END </textarea></td> - <td colspan='2'><textarea name='PORTS_SSL' cols='32' rows='6' wrap='off'> + <td colspan='2'><textarea name='PORTS_SSL' cols='32' rows='6' wrap='off'> END ; - if (!$proxysettings{'PORTS_SSL'}) { print $def_ports_ssl; } else { print $proxysettings{'PORTS_SSL'}; } + if (!$proxysettings{'PORTS_SSL'}) { print $def_ports_ssl; } else { print $proxysettings{'PORTS_SSL'}; } print <<END </textarea></td> @@ -1211,27 +1211,27 @@ <hr size='1'/> <table width='100%'> <tr> - <td colspan='4'><b>$Lang::tr{'network based access'}</b></td> + <td colspan='4'><b>$Lang::tr{'network based access'}</b></td> </tr> <tr> - <td width='25%'></td> <td width='20%'> </td><td width='30%'> </td><td width='25%'></td> + <td width='25%'></td> <td width='20%'> </td><td width='30%'> </td><td width='25%'></td> </tr> <tr> - <td colspan='2' class='base'>$Lang::tr{'allowed subnets'}:</td> - <td colspan='2'> </td> + <td colspan='2' class='base'>$Lang::tr{'allowed subnets'}:</td> + <td colspan='2'> </td> </tr> <tr> - <td colspan='2' rowspan='4' valign='top'><textarea name='SRC_SUBNETS' cols='32' rows='6' wrap='off'> + <td colspan='2' rowspan='4' valign='top'><textarea name='SRC_SUBNETS' cols='32' rows='6' wrap='off'> END ; if (!$proxysettings{'SRC_SUBNETS'}) { - print "$netsettings{'GREEN_1_NETADDRESS'}\/$netsettings{'GREEN_1_NETMASK'}\n"; - if ($netsettings{'BLUE_COUNT'} >= 1) - { - print "$netsettings{'BLUE_1_NETADDRESS'}\/$netsettings{'BLUE_1_NETMASK'}\n"; - } + print "$netsettings{'GREEN_1_NETADDRESS'}\/$netsettings{'GREEN_1_NETMASK'}\n"; + if ($netsettings{'BLUE_COUNT'} >= 1) + { + print "$netsettings{'BLUE_1_NETADDRESS'}\/$netsettings{'BLUE_1_NETMASK'}\n"; + } } else { print $proxysettings{'SRC_SUBNETS'}; } print <<END @@ -1242,7 +1242,7 @@ $line = $Lang::tr{'no internal proxy'}; print "<td class='base'>$line:</td>\n"; print <<END - <td><input type='checkbox' name='NO_PROXY_LOCAL' $checked{'NO_PROXY_LOCAL'}{'on'} /></td> + <td><input type='checkbox' name='NO_PROXY_LOCAL' $checked{'NO_PROXY_LOCAL'}{'on'} /></td> </tr> END ; @@ -1251,44 +1251,44 @@ $line =~ s/Green/<span class='ipcop_iface_green' style='font-weight: bold;'>$Lang::tr{'green'}<\/span>/i; print "<tr><td class='base'>$line:</td>\n"; print <<END - <td><input type='checkbox' name='NO_PROXY_LOCAL_GREEN' $checked{'NO_PROXY_LOCAL_GREEN'}{'on'} /></td> + <td><input type='checkbox' name='NO_PROXY_LOCAL_GREEN' $checked{'NO_PROXY_LOCAL_GREEN'}{'on'} /></td> </tr> END ; if ($netsettings{'BLUE_COUNT'} >= 1) { - $line = $Lang::tr{'no internal proxy on blue'}; - $line =~ s/Blue/<span class='ipcop_iface_blue' style='font-weight: bold;'>$Lang::tr{'blue'}<\/span>/i; - print "<tr>\n"; - print "<td class='base'>$line:</td>\n"; - print <<END - <td><input type='checkbox' name='NO_PROXY_LOCAL_BLUE' $checked{'NO_PROXY_LOCAL_BLUE'}{'on'} /></td> + $line = $Lang::tr{'no internal proxy on blue'}; + $line =~ s/Blue/<span class='ipcop_iface_blue' style='font-weight: bold;'>$Lang::tr{'blue'}<\/span>/i; + print "<tr>\n"; + print "<td class='base'>$line:</td>\n"; + print <<END + <td><input type='checkbox' name='NO_PROXY_LOCAL_BLUE' $checked{'NO_PROXY_LOCAL_BLUE'}{'on'} /></td> </tr> END ; } print <<END <tr> - <td colspan='2'> </td> + <td colspan='2'> </td> </tr> </table> <table width='100%'> <tr> - <td width='25%'></td> <td width='20%'> </td><td width='25%'> </td><td width='30%'></td> + <td width='25%'></td> <td width='20%'> </td><td width='25%'> </td><td width='30%'></td> </tr> <tr> - <td colspan='2' class='base'>$Lang::tr{'unrestricted ip clients'}: <img src='/blob.gif' alt='*' /></td> - <td colspan='2' class='base'>$Lang::tr{'unrestricted mac clients'}: <img src='/blob.gif' alt='*' /></td> + <td colspan='2' class='base'>$Lang::tr{'unrestricted ip clients'}: <img src='/blob.gif' alt='*' /></td> + <td colspan='2' class='base'>$Lang::tr{'unrestricted mac clients'}: <img src='/blob.gif' alt='*' /></td> </tr> <tr> - <td colspan='2'><textarea name='SRC_UNRESTRICTED_IP' cols='32' rows='6' wrap='off'> + <td colspan='2'><textarea name='SRC_UNRESTRICTED_IP' cols='32' rows='6' wrap='off'> END ; - print $proxysettings{'SRC_UNRESTRICTED_IP'}; + print $proxysettings{'SRC_UNRESTRICTED_IP'}; print <<END </textarea></td> - <td colspan='2'><textarea name='SRC_UNRESTRICTED_MAC' cols='32' rows='6' wrap='off'> + <td colspan='2'><textarea name='SRC_UNRESTRICTED_MAC' cols='32' rows='6' wrap='off'> END ; @@ -1300,22 +1300,22 @@ </table> <table width='100%'> <tr> - <td width='25%'></td> <td width='20%'> </td><td width='25%'> </td><td width='30%'></td> + <td width='25%'></td> <td width='20%'> </td><td width='25%'> </td><td width='30%'></td> </tr> <tr> - <td colspan='2' class='base'>$Lang::tr{'banned ip clients'}: <img src='/blob.gif' alt='*' /></td> - <td colspan='2' class='base'>$Lang::tr{'banned mac clients'}: <img src='/blob.gif' alt='*' /></td> + <td colspan='2' class='base'>$Lang::tr{'banned ip clients'}: <img src='/blob.gif' alt='*' /></td> + <td colspan='2' class='base'>$Lang::tr{'banned mac clients'}: <img src='/blob.gif' alt='*' /></td> </tr> <tr> - <td colspan='2'><textarea name='SRC_BANNED_IP' cols='32' rows='6' wrap='off'> + <td colspan='2'><textarea name='SRC_BANNED_IP' cols='32' rows='6' wrap='off'> END ; - print $proxysettings{'SRC_BANNED_IP'}; + print $proxysettings{'SRC_BANNED_IP'}; print <<END </textarea></td> - <td colspan='2'><textarea name='SRC_BANNED_MAC' cols='32' rows='6' wrap='off'> + <td colspan='2'><textarea name='SRC_BANNED_MAC' cols='32' rows='6' wrap='off'> END ; @@ -1338,34 +1338,34 @@ <table width='100%'> <tr> - <td colspan='4'><b>$Lang::tr{'classroom extensions'}</b></td> + <td colspan='4'><b>$Lang::tr{'classroom extensions'}</b></td> </tr> <tr> - <td width='25%'></td> <td width='20%'> </td><td width='25%'> </td><td width='30%'></td> + <td width='25%'></td> <td width='20%'> </td><td width='25%'> </td><td width='30%'></td> </tr> <tr> - <td class='base'>$Lang::tr{'enabled'}:</td> - <td><input type='checkbox' name='CLASSROOM_EXT' $checked{'CLASSROOM_EXT'}{'on'} /></td> - <td class='base'>$Lang::tr{'supervisor password'}: <img src='/blob.gif' alt='*' /></td> - <td><input type='password' name='SUPERVISOR_PASSWORD' value='$proxysettings{'SUPERVISOR_PASSWORD'}' size='12' /></td> + <td class='base'>$Lang::tr{'enabled'}:</td> + <td><input type='checkbox' name='CLASSROOM_EXT' $checked{'CLASSROOM_EXT'}{'on'} /></td> + <td class='base'>$Lang::tr{'supervisor password'}: <img src='/blob.gif' alt='*' /></td> + <td><input type='password' name='SUPERVISOR_PASSWORD' value='$proxysettings{'SUPERVISOR_PASSWORD'}' size='12' /></td> </tr> <tr> - <td colspan='2' class='base'>$Lang::tr{'cre group definitions'}:</td> - <td colspan='2' class='base'>$Lang::tr{'cre supervisors'}: <img src='/blob.gif' alt='*' /></td> + <td colspan='2' class='base'>$Lang::tr{'cre group definitions'}:</td> + <td colspan='2' class='base'>$Lang::tr{'cre supervisors'}: <img src='/blob.gif' alt='*' /></td> </tr> <tr> - <td colspan='2'><textarea name='CRE_GROUPS' cols='32' rows='6' wrap='off'> + <td colspan='2'><textarea name='CRE_GROUPS' cols='32' rows='6' wrap='off'> END ; - print $proxysettings{'CRE_GROUPS'}; + print $proxysettings{'CRE_GROUPS'}; print <<END </textarea></td> - <td colspan='2'><textarea name='CRE_SVHOSTS' cols='32' rows='6' wrap='off'> + <td colspan='2'><textarea name='CRE_SVHOSTS' cols='32' rows='6' wrap='off'> END ; - print $proxysettings{'CRE_SVHOSTS'}; + print $proxysettings{'CRE_SVHOSTS'}; print <<END </textarea></td> @@ -1377,10 +1377,10 @@ END ; } else { - print <<END - <input type='hidden' name='SUPERVISOR_PASSWORD' value='$proxysettings{'SUPERVISOR_PASSWORD'}' /> - <input type='hidden' name='CRE_GROUPS' value='$proxysettings{'CRE_GROUPS'}' /> - <input type='hidden' name='CRE_SVHOSTS' value='$proxysettings{'CRE_SVHOSTS'}' /> + print <<END + <input type='hidden' name='SUPERVISOR_PASSWORD' value='$proxysettings{'SUPERVISOR_PASSWORD'}' /> + <input type='hidden' name='CRE_GROUPS' value='$proxysettings{'CRE_GROUPS'}' /> + <input type='hidden' name='CRE_SVHOSTS' value='$proxysettings{'CRE_SVHOSTS'}' /> END ; } @@ -1391,170 +1391,170 @@ <table width='100%'> <tr> - <td colspan='4'><b>$Lang::tr{'time restrictions'}</b></td> + <td colspan='4'><b>$Lang::tr{'time restrictions'}</b></td> </tr> <tr> - <td width='2%'>$Lang::tr{'access'}</td> - <td width='1%'> </td> - <td width='2%' align='center'>$Lang::tr{'monday short'}</td> - <td width='2%' align='center'>$Lang::tr{'tuesday short'}</td> - <td width='2%' align='center'>$Lang::tr{'wednesday short'}</td> - <td width='2%' align='center'>$Lang::tr{'thursday short'}</td> - <td width='2%' align='center'>$Lang::tr{'friday short'}</td> - <td width='2%' align='center'>$Lang::tr{'saturday short'}</td> - <td width='2%' align='center'>$Lang::tr{'sunday short'}</td> - <td width='1%'> </td> - <td width='7%' colspan=3>$Lang::tr{'from'}</td> - <td width='1%'> </td> - <td width='7%' colspan=3>$Lang::tr{'to'}</td> - <td> </td> + <td width='2%'>$Lang::tr{'access'}</td> + <td width='1%'> </td> + <td width='2%' align='center'>$Lang::tr{'monday short'}</td> + <td width='2%' align='center'>$Lang::tr{'tuesday short'}</td> + <td width='2%' align='center'>$Lang::tr{'wednesday short'}</td> + <td width='2%' align='center'>$Lang::tr{'thursday short'}</td> + <td width='2%' align='center'>$Lang::tr{'friday short'}</td> + <td width='2%' align='center'>$Lang::tr{'saturday short'}</td> + <td width='2%' align='center'>$Lang::tr{'sunday short'}</td> + <td width='1%'> </td> + <td width='7%' colspan=3>$Lang::tr{'from'}</td> + <td width='1%'> </td> + <td width='7%' colspan=3>$Lang::tr{'to'}</td> + <td> </td> </tr> <tr> - <td class='base'> - <select name='TIME_ACCESS_MODE'> - <option value='allow' $selected{'TIME_ACCESS_MODE'}{'allow'}>$Lang::tr{'mode allow'}</option> - <option value='deny' $selected{'TIME_ACCESS_MODE'}{'deny'}>$Lang::tr{'mode deny'}</option> - </select> - </td> - <td> </td> - <td class='base'><input type='checkbox' name='TIME_MON' $checked{'TIME_MON'}{'on'} /></td> - <td class='base'><input type='checkbox' name='TIME_TUE' $checked{'TIME_TUE'}{'on'} /></td> - <td class='base'><input type='checkbox' name='TIME_WED' $checked{'TIME_WED'}{'on'} /></td> - <td class='base'><input type='checkbox' name='TIME_THU' $checked{'TIME_THU'}{'on'} /></td> - <td class='base'><input type='checkbox' name='TIME_FRI' $checked{'TIME_FRI'}{'on'} /></td> - <td class='base'><input type='checkbox' name='TIME_SAT' $checked{'TIME_SAT'}{'on'} /></td> - <td class='base'><input type='checkbox' name='TIME_SUN' $checked{'TIME_SUN'}{'on'} /></td> - <td> </td> - <td class='base'> - <select name='TIME_FROM_HOUR'> + <td class='base'> + <select name='TIME_ACCESS_MODE'> + <option value='allow' $selected{'TIME_ACCESS_MODE'}{'allow'}>$Lang::tr{'mode allow'}</option> + <option value='deny' $selected{'TIME_ACCESS_MODE'}{'deny'}>$Lang::tr{'mode deny'}</option> + </select> + </td> + <td> </td> + <td class='base'><input type='checkbox' name='TIME_MON' $checked{'TIME_MON'}{'on'} /></td> + <td class='base'><input type='checkbox' name='TIME_TUE' $checked{'TIME_TUE'}{'on'} /></td> + <td class='base'><input type='checkbox' name='TIME_WED' $checked{'TIME_WED'}{'on'} /></td> + <td class='base'><input type='checkbox' name='TIME_THU' $checked{'TIME_THU'}{'on'} /></td> + <td class='base'><input type='checkbox' name='TIME_FRI' $checked{'TIME_FRI'}{'on'} /></td> + <td class='base'><input type='checkbox' name='TIME_SAT' $checked{'TIME_SAT'}{'on'} /></td> + <td class='base'><input type='checkbox' name='TIME_SUN' $checked{'TIME_SUN'}{'on'} /></td> + <td> </td> + <td class='base'> + <select name='TIME_FROM_HOUR'> END ; for ($i=0;$i<=24;$i++) { - $_ = sprintf("%02s",$i); - print "<option $selected{'TIME_FROM_HOUR'}{$_}>$_</option>\n"; + $_ = sprintf("%02s",$i); + print "<option $selected{'TIME_FROM_HOUR'}{$_}>$_</option>\n"; } print <<END - </select> - </td> - <td>:</td> - <td class='base'> - <select name='TIME_FROM_MINUTE'> + </select> + </td> + <td>:</td> + <td class='base'> + <select name='TIME_FROM_MINUTE'> END ; for ($i=0;$i<=45;$i+=15) { - $_ = sprintf("%02s",$i); - print "<option $selected{'TIME_FROM_MINUTE'}{$_}>$_</option>\n"; + $_ = sprintf("%02s",$i); + print "<option $selected{'TIME_FROM_MINUTE'}{$_}>$_</option>\n"; } print <<END - </select> - </td> - <td> - </td> - <td class='base'> - <select name='TIME_TO_HOUR'> + </select> + </td> + <td> - </td> + <td class='base'> + <select name='TIME_TO_HOUR'> END ; for ($i=0;$i<=24;$i++) { - $_ = sprintf("%02s",$i); - print "<option $selected{'TIME_TO_HOUR'}{$_}>$_</option>\n"; + $_ = sprintf("%02s",$i); + print "<option $selected{'TIME_TO_HOUR'}{$_}>$_</option>\n"; } print <<END - </select> - </td> - <td>:</td> - <td class='base'> - <select name='TIME_TO_MINUTE'> + </select> + </td> + <td>:</td> + <td class='base'> + <select name='TIME_TO_MINUTE'... [truncated message content] |