if (!($acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'all') | $acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'com_poll'))) { mosRedirect('index2.php', _NOT_AUTH); } require_once $mainframe->getPath('admin_html'); require_once $mainframe->getPath('class'); $task = mosGetParam($_REQUEST, 'task', ''); $cid = mosGetParam($_REQUEST, 'cid', array(0)); if (!is_array($cid)) { $cid = array(0); } switch ($task) { case "new": editPoll(0, $option); break; case "edit": editPoll($cid[0], $option); break; case "save": savePoll($option); break; case "remove": removePoll($cid, $option); break; case "publish": publishPolls($cid, 1, $option); break; case "unpublish": publishPolls($cid, 0, $option); break; case "cancel": cancelPoll($option);
// ensure user has access to this function if (!($acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'all') | $acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'com_poll'))) { mosRedirect('index2.php', _NOT_AUTH); } require_once $mainframe->getPath('admin_html'); require_once $mainframe->getPath('class'); $cid = josGetArrayInts('cid'); switch ($task) { case 'new': editPoll(0, $option); break; case 'edit': editPoll(intval($cid[0]), $option); break; case 'editA': editPoll($id, $option); break; case 'save': savePoll($option); break; case 'remove': removePoll($cid, $option); break; case 'publish': publishPolls($cid, 1, $option); break; case 'unpublish': publishPolls($cid, 0, $option); break; case 'cancel': cancelPoll($option);