$eve->SessionSetVar('statusmsg', 'API Key Saved!');
    }
    $eve->RedirectUrl('admin.php');
} elseif ($action == 'updatekey') {
    $keyremove = $eve->VarCleanFromInput('keyremove');
    //echo '<pre>';print_r($userremove);echo '</pre>';exit;
    foreach ($keyremove as $id => $remove) {
        if (!$posmgmt->DeleteKey($id)) {
            $eve->RedirectUrl('admin.php');
        }
    }
    $eve->SessionSetVar('statusmsg', 'Information Saved!');
    $eve->RedirectUrl('admin.php');
} elseif ($action == 'updatedatafromapi') {
    @set_time_limit(0);
    $results = $posmgmt->API_UPDATEAllPOSES();
    if (!$results) {
        //$eve->SessionSetVar('errormsg', 'ERROR or No Character!');
        $eve->RedirectUrl('admin.php');
    }
    $eveRender->Assign('action', $action);
    $eveRender->Assign('posupdate', $results['posupdate']);
    $eveRender->Assign('results', $results);
    $eveRender->Display('admin.tpl');
    exit;
} elseif ($action == 'updateprices') {
    $PricesUpdate = $eve->VarCleanFromInput('PricesUpdate');
    foreach ($PricesUpdate as $id => $value) {
        $pinfo = array('name' => $id, 'value' => $value);
        if (!$posmgmt->UpdatePrices($pinfo)) {
            $eve->RedirectUrl('admin.php');