| version 1.6, 2005/11/28 10:11:32 |
version 1.7, 2005/11/28 11:53:49 |
| Line 83 $ezin_tmpl_key = ''; |
|
| Line 83 $ezin_tmpl_key = ''; |
|
| $ezin_db_author = ''; |
$ezin_db_author = ''; |
| $ezin_db_section = ''; |
$ezin_db_section = ''; |
| $ezin_db_article = ''; |
$ezin_db_article = ''; |
| |
$ezin_db_poll = ''; |
| if ($ezin_cgi['author_id'] > 0 || $ezin_cgi['output'] == 'author') { /* {{{ */ |
if ($ezin_cgi['author_id'] > 0 || $ezin_cgi['output'] == 'author') { /* {{{ */ |
| $ezin_db_author = ezin_get_author($ezin_cgi['author_id']); |
$ezin_db_author = ezin_get_author($ezin_cgi['author_id']); |
| if (! empty($ezin_db_author['author_link']) && $ezin_cgi['output'] == 'author') { |
if (! empty($ezin_db_author['author_link']) && $ezin_cgi['output'] == 'author') { |
| Line 303 if ($ezin_tmpl_main->isVar('article_item |
|
| Line 304 if ($ezin_tmpl_main->isVar('article_item |
|
| } |
} |
| } /* }}} */ |
} /* }}} */ |
| |
|
| |
if ($ezin_tmpl_main->isVar('poll_question')) { /* {{{ */ |
| |
$ezin_db_poll = ezin_get_poll($ezin_db_section['section_id'], $ezin_cgi['lang']); |
| |
if ($ezin_db_poll != '') { |
| |
$ezin_tmpl_main->set($ezin_db_poll); |
| |
} |
| |
if ($ezin_db_poll != '' && $ezin_tmpl_main->isVar('poll_answer_items')) { |
| |
|
| |
$cache_id = 'P'.@$ezin_db_poll['poll_id']; |
| |
$cache_ar = ezin_cache_load($cache_id); |
| |
if (intval($cache_ar['timestamp']) <= 0) { |
| |
$item = new HTML_Template_Platon($ezin_sys['tmpl']['poll_answer_item'].$ezin_tmpl_key, |
| |
HTML_TEMPLATE_PLATON_METHOD_VAR_KEEP); |
| |
$cache_ar['var_var'] = $item->isVar('poll_answer_votes') |
| |
|| $item->isVar('poll_answer_pct'); |
| |
$cache_ar['var_var'] = 0; // REMOVE ME / FIX ME |
| |
$answers = ezin_get_poll_answer_list($ezin_db_poll['poll_id']); |
| |
$cache_ar['content'] = ''; |
| |
|
| |
for ($k = 0; $k < count($answers); $k++) { |
| |
$item->reload(); |
| |
//ezin_section_link_process($answers[$k]); |
| |
//ezin_section_counts_process($answers[$k]); |
| |
if ($cache_ar['var_var']) { |
| |
$id = $answers[$k]['poll_answer_id']; |
| |
$item->setVar('poll_answer_votes', 'poll_answer_votes_'.$id); |
| |
$item->setVar('poll_answer_pct', 'poll_answer_pct_'.$id); |
| |
} |
| |
$item->set($answers[$k]); |
| |
$cache_ar['content'] .= $item->getCode(); |
| |
} |
| |
//$cache_ar['content'] = Platon::tilde_replace($cache_ar['content']); |
| |
unset($answers); |
| |
ezin_cache_save($cache_id, $cache_ar['content'], $cache_ar['var_var']); |
| |
} |
| |
$ezin_tmpl_main->setCode('poll_answer_items', $cache_ar['content']); |
| |
if ($cache_ar['var_var']) { |
| |
$ezin_tmpl_main->set(ezin_get_poll_answer_list_counts($ezin_db_poll['poll_id'])); |
| |
} |
| |
} |
| |
} /* }}} */ |
| |
|
| /* |
/* |
| * Gets and substitute current article parameters (if article is set) |
* Gets and substitute current article parameters (if article is set) |