Made it possible to redirect to a specific page after login in
This commit is contained in:
parent
17233ba735
commit
1376158cb1
5 changed files with 31 additions and 5 deletions
|
@ -325,7 +325,7 @@ CClientConfig::CClientConfig()
|
|||
DisplayAccountButtons = true;
|
||||
CreateAccountURL = "http://shard.ryzomcore.org/ams/index.php?page=register";
|
||||
ConditionsTermsURL = "https://secure.ryzom.com/signup/terms_of_use.php";
|
||||
EditAccountURL = "https://secure.ryzom.com/payment_profile/index.php";
|
||||
EditAccountURL = "http://shard.ryzomcore.org/ams/index.php?page=settings";
|
||||
BetaAccountURL = "http://www.ryzom.com/profile";
|
||||
ForgetPwdURL = "https://secure.ryzom.com/payment_profile/lost_secure_password.php";
|
||||
FreeTrialURL = "http://www.ryzom.com/join/?freetrial=1";
|
||||
|
|
|
@ -21,12 +21,21 @@ function login(){
|
|||
$_SESSION['ticket_user'] = serialize(Ticket_User::constr_ExternId($_SESSION['id']));
|
||||
$user = new WebUsers($_SESSION['id']);
|
||||
$_SESSION['Language'] = $user->getLanguage();
|
||||
|
||||
$GETString = "";
|
||||
foreach($_GET as $key => $value){
|
||||
$GETString = $GETString . $key . '=' . $value . "&";
|
||||
}
|
||||
if($GETString != ""){
|
||||
$GETString = '?'.$GETString;
|
||||
}
|
||||
|
||||
|
||||
//go back to the index page.
|
||||
if (Helpers::check_if_game_client()) {
|
||||
header( 'Location: '. $INGAME_WEBPATH );
|
||||
header( 'Location: '. $INGAME_WEBPATH . $GETString);
|
||||
}else{
|
||||
header( 'Location: '. $WEBPATH );
|
||||
header( 'Location: '. $WEBPATH . $GETString);
|
||||
}
|
||||
exit;
|
||||
}else{
|
||||
|
|
|
@ -26,6 +26,14 @@ function login(){
|
|||
}
|
||||
}
|
||||
$pageElements['ingame_webpath'] = $INGAME_WEBPATH;
|
||||
$GETString = "";
|
||||
foreach($_GET as $key => $value){
|
||||
$GETString = $GETString . $key . '=' . $value . "&";
|
||||
}
|
||||
if($GETString != ""){
|
||||
$GETString = '?'.$GETString;
|
||||
}
|
||||
$pageElements['getstring'] = $GETString;
|
||||
return $pageElements;
|
||||
|
||||
}
|
||||
|
|
|
@ -30,7 +30,16 @@ if ( ! isset( $_GET["page"]) ){
|
|||
$page = 'login';
|
||||
}
|
||||
}else{
|
||||
$page = $_GET["page"];
|
||||
if(isset($_SESSION['user'])){
|
||||
$page = $_GET["page"];
|
||||
}else{
|
||||
if($_GET["page"] == 'register'){
|
||||
$page = 'register';
|
||||
}else{
|
||||
$page = 'login';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//check if ingame & page= register
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<div class="alert alert-info">
|
||||
{$login_info}
|
||||
</div>
|
||||
<form method="post" action="index.php" class="form-horizontal">
|
||||
<form method="post" action="index.php{$getstring}" class="form-horizontal">
|
||||
<fieldset>
|
||||
<div data-rel="tooltip" class="input-prepend" data-original-title="Username">
|
||||
<span class="add-on"><i class="icon-user"></i></span><input type="text" value="" id="Username" name="Username" class="input-large span10" placeholder="Username">
|
||||
|
|
Loading…
Reference in a new issue