SET(sarg_VERSION 2)
SET(sarg_REVISION "3.2-pre1")
SET(sarg_BUILD "")
-SET(sarg_BUILDDATE "Nov-29-2010")
+SET(sarg_BUILDDATE "Dec-21-2010")
INCLUDE(AddFileDependencies)
INCLUDE(CheckIncludeFile)
SARG ChangeLog
-Nov-29-2010 Version 2.3.2-pre1
+Dec-21-2010 Version 2.3.2-pre1
- Add support for sorttable.js (http://www.kryogenix.org/code/browser/sorttable/) to dynamically sort some tables (thanks to Éric).
- Add the two command line options --lastlog and --keeplogs to set the number of reports to keep or to keep all the reports respectively (thanks to Emmanuel Lacour for the suggestion).
- Report the user ID in the e-mail report.
- Add an option to sort the top sites by time.
- Delete unused files from the directory containing the user report (thanks to alf-man).
+ - Add the index_fields option to hide the directory size column in the index sorted by date.
Sep-18-2010 Version 2.3.1
- Remove the distinct printf for the alpha architecture as it doesn't work anymore and is not necessary anyway.
{"file",INDEX_TREE_FILE,~INDEX_TREE_FILE},
};
+static struct param_list indexfields_values[]=
+{
+ {"DIRSIZE",INDEXFIELDS_DIRSIZE,0},
+};
+
static struct param_list ntml_userformat_values[]=
{
{"user",NTLMUSERFORMAT_USER,~NTLMUSERFORMAT_USER},
if (getparam_list("index",SET_LIST(index_values),buf,&Index)>0) return;
+ if (getparam_list("index_fields",SET_LIST(indexfields_values),buf,&IndexFields)>0) return;
+
if (getparam_bool("overwrite_report",buf,&OverwriteReport)>0) return;
if (getparam_list("records_without_userid",SET_LIST(recnouser_values),buf,&RecordsWithoutUser)>0) return;
#define INDEX_TREE_DATE 0x0001UL
#define INDEX_TREE_FILE 0x0002UL
+#define INDEXFIELDS_DIRSIZE 0x0001UL
+
#define NTLMUSERFORMAT_USER 0x0001UL
#define NTLMUSERFORMAT_DOMAINUSER 0x0002UL
char ExternalCSSFile[MAXLEN];
char BlockIt[255];
unsigned long int NtlmUserFormat;
+//! How to display the index of the reports.
unsigned long int IndexTree;
+//! The columns to show in the index of the reports.
+unsigned long int IndexFields;
bool UserAuthentication;
char AuthUserTemplateFile[1024];
char val1[MAXLEN];
-#define VERSION PACKAGE_VERSION" Nov-29-2010"
+#define VERSION PACKAGE_VERSION" Dec-21-2010"
#define PGM PACKAGE_NAME
#define URL "http://sarg.sourceforge.net"
}
write_html_header(fp_ou,0,ngettext("SARG report","SARG reports",nyears),HTML_JS_NONE);
close_html_header(fp_ou);
- fputs("<div class=\"index\"><table cellpadding=\"1\" cellspacing=\"2\">\n<tr><td></td><td></td></tr>\n",fp_ou);
- fprintf(fp_ou,"<tr><th class=\"header_l\">%s</th><th class=\"header_l\">%s</th></tr>\n",_("YEAR"),_("SIZE"));
+ fputs("<div class=\"index\"><table cellpadding=\"1\" cellspacing=\"2\">\n",fp_ou);
+ fprintf(fp_ou,"<tr><th class=\"header_l\">%s</th>",_("YEAR"));
+ if (IndexFields & INDEXFIELDS_DIRSIZE)
+ fprintf(fp_ou,"<th class=\"header_l\">%s</th>",_("SIZE"));
+ fputs("</tr>\n",fp_ou);
for (y=0 ; y<nyears ; y++) {
if (order>0)
year=yearsort[y];
else
year=yearsort[nyears-1-y];
sprintf(yearnum,"%04d",year);
- fprintf(fp_ou,"<tr><td class=\"data2\"><a href=\"%s/index.html\">%s</a></td><td class=\"data2\">%s</td></tr>\n",yearnum,yearnum,get_size(outdir,yearnum));
+ fprintf(fp_ou,"<tr><td class=\"data2\"><a href=\"%s/index.html\">%s</a></td>",yearnum,yearnum);
+ if (IndexFields & INDEXFIELDS_DIRSIZE)
+ fprintf(fp_ou,"<td class=\"data2\">%s</td>",get_size(outdir,yearnum));
+ fputs("</tr>\n",fp_ou);
sprintf(yeardir,"%s%s",outdir,yearnum);
// Year dir
nmonths=0;
strcpy(Ulimit,"20000");
NtlmUserFormat=NTLMUSERFORMAT_DOMAINUSER;
IndexTree=INDEX_TREE_FILE;
+ IndexFields=INDEXFIELDS_DIRSIZE;
strcpy(RealtimeTypes,"GET,PUT,CONNECT");
RealtimeUnauthRec=REALTIME_UNAUTH_REC_SHOW;
RedirectorFilterOutDate=true;
#
#index_tree file
+# TAG: index_fields
+# The columns to show in the index of the reports
+# Columns are: dirsize
+#
+#index_fields dirsize
+
# TAG: overwrite_report yes|no
# yes - if report date already exist then will be overwrited.
# no - if report date already exist then will be renamed to filename.n, filename.n+1