-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.php
executable file
·49 lines (42 loc) · 1.78 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
<?php
// Project name. Will be used for loging errors
define('PR_NAME','Boomboom');
// Project damain name. Will be used for sending email messages
define('PR_DOMAIN','Boomboom.co.il');
/*
* 0 - test mode (will print errors and save in database)
* 1 - live mode (only save errors in database)
*/
define('PR_MODE',0);
/*
* Meanwhile turning off search by categories,
* because all the job ads are from parsed websites,
* and they don't divided by categories
*/
define('MOD_CATEGORIES_ON',0);
// Protecting sensitive information, from you, reader
$passwords = @file(__DIR__.'/.passwords');
$passwords[0] = isset($passwords[0])?trim($passwords[0]):'';
$passwords[1] = isset($passwords[1])?trim($passwords[1]):'';
// Database connection data for localhost, and not a local host.
$localServers = array('127.0.0.1', '::1', '33.33.33.100');
if(in_array($_SERVER['REMOTE_ADDR'], $localServers, true))
{
define('DBMS_NAME','mysql'); // Database management system name
define('DB_HOST' ,'localhost'); // If the server is on the same ip as mysql(or other dbms), the host is localhost
define('DB_PORT' ,'3306'); // Default port for mysql
define('DB_USER' ,'root'); // Name of the user with access to Boomboom and log databases
define('DB_PASS' ,$passwords[0]); // Password of the user
define('DB_DATABASENAME','Boomboom'); // Name of the main database
define('DB_DATABASENAME_LOG','log'); // Name of database for log error
}
else
{
define('DBMS_NAME','mysql');
define('DB_HOST' ,'localhost');
define('DB_PORT' ,'3306');
define('DB_USER' ,'root');
define('DB_PASS' ,$passwords[1]);
define('DB_DATABASENAME','Boomboom');
define('DB_DATABASENAME_LOG','log');
}