]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - authfail.c
Imported sarg 2.0.9
[thirdparty/sarg.git] / authfail.c
index b73d26278640582a5b95ae0da4c4a13090538cb7..84fc03d074ad18cabb733e0af8742e537b850f52 100644 (file)
@@ -1,7 +1,10 @@
 /*
- * AUTHOR: Pedro Lineu Orso                             orso@brturbo.com
- *                                                            1998, 2004
- * SARG Squid Analysis Report Generator            http://sarg-squid.org
+ * AUTHOR: Pedro Lineu Orso                      orso@penguintech.com.br
+ *                                                            1998, 2005
+ * SARG Squid Analysis Report Generator      http://sarg.sourceforge.net
+ *
+ * SARG donations:
+ *      please look at http://sarg.sourceforge.net/donations.php
  * ---------------------------------------------------------------------
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -61,7 +64,7 @@ void authfail_report()
    sprintf(per,"%s/periodo",dirname);
    sprintf(report,"%s/authfail.html",dirname);
 
-   sprintf(csort,"sort -b -T %s -k 3,3 -k 5,5 -o %s %s", TempDir, authfail_in, tmp4);
+   sprintf(csort,"sort -b -T %s -k 3,3 -k 5,5 -o '%s' '%s'", TempDir, authfail_in, tmp4);
    system(csort);
    unlink(tmp4);
 
@@ -101,9 +104,10 @@ void authfail_report()
    fputs(url,fp_ou);
 
    if(strlen(LogoImage) > 0) {
-      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
-      sprintf(url,"<tr><th align=\"center\"><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font>\n",LogoImage,Width,Height,LogoTextColor,LogoText);
+      fputs("<center><table cellpadding=\"0\" cellspacing=\"0\">\n",fp_ou);
+      sprintf(url,"<tr><th class=\"logo\"><img src='%s' border=0 align=absmiddle width=%s height=%s>&nbsp;%s</th></tr>\n",LogoImage,Width,Height,LogoText);
       fputs(url,fp_ou);
+      fputs("<tr><td height=\"5\"></td></tr>\n",fp_ou);
       fputs("</table>\n",fp_ou);
    }
 
@@ -169,6 +173,11 @@ void authfail_report()
          } else strcpy(name,user);
       } else strcpy(name,user);
 
+      if(dotinuser && strstr(name,"_")) {
+         str2=(char *)subs(name,"_",".");
+         strcpy(name,str2);
+      }
+
      if(AuthfailReportLimit) {
         if(strcmp(ouser2,name) == 0) {
             count++;