if ($_GET['action'] == 'delete-candidate') {
        if (!buckys_check_id_encrypted($_GET['id'], $_GET['idHash'])) {
            buckys_redirect('/moderator.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
        }
        BuckysModerator::deleteCandidate($userID, $_GET['id']);
        buckys_redirect('/moderator.php');
    }
    if ($_GET['action'] == 'delete-moderator') {
        //Confirm that the user is administrator
        if (!buckys_check_user_acl(USER_ACL_ADMINISTRATOR)) {
            buckys_redirect('/moderator.php', MSG_PERMISSION_DENIED, MSG_TYPE_ERROR);
        }
        if (!buckys_check_id_encrypted($_GET['id'], $_GET['idHash'])) {
            buckys_redirect('/moderator.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
        }
        BuckysModerator::deleteModerator($_GET['id']);
        buckys_redirect('/moderator.php');
    }
    if ($_GET['action'] == 'reset-voting') {
        //Confirm that the user is administrator
        if (!buckys_check_user_acl(USER_ACL_ADMINISTRATOR)) {
            buckys_redirect('/moderator.php', MSG_PERMISSION_DENIED, MSG_TYPE_ERROR);
        }
        BuckysModerator::resetVotes();
        buckys_redirect('/moderator.php');
    }
}
//Process Actions
if (isset($_POST['action'])) {
    if ($_POST['action'] == 'apply_candidate') {
        if (isset($_POST['candidate_id'])) {