From 2370d95729dde9223bf09c8a453cbac198e87c1f Mon Sep 17 00:00:00 2001 From: botanic Date: Sat, 8 Feb 2014 20:15:38 -0800 Subject: [PATCH] add_user code for AMS --- .../ryzom_ams/www/html/func/add_user.php | 11 +- .../ryzom_ams/www/html/templates/settings.tpl | 158 ++++++++++++++++++ 2 files changed, 168 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php b/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php index aad237ae7..fa08ef1a5 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php @@ -37,6 +37,15 @@ function add_user(){ $pageElements['ingame_webpath'] = $INGAME_WEBPATH; helpers :: loadtemplate( 'register_feedback', $pageElements); exit; + }elseif ($_POST['page']=="settings"){ + // pass error and reload template accordingly + $result['prevUsername'] = $_POST["Username"]; + $result['prevPassword'] = $_POST["Password"]; + $result['prevConfirmPass'] = $_POST["ConfirmPass"]; + $result['prevEmail'] = $_POST["Email"]; + $result['no_visible_elements'] = 'TRUE'; + helpers :: loadtemplate( 'settings', $result); + exit; }else{ // pass error and reload template accordingly $result['prevUsername'] = $_POST["Username"]; @@ -44,7 +53,7 @@ function add_user(){ $result['prevConfirmPass'] = $_POST["ConfirmPass"]; $result['prevEmail'] = $_POST["Email"]; $result['no_visible_elements'] = 'TRUE'; - $pageElements['ingame_webpath'] = $INGAME_WEBPATH; + $pageElements['ingame_webpath'] = $INGAME_WEBPATH; helpers :: loadtemplate( 'register', $result); exit; } diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl index 4ea75af12..395071a5b 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl @@ -52,6 +52,164 @@ + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"} +
+ The password has been changed! +
+ {/if} + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "SHARDOFF"} +
+ The password has been changed, though the shard seems offline, it may take some time to see the change on the shard. +
+ {/if} + + + +
+ +
+ +
+
+ + + + + + +
+
+

Add User

+
+ + +
+
+
+
+
+ Add User + +
+ +
+
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"} +
+ The user is created! +
+ {/if} + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "SHARDOFF"} +
+ The user can't be created. +
+ {/if} + + + +
+ +
+ +
+
+
+
+
+
+ + +
+
+

Create User

+
+ + +
+
+
+
+
+ Create User + + {if !isset($changesOther) or $changesOther eq "FALSE"} +
+ +
+
+ + + {if isset($MATCH_ERROR) and $MATCH_ERROR eq "TRUE"}The password is incorrect{/if} +
+
+
+ {/if} +
+ +
+
+ + + {if isset($NEWPASSWORD_ERROR) and $NEWPASSWORD_ERROR eq "TRUE"}{$newpass_error_message}{/if} +
+
+
+ +
+ +
+
+ + + {if isset($CNEWPASSWORD_ERROR) and $CNEWPASSWORD_ERROR eq "TRUE"}{$confirmnewpass_error_message}{/if} +
+
+
+ + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"}
The password has been changed!