double perc=0, perc2=0, ouperc=0, inperc=0;
int count;
int cstatus;
- int have_denied_report;
+ bool have_denied_report;
const char *sort_field;
const char *sort_order;
char siteind[MAX_TRUNCATED_URL];
debuga(_("Output file name too long: %s/%s/%s.html\n"),outdirname,uinfo->filename,uinfo->filename);
exit(EXIT_FAILURE);
}
- if (snprintf(duser,sizeof(duser),"%s/%s/denied_%s.html",tmp,uinfo->filename,uinfo->filename)>=sizeof(duser)) {
- debuga(_("File name too long: %s/%s/denied_%s.html\n"),tmp,uinfo->filename,uinfo->filename);
+ if (snprintf(duser,sizeof(duser),"%s/denied_%s.html",outdirname,uinfo->filename)>=sizeof(duser)) {
+ debuga(_("File name too long: %s/denied_%s.html\n"),outdirname,uinfo->filename);
exit(EXIT_FAILURE);
}
if(access(duser, R_OK) != 0)
- have_denied_report=0;
+ have_denied_report=false;
else
- have_denied_report=1;
+ have_denied_report=true;
if ((line=longline_create())==NULL) {
debuga(_("Not enough memory to read file %s\n"),arqin);
fprintf(fp_ou,"<tr><th class=\"header_c\">%s</th></tr>\n",_("User report"));
close_html_header(fp_ou);
+ if (have_denied_report) {
+ fputs("<div class=\"report\"><table cellpadding=\"1\" cellspacing=\"2\">\n",fp_ou);
+ fprintf(fp_ou,"<tr><td class=\"header_l\" colspan=\"11\"><a href=\"denied_%s.html\">%s</a></td></tr>\n",uinfo->filename,_("SmartFilter report"));
+ fputs("<tr><td></td></tr>\n</table></div>\n",fp_ou);
+ }
+
fputs("<div class=\"report\"><table cellpadding=\"2\" cellspacing=\"1\"",fp_ou);
if (SortTableJs[0]) fputs(" class=\"sortable\"",fp_ou);
fputs(">\n",fp_ou);
- /*! \bug This line lays before the header of the table and is therefore invalid
- HTML. It will also break the sorttable script. Beside, I suspect it serves no purpose.
- */
- if(have_denied_report) {
- fprintf(fp_ou,"<tr><td class=\"header_l\" colspan=\"11\"><a href=\"denied_%s.html\">%s</a> %s</td></tr>\n",uinfo->filename,_("SmartFilter"),_("Report"));
- }
-
fputs("<thead><tr><th class=\"sorttable_nosort\"></th><th class=\"header_l",fp_ou);
if (SortTableJs[0]) fputs(" sorttable_alpha",fp_ou);
fprintf(fp_ou,"\">%s</th>",_("ACCESSED SITE"));