]> git.ipfire.org Git - thirdparty/sarg.git/blob - include/conf.h
Imported Sarg 2.1.0
[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_GD_H
59 #include <gd.h>
60 #define HAVE_GD
61 gdImagePtr im;
62 gdPoint points[4];
63 #endif
64 #if HAVE_GDFONTL_H
65 #include <gdfontl.h>
66 #endif
67 #if HAVE_GDFONTT_H
68 #include <gdfontt.h>
69 #endif
70 #if HAVE_GDFONTS_H
71 #include <gdfonts.h>
72 #endif
73 #if HAVE_GDFONTMB_H
74 #include <gdfontmb.h>
75 #endif
76 #if HAVE_GDFONTG_H
77 #include <gdfontg.h>
78 #endif
79
80 #if HAVE_FOPEN64
81 #define _FILE_OFFSET_BITS 64
82 #define MY_FOPEN fopen
83 #else
84 #define MY_FOPEN fopen
85 #endif
86
87
88 #define MAXLEN 20000
89 long long int my_atoll (const char *nptr);
90
91 FILE *fp_tt;
92
93 char outdir[MAXLEN];
94 char dirname[MAXLEN];
95 char buf[MAXLEN];
96 char url[MAXLEN];
97 char urly[MAXLEN];
98 char user[MAXLEN];
99 char periodo[MAXLEN];
100 char msg[1024];
101 char per_hour[128];
102 char tmp[MAXLEN];
103 char tmp2[MAXLEN];
104 char tmp3[MAXLEN];
105 char tmp4[MAXLEN];
106 char tmp5[MAXLEN];
107 char tmp6[MAXLEN];
108 char parse_out[MAXLEN];
109 char arqtt[MAXLEN];
110 char html[MAXLEN];
111 char datestimes[MAXLEN];
112 char ConfigFile[MAXLEN];
113 char href[MAXLEN];
114 char href2[MAXLEN];
115 char href3[MAXLEN];
116 char df[20];
117 char day[3], month[4], year[5];
118 char nmonth[30];
119 char y1[5], y2[5];
120 char d1[3], d2[3];
121 char m1[4], m2[4];
122 char ltext110[50];
123 char cdfrom[30];
124 char cduntil[30];
125 char LastLog[5];
126 char RemoveTempFiles[4];
127 char ReplaceIndex[256];
128 char Index[20];
129 char OverwriteReport[4];
130 char RecordsWithoutUser[20];
131 char UseComma[4];
132 char MailUtility[6];
133 char TopSitesNum[20];
134 char TopUsersNum[20];
135 char ExcludeCodes[256];
136 char TopsitesSortField[15];
137 char TopsitesSortType[20];
138 char ReportType[255];
139 char UserTabFile[255];
140 char warea[MAXLEN];
141 char name[MAXLEN];
142 char LongUrl[20];
143 char Ip2Name[20];
144 char language[255];
145 char AccessLog[MAXLEN];
146 char Title[MAXLEN];
147 char BgColor[MAXLEN];
148 char BgImage[MAXLEN];
149 char TxColor[MAXLEN];
150 char TxBgColor[MAXLEN];
151 char TiColor[MAXLEN];
152 char LogoImage[MAXLEN];
153 char LogoText[MAXLEN];
154 char LogoTextColor[MAXLEN];
155 char Width[MAXLEN];
156 char Height[MAXLEN];
157 char FontFace[MAXLEN];
158 char HeaderColor[MAXLEN];
159 char HeaderBgColor[MAXLEN];
160 char FontSize[MAXLEN];
161 char PasswdFile[MAXLEN];
162 char TempDir[MAXLEN];
163 char OutputDir[MAXLEN];
164 char OutputEmail[MAXLEN];
165 char TopuserSortField[30];
166 char UserSortField[30];
167 char TopuserSortOrder[10];
168 char UserSortOrder[10];
169 char UserAgentLog[255];
170 char module[255];
171 char ExcludeHosts[255];
172 char ExcludeUsers[255];
173 char DateFormat[2];
174 char PerUserLimitFile[255];
175 char PerUserLimit[20];
176 char UserIp[5];
177 char MaxElapsed[255];
178 char datetimeby[10];
179 char csort[255];
180 char CharSet[255];
181 char UserInvalidChar[255];
182 char Graphs[5];
183 char GraphDaysBytesBarColor[255];
184 char Privacy[10];
185 char PrivacyString[255];
186 char PrivacyStringColor[30];
187 char IncludeUsers[MAXLEN];
188 char ExcludeString[MAXLEN];
189 char SuccessfulMsg[5];
190 char TopUserFields[255];
191 char UserReportFields[255];
192 char DataFile[MAXLEN];
193 char DataFileDelimiter[3];
194 char DataFileFields[MAXLEN];
195 char DataFileUrl[20];
196 char SiteUserTimeDateType[10];
197 char ShowReadStatistics[5];
198 char IndexSortOrder[5];
199 char DansGuardianConf[MAXLEN];
200 char DansguardianIgnoreDate[10];
201 char SquidGuardConf[MAXLEN];
202 char SquidGuarddbHome[255];
203 char SquidGuardLogFormat[MAXLEN];
204 char SquidGuardLogAlternate[MAXLEN];
205 char SquidguardIgnoreDate[10];
206 char ShowSargInfo[5];
207 char ShowSargLogo[5];
208 char ParsedOutputLog[MAXLEN];
209 char ParsedOutputLogCompress[255];
210 char DisplayedValues[20];
211 char HeaderFontSize[4];
212 char TitleFontSize[5];
213 char wwwDocumentRoot[MAXLEN];
214 char ExternalCSSFile[MAXLEN];
215 char BlockIt[255];
216 char BlockImage[512];
217 char NtlmUserFormat[30];
218 char hbc1[30];
219 char hbc2[255];
220 char hbc3[30];
221 char hbc4[30];
222 char hbc5[30];
223 char hbc6[30];
224 char hbc7[30];
225 char hbc8[30];
226 char hbc9[30];
227 char hbc10[30];
228 char IndexTree[10];
229 char UserAuthentication[10];
230 char AuthUserFile[255];
231 char AuthName[512];
232 char AuthType[255];
233 char Require[512];
234 char DownloadSuffix[MAXLEN];
235 char *excludecode;
236 char *userfile;
237 char *str;
238 char *str2;
239 char text[200][255];
240 char val1[MAXLEN];
241 char val2[MAXLEN];
242 char val3[MAXLEN];
243 char val4[MAXLEN];
244 char val5[MAXLEN];
245 char val6[MAXLEN];
246 char val7[MAXLEN];
247 char val8[MAXLEN];
248 char val9[MAXLEN];
249 char val10[MAXLEN];
250 char val11[MAXLEN];
251 char wwork1[MAXLEN];
252 char wwork2[MAXLEN];
253 char wwork3[MAXLEN];
254 char ftime[128];
255 char mask[MAXLEN];
256 char httplink[MAXLEN];
257 char html_old[MAXLEN];
258 char siteind[MAXLEN];
259 char site[MAXLEN];
260 char us[50];
261 char email[MAXLEN];
262 char test[1];
263 char ouser2[255];
264 char user2[MAXLEN];
265 char wentp[512];
266 char addr[MAXLEN];
267 char suffix[10];
268 char download_url[MAXLEN];
269 char Ulimit[6];
270 char RealtimeTypes[1024];
271 char cmd[255];
272 char ImageFile[255];
273 char tbuf[128];
274 char ip[25];
275 char RealtimeUnauthRec[15];
276
277 int excode;
278 int idate;
279 int smartfilter;
280 int denied_count;
281 int download_count;
282 int authfail_count;
283 int dansguardian_count;
284 int squidguard_count;
285 int limit_flag;
286 int color1;
287 int color2;
288 int color3;
289 int z1, z2, z3;
290 int ttopen;
291 int ind2;
292 int sarglog;
293 int isalog;
294 int dfrom;
295 int duntil;
296 int dataonly;
297 int indexonly;
298 int iprel;
299 int userip;
300 int langcode;
301 int debug;
302 int debugz;
303 int debugm;
304 int AuthfailReportLimit;
305 int DeniedReportLimit;
306 int DownloadReportLimit;
307 int SiteUsersReportLimit;
308 int DansGuardianReportLimit;
309 int SquidGuardReportLimit;
310 int UserReportLimit;
311 int download_flag;
312 int dotinuser;
313 int realtime_refresh;
314 int realtime_access_log_lines;
315 int realt;
316 int x, y;
317 int rc;
318 long l1, l2;
319 float perc;
320
321 long long int twork;
322 long long int twork2;
323 long long int nocost;
324 float cost;
325
326 typedef struct
327 { int list[ 24 ];
328 int len;
329 } numlist;
330
331 DIR *dirp;
332 struct dirent *direntp;
333
334 int getnumlist( char *, numlist *, const int, const int );