<?php


/**
 * check the group permission
 */
$writeCheck = $voting->getGroupAccess($voting->customer_group_write, (int)$_SESSION['customers_status']['customers_status_id']);
$captchaCheck = $voting->getGroupAccess($voting->customer_group_captcha, (int)$_SESSION['customers_status']['customers_status_id']);
$pagepart = $voting->pagepart();


if ($voting->voting_module_active == 0) {
    mh_redirect(mh_href_link(FILENAME_DEFAULT, '', 'NONSSL'));
} elseif ($writeCheck != 1) {
    if (!isset($_SESSION['customer_id'])) {
        if (is_object($navigation)) {
            $navigation->set_snapshot();
        } elseif (is_object($_SESSION['navigation'])) {
            $_SESSION['navigation']->set_snapshot();
        }
        mh_redirect(mh_href_link(FILENAME_LOGIN));
    }
}


