]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - topsites.c
Imported Sarg 2.1.0
[thirdparty/sarg.git] / topsites.c
index d6043f188ec121d316c7f568bde7eab3562a36df..11c6e8c01ebb0bfc14adddf08305baf5993959c6 100644 (file)
@@ -62,7 +62,11 @@ void topsites()
    sprintf(geral2,"%s/geral2",dirname);
    sprintf(geral3,"%s/geral3",dirname);
    sprintf(per,"%s/periodo",dirname);
-   sprintf(report,"%s/topsites.html",dirname);
+
+   if (strstr(ReportType,"topusers") == 0)
+      sprintf(report,"%s/index.html",dirname);
+   else
+      sprintf(report,"%s/topsites.html",dirname);
 
    if ((fp_in = fopen(per, "r")) == 0) {
       fprintf(stderr, "SARG: (topuser) %s: %s\n",text[45],per);
@@ -183,7 +187,11 @@ void topsites()
       fputs("</table>\n",fp_ou);
    }
 
-   show_sarg(fp_ou,"..");
+   if(strcmp(IndexTree,"date") == 0)
+      show_sarg(fp_ou,"../../..");
+   else
+      show_sarg(fp_ou, "..");
+
    fputs("<center><table cellpadding=\"0\" cellspacing=\"0\">\n",fp_ou);
    sprintf(url,"<tr><th class=\"title\">%s</th></tr>\n",Title);
    fputs(url,fp_ou);