function vote_main() { // initialize return value $result = ''; // get current task $task = Request::getVar('task', ''); switch ($task) { // show vote button case 'show': default: $result = vote_show(); break; // vote button was activated // vote button was activated case 'vote': $result = vote_vote(); } return $result; }
function vote_main() { global $params; // initialize return value $result = ''; // get current task $task = $params->POST->task; switch ($task) { // show vote button case 'show': default: $result = vote_show(); break; // vote button was activated // vote button was activated case 'vote': $result = vote_vote(); } return $result; }