]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Last line of siteuser page is not the same as the previous ones
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Sat, 20 Nov 2010 22:06:41 +0000 (22:06 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Sat, 20 Nov 2010 22:06:41 +0000 (22:06 +0000)
The last line of the siteuser.html report page doesn't contain a link
to block the site and doesn't show the bytes column.

This patch makes it identical to the other lines in the report.

siteuser.c

index f7d0dbf96f376bfdd66ec5ee687fae562daeb0dc..36e53f1417c7c34862c5b2bc288c5ac48a1dd6de 100644 (file)
@@ -186,11 +186,21 @@ void siteuser(void)
    longline_destroy(&line);
 
    if(nsitesusers) {
-      fprintf(fp_ou,"<tr><td class=\"data\">%d</td><td class=\"data2\"><a href=\"http://",regs);
+      fprintf(fp_ou,"<tr><td class=\"data\">%d</td><td class=\"data2\">",regs);
+      if(BlockIt[0]!='\0') {
+         fprintf(fp_ou,"<a href=\"%s%s?url=",wwwDocumentRoot,BlockIt);
+         output_html_url(fp_ou,ourl);
+         fputs("\"><img src=\"../images/sarg-squidguard-block.png\"></a>&nbsp;",fp_ou);
+      }
+      fputs("<a href=\"http://",fp_ou);
       output_html_url(fp_ou,ourl);
       fputs("\">",fp_ou);
       output_html_string(fp_ou,ourl,100);
-      fprintf(fp_ou,"</a></td><td class=\"data2\">%s</td></tr>\n",users);
+      fputs("</a></td>",fp_ou);
+      if (BytesInSitesUsersReport) {
+         fprintf(fp_ou,"<td class=\"data\">%s</td>",fixnum(obytes,1));
+      }
+      fprintf(fp_ou,"<td class=\"data2\">%s</td></tr>\n",users);
    }
    if (ourl) free(ourl);