| version 1.99, 2012/09/19 06:55:15 |
version 1.100, 2012/09/28 16:23:20 |
|
|
| * http://platon.sk/projects/Metafox/ |
* http://platon.sk/projects/Metafox/ |
| */ |
*/ |
| |
|
| /* $Platon: Metafox/functions.inc.php,v 1.98 2012-05-23 17:50:32 igor Exp $ */ |
/* $Platon: Metafox/functions.inc.php,v 1.99 2012-09-19 06:55:15 igor Exp $ */ |
| |
|
| function ezin_eval($evalcode) /* {{{ */ |
function ezin_eval($evalcode) /* {{{ */ |
| { |
{ |
| Line 1516 function ezin_cgi_parse() /* {{{ */ |
|
| Line 1516 function ezin_cgi_parse() /* {{{ */ |
|
| } |
} |
| } |
} |
| |
|
| |
$notfound_id = ''; |
| |
$notfound_id = (strlen($notfound_id) <= 0) ? @$ezin_cgi['author_id'] : $notfound_id; |
| |
$notfound_id = (strlen($notfound_id) <= 0) ? @$ezin_cgi['section_id'] : $notfound_id; |
| |
$notfound_id = (strlen($notfound_id) <= 0) ? @$ezin_cgi['article_id'] : $notfound_id; |
| |
$notfound_id = (strlen($notfound_id) <= 0) ? strval(@$ezin_cgi['message_id']) : $notfound_id; |
| |
$notfound_id = (strlen($notfound_id) <= 0) ? @$ezin_cgi['section_access_key'] : $notfound_id; |
| |
$notfound_id = (strlen($notfound_id) <= 0) ? @$ezin_cgi['article_access_key'] : $notfound_id; |
| |
$ezin_cgi['notfound_id'] = $notfound_id; |
| |
|
| $ar = ezin_validate_IDs(array( |
$ar = ezin_validate_IDs(array( |
| 'author_id' => $ezin_cgi['author_id'], |
'author_id' => $ezin_cgi['author_id'], |
| 'section_id' => $ezin_cgi['section_id'], |
'section_id' => $ezin_cgi['section_id'], |
| Line 2115 function ezin_redirect_section($section_ |
|
| Line 2124 function ezin_redirect_section($section_ |
|
| if ($type == null) { |
if ($type == null) { |
| $type = $ezin_cfg['link_file_type']; |
$type = $ezin_cfg['link_file_type']; |
| } |
} |
| |
$ar = ezin_validate_IDs(array('section_id' => $section_id)); |
| |
$section_key = strlen($ar['section_access_key']) > 0 ? $ar['section_access_key'] : $ar['section_id']; |
| switch($type) { |
switch($type) { |
| case 0: |
case 0: |
| $redirect = $ezin_cfg['url'].'index.php?ezin_section_key='.$section_id; |
$redirect = $ezin_cfg['url'].'index.php?ezin_section_key='.$section_key; |
| break; |
break; |
| case 1: |
case 1: |
| $redirect = $ezin_cfg['url'].'section.php?'.$section_id; |
$redirect = $ezin_cfg['url'].'section.php?'.$section_key; |
| break; |
break; |
| case 2: |
case 2: |
| $redirect = $ezin_cfg['url'].$section_id; |
$redirect = $ezin_cfg['url'].$section_key; |
| break; |
break; |
| } |
} |
| ezin_redirect_special($redirect); |
ezin_redirect_special($redirect); |
| Line 2134 function ezin_redirect_article($article_ |
|
| Line 2145 function ezin_redirect_article($article_ |
|
| if ($type == null) { |
if ($type == null) { |
| $type = $ezin_cfg['link_file_type']; |
$type = $ezin_cfg['link_file_type']; |
| } |
} |
| |
$ar = ezin_validate_IDs(array('article_id' => $article_id)); |
| |
$section_key = strlen($ar['section_access_key']) > 0 ? $ar['section_access_key'] : $ar['section_id']; |
| |
$article_key = strlen($ar['article_access_key']) > 0 ? $ar['article_access_key'] : $ar['article_id']; |
| switch($type) { |
switch($type) { |
| case 0: |
case 0: |
| $redirect = $ezin_cfg['url'].'index.php?ezin_article_key='.$article_id; |
$redirect = $ezin_cfg['url'].'index.php?ezin_article_key='.$article_key; |
| break; |
break; |
| case 1: |
case 1: |
| $redirect = $ezin_cfg['url'].'article.php?'.$article_id; |
$redirect = $ezin_cfg['url'].'article.php?'.$article_key; |
| break; |
break; |
| case 2: |
case 2: |
| $ar = ezin_validate_IDs(array('article_id' => $article_id)); |
$redirect = $ezin_cfg['url'].$section_key.'/'.$article_key; |
| $section_key = strlen($ar['section_access_key']) > 0 ? $ar['section_access_key'] : $ar['section_id']; |
|
| $redirect = $ezin_cfg['url'].$section_key.'/'.$article_id; |
|
| break; |
break; |
| } |
} |
| ezin_redirect_special($redirect); |
ezin_redirect_special($redirect); |
| Line 2155 function ezin_redirect_author($author_id |
|
| Line 2167 function ezin_redirect_author($author_id |
|
| if ($type == null) { |
if ($type == null) { |
| $type = $ezin_cfg['link_file_type']; |
$type = $ezin_cfg['link_file_type']; |
| } |
} |
| |
$ar = ezin_validate_IDs(array('author_id' => $author_id)); |
| |
$author_key = strlen($ar['author_access_key']) > 0 ? $ar['author_access_key'] : $ar['author_id']; |
| switch($type) { |
switch($type) { |
| case 0: |
case 0: |
| $redirect = $ezin_cfg['url'].'index.php?ezin_author_key='.$author_id; |
$redirect = $ezin_cfg['url'].'index.php?ezin_author_key='.$author_key; |
| break; |
break; |
| case 1: |
case 1: |
| $redirect = $ezin_cfg['url'].'author.php?'.$author_id; |
$redirect = $ezin_cfg['url'].'author.php?'.$author_key; |
| break; |
break; |
| case 2: |
case 2: |
| $redirect = $ezin_cfg['url'].ezin_get_rewrite_action('author').'/'.$author_id; |
$redirect = $ezin_cfg['url'].ezin_get_rewrite_action('author').'/'.$author_key; |
| break; |
break; |
| } |
} |
| ezin_redirect_special($redirect); |
ezin_redirect_special($redirect); |
| Line 2174 function ezin_redirect_print($article_id |
|
| Line 2188 function ezin_redirect_print($article_id |
|
| if ($type == null) { |
if ($type == null) { |
| $type = $ezin_cfg['link_file_type']; |
$type = $ezin_cfg['link_file_type']; |
| } |
} |
| |
$ar = ezin_validate_IDs(array('article_id' => $article_id)); |
| |
$article_key = strlen($ar['article_access_key']) > 0 ? $ar['article_access_key'] : $ar['article_id']; |
| switch($type) { |
switch($type) { |
| case 0: |
case 0: |
| $redirect = $ezin_cfg['url'].'index.php?ezin_article_key='.$article_id.'&ezin_print=1'; |
$redirect = $ezin_cfg['url'].'index.php?ezin_article_key='.$article_key.'&ezin_print=1'; |
| break; |
break; |
| case 1: |
case 1: |
| $redirect = $ezin_cfg['url'].'print.php?'.$article_id; |
$redirect = $ezin_cfg['url'].'print.php?'.$article_key; |
| break; |
break; |
| case 2: |
case 2: |
| $redirect = $ezin_cfg['url'].ezin_get_rewrite_action('print').'/'.$article_id; |
$redirect = $ezin_cfg['url'].ezin_get_rewrite_action('print').'/'.$article_key; |
| break; |
break; |
| } |
} |
| ezin_redirect_special($redirect); |
ezin_redirect_special($redirect); |