Example #1
0
function voteResult($div_id, $vote_id)
{
    $_POST['vote'] = $vote_id;
    inc_u('vote');
    $unit = new VoteUnit($GLOBALS['urlprops']);
    $objResponse = new xajaxResponse();
    $objResponse->assign($div_id, 'innerHTML', $unit->getBody());
    return $objResponse;
}
Example #2
0
/**
 * Smarty {raVote} function plugin
 *
 * Type:     function<br>
 * Name:     raVote<br>
 * Purpose:  initialize overlib
 * @author   Roman Alyakrytskiy
 * @param array
 * @param Smarty
 * @return string
 */
function smarty_function_raVote($params, &$smarty)
{
    global $urlprops;
    $urlprops['action'] = 'form';
    $urlprops['frmname'] = empty($params['name']) ? '' : $params['name'];
    inc_u('vote');
    $unit = new VoteUnit($urlprops);
    return $unit->getBody();
}