mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-25 02:00:54 +00:00
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;
|
DisplayAccountButtons = true;
|
||||||
CreateAccountURL = "http://shard.ryzomcore.org/ams/index.php?page=register";
|
CreateAccountURL = "http://shard.ryzomcore.org/ams/index.php?page=register";
|
||||||
ConditionsTermsURL = "https://secure.ryzom.com/signup/terms_of_use.php";
|
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";
|
BetaAccountURL = "http://www.ryzom.com/profile";
|
||||||
ForgetPwdURL = "https://secure.ryzom.com/payment_profile/lost_secure_password.php";
|
ForgetPwdURL = "https://secure.ryzom.com/payment_profile/lost_secure_password.php";
|
||||||
FreeTrialURL = "http://www.ryzom.com/join/?freetrial=1";
|
FreeTrialURL = "http://www.ryzom.com/join/?freetrial=1";
|
||||||
|
|
|
@ -22,11 +22,20 @@ function login(){
|
||||||
$user = new WebUsers($_SESSION['id']);
|
$user = new WebUsers($_SESSION['id']);
|
||||||
$_SESSION['Language'] = $user->getLanguage();
|
$_SESSION['Language'] = $user->getLanguage();
|
||||||
|
|
||||||
|
$GETString = "";
|
||||||
|
foreach($_GET as $key => $value){
|
||||||
|
$GETString = $GETString . $key . '=' . $value . "&";
|
||||||
|
}
|
||||||
|
if($GETString != ""){
|
||||||
|
$GETString = '?'.$GETString;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//go back to the index page.
|
//go back to the index page.
|
||||||
if (Helpers::check_if_game_client()) {
|
if (Helpers::check_if_game_client()) {
|
||||||
header( 'Location: '. $INGAME_WEBPATH );
|
header( 'Location: '. $INGAME_WEBPATH . $GETString);
|
||||||
}else{
|
}else{
|
||||||
header( 'Location: '. $WEBPATH );
|
header( 'Location: '. $WEBPATH . $GETString);
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -26,6 +26,14 @@ function login(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$pageElements['ingame_webpath'] = $INGAME_WEBPATH;
|
$pageElements['ingame_webpath'] = $INGAME_WEBPATH;
|
||||||
|
$GETString = "";
|
||||||
|
foreach($_GET as $key => $value){
|
||||||
|
$GETString = $GETString . $key . '=' . $value . "&";
|
||||||
|
}
|
||||||
|
if($GETString != ""){
|
||||||
|
$GETString = '?'.$GETString;
|
||||||
|
}
|
||||||
|
$pageElements['getstring'] = $GETString;
|
||||||
return $pageElements;
|
return $pageElements;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,16 @@ if ( ! isset( $_GET["page"]) ){
|
||||||
$page = 'login';
|
$page = 'login';
|
||||||
}
|
}
|
||||||
}else{
|
}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
|
//check if ingame & page= register
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
{$login_info}
|
{$login_info}
|
||||||
</div>
|
</div>
|
||||||
<form method="post" action="index.php" class="form-horizontal">
|
<form method="post" action="index.php{$getstring}" class="form-horizontal">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<div data-rel="tooltip" class="input-prepend" data-original-title="Username">
|
<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">
|
<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