]> git.ipfire.org Git - thirdparty/sarg.git/blob - include/conf.h
Fixed e-mail report (may also fix bug #2153024).
[thirdparty/sarg.git] / include / conf.h
1
2 #include "info.h"
3
4 #if HAVE_STDIO_H
5 #include <stdio.h>
6 #endif
7 #if HAVE_STDLIB_H
8 #include <stdlib.h>
9 #endif
10 #if HAVE_STRING_H
11 #include <string.h>
12 #endif
13 #if HAVE_STRINGS_H
14 #include <strings.h>
15 #endif
16 #if HAVE_SYS_TIME_H
17 #include <sys/time.h>
18 #endif
19 #if HAVE_TIME_H
20 #include <time.h>
21 #endif
22 #if HAVE_SYS_RESOURCE_H
23 #include <sys/resource.h>
24 #endif
25 #if HAVE_UNISTD_H
26 #include <unistd.h>
27 #endif
28 #if HAVE_SYS_DIRENT_H && !HAVE_DIRENT_H
29 #include <sys/dirent.h>
30 #endif
31 #if HAVE_DIRENT_H
32 #include <dirent.h>
33 #endif
34 #if HAVE_SYS_SOCKET_H
35 #include <sys/socket.h>
36 #endif
37 #if HAVE_NETDB_H
38 #include <netdb.h>
39 #endif
40 #if HAVE_TYPES_H
41 #include <types.h>
42 #endif
43 #if HAVE_NETINET_IN_H
44 #include <netinet/in.h>
45 #endif
46 #if HAVE_ARPA_INET_H
47 #include <arpa/inet.h>
48 #endif
49 #if HAVE_SYS_STAT_H
50 #include <sys/stat.h>
51 #endif
52 #if HAVE_CTYPE_H
53 #include <ctype.h>
54 #endif
55 #if HAVE_ERRNO_H
56 #include <errno.h>
57 #endif
58 #if HAVE_SYS_WAIT_H
59 #include <sys/wait.h>
60 #endif
61 #if HAVE_GD_H
62 #include <gd.h>
63 #define HAVE_GD
64 gdImagePtr im;
65 gdPoint points[4];
66 #endif
67 #if HAVE_GDFONTL_H
68 #include <gdfontl.h>
69 #endif
70 #if HAVE_GDFONTT_H
71 #include <gdfontt.h>
72 #endif
73 #if HAVE_GDFONTS_H
74 #include <gdfonts.h>
75 #endif
76 #if HAVE_GDFONTMB_H
77 #include <gdfontmb.h>
78 #endif
79 #if HAVE_GDFONTG_H
80 #include <gdfontg.h>
81 #endif
82 #if HAVE_STDARG_H
83 #include <stdarg.h>
84 #endif
85 #if HAVE_INTTYPES_H
86 #include <inttypes.h>
87 #endif
88 #if HAVE_LIMITS_H
89 #include <limits.h>
90 #endif
91
92 #if HAVE_FOPEN64
93 #define _FILE_OFFSET_BITS 64
94 #define MY_FOPEN fopen64
95 #else
96 #define MY_FOPEN fopen
97 #endif
98
99
100 #define MAXLEN 20000
101 long long int my_atoll (const char *nptr);
102
103 FILE *fp_tt;
104
105 char outdir[MAXLEN];
106 char dirname[MAXLEN];
107 char buf[MAXLEN];
108 char url[MAXLEN];
109 char urly[MAXLEN];
110 char user[MAXLEN];
111 char period[MAXLEN];
112 char msg[1024];
113 char per_hour[128];
114 char code[MAXLEN];
115 char code2[MAXLEN];
116 char tmp[MAXLEN];
117 char tmp2[MAXLEN];
118 char tmp3[MAXLEN];
119 char tmp4[MAXLEN];
120 char tmp5[MAXLEN];
121 char tmp6[MAXLEN];
122 char tmp7[MAXLEN];
123 char parse_out[MAXLEN];
124 char arqtt[MAXLEN];
125 char html[MAXLEN];
126 char datestimes[MAXLEN];
127 char ConfigFile[MAXLEN];
128 char href[MAXLEN];
129 char href2[MAXLEN];
130 char href3[MAXLEN];
131 char df[20];
132 char day[3], month[4], year[5];
133 char nmonth[30];
134 char ltext110[50];
135 char cdfrom[30];
136 char cduntil[30];
137 char LastLog[5];
138 char RemoveTempFiles[4];
139 char ReplaceIndex[256];
140 char Index[20];
141 char OverwriteReport[4];
142 char u2[255];
143 char RecordsWithoutUser[20];
144 char UseComma[4];
145 char MailUtility[PATH_MAX];
146 char TopSitesNum[20];
147 int TopUsersNum;
148 char ExcludeCodes[256];
149 char TopsitesSortField[15];
150 char TopsitesSortType[20];
151 char ReportType[255];
152 char UserTabFile[255];
153 char warea[MAXLEN];
154 char name[MAXLEN];
155 char LongUrl[20];
156 char Ip2Name[20];
157 char language[255];
158 char bufy[MAXLEN];
159 char AccessLog[MAXLEN];
160 char Title[MAXLEN];
161 char BgColor[MAXLEN];
162 char BgImage[MAXLEN];
163 char TxColor[MAXLEN];
164 char TxBgColor[MAXLEN];
165 char TiColor[MAXLEN];
166 char LogoImage[MAXLEN];
167 char LogoText[MAXLEN];
168 char LogoTextColor[MAXLEN];
169 char Width[MAXLEN];
170 char Height[MAXLEN];
171 char FontFace[MAXLEN];
172 char HeaderColor[MAXLEN];
173 char HeaderBgColor[MAXLEN];
174 char FontSize[MAXLEN];
175 char PasswdFile[MAXLEN];
176 char TempDir[MAXLEN];
177 char OutputDir[MAXLEN];
178 char OutputEmail[MAXLEN];
179 char TopuserSortField[30];
180 char UserSortField[30];
181 char TopuserSortOrder[10];
182 char UserSortOrder[10];
183 char UserAgentLog[255];
184 char module[255];
185 char ExcludeHosts[255];
186 char ExcludeUsers[255];
187 char DateFormat[2];
188 char PerUserLimitFile[255];
189 char PerUserLimit[20];
190 char UserIp[5];
191 char MaxElapsed[255];
192 char datetimeby[10];
193 char csort[255];
194 char CharSet[255];
195 char UserInvalidChar[255];
196 char Graphs[5];
197 char GraphDaysBytesBarColor[255];
198 char Privacy[10];
199 char PrivacyString[255];
200 char PrivacyStringColor[30];
201 char IncludeUsers[MAXLEN];
202 char ExcludeString[MAXLEN];
203 char SuccessfulMsg[5];
204 char TopUserFields[255];
205 char UserReportFields[255];
206 char DataFile[MAXLEN];
207 char DataFileDelimiter[3];
208 char DataFileFields[MAXLEN];
209 char DataFileUrl[20];
210 char SiteUserTimeDateType[10];
211 char ShowReadStatistics[5];
212 char IndexSortOrder[5];
213 char DansGuardianConf[MAXLEN];
214 char DansguardianIgnoreDate[10];
215 char SquidGuardConf[MAXLEN];
216 char SquidGuarddbHome[255];
217 char SquidGuardLogFormat[MAXLEN];
218 char SquidGuardLogAlternate[MAXLEN];
219 char SquidguardIgnoreDate[10];
220 char ShowSargInfo[5];
221 char BytesInSitesUsersReport[10];
222 char ShowSargLogo[5];
223 char ParsedOutputLog[MAXLEN];
224 char ParsedOutputLogCompress[255];
225 char DisplayedValues[20];
226 char HeaderFontSize[5];
227 char TitleFontSize[5];
228 char wwwDocumentRoot[MAXLEN];
229 char ExternalCSSFile[MAXLEN];
230 char BlockIt[255];
231 char BlockImage[512];
232 char NtlmUserFormat[30];
233 char hbc1[30];
234 char hbc2[255];
235 char hbc3[30];
236 char hbc4[30];
237 char hbc5[30];
238 char hbc6[30];
239 char hbc7[30];
240 char hbc8[30];
241 char hbc9[30];
242 char hbc10[30];
243 char IndexTree[10];
244 char UserAuthentication[10];
245 char AuthUserFile[255];
246 char AuthName[512];
247 char AuthType[255];
248 char Require[512];
249 char DownloadSuffix[MAXLEN];
250 char *userfile;
251 char *str;
252 char *str2;
253 char text[200][255];
254 char val1[MAXLEN];
255 char val2[MAXLEN];
256 char val3[MAXLEN];
257 char val4[MAXLEN];
258 char val5[MAXLEN];
259 char val6[MAXLEN];
260 char val7[MAXLEN];
261 char val8[MAXLEN];
262 char val9[MAXLEN];
263 char val10[MAXLEN];
264 char val11[MAXLEN];
265 char wwork1[MAXLEN];
266 char wwork2[MAXLEN];
267 char wwork3[MAXLEN];
268 char ftime[128];
269 char mask[MAXLEN];
270 char httplink[MAXLEN];
271 char html_old[MAXLEN];
272 char site[MAXLEN];
273 char us[50];
274 char email[MAXLEN];
275 char test[1];
276 char ouser2[255];
277 char user2[MAXLEN];
278 char wentp[512];
279 char addr[MAXLEN];
280 char Ulimit[6];
281 char RealtimeTypes[1024];
282 char cmd[255];
283 char ImageFile[255];
284 char tbuf[128];
285 char ip[25];
286 char RealtimeUnauthRec[15];
287
288 int idate;
289 int smartfilter;
290 int denied_count;
291 int download_count;
292 int authfail_count;
293 int dansguardian_count;
294 int squidguard_count;
295 int limit_flag;
296 int color1;
297 int color2;
298 int color3;
299 int z1, z2, z3;
300 int ttopen;
301 int ind2;
302 int sarglog;
303 int isalog;
304 int dfrom;
305 int duntil;
306 int dataonly;
307 int indexonly;
308 int iprel;
309 int userip;
310 int langcode;
311 int debug;
312 int debugz;
313 int debugm;
314 int AuthfailReportLimit;
315 int DeniedReportLimit;
316 int DownloadReportLimit;
317 int SiteUsersReportLimit;
318 int DansGuardianReportLimit;
319 int SquidGuardReportLimit;
320 int UserReportLimit;
321 int dotinuser;
322 int realtime_refresh;
323 int realtime_access_log_lines;
324 int realt;
325 int rc;
326 int ntopsites;
327 int nsitesusers;
328 int nrepday;
329 int ndownload;
330 int ntopuser;
331 int squid24;
332 float perc;
333
334 long long int nocost;
335 float cost;
336
337 typedef struct
338 { int list[ 24 ];
339 int len;
340 } numlist;
341
342 DIR *dirp;
343 struct dirent *direntp;