-
Notifications
You must be signed in to change notification settings - Fork 6
/
config.inc.php
33 lines (30 loc) · 956 Bytes
/
config.inc.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
<?PHP
/* MYSQL Configuration */
$DBServer = 'dbaddress';
$DBName = 'dbname';
$DBUser = 'dbuser';
$DBPassword = 'dbpass';
$db_handle = mysqli_connect($DBServer, $DBUser, $DBPassword);
$db_found = mysqli_select_db($db_handle, $DBName);
if ($db_found)
{
$config_sql = "select * from config where id = 1" ;
$config_result = mysqli_query($db_handle, $config_sql);
while ($db_field = mysqli_fetch_assoc($config_result))
{
/* Display Smart Devices */
$enable_smart = $db_field['enablesmart'];
/* Default refresh rate for index page */
$refresh = $db_field['refresh'];
/* SMTP Details for admin emails */
$smtp = $db_field['smtp'];
$smtp_port = $db_field['smtp_port'];
$smtp_username = $db_field['smtp_username'];
$smtp_password = $db_field['smtp_password'];
$admin_email = $db_field['admin_email'];
/* Email Alert Down Limit */
$alert_limit = $db_field['alert_limit'];
$row_count = $db_field['rowcount'];
}
}
?>