]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Fixed bug #2716729.
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Mon, 20 Jul 2009 08:09:45 +0000 (08:09 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Mon, 20 Jul 2009 08:09:45 +0000 (08:09 +0000)
html.c

diff --git a/html.c b/html.c
index 2a1fd74278472f11aeaf704c4348efa3f4af8fa7..80a96996b4259c1c307847cb4c491842425d27ea 100644 (file)
--- a/html.c
+++ b/html.c
@@ -200,17 +200,17 @@ void htmlrel(void)
       }
 
       fclose(fp_in);
-   
+
       if ((fp_in = fopen(arqin, "r")) == 0){
          fprintf(stderr, "SARG: (html4) %s: %s\n",text[45],arqin);
          exit(1);
       }
-   
+
       if ((fp_ou = fopen(arqou, "w")) == 0){
          fprintf(stderr, "SARG: (html5) %s: %s\n",text[45],arqou);
          exit(1);
       }
-   
+
       fputs("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"",fp_ou);
       fputs(" \"http://www.w3.org/TR/html4/loose.dtd\">\n",fp_ou);
       fputs("<html>\n",fp_ou);
@@ -242,14 +242,14 @@ void htmlrel(void)
       fprintf(fp_ou,"<tr><td class=\"header\" colspan=\"2\">%s:&nbsp;%s, %s</td></tr>\n",text[104],UserSortField,UserSortOrder);
       fprintf(fp_ou,"<tr><td class=\"header3\" colspan=2>%s %s</td></tr>\n",text[32],text[55]);
       fputs("<tr><td></td></tr>\n",fp_ou);
+
       fputs("</table></center>\n",fp_ou);
       fputs("<center><table cellpadding=\"2\" cellspacing=\"1\">\n",fp_ou);
-   
+
       if(strlen(denied_report) > 0) {
          fprintf(fp_ou,"<tr><td class=\"header\" colspan=11><a href=\"denied_%s.html\">%s</a> %s</td></tr>\n",denied_report,text[116],text[55]);
       }
-   
+
       strcpy(val3,text[92]);
       strcpy(val4,text[93]);
       sprintf(val11,"%%%s",text[93]);
@@ -259,7 +259,7 @@ void htmlrel(void)
       sprintf(val8,"%%%s",text[99]);
       strcpy(val9,"colspan=2");
       bzero(val10, 255);
-      
+
       if(strstr(UserReportFields,"CONNECT") == 0)
          bzero(val3, 255);
       if(strstr(UserReportFields,"BYTES") == 0)
@@ -277,9 +277,9 @@ void htmlrel(void)
          bzero(val7, 255);
       if(strstr(UserReportFields,"%TIME") == 0)
          bzero(val8, 255);
-   
+
       fprintf(fp_ou,"<tr><th></th><th class=\"header\">%s</th><th class=\"header\">%s</th><th class=\"header\">%s</th><th class=\"header\">%s</th><th class=\"header3\" %s>%s</th><th class=\"header\">%s</th><th class=\"header\">%s</th><th class=\"header\">%s</th></tr>\n",text[91],val3,val4,val11,val9,val5,val6,val7,val8);
-  
+
       if(debug) {
          if(userip) {
             strcpy(u2,usuario);
@@ -306,7 +306,7 @@ void htmlrel(void)
          nnelap=my_atoll(nelap);
          incache=my_atoll(incac);
          oucache=my_atoll(oucac);
-   
+
          if(nnbytes) {
             perc=nnbytes * 100;
             perc=perc / tnbytes;
@@ -324,12 +324,12 @@ void htmlrel(void)
             inperc=incache * 100;
             inperc=inperc / nnbytes;
          } else inperc=0;
-   
+
          if(oucache) {
             ouperc=oucache * 100;
             ouperc=ouperc / nnbytes;
          } else ouperc=0;
-   
+
          twork=my_atoll(nacc);
          strcpy(wwork1,fixnum(twork,1));
          strcpy(wwork2,fixnum(nnbytes,1));
@@ -355,7 +355,7 @@ void htmlrel(void)
          if(strcmp(Privacy,"yes") == 0)
             sprintf(httplink,"<font color=%s><href=http://%s>%s",       \
                     PrivacyStringColor,PrivacyString,PrivacyString);
-          else
+         else {
              strcpy(tmp6,"../../images");
              if(strcmp(IndexTree,"date") == 0)
                 sprintf(tmp6,"../%s",ImageFile);
@@ -363,6 +363,7 @@ void htmlrel(void)
                 sprintf(httplink,"<a href=\"%s%s?url=%s\"><img src=\"%s/sarg-squidguard-block.png\" border=\"0\"></a><a href=http://%s>&nbsp;%s</a>",wwwDocumentRoot,BlockIt,urly,tmp6,urly,urly);
              else
                 sprintf(httplink,"<a href=http://%s title=\"%s\">%s</a>",urly,urly,url);
+         }
 
          if(strstr(ReportType,"site_user_time_date") != 0) {
             strcpy(ltext110,text[110]);