$eveRender->Assign('theme_id', $theme_id);
$pID = 'admin';
$eveRender->Assign('pID', $pID);
if (!$userinfo || $userinfo['access'] != 5 && $userinfo['access'] != 6) {
    $eve->SessionSetVar('errormsg', 'Admin Access Level Required - Please login!');
    $eve->RedirectUrl('login.php');
} else {
    $access = explode('.', $userinfo['access']);
    $eveRender->Assign('access', $access);
}
$file_check = 'install.php';
$installchecker = file_exists($file_check) ? true : false;
$eveRender->Assign('installchecker', $installchecker);
$op = $eve->VarCleanFromInput('op');
if ($op == 'modules') {
    $posmgmt->ModuleLoadVars();
    $func = $eve->VarCleanFromInput('func');
    if ($func == 'install' || $func == 'uninstall') {
        $modname = $eve->VarCleanFromInput('modname');
        if (file_exists('mods/' . $modname . '/install.php')) {
            include_once 'mods/' . $modname . '/install.php';
            if (function_exists($modname . '_' . $func)) {
                $install = $modname . '_' . $func;
                $result = $install();
            } else {
                $result = 0;
            }
        } else {
            $result = $func == 'install' ? 1 : 0;
        }
        $posmgmt->ChangeModState(array('modname' => $modname, 'modstate' => $result));