getLanguage(); $GETString = ""; foreach($_GET as $key => $value){ $GETString = $GETString . $key . '=' . $value . "&"; } if($GETString != ""){ $GETString = '?'.$GETString; } //go back to the index page. header("Cache-Control: max-age=1"); if (Helpers::check_if_game_client()) { header( 'Location: '. $INGAME_WEBPATH . $GETString); }else{ header( 'Location: '. $WEBPATH . $GETString); } throw new SystemExit(); }else{ //handle login failure $result = Array(); $result['login_error'] = 'TRUE'; $result['no_visible_elements'] = 'TRUE'; helpers :: loadtemplate( 'login', $result); throw new SystemExit(); } }catch (PDOException $e) { //go to error page or something, because can't access website db print_r($e); throw new SystemExit(); } }