| version 1.145, 2026/11/06 11:25:59 |
version 1.146, 2026/11/06 14:16:37 |
|
|
| * http://platon.sk/projects/Metafox/ |
* http://platon.sk/projects/Metafox/ |
| */ |
*/ |
| |
|
| /* $Platon: Metafox/functions.inc.php,v 1.144 2024/11/20 15:48:03 igor Exp $ */ |
/* $Platon: Metafox/functions.inc.php,v 1.145 2026/11/06 11:25:59 nepto Exp $ */ |
| |
|
| function ezin_eval($evalcode) /* {{{ */ |
function ezin_eval($evalcode) /* {{{ */ |
| { |
{ |
| Line 695 function ezin_get_weblog_count($count_ty |
|
| Line 695 function ezin_get_weblog_count($count_ty |
|
| * Link changing |
* Link changing |
| */ |
*/ |
| |
|
| |
function ezin_get_schema() /* {{{ */ |
| |
{ |
| |
if (! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off') { |
| |
return 'https'; |
| |
} |
| |
return @$_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http'; |
| |
} /* }}} */ |
| |
|
| function ezin_get_link($type = 'S', $id = 0, $full_url = 0, $lang = '', $force_lang = 0) /* {{{ */ |
function ezin_get_link($type = 'S', $id = 0, $full_url = 0, $lang = '', $force_lang = 0) /* {{{ */ |
| { |
{ |
| global $ezin_cfg; |
global $ezin_cfg; |
| Line 2073 function ezin_cgi_parse() /* {{{ */ |
|
| Line 2081 function ezin_cgi_parse() /* {{{ */ |
|
| |
|
| if ($do_redirect) { |
if ($do_redirect) { |
| $request_uri = $_SERVER['REQUEST_URI']; |
$request_uri = $_SERVER['REQUEST_URI']; |
| $location = 'http://'.$_SERVER['HTTP_HOST'].$request_uri; |
$location = ezin_get_schema().'://'.$_SERVER['HTTP_HOST'].$request_uri; |
| if (strpos($request_uri, '?') === false) { |
if (strpos($request_uri, '?') === false) { |
| if (intval($ezin_cgi['article_id']) > 0) { |
if (intval($ezin_cgi['article_id']) > 0) { |
| $location = ezin_get_link('A', $ezin_cgi['article_id'], 1, @$ezin_cgi['lang']); |
$location = ezin_get_link('A', $ezin_cgi['article_id'], 1, @$ezin_cgi['lang']); |
|
|
| \$ezin_tmpl_subdir = dirname(Platon::str_replace_prefix(\$ezin_cfg['url'].$url_part, |
\$ezin_tmpl_subdir = dirname(Platon::str_replace_prefix(\$ezin_cfg['url'].$url_part, |
| '', \$_SERVER['SCRIPT_NAME'])); |
'', \$_SERVER['SCRIPT_NAME'])); |
| if (@chdir(\$ezin_sys['dir']['root']."/lib2/$lib2_dir/".\$ezin_tmpl_subdir) == false) { |
if (@chdir(\$ezin_sys['dir']['root']."/lib2/$lib2_dir/".\$ezin_tmpl_subdir) == false) { |
| header('Location: http://'.\$_SERVER['HTTP_HOST'].\$ezin_cfg['url']); |
header('Location: '.ezin_get_schema().'://'.\$_SERVER['HTTP_HOST'].\$ezin_cfg['url']); |
| exit; |
exit; |
| } |
} |
| if (@file_exists(basename(\$_SERVER['SCRIPT_NAME']))) { |
if (@file_exists(basename(\$_SERVER['SCRIPT_NAME']))) { |
| Line 2289 function ezin_dir_app_include($url_part, |
|
| Line 2297 function ezin_dir_app_include($url_part, |
|
| '', $_SERVER['SCRIPT_NAME'])); |
'', $_SERVER['SCRIPT_NAME'])); |
| |
|
| if (@chdir($ezin_sys['dir']['root']."/lib2/$lib2_dir/$ezin_tmpl_subdir") == false) { |
if (@chdir($ezin_sys['dir']['root']."/lib2/$lib2_dir/$ezin_tmpl_subdir") == false) { |
| header('Location: http://'.$_SERVER['HTTP_HOST'].$ezin_cfg['url']); |
header('Location: '.ezin_get_schema().'://'.$_SERVER['HTTP_HOST'].$ezin_cfg['url']); |
| exit; |
exit; |
| } |
} |
| |
|