-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathconfig.php
101 lines (87 loc) · 3.55 KB
/
config.php
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
<?php
//stop file from being directly acessed
if (phpversion() >= 5)
{
if (count(get_included_files()) == 1)
{
header("HTTP/1.1 404 File Not Found", 404);
exit;
}
}
else
{
if (count(get_included_files()) == 0) //stop file from being directly acessed
{
header("HTTP/1.1 404 File Not Found", 404);
exit;
}
}
/**
CDP.me | Data Backups
Copyright (C) 2014 CDP.me / PetaByet.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
**/
// edit the configuration below to meet your needs
$config = array();
$config['adminemail'] = '[email protected]'; //the email address to send notifications to
$config['sendnotification'] = true; //send email notification (recommended)
$config['emailfrom'] = '[email protected]'; //send email from
$config['smtp'] = false; //use smtp to send emails
$config['smtpserver'] = ''; //smtp server (only enter if smtp is true)
$config['smtpusername'] = ''; //smtp username (only enter if smtp is true)
$config['smtppassword'] = ''; //smtp password (only enter if smtp is true)
$config['smtpsecure'] = 'tls'; //smtp encryption (tls / ssl)
$config['smtpport'] = 587; //smtp port (only enter if smtp is true)
$config['path'] = dirname(__FILE__); //script root path
$config['version'] = '1.0'; //script version
$config['logintimeout'] = '1800'; //inactivity timeout in seconds
$config['debug'] = false; //debug mode
$config['debuglevel'] = 2; //0 for just show errors, 1 for just log errors or 2 for show and log errors
$config['errorlevels'] = 'E_ALL | E_STRICT'; //error reporting level
$config['logerrors'] = true; //log errors to the syslog even when debug is set to false
$config['timezone'] = 'UTC'; //default time zone to use
// DON'T EDIT BELOW THIS LINE
error_reporting($config['errorlevels']); //set error reporting level
date_default_timezone_set($config['timezone']); //set time zone
if ($config['debug']) //enable or disable debug mode
{
switch ($config['debuglevel'])
{
case 0:
ini_set('display_errors', 1);
ini_set('log_errors', 0);
break;
case 1:
ini_set('display_errors', 0);
ini_set('log_errors', 1);
break;
case 2:
ini_set('display_errors', 1);
ini_set('log_errors', 1);
break;
default:
ini_set('display_errors', 1);
ini_set('log_errors', 1);
break;
}
}
else
{
ini_set('display_errors', 0);
}
if ($config['logerrors']) //enable or disable error logging for the syslog
{
ini_set('log_errors', 1);
ini_set('error_log', 'syslog');
}
?>