}
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);
fprintf(fp_ou,"<tr><td class=\"header\" colspan=\"2\">%s: %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]);
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)
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);
nnelap=my_atoll(nelap);
incache=my_atoll(incac);
oucache=my_atoll(oucac);
-
+
if(nnbytes) {
perc=nnbytes * 100;
perc=perc / tnbytes;
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));
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);
sprintf(httplink,"<a href=\"%s%s?url=%s\"><img src=\"%s/sarg-squidguard-block.png\" border=\"0\"></a><a href=http://%s> %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]);