SquidGuard.cgi IPCOP1.4b3 modifié pour une Mandrake

Forum traitant de la distribution sécurisée montante nommée IP cop et basée sur la distribution Smoothwall. C'est à l'heure actuelle le forum le plus actif du site.

Modérateur: modos Ixus

SquidGuard.cgi IPCOP1.4b3 modifié pour une Mandrake

Messagepar pascal_lucas » 19 Mai 2004 06:14

Ceci n'a pas directement à voir avec IPCOP1.4 mais j'utilise à la maison MAndrake10.0 et j'y ai installé SquidGuard afin de filtrer l'accés internet pour mes enfants.
Ayant installé "petite poulpe" sur l'IPCOP 1.4b3 de mon établissement j'aimerais que l'affichage de la page d'interdition soit la même. J'ai donc recopié le script fourni par admin Bourdonnec sur la Mandrake10.0 mais lors d'accés aux sites interdits le serveur apache m'indique des erreurs.
N'étant pas un pro des scripts cgi, et n'ayant actuellement pas beaucoup de temps à consacrer à ce problème, pourriez-vous m'indiquer à quel endroit je dois placer les images, ainsi que les points importants de configuration de script.

Si quelqu'un pouvait commenter le script ci-dessous ceci m'aiderai bien.

Merci d'avance pour tous les renseignements

Pascal Lucas

PS Comment sur ixus.net peut-on joindre un fichier ?


#! /usr/bin/perl
#
# Sample CGI to explain to the user that the URL is blocked and by which rule set
#
# By Pål Baltzersen 1998
#

#
# Adaptation pour IpCop 1.4 par admin Bourdonnec "fbourdonnec_chez.com"
# 15 mars 2004
#

use Sys::Hostname;

$QUERY_STRING = $ENV{'QUERY_STRING'};
$DOCUMENT_ROOT = $ENV{'DOCUMENT_ROOT'};

$clientaddr = "";
$clientname = "";
$srcclass = "";
$targetclass = "";
$url = "";
$time = time;
@day = ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
@month = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");

while ($QUERY_STRING =~ /^\&?([^&=]+)=([^&=]*)(.*)/) {
$key = $1;
$value = $2;
$QUERY_STRING = $3;
if ($key =~ /^(clientaddr|srcclass|targetclass|url)$/) {
eval "\$$key = \$value";
}
if ($QUERY_STRING =~ /^url=(.*)/) {
$url = $1;
$QUERY_STRING = "";
}
}

if ($url =~ /\.(png|gif|jpg|jpeg|mpg|mpeg|avi|mov)$/i) {
print "Content-Type: image/png\n";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($time);
printf "Expires: %s, %02d-%s-%02d %02d:%02d:%02d GMT\n\n", $day[$wday],$mday,$month[$mon],$year,$hour,$min,$sec;
open(GIF, "$DOCUMENT_ROOT/images/blocked.gif");
while (<GIF>) {
print;
}
close(GIF)
} else {
print "Content-type: text/html\n";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($time);
printf "Expires: %s, %02d-%s-%02d %02d:%02d:%02d GMT\n\n", $day[$wday],$mday,$month[$mon],$year,$hour,$min,$sec;
print "<HTML>\n\n";
# print " <HEAD>\n\n\n <TITLE>302 Accés interdit</TITLE>\n <LINK REL=\"SHORTCUT ICON\" HREF=\"/favicon_av.ico\"> </HEAD>\n\n";
print "<BODY BGCOLOR=\"#666699\" text=\"#FFFFFF\">";

if ($srcclass eq "unknown") {
print " <H1 ALIGN=CENTER><BR><BR>Cette machine n'a pas<BR>accés a internet</H1>\n\n";
print " <TABLE BORDER=0 ALIGN=CENTER>\n";
print " <TR><TH ALIGN=RIGHT>Client address<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientaddr\n";
print " <TR><TH ALIGN=RIGHT>Client group<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$srcclass\n";
print " </TABLE>";
print " <P ALIGN=CENTER><FONT COLOR=\"#66CC00\">Informez admin si ce site doit être autorisé<BR>\n";
print " <A HREF=mailto:pascal.ltp\@tiscali.fr?subject=Filtrage%20Urls&body=Je%20voudrais%20visiter%20";
print "le%20site%20$url%20($srcclass),($targetclass),($clientaddr)>";
print " pascal.ltp\@tiscali.fr</A>";
print " </P>";
} else {
print " <BR><FONT COLOR=\"#FFFFFF\"><CENTER><H1>Accés interdit</H1></CENTER></FONT>\n\n";
print " <TABLE BORDER=0 ALIGN=CENTER>\n";
print " <TR><TH ALIGN=RIGHT>Client address<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientaddr\n";
print " <TR><TH ALIGN=RIGHT>Client group<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$srcclass\n";
print " <TR><TH ALIGN=RIGHT>URL<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$url\n";
print " <TR><TH ALIGN=RIGHT>Target class<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$targetclass\n";
print " </TABLE>";
print " <P ALIGN=CENTER><FONT COLOR=\"#66CC00\">Informez admin si ce site doit être autorisé<BR>\n";
print " <A HREF=mailto:admin%20%3Cpascal.ltp\@tiscali.fr%3E?subject=Filtrage%20Urls&body=Je%20voudrais%20visiter%20";
print "le%20site%0A$url%0A$srcclass,$targetclass,$clientaddr>";
print " pascal.ltp\@tiscali.fr</A>";
print " </P>";
}
# print " <P ALIGN=CENTER> <IMG ALIGN=CENTER SRC=\'http://" . &hostname() . ":81/images/bounceback.png\' ></P>";
# print " <P> <IMG ALIGN=CENTER SRC=\'http://10.0.0.100:81/images/bounceback.png\' ></P>";
print " </BODY></HTML>";
}
exit 0;[/list]
Avatar de l’utilisateur
pascal_lucas
Aspirant
Aspirant
 
Messages: 110
Inscrit le: 28 Nov 2003 01:00
Localisation: carvin

Le script cgi fourni lors de l'installation de squidGuard

Messagepar pascal_lucas » 19 Mai 2004 06:39

J'ai oublié de fournir le script cgi fourni lors de l'installation de squidGuard sur la Mandrake (celui ci fonctionne)

Merci pour l'aide

Pascal Lucas

#! /usr/bin/perl
#
# Sample CGI to explain to the user that the URL is blocked and by which rule set
#
# By Pål Baltzersen 1998
#
# Modifié par Pascal Lucas le 11 Mai 2004

$QUERY_STRING = $ENV{'QUERY_STRING'};
$DOCUMENT_ROOT = $ENV{'DOCUMENT_ROOT'};

$clientaddr = "";
$clientname = "";
$clientident = "";
$srcclass = "";
$targetclass = "";
$url = "";
$time = time;
@day = ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
@month = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");

while ($QUERY_STRING =~ /^\&?([^&=]+)=([^&=]*)(.*)/) {
$key = $1;
$value = $2;
$QUERY_STRING = $3;
if ($key =~ /^(clientaddr|clientname|clientident|srcclass|targetclass|url)$/) {
eval "\$$key = \$value";
}
if ($QUERY_STRING =~ /^url=(.*)/) {
$url = $1;
$QUERY_STRING = "";
}
}

if ($url =~ /\.(gif|jpg|jpeg|mpg|mpeg|avi|mov)$/i) {
print "Content-Type: image/gif\n";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($time);
printf "Expires: %s, %02d-%s-%02d %02d:%02d:%02d GMT\n\n", $day[$wday],$mday,$month[$mon],$year,$hour,$min,$sec;
open(GIF, "$DOCUMENT_ROOT/images/blocked.gif");
while (<GIF>) {
print;
}
close(GIF)
} else {
print "Content-type: text/html\n";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($time);
printf "Expires: %s, %02d-%s-%02d %02d:%02d:%02d GMT\n\n", $day[$wday],$mday,$month[$mon],$year,$hour,$min,$sec;
# print " <BR><BR><BR>\n\n";
print "<HTML>\n\n <HEAD>\n\n\n <TITLE>302 Access Interdit denied</TITLE>\n </HEAD>\n\n";
print " <BODY BGCOLOR=\"#666699\" text=\"#FFFFFF\">\n";
if ($srcclass eq "unknown") {
# print " BORDER=0></A>\n </P>\n\n";
print " <H1 ALIGN=CENTER>Acces Interdit ddddenied because<BR>this client is not<BR>defined on the proxy</H1>\n\n";
print " <TABLE BORDER=0 ALIGN=CENTER>\n";
# print " <TR><TH ALIGN=RIGHT>Supplementary info<TH ALIGN=CENTER>:<TH ALIGN=LEFT>\n";
print " <TR><TH ALIGN=RIGHT>Client address<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientaddr\n";
# print " <TR><TH ALIGN=RIGHT>Client name<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientname\n";
# print " <TR><TH ALIGN=RIGHT>User ident<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientident\n";
print " <TR><TH ALIGN=RIGHT>Client group<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$srcclass\n";
print " </TABLE>\n\n";
# print the squidGuard region
print "<BR>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=CENTER BGCOLOR=\"#666699\"><H2><FONT COLOR=\"#66CC00\">1Here below you can find lucas the authorized time range</FONT></H2>\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TH ALIGN=CENTER BGCOLOR=\"#666699\">The local time on the pascal server is: ".localtime."\n";
#print "</TH>\n";
#print "</TR>\n";
#print "</TABLE>\n";
#print "</CENTER>\n";
#print "<CENTER>\n";
#print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
#print "<TR>\n";
#print "<TH ALIGN=LEFT BGCOLOR=\"#666699\">Sunday\n";
#print "</TH>\n";
#print "</TR>\n";
#print "<TR>\n";
#print "<TD WIDTH=\"39%\" ALIGN=RIGHT BGCOLOR=\"#666699\">09:30\n";
#print "</TD>\n";
#print "<TD WIDTH=\"11%\" ALIGN=RIGHT BGCOLOR=\"#666699\">12:00\n";
#print "</TD>\n";
#print "<TD WIDTH=\"4%\" ALIGN=RIGHT BGCOLOR=\"#666699\">13:00\n";
#print "</TD>\n";
#print "<TD WIDTH=\"25%\" ALIGN=RIGHT BGCOLOR=\"#666699\">19:00\n";
#print "</TD>\n";
#print "<TD WIDTH=\"21%\" ALIGN=RIGHT BGCOLOR=\"#666699\">24:00\n";
#print "</TD>\n";
#print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"39%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"11%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"4%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=LEFT BGCOLOR=\"#666699\">Lundi\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\" ALIGN=RIGHT BGCOLOR=\"#666699\">09:00\n";
print "</TD>\n";
print "<TD WIDTH=\"13%\" ALIGN=RIGHT BGCOLOR=\"#666699\">12:00\n";
print "</TD>\n";
print "<TD WIDTH=\"4%\" ALIGN=RIGHT BGCOLOR=\"#666699\">13:00\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\" ALIGN=RIGHT BGCOLOR=\"#666699\">19:00\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\" ALIGN=RIGHT BGCOLOR=\"#666699\">24:00\n";
print "</TD>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"13%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"4%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=LEFT BGCOLOR=\"#666699\">Tuesday\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\" ALIGN=RIGHT BGCOLOR=\"#666699\">09:00\n";
print "</TD>\n";
print "<TD WIDTH=\"8%\" ALIGN=RIGHT BGCOLOR=\"#666699\">11:00\n";
print "</TD>\n";
print "<TD WIDTH=\"5%\" ALIGN=RIGHT BGCOLOR=\"#666699\">12:00\n";
print "</TD>\n";
print "<TD WIDTH=\"29%\" ALIGN=RIGHT BGCOLOR=\"#666699\">19:00\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\" ALIGN=RIGHT BGCOLOR=\"#666699\">24:00\n";
print "</TD>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"8%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"5%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"29%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=LEFT BGCOLOR=\"#666699\">Wednesday\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\" ALIGN=RIGHT BGCOLOR=\"#666699\">09:00\n";
print "</TD>\n";
print "<TD WIDTH=\"13%\" ALIGN=RIGHT BGCOLOR=\"#666699\">12:00\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\" ALIGN=RIGHT BGCOLOR=\"#666699\">18:00\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\" ALIGN=RIGHT BGCOLOR=\"#666699\">24:00\n";
print "</TD>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"13%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=LEFT BGCOLOR=\"#666699\">Thurdsay\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\" ALIGN=RIGHT BGCOLOR=\"#666699\">09:00\n";
print "</TD>\n";
print "<TD WIDTH=\"17%\" ALIGN=RIGHT BGCOLOR=\"#666699\">13:00\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\" ALIGN=RIGHT BGCOLOR=\"#666699\">18:00\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\" ALIGN=RIGHT BGCOLOR=\"#666699\">24:00\n";
print "</TD>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"17%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=LEFT BGCOLOR=\"#666699\">Friday\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\" ALIGN=RIGHT BGCOLOR=\"#666699\">09:00\n";
print "</TD>\n";
print "<TD WIDTH=\"13%\" ALIGN=RIGHT BGCOLOR=\"#666699\">12:00\n";
print "</TD>\n";
print "<TD WIDTH=\"6%\" ALIGN=RIGHT BGCOLOR=\"#666699\">13:30\n";
print "</TD>\n";
print "<TD WIDTH=\"19%\" ALIGN=RIGHT BGCOLOR=\"#666699\">18:00\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\" ALIGN=RIGHT BGCOLOR=\"#666699\">24:00\n";
print "</TD>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"13%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"6%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"19%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=LEFT BGCOLOR=\"#666699\">Saturday\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"34%\" ALIGN=RIGHT BGCOLOR=\"#666699\">08:20\n";
print "</TD>\n";
print "<TD WIDTH=\"20%\" ALIGN=RIGHT BGCOLOR=\"#666699\">13:00\n";
print "</TD>\n";
print "<TD WIDTH=\"2%\" ALIGN=RIGHT BGCOLOR=\"#666699\">13:30\n";
print "</TD>\n";
print "<TD WIDTH=\"23%\" ALIGN=RIGHT BGCOLOR=\"#666699\">19:00\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\" ALIGN=RIGHT BGCOLOR=\"#666699\">24:00\n";
print "</TD>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"34%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"20%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"2%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"23%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<BR>\n";

print " <P ALIGN=CENTER>If this is wrong, contact your admin and send all the above information<BR>\n";
print " <A HREF=mailto:admin\@yourdomain.com>admin\@yourdomain.com</A>
";
print " </P>\n\n";
} elsif ($targetclass eq "in-addr") {
print " <P ALIGN=RIGHT>\n";
print " <A HREF=\"http://www.linux-mandrake.com/\"><IMG SRC=\"http://127.0.0.1/icons/crosslight3.gif\"\n";
# print " BORDER=0></A>\n </P>\n\n";
print " <H1 ALIGN=CENTER>IP address URLs<BR>are not allowed<BR>from this client</H1>\n\n";
print " <TABLE BORDER=0 ALIGN=CENTER>\n";
# print " <TR><TH ALIGN=RIGHT>Supplementary info<TH ALIGN=CENTER>:<TH ALIGN=LEFT>\n";
print " <TR><TH ALIGN=RIGHT>Client address<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientaddr\n";
# print " <TR><TH ALIGN=RIGHT>Client name<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientname\n";
# print " <TR><TH ALIGN=RIGHT>User ident<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientident\n";
print " <TR><TH ALIGN=RIGHT>Client group<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$srcclass\n";
print " <TR><TH ALIGN=RIGHT>URL<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$url\n";
print " <TR><TH ALIGN=RIGHT>Target class<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$targetclass\n";
print " </TABLE>\n\n";
print " <P ALIGN=CENTER>Contact the <B>webmaster</B> of <B>$url</B><BR>\n";
print " and ask him to give the webserver a proper <U>domain name</U>\n";
print " </P>\n\n";
} else {
# print " <P ALIGN=RIGHT>\n";
# print " <A HREF=\"http://www.linux-mandrake.com/\"><IMG SRC=\"http://127.0.0.1/icons/crosslight3.gif\"\n";
# print " BORDER=0></A>\n </P>\n\n";
# print " <BR><BR><BR>\n\n";
print " <BR><FONT COLOR=\"#FFFFFF\"><CENTER><H1>Access denied</H1></CENTER></FONT>\n\n";
print " <TABLE BORDER=0 ALIGN=CENTER>\n";
# print " <TR><TH ALIGN=RIGHT>Supplementary info<TH ALIGN=CENTER>:<TH ALIGN=LEFT>\n";
print " <TR><TH ALIGN=RIGHT>Client address<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientaddr\n";
# print " <TR><TH ALIGN=RIGHT>Client name<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientname\n";
# print " <TR><TH ALIGN=RIGHT>User ident<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$clientident\n";
print " <TR><TH ALIGN=RIGHT>Client group<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$srcclass\n";
print " <TR><TH ALIGN=RIGHT>URL<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$url\n";
print " <TR><TH ALIGN=RIGHT>Target class<TH ALIGN=CENTER>=<TH ALIGN=LEFT>$targetclass\n";
print " </TABLE>\n\n";
# print the squidGuard region
print "<BR>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=CENTER BGCOLOR=\"#666699\"><H2><FONT COLOR=\"#66CC00\">Here below you can find the authorized time range</FONT></H2>\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TH ALIGN=CENTER BGCOLOR=\"#666699\">The local time on the server is: ".localtime."\n";
print "</TH>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=LEFT BGCOLOR=\"#666699\">Sunday\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"39%\" ALIGN=RIGHT BGCOLOR=\"#666699\">09:30\n";
print "</TD>\n";
print "<TD WIDTH=\"11%\" ALIGN=RIGHT BGCOLOR=\"#666699\">12:00\n";
print "</TD>\n";
print "<TD WIDTH=\"4%\" ALIGN=RIGHT BGCOLOR=\"#666699\">13:00\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\" ALIGN=RIGHT BGCOLOR=\"#666699\">19:00\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\" ALIGN=RIGHT BGCOLOR=\"#666699\">24:00\n";
print "</TD>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"39%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"11%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"4%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=LEFT BGCOLOR=\"#666699\">Monday\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\" ALIGN=RIGHT BGCOLOR=\"#666699\">09:00\n";
print "</TD>\n";
print "<TD WIDTH=\"13%\" ALIGN=RIGHT BGCOLOR=\"#666699\">12:00\n";
print "</TD>\n";
print "<TD WIDTH=\"4%\" ALIGN=RIGHT BGCOLOR=\"#666699\">13:00\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\" ALIGN=RIGHT BGCOLOR=\"#666699\">19:00\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\" ALIGN=RIGHT BGCOLOR=\"#666699\">24:00\n";
print "</TD>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"13%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"4%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=LEFT BGCOLOR=\"#666699\">Tuesday\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\" ALIGN=RIGHT BGCOLOR=\"#666699\">09:00\n";
print "</TD>\n";
print "<TD WIDTH=\"8%\" ALIGN=RIGHT BGCOLOR=\"#666699\">11:00\n";
print "</TD>\n";
print "<TD WIDTH=\"5%\" ALIGN=RIGHT BGCOLOR=\"#666699\">12:00\n";
print "</TD>\n";
print "<TD WIDTH=\"29%\" ALIGN=RIGHT BGCOLOR=\"#666699\">19:00\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\" ALIGN=RIGHT BGCOLOR=\"#666699\">24:00\n";
print "</TD>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"8%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"5%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"29%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=LEFT BGCOLOR=\"#666699\">Wednesday\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\" ALIGN=RIGHT BGCOLOR=\"#666699\">09:00\n";
print "</TD>\n";
print "<TD WIDTH=\"13%\" ALIGN=RIGHT BGCOLOR=\"#666699\">12:00\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\" ALIGN=RIGHT BGCOLOR=\"#666699\">18:00\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\" ALIGN=RIGHT BGCOLOR=\"#666699\">24:00\n";
print "</TD>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"13%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=LEFT BGCOLOR=\"#666699\">Thurdsay\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\" ALIGN=RIGHT BGCOLOR=\"#666699\">09:00\n";
print "</TD>\n";
print "<TD WIDTH=\"17%\" ALIGN=RIGHT BGCOLOR=\"#666699\">13:00\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\" ALIGN=RIGHT BGCOLOR=\"#666699\">18:00\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\" ALIGN=RIGHT BGCOLOR=\"#666699\">24:00\n";
print "</TD>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"17%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=LEFT BGCOLOR=\"#666699\">Friday\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\" ALIGN=RIGHT BGCOLOR=\"#666699\">09:00\n";
print "</TD>\n";
print "<TD WIDTH=\"13%\" ALIGN=RIGHT BGCOLOR=\"#666699\">12:00\n";
print "</TD>\n";
print "<TD WIDTH=\"6%\" ALIGN=RIGHT BGCOLOR=\"#666699\">13:30\n";
print "</TD>\n";
print "<TD WIDTH=\"19%\" ALIGN=RIGHT BGCOLOR=\"#666699\">18:00\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\" ALIGN=RIGHT BGCOLOR=\"#666699\">24:00\n";
print "</TD>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"37%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"13%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"6%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"19%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"25%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<CENTER>\n";
print "<TABLE WIDTH=\"60%\" BORDER=0 CELLPADDING=\"1\" CELLSPACING=\"0\">\n";
print "<TR>\n";
print "<TH ALIGN=LEFT BGCOLOR=\"#666699\">Saturday\n";
print "</TH>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"34%\" ALIGN=RIGHT BGCOLOR=\"#666699\">08:20\n";
print "</TD>\n";
print "<TD WIDTH=\"20%\" ALIGN=RIGHT BGCOLOR=\"#666699\">13:00\n";
print "</TD>\n";
print "<TD WIDTH=\"2%\" ALIGN=RIGHT BGCOLOR=\"#666699\">13:30\n";
print "</TD>\n";
print "<TD WIDTH=\"23%\" ALIGN=RIGHT BGCOLOR=\"#666699\">19:00\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\" ALIGN=RIGHT BGCOLOR=\"#666699\">24:00\n";
print "</TD>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD WIDTH=\"34%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"20%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"2%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"23%\"BGCOLOR=\"#66CC00\">&nbsp\n";
print "</TD>\n";
print "<TD WIDTH=\"21%\"BGCOLOR=\"#FF3300\">&nbsp\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
print "</CENTER>\n";
print "<BR>\n";

print " <P ALIGN=CENTER><FONT COLOR=\"#66CC00\">Informer l'administrateur si ce site doit être autorisé</FONT><BR>\n";

print " <A HREF=mailto:pascal.ltp@tiscali.fr>pascal.ltp@tiscali.fr</A>
";

print " </P>\n\n";
}
print " </BODY>\n\n</HTML>\n";
}
exit 0;
Avatar de l’utilisateur
pascal_lucas
Aspirant
Aspirant
 
Messages: 110
Inscrit le: 28 Nov 2003 01:00
Localisation: carvin


Retour vers IPCop

Qui est en ligne ?

Utilisateur(s) parcourant actuellement ce forum : Aucun utilisateur inscrit et 1 invité

cron