*** squidGuard-simple.cgi.in	Wed Jan 16 10:24:09 2002
--- squidGuard-simple.cgi	Wed Jan 16 10:05:08 2002
***************
*** 4,10 ****
  #
  # By Pål Baltzersen 1998
  #
! 
  $QUERY_STRING = $ENV{'QUERY_STRING'};
  $DOCUMENT_ROOT = $ENV{'DOCUMENT_ROOT'};
  
--- 4,11 ----
  #
  # By Pål Baltzersen 1998
  #
! # Email and enviroment variables by Aaron Seelye <aseelye@urx.com> 2002
! #
  $QUERY_STRING = $ENV{'QUERY_STRING'};
  $DOCUMENT_ROOT = $ENV{'DOCUMENT_ROOT'};
  
***************
*** 18,35 ****
  @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";
--- 19,48 ----
  @day = ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
  @month = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
  
! # All values are put into newvals array and then split into their respective
! # arrays
! @newvals = split(/\+/,$QUERY_STRING);
! @caarray = split(/=/,$newvals[0]);
! @cnarray = split(/=/,$newvals[1]);
! @ciarray = split(/=/,$newvals[2]);
! @scarray = split(/=/,$newvals[3]);
! @tcarray = split(/=/,$newvals[4]);
! @urlarray = split(/=/,$newvals[5]);
! $clientaddr = $caarray[1];
! $clientname = $cnarray[1];
! $clientident = $ciarray[1];
! $srcclass = $scarray[1];
! $targetclass = $tcarray[1];
! $url = $urlarray[1];
! 
! #
! # Send an email telling what happened...
! #
! #open MAIL, "|mail proxymaster\@foo.bar.com";
! #print MAIL "Bad news: $clientaddr tried to go to $url.\n";
! #close MAIL;
! #
! #
  
  if ($url =~ /\.(gif|jpg|jpeg|mpg|mpeg|avi|mov)$/i) {
    print "Content-Type: image/gif\n";
