<?php
if (!class_exists('Constants')) require_once("constants.php");

if ($_SERVER['SERVER_NAME'] == 'www.archline.hu' || $_SERVER['SERVER_NAME'] == 'www.archlinexp.com' || $_SERVER['SERVER_NAME'] == 'www.archlinexp.eu') {
    $config['db_host'] = Constants::DB_HOST;
    $config['db_user'] = Constants::DB_USER;
    $config['db_pass'] = Constants::DB_PASSWORD;
    $config['db_name'] = Constants::DB_NAME;
} elseif ($_SERVER['SERVER_NAME'] == 'secondary.dev.cadline.hu') {
    $config['db_host'] = Constants::DB_HOST;
    $config['db_user'] = Constants::DB_USER;
    $config['db_pass'] = Constants::DB_PASSWORD;
    $config['db_name'] = Constants::DB_NAME;
} elseif ($_SERVER['SERVER_NAME'] == 'crm.cadline.hu') {
    $config['db_host'] = Constants::DB_HOST;
    $config['db_user'] = Constants::DB_USER;
    $config['db_pass'] = Constants::DB_PASSWORD;
    $config['db_name'] = Constants::DB_NAME;
} else {
    $config['db_host'] = '127.0.0.1';
    $config['db_user'] = Constants::DB_USER;
    $config['db_pass'] = Constants::DB_PASSWORD;
    $config['db_name'] = Constants::DB_NAME;
}
