-
Notifications
You must be signed in to change notification settings - Fork 0
/
includes.constants.php
116 lines (102 loc) · 4.78 KB
/
includes.constants.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
// custom library, added c. 4/2010...
require_once('lib/common.php');
# ERROR REPORTING
error_reporting(E_ALL ^ E_NOTICE); // error reporting set to fatal/warning only
# ADMIN VARIABLES
define('ALERT_EMAIL', '[email protected]'); //'[email protected], [email protected]'); //[email protected], [email protected]
define('IS_LOCAL', substr($_SERVER['DOCUMENT_ROOT'], 0, 3)=='C:/');
define('IS_DEV', !IS_LOCAL && substr($_SERVER['SERVER_NAME'], 0, 4) == 'dev.');
$aclList = array( //list of ip addresses for access control
'24.21.69.57', //Lawrence [c.8/2009]
);
define('DEBUG', IS_LOCAL || in_array($_SERVER['REMOTE_ADDR'], $aclList)); //controls verbosity of error messaging
if (IS_LOCAL)
{
# DNS VARIABLES
define('SITE_DOMAIN', 'http://127.0.0.1/InkBustersUsa.com/public_html/');
define('ADMIN_DOMAIN', 'http://127.0.0.1/InkBustersUsa.com/public_html/admin/');
define('ADMIN_URL_PATH', 'http://127.0.0.1/InkBustersUsa.com/public_html/admin/');
define('CUSTOMER_DOMAIN', 'http://127.0.0.1/InkBustersUsa.com/public_html/customers/');
define('CUSTOMER_URL_PATH', 'http://127.0.0.1/InkBustersUsa.com/public_html/customers/');
define('MOBILE_DOMAIN', 'http://127.0.0.1/InkBustersUsa.com/public_html/mobile/');
define('MOBILE_URL_PATH', 'http://127.0.0.1/InkBustersUsa.com/public_html/mobile/');
# PATH VARIABLE
define('PUBLIC_PATH', $_SERVER['DOCUMENT_ROOT'] . '/InkBustersUsa.com/public_html/');
define('ADMIN_PATH', $_SERVER['DOCUMENT_ROOT'] . '/InkBustersUsa.com/public_html/admin/');
define('CUSTOMER_PATH', $_SERVER['DOCUMENT_ROOT'] . '/InkBustersUsa.com/public_html/customers/');
}
elseif (IS_DEV) //development...
{
# DNS VARIABLES
define('SITE_DOMAIN', 'http://dev.inkbustersusa.com/');
define('ADMIN_DOMAIN', 'http://dev.inkbustersusa.com/admin/');
define('ADMIN_URL_PATH', 'http://dev.inkbustersusa.com/admin/');
define('CUSTOMER_DOMAIN', 'http://dev.inkbustersusa.com/customers/');
define('CUSTOMER_URL_PATH', 'http://dev.inkbustersusa.com/customers/');
define('MOBILE_DOMAIN', 'http://dev.inkbustersusa.com/mobile/');
define('MOBILE_URL_PATH', 'http://dev.inkbustersusa.com/mobile/');
# PATH VARIABLE
define('PUBLIC_PATH', $_SERVER['DOCUMENT_ROOT'] . '/');
define('ADMIN_PATH', $_SERVER['DOCUMENT_ROOT'] . '/admin/');
define('CUSTOMER_PATH', $_SERVER['DOCUMENT_ROOT'] . '/customers/');
}
else //live...
{
# DNS VARIABLES
define('SITE_DOMAIN', 'http://www.inkbustersusa.com/');
define('ADMIN_DOMAIN', 'http://admin.inkbustersusa.com/');
define('ADMIN_URL_PATH', 'http://www.inkbustersusa.com/admin/');
define('CUSTOMER_DOMAIN', 'http://customers.inkbustersusa.com/');
define('CUSTOMER_URL_PATH', 'http://www.inkbustersusa.com/customers/');
define('MOBILE_DOMAIN', 'http://mobile.inkbustersusa.com/');
define('MOBILE_URL_PATH', 'http://www.inkbustersusa.com/mobile/');
# PATH VARIABLE
define('PUBLIC_PATH', '/home/bilyum/public_html/');
define('ADMIN_PATH', '/home/bilyum/public_html/admin/');
define('CUSTOMER_PATH', '/home/bilyum/public_html/customers/');
}
# SESSION VARIABLES
//define('SESSION_NAME', 'owt-ses');
//define('SESSION_DOMAIN', 'time.oregonwebteam.com');
# DATABASE ACCESS VARIABLES
if (IS_DEV)
{
define('DB_LOCATION', 'localhost');
define('DB_ACCOUNT', 'inkbstrs_inkdata');
define('DB_PASSWORD', 'j8uk94d1');
define('DB_DATABASE', 'inkbstrs_users');
define('DB_DATABASE_USERS', 'inkbstrs_users');
define('DB_DATABASE_CUSTOMERS', 'inkbstrs_customers');
define('DB_DATABASE_PROPOSALS', 'inkbstrs_proposals');
define('DB_DATABASE_INVOICES', 'inkbstrs_invoices');
}
else
{
define('DB_LOCATION', 'localhost');
define('DB_ACCOUNT', 'bilyum_inkdata');
define('DB_PASSWORD', 'j8uk94d1');
define('DB_DATABASE', 'bilyum_users');
define('DB_DATABASE_USERS', 'bilyum_users');
define('DB_DATABASE_CUSTOMERS', 'bilyum_customeraccounts');
define('DB_DATABASE_PROPOSALS', 'bilyum_proposals');
define('DB_DATABASE_INVOICES', 'bilyum_invoices');
}
# SITE VARIABLES
define('SITE_CLOSED', false);
define('SITE_CLOSED_REASON', 'Under-going updates to dates and timezones.');
define('SEVER_TIMEZONE', 'America/Chicago');
# HEREDOC USABLE VARIABLES
$DB_DATABASE_USERS = DB_DATABASE_USERS;
$DB_DATABASE_CUSTOMERS = DB_DATABASE_CUSTOMERS;
$DB_DATABASE_PROPOSALS = DB_DATABASE_PROPOSALS;
$DB_DATABASE_INVOICES = DB_DATABASE_INVOICES;
$PUBLIC_PATH = PUBLIC_PATH;
$ADMIN_PATH = ADMIN_PATH;
$adminAcl = array(
'24.21.69.57', //Lawrence, c.10/2009
//'24.20.194.84', //legacy, removed 10/1/2009
//'208.54.15.72', //legacy, removed 10/1/2009
);
$admin_ip = in_array($_SERVER['REMOTE_ADDR'], $adminAcl) ? true : false;