| version 1.59, 2013/09/02 13:30:19 |
version 1.60, 2013/09/03 15:34:47 |
|
|
| * http://platon.sk/projects/Metafox/ |
* http://platon.sk/projects/Metafox/ |
| */ |
*/ |
| |
|
| /* $Platon: Metafox/subst.inc.php,v 1.58 2013-09-02 12:46:38 igor Exp $ */ |
/* $Platon: Metafox/subst.inc.php,v 1.59 2013-09-02 13:30:19 igor Exp $ */ |
| |
|
| require_once 'cfgldr.inc.php'; |
require_once 'cfgldr.inc.php'; |
| require_once 'error.inc.php'; |
require_once 'error.inc.php'; |
| Line 82 if ($ezin_cgi['output'] == 'admin' |
|
| Line 82 if ($ezin_cgi['output'] == 'admin' |
|
| } |
} |
| } |
} |
| |
|
| |
$ezin_http_host = strtolower($_SERVER['HTTP_HOST']); |
| |
|
| |
// Set language by HTTP host |
| |
if (strlen($ezin_cfg['http_host_language']) > 0) { |
| |
preg_match_all('|(\w\w)[^\(]*\(([^\)]*)\)|', $ezin_cfg['http_host_language'], $matches); |
| |
foreach ($matches[1] as $index => $lang) { |
| |
$hosts = preg_split('/(\s+|\xc2\xa0)/', $matches[2][$index]); |
| |
if (in_array($ezin_http_host, $hosts)) { |
| |
$ezin_cgi['lang'] = $lang; |
| |
break; |
| |
} |
| |
} |
| |
} |
| |
|
| if (strlen($ezin_cfg['http_host_redirect']) > 0 && strcasecmp($_SERVER['REQUEST_METHOD'], 'POST')) { /* {{{ */ |
if (strlen($ezin_cfg['http_host_redirect']) > 0 && strcasecmp($_SERVER['REQUEST_METHOD'], 'POST')) { /* {{{ */ |
| $ezin_http_host = strtolower($_SERVER['HTTP_HOST']); |
|
| $ezin_redirect_ar = preg_split('/(\s+|\xc2\xa0)/', $ezin_cfg['http_host_redirect']); |
$ezin_redirect_ar = preg_split('/(\s+|\xc2\xa0)/', $ezin_cfg['http_host_redirect']); |
| if (count($ezin_redirect_ar) > 1) { |
if (count($ezin_redirect_ar) > 1) { |
| $ezin_redirect_new = array(); |
$ezin_redirect_new = array(); |