$error = "Session login error: {$err}"; $cmd = 'logout'; $session = false; } else { if (!$cmd) { $cmd = 'balance'; } } } if ($client->id) { $keephistory = $client->userpreference('keephistory'); // Default is to keep history if (!$keephistory) { $keephistory = 'keep'; } $client->keephistory($keephistory == 'keep'); setbank(); if (!$client->bankid) { if ($cmd && $cmd != 'logout' && $cmd != 'login' & $cmd != 'bank') { $cmd = 'banks'; } } } elseif ($cmd != 'login' && $cmd != 'register') { $cmd = ''; } if (!$cmd) { draw_login(); } elseif ($cmd == 'logout') { do_logout(); } elseif ($cmd == 'login') { do_login();