| version 1.41, 2008/07/29 16:14:29 |
version 1.42, 2008/09/08 21:06:58 |
|
|
| * http://platon.sk/projects/Metafox/ |
* http://platon.sk/projects/Metafox/ |
| */ |
*/ |
| |
|
| /* $Platon: Metafox/subst.inc.php,v 1.40 2008-05-02 15:55:33 nepto Exp $ */ |
/* $Platon: Metafox/subst.inc.php,v 1.41 2008-07-29 16:14:29 nepto Exp $ */ |
| |
|
| require_once 'cfgldr.inc.php'; |
require_once 'cfgldr.inc.php'; |
| require_once 'error.inc.php'; |
require_once 'error.inc.php'; |
| Line 70 if ($ezin_cgi['output'] == 'admin' |
|
| Line 70 if ($ezin_cgi['output'] == 'admin' |
|
| |
|
| 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_http_host = strtolower($_SERVER['HTTP_HOST']); |
| $ezin_redirect_ar = preg_split('|\s+|', $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(); |
| foreach ($ezin_redirect_ar as $val) { |
foreach ($ezin_redirect_ar as $val) { |
| Line 100 if (strlen($ezin_cfg['http_host_redirect |
|
| Line 100 if (strlen($ezin_cfg['http_host_redirect |
|
| if (strlen($ezin_redirect_ar['host']) > 0 && strlen($ezin_http_host) > 0 |
if (strlen($ezin_redirect_ar['host']) > 0 && strlen($ezin_http_host) > 0 |
| && strcasecmp($ezin_redirect_ar['host'], $ezin_http_host)) { |
&& strcasecmp($ezin_redirect_ar['host'], $ezin_http_host)) { |
| //die("here: ".$ezin_http_host.'-'.$ezin_redirect_ar['host']); |
//die("here: ".$ezin_http_host.'-'.$ezin_redirect_ar['host']); |
| $ezin_http_host_allowed_ar = preg_split('|\s+|', $ezin_cfg['http_host_allowed']); |
$ezin_http_host_allowed_ar = preg_split('/(\s+|\xc2\xa0)/', $ezin_cfg['http_host_allowed']); |
| $ezin_http_host_forbidden_ar = preg_split('|\s+|', $ezin_cfg['http_host_forbidden']); |
$ezin_http_host_forbidden_ar = preg_split('/(\s+|\xc2\xa0)/', $ezin_cfg['http_host_forbidden']); |
| if (count($ezin_http_host_forbidden_ar) <= 0 |
if (count($ezin_http_host_forbidden_ar) <= 0 |
| || in_array($ezin_http_host, $ezin_http_host_forbidden_ar)) { |
|| in_array($ezin_http_host, $ezin_http_host_forbidden_ar)) { |
| if (! in_array($ezin_http_host, $ezin_http_host_allowed_ar)) { |
if (! in_array($ezin_http_host, $ezin_http_host_allowed_ar)) { |