forked from andrew867/timeclock
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconfig.inc.php.sample
More file actions
564 lines (355 loc) · 15.7 KB
/
config.inc.php.sample
File metadata and controls
564 lines (355 loc) · 15.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
<?php
/*
****************************************************************************
Be sure to set appropriate permissions on this file as it contains sensitive
username and password information!
****************************************************************************
*/
/* --- REQUIRED CHANGES --- */
/* mysql info --- $db_hostname is the hostname for your mysql server, default is localhost.
--- $db_username is the mysql username you created during the install.
--- $db_password is the mysql password for the username you created during
the install.
--- $db_name is the mysql database you created during the install. */
$db_hostname = "localhost";
$db_username = "timeclock";
$db_password = "clocktime";
$db_name = "timeclock";
/* --- RECOMMENDED CHANGES --- */
/* This adds a prefix to the tablenames in the database. This can be helpful if you
have an existing mysql database that you would like to use with PHP Timeclock.
If you are unaware of what is meant by "table prefix", then please leave this
option as is. Default is to leave it blank.
Since: v1.4
*/
$db_prefix = "";
/* Choose "yes" to restrict the ip addresses that can connect to PHP Timeclock. If
"yes" is chosen, you MUST input the allowed networks in the $allowed_networks
array below. Otherwise, choosing "yes" here and leaving $allowed_networks
blank will cause PHP Timeclock to reject everyone attempting to connect to it.
Default is "no".
Since: v1.4
*/
$restrict_ips = "no";
/* Insert the networks or ip addresses you wish to allow to connect to PHP Timeclock
into the $allowed_networks array below. There is not a limit on how many networks
or addresses that can be included in this array. This will currently only work for
ipv4 addresses, ipv6 may be supported in a future release. If $restrict_ips is
set to "no", this option is ignored.
* will work:
* xxx.xxx.xxx.xxx (exact)
* xxx.xxx.xxx.[yyy-zzz] (range)
* xxx.xxx.xxx.xxx/nn (CIDR)
*
* will NOT work:
* xxx.xxx.xxx.xx[yyy-zzz] (range, partial octets not supported)
* xxx.xxx.xxx.yyy - xxx.xxx.xxx.zzz (range, entire networks not supported).
* xxx.xxx. (range, less than 4 octets not supported).
example --> $allowed_networks = array("10.0.0.4","192.168.1.[11-20]","192.168.4.0/24","192.0.0.0/8");
Since: v1.4
*/
$allowed_networks = array();
/* Choose whether to use encrypted passwords along with the usernames. Options are
"yes" or "no". If "yes" is chosen, users will be required to enter a password
whenever they change their status. Default is "no".
Since: v1.4
*/
$use_passwd = "no";
/* If you only want certain users to have the ability to view and run the reports,
change $use_reports_password to "yes". Default is "no";
Since: v1.4
*/
$use_reports_password = "no";
/* Choose whether to allow barcode clock-in/out. Options are "yes" or "no".
If "yes" is chosen, the barcode entry will be visible and focused by
default on the main timeclock screen. Scanning the employee barcode will
immediately change their status.
New in: v2.0
*/
$barcode_clockin = "yes";
/* Allow generation of random barcodes which probably won't result in duplicates.
Default type "code39".
Default length "10".
Valid types: null, "code39", "ean"
Warning: Valid lengths for ean codes are: 8 or 13 and check digits must
be present and correctly calculated!
New in: v2.1
Changed in: 2.4, Added "ean"
*/
$barcode_type = "code39";
$barcode_length = "10";
/* Allow rendering of barcodes to images using gnu "barcode" and
ImageMagick "convert" (which must both be installed on server). When set
to "yes", rendered images will be stored in the named cache directory
for the specified interval.
Defaults are "no", "/tmp/timeclock-barcodes", and "1 hour" respectively.
New in: v2.1
*/
$barcode_rendering = "no";
$barcode_cache_dir = "/tmp/timeclock-barcodes";
$barcode_cache_age = "1 hour";
/* Choose whether to allow selecting employee name from dropdown to
clock-in/out. Options are "yes" or "no". If "yes" is chosen, the a
dropdown (and password entry if enabled) will be displayed on the
timeclock screen and employees will be able to change their status.
New in: v2.0
*/
$manual_clockin = "yes";
/* Enable the option to log the ip addresses of the connecting computers when users
punch-in/out, or when a time is manually added, edited, or deleted. Default is
"yes".
Since: v1.4
*/
$ip_logging = "yes";
/* An email address to display in the footer (footer.php). Set it to "none" to ignore
this option.
Since: v1.4
*/
$email = "none";
/* --- OPTIONAL CHANGES --- */
/* Choose the way dates are displayed. $datefmt default is "n/j/y", $js_datefmt default is
"M/d/yy", $tmp_datefmt default is "m/d/yy", and $calendar_style default is "amer". You
will need to choose date formats with matching numbers, ie: if format number 10 is used
for $datefmt, then format number 10 will need to be used for $js_format and $tmp_format
as well. "euro" will need to be chosen for date format numbers 1-6, and "amer" will need
to be chosen for date format numbers 7-12. Again, if you are confused, i urge you to change
these settings via the Edit System Settings page in the Administration Section. Choosing
mismatched options will lead to much confusion and plenty of headaches later.
Possibilities for these variables are:
$calendar_style --> 1) amer
2) euro
$datefmt --> 1) j.n.Y $js_datefmt --> 1) d.M.yyyy $tmp_datefmt --> 1) d.m.yyyy
2) j/n/Y 2) d/M/yyyy 2) d/m/yyyy
3) j-n-Y 3) d-M-yyyy 3) d-m-yyyy
4) j.n.y 4) d.M.yy 4) d.m.yy
5) j/n/y 5) d/M/yy 5) d/m/yy
6) j-n-y 6) d-M-yy 6) d-m-yy
7) n.j.Y 7) M.d.yyyy 7) m.d.yyyy
8) n/j/Y 8) M/d/yyyy 8) m/d/yyyy
9) n-j-Y 9) M-d-yyyy 9) m-d-yyyy
10) n.j.y 10) M.d.yy 10) m.d.yy
11) n/j/y 11) M/d/yy 11) m/d/yy
12) n-j-y 12) M-d-yy 12) m-d-yy
Since: v1.4
*/
$datefmt = "n/j/Y";
$js_datefmt = "M/d/yyyy";
$tmp_datefmt = "m/d/yyyy";
$calendar_style = "amer";
/* Choose the way times are displayed. Default is "g:i a".
g 12-hour format of an hour without leading zeros 1 through 12
G 24-hour format of an hour without leading zeros 0 through 23
h 12-hour format of an hour with leading zeros 01 through 12
H 24-hour format of an hour with leading zeros 00 through 23
i Minutes with leading zeros
a Lowercase Ante meridiem and Post meridiem am or pm
A Uppercase Ante meridiem and Post meridiem
Possibilities for this variable are:
$timefmt --> 1) G:i
2) H:i
3) g:i A
4) g:i a
5) g:iA
6) g:ia
Since: v1.4
*/
$timefmt = "g:ia";
/* Display only activity for the the current day instead of the last entry from each user.
Default is "no".
Since: v1.4
*/
$display_current_users = "no";
/* Show a Display Name instead of a Username for each user on the main page.
Default is "no".
Since: v1.4
*/
$show_display_name = "no";
/* Display punch-in/out times or just in/out status. Default is "yes".
Since: v2.3.0
*/
$display_punch_times = "yes";
/* Display current time, set to "server" to display a clock with the
current server time. Set to "client" to display a cloc with the current
client time. Set to anything else to not display the current time.
Default is "no".
Since: v2.3.0
*/
$display_current_time = "no";
/* Display punch-in/out times for only a certain office on the main page of the application.
Replace "all" with the office you wish to display below. Default is "all".
Since: v1.4
*/
$display_office = "all";
/* Display punch-in/out times for only a certain group on the main page of the application.
Replace "all" with the group you wish to display below. Default is "all".
Since: v1.4
*/
$display_group = "all";
/* Display a column on the main page that shows the office each person is affiliated with.
Default is "no".
Since: v1.4
*/
$display_office_name = "no";
/* Display a column on the main page that shows the group each person is affiliated with.
Default is "no".
Since: v1.4
*/
$display_group_name = "no";
/* A logo or graphic, this is displayed in the top left of each page.
Set it to "none" to ignore this option.
Since: v1.4
*/
$logo = "images/logos/phptimeclock.png";
/* This sets the refresh rate (in seconds) for index.php. If the application is kept open,
it will refresh every $refresh seconds to display the most current info. Default
is 300. Set it to "none" to ignore this option.
Since: v1.4
*/
$refresh = "300";
/* This creates a clickable date in the top right of each page. By Default, it links to
"This Day in History" on the historychannel.com website. Set it to "none" to ignore this option.
Since: v1.4
*/
$date_link = "http://www.historychannel.com/tdih";
/* These are alternating row colors for the main page and for reports.
Since: v1.4
*/
$color1 = "#EFEFEF";
$color2 = "#FBFBFB";
/* Insert/change/delete below the ACTUAL links to websites you wish to display in the
topleft side of each page (leftmain.php). These links can link to anything you want
them to -- websites, other web-based applications, etc. Default number of links is 6.
Set $links to "none" to ignore this option. Ex: $links = "none";
Since: v1.4
*/
$links = "none";
/* Insert/change/delete below the display names for the links you inserted above.
If $links is set to "none", this option is ignored.
Since: v1.4
*/
$display_links = "none";
/* --- REPORTING INFO --- */
/* The settings in this section are simply default settings. They can easily be changed each
time you run a report.
Since: v1.4
*/
/* Choose whether to paginate the Hours Worked report or not. Setting this option to "yes"
will print the totals for each user on their own page. Default is "yes".
Since: v1.4
*/
$paginate = "yes";
/* Choose whether to show the punch-in/out details for each punch for each user on the
Hours Worked report or not. Default is "yes".
Since: v1.4
*/
$show_details = "yes";
/* Choose how to round the time worked within the Hours Worked report for each user. This
simply tells the report how to format the total hours worked for the Hours Worked Report.
Default is "0".
Possibilities for this variable are:
$round_time --> 0) Do not round.
1) Round to the nearest 5 minutes.
2) Round to the nearest 10 minutes.
3) Round to the nearest 15 minutes.
4) Round to the nearest 20 minutes.
5) Round to the nearest 30 minutes.
Since: v1.4
*/
$round_time = "0";
/* The two variables below, $report_start_time and $report_end_time, are designed to work with
the Hours Worked report. They are there to give you a starting time to go along with the
starting date, and an ending time to go along with the ending date for the dates specified
when the report is run. Default is 00:00 (12:00am) for $report_start_time and
23:59 (11:59pm) for $report_end_time. 12 hour and 24 hour formats are supported.
Since: v1.4
*/
$report_start_time = "00:00";
$report_end_time = "23:59";
/* Setting this variable to "yes" will display a single dropdown box containing usernames
to choose from when running the reports. Setting this variable to "no" will instead
display a triple dropdown box containing offices, groups, and usernames to choose from
when running the reports. A single dropdown box works well if there are just a few
usernames in the system, and a triple dropdown works well if multiple offices and/or
groups are in the system. Default is "no".
Since: v1.4
*/
$username_dropdown_only = "no";
/* Choose whether to print displaynames or usernames for each user when reports are run.
Options for this variable are "user" and "display". Default is "user".
Since: v1.4
*/
$user_or_display = "user";
/* Choose whether to include in the reports the ip addresses of the systems that connect to
sign-in/out into PHP Timeclock or not. This option is useful for auditing purposes. The
ip_logging option must be set to "yes" in order for this option to work as expected.
Default is "yes".
Since: v1.4
*/
$display_ip = "yes";
/* Choose whether to log and include in the reports the office name of
where individual punches occur. This option is useful for auditing
purposes, but requires that machines set their office name in the office
administration page. Default is "no".
New in: v2.1
*/
$audit_office = "no";
/* Reports can be exported to a comma delimited file (.csv). Setting this to "yes" will
export the reports to .csv files. Default is "no"
Since: v1.4
*/
$export_csv = "no";
/* --- TIMEZONE INFO --- */
/* If you have users who are in different timezones, you may wish to display the punch-in/out
times according to the timezone they are currently in. Setting this option to "yes" will
display the punch-in/out times in the timezone of their connecting systems. The timezone
info is pulled from the web browser of the user via javascript and stored in a cookie on their
system. The default setting is "no".
Since: v1.4
*/
$use_client_tz = "no";
/* To display the punch-in/out times in the timezone of the web server, leave this option set
to "yes". Setting this option to "no" AND setting the above $use_client_tz option to "no",
will display the punch-in/out times in GMT. Default is "yes".
Since: v1.4
*/
$use_server_tz = "no";
/* --- WEATHER INFO --- */
/* Include local weather info on the left side of the main page just below the Submit button.
If you would like to include this feature, set $display_weather to "yes". Default is "no".
Since: v1.4
*/
$display_weather = "yes";
/* Display weather in US or metric measurements. Options are "f" or "c". Default is "c"
Since: v1.4
*/
$weather_units = "c";
/* set this list to your local weather station location
the entry format (all fields are required) is
'Metar(ICAO) | Name of station | dist-mi | dist-km | direction |'
Note that the trailing | is required.
You may have two in the array, which will show weather conditions
for two different stations, in which case you enter
array('a|b|c|d|e|','F|G|H|I|J|')
You can find a list of valid ICAO codes at:
https://pilotweb.nas.faa.gov/qryhtml/icao/
Since: v1.4
*/
$WxList = array();
$WxList = array('KTOP|Topeka, Kansas|4|7|NE|');
/* NOTE: this *MUST* be set correctly to
translate UTC times to your LOCAL time for the weather displays.
The list of valid timezone names can be found at
http://us.php.net/manual/en/timezones.php
pick the one that is closest to your location
$WxTimeZone = 'America/Los_Angeles';
or
$WxTimeZone = 'Europe/Brussels';
Since: v1.4
*/
$WxTimeZone = 'America/Chicago';
/* Sets the title in the header. This is what the page will be named by default when you
make a "favorite" or "bookmark" in your browser. Change as you see fit.
Since: v1.4
*/
$title = "$app_name $app_version";
?>