Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 41273ead8df4bd50581c6e7187d1d1d9 > files > 6

squidGuard-1.2.0-10mdk.src.rpm

#! /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
#

$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 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>Access denied 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\">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>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\">If this is wrong, contact your admin and send all the above information</FONT><BR>\n";

print "      <A HREF=mailto:admin\@yourdomain.com>admin@yourdomain.com</A>
"; 
 
    print "    </P>\n\n";
  }
  print "  </BODY>\n\n</HTML>\n";
}
exit 0;