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