$eve = new Eve();
$posmgmt = new POSMGMT();
$access = $eve->SessionGetVar('access');
$theme_id = $eve->SessionGetVar('theme_id');
$pID = 'login';
$eveRender->Assign('pID', $pID);
$action = $eve->VarCleanFromInput('action');
$eveRender->Assign('access', $access);
if ($action == 'Login') {
    $name = $eve->VarCleanFromInput('name');
    $pass = $eve->VarCleanFromInput('pass');
    if (empty($name) || empty($pass)) {
        $eve->SessionSetVar('errormsg', 'Please fill the form properly!');
        $eve->RedirectUrl('login.php');
    }
    $user = $posmgmt->LogUser(array('name' => $name, 'pass' => $pass));
    if ($user) {
        $eve->SessionSetVar('statusmsg', 'Welcome ' . $user['name']);
        $eve->RedirectURL('track.php');
    } else {
        $eve->SessionSetVar('statusmsg', 'Wrong Login or Pass!');
        $eve->RedirectURL('login.php');
    }
}
if ($eve->IsMiniBrowser()) {
    if (!$eve->IsTrusted()) {
        $eve->RequestTrust('You must add this site to your trusted list to log in in-game!');
    } else {
        $userinfo = $eve->GetUserVars();
        $eveRender->Assign('IS_IGB', true);
        $eveRender->Assign('userinfo', $userinfo);