| version 1.52, 2007/02/17 16:55:48 |
version 1.53, 2007/02/18 21:30:29 |
|
|
| * http://platon.sk/projects/Metafox/ |
* http://platon.sk/projects/Metafox/ |
| */ |
*/ |
| |
|
| /* $Platon: Metafox/functions.inc.php,v 1.51 2007-02-01 18:12:24 nepto Exp $ */ |
/* $Platon: Metafox/functions.inc.php,v 1.52 2007-02-17 16:55:48 nepto Exp $ */ |
| |
|
| function ezin_eval($evalcode) /* {{{ */ |
function ezin_eval($evalcode) /* {{{ */ |
| { |
{ |
| Line 1338 function ezin_cgi_parse() /* {{{ */ |
|
| Line 1338 function ezin_cgi_parse() /* {{{ */ |
|
| } |
} |
| } |
} |
| |
|
| if (! empty($ezin_cgi['section_id'])) { |
if (! empty($ezin_cgi['section_id']) || ! empty($ezin_cgi['author_id'])) { |
| $ezin_save_feedback = Platon::parse_id_param('ezin_save_feedback', false); |
$ezin_save_feedback = Platon::parse_id_param('ezin_save_feedback', false); |
| $ezin_save_email = Platon::parse_id_param('ezin_save_email', false); |
$ezin_save_email = Platon::parse_id_param('ezin_save_email', false); |
| |
$ezin_save_author = Platon::parse_id_param('ezin_save_author', false); |
| if (! empty($ezin_save_feedback)) { /* {{{ */ |
if (! empty($ezin_save_feedback)) { /* {{{ */ |
| if (stristr($ezin_cfg['antispam_flags'], 'F') != false |
if (stristr($ezin_cfg['antispam_flags'], 'F') != false |
| && strlen(trim($ezin_cfg['antispam_answer'])) > 0 |
&& strlen(trim($ezin_cfg['antispam_answer'])) > 0 |
| Line 1390 function ezin_cgi_parse() /* {{{ */ |
|
| Line 1391 function ezin_cgi_parse() /* {{{ */ |
|
| } |
} |
| } |
} |
| } /* }}} */ |
} /* }}} */ |
| |
if (! empty($ezin_save_author)) { /* {{{ */ |
| |
if (stristr($ezin_cfg['antispam_flags'], 'A') != false |
| |
&& strlen(trim($ezin_cfg['antispam_answer'])) > 0 |
| |
&& strcasecmp(trim($ezin_cfg['antispam_answer']), trim($_REQUEST['ezin_antispam']))) { |
| |
$ezin_cgi['author_save_error'] = 1; |
| |
} else { |
| |
$data = array(); |
| |
foreach ($_POST + $_GET as $key => $val) { |
| |
if (in_array($key, array('ezin_save_author', 'ezin_fragment', |
| |
'ezin_section_id', 'ezin_section_key', 'ezin_antispam'))) { |
| |
continue; |
| |
} |
| |
if (preg_match('|^ezin_(.+)$|', $key, $matches)) { |
| |
$data[$matches[1]] = stripslashes($val); |
| |
} |
| |
} |
| |
//ezin_feedback_send_notify_email($data); |
| |
if (ezin_save_author($data)) { |
| |
$ezin_cgi['author_save_ok'] = 1; |
| |
if ($ezin_cfg['author_save_redirect']) { |
| |
$request_uri = $_SERVER['REQUEST_URI']; |
| |
$location = strpos($request_uri, '?') === false |
| |
? ezin_get_link('S', $ezin_cgi['section_id'], 1, @$ezin_cgi['lang']) |
| |
: 'http://'.$_SERVER['HTTP_HOST'].$request_uri; |
| |
if (strlen(@$_POST['ezin_fragment']) > 0) { |
| |
$location .= '#'.$_POST['ezin_fragment']; |
| |
} |
| |
Platon::redirect($location); |
| |
} |
| |
} else { |
| |
$ezin_cgi['author_save_error'] = 1; |
| |
} |
| |
} |
| |
} /* }}} */ |
| } |
} |
| |
|
| if (! empty($ezin_cgi['author_id'])) { |
if (! empty($ezin_cgi['author_id'])) { |
| $ezin_cgi['output'] = 'author'; |
$ezin_cgi['output'] = 'author'; |
| } |
} |
| |
|
| |
$ezin_edit_author = Platon::parse_id_param('ezin_edit_author', false); |
| |
if (! empty($ezin_edit_author)) { |
| |
$ezin_cgi['output'] = 'author_edit'; |
| |
} |
| |
|
| $poll_answer_id = Platon::parse_id_param('ezin_poll_answer_id', 0); |
$poll_answer_id = Platon::parse_id_param('ezin_poll_answer_id', 0); |
| if ($poll_answer_id > 0 && @strlen($_SERVER['HTTP_REFERER']) > 0) { |
if ($poll_answer_id > 0 && @strlen($_SERVER['HTTP_REFERER']) > 0) { |
| $poll_id = ezin_is_valid_poll($poll_answer_id); |
$poll_id = ezin_is_valid_poll($poll_answer_id); |