<?php
if (isset($_SERVER['HTTP_HOST'])) {
  switch ($_SERVER['HTTP_HOST']) {
    case 'archline.hu':
    case 'www.archline.hu': {
        define('ELES', TRUE);
        define('LANG', 'hun');
        define('PREFIX', 'lakber_');
        define('JMLADATBAZIS', "www_archline_hu");
        define('PATH_CODEGEN', "/usr/local/sbin/codegen");
        break;
      }
    case 'archlinexp.com':
    case 'www.archlinexp.com': {
        define('ELES', TRUE);
        define('LANG', 'eng');
        define('PREFIX', 'eng_');
        define('JMLADATBAZIS', "www_archline_hu");
        define('PATH_CODEGEN', "/usr/local/sbin/codegen");
        break;
      }
    case 'cadline.hu':
    case 'www.cadline.hu': {
        define('ELES', TRUE);
        define('LANG', 'hun');
        define('PREFIX', 'lakber_');
        define('JMLADATBAZIS', "www_archline_hu");
        define('PATH_CODEGEN', "/usr/local/sbin/codegen");
        break;
      }
    case 'dev.cadline.hu': {
        define('ELES', FALSE);
        define('LANG', 'hun');
        define('PREFIX', 'jml_');
        define('JMLADATBAZIS', "dev_cadline_hu");
        define('PATH_CODEGEN', "/var/www/tamas/codegen");
        break;
      }
    case 'dev.archlinexp.com': {
        define('ELES', FALSE);
        define('LANG', 'eng');
        define('PREFIX', 'eng_');
        define('JMLADATBAZIS', "dev_cadline_hu");
        define('PATH_CODEGEN', "/var/www/tamas/codegen");
        break;
      }
    default: {
        define('ELES', TRUE);
        define('LANG', 'hun');
        define('PREFIX', 'lakber_');
        define('JMLADATBAZIS', "www_archline_hu");
        define('PATH_CODEGEN', "/usr/local/sbin/codegen");
        break;
      }
  }
} else {
  define('ELES', TRUE);
  define('LANG', 'hun');
  define('PREFIX', 'lakber_');
  define('JMLADATBAZIS', "www_archline_hu");
  define('PATH_CODEGEN', "/usr/local/sbin/codegen");
}

$folder = (trim($_SERVER['DOCUMENT_ROOT']) > '' ? trim($_SERVER['DOCUMENT_ROOT']) : $_SERVER['DOCUMENT_ROOT']); // cron-ból futtatva a DOCUMENT_ROOT-nak nincs értéke!!!
require_once('config.mail.php');

if (class_exists('MySqlHelper') === FALSE)
  require_once('MySqlHelper.class.php');

define('CRMADATBAZIS', "cl_hlusers");
define('ACT_VERSION_ID', 1182);
define('DOMAIN', 'www.archline.hu');
define('DEFAULT_EMAIL', 'info@cadline.hu');
define('DEFAULT_EMAIL_ENG', 'info@archlinexp.com');

$config['db_host'] = 'localhost'; // 217.116.46.39
$config['db_user'] = 'cadline';       //'mycadline';
$config['db_pass'] = 'Shea6hoo';      //'uf1Ohpee';
$config['db_name'] = 'cl_hlusers';

$config2['db_host'] = 'localhost';  // tanis 2 - 185.43.206.63
$config2['db_user'] = 'mycadline';
$config2['db_pass'] = 'Shea6hoo';
$config2['db_name'] = 'www_archline_hu';

$msh = new MySQLHelper(); // tanis
$msh->init($config['db_host'], $config['db_name'], $config['db_user'], $config['db_pass']);
$msh->writelog = TRUE;

$msh2 = new MySQLHelper(); // tanis 2
$msh2->init($config2['db_host'], $config2['db_name'], $config2['db_user'], $config2['db_pass']);
