mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-30 23:45:59 +00:00
add_user code for AMS
This commit is contained in:
parent
ba675ec0da
commit
2370d95729
2 changed files with 168 additions and 1 deletions
|
@ -37,6 +37,15 @@ function add_user(){
|
||||||
$pageElements['ingame_webpath'] = $INGAME_WEBPATH;
|
$pageElements['ingame_webpath'] = $INGAME_WEBPATH;
|
||||||
helpers :: loadtemplate( 'register_feedback', $pageElements);
|
helpers :: loadtemplate( 'register_feedback', $pageElements);
|
||||||
exit;
|
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{
|
}else{
|
||||||
// pass error and reload template accordingly
|
// pass error and reload template accordingly
|
||||||
$result['prevUsername'] = $_POST["Username"];
|
$result['prevUsername'] = $_POST["Username"];
|
||||||
|
|
|
@ -52,6 +52,164 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"}
|
||||||
|
<div class="alert alert-success">
|
||||||
|
The password has been changed!
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "SHARDOFF"}
|
||||||
|
<div class="alert alert-warning">
|
||||||
|
The password has been changed, though the shard seems offline, it may take some time to see the change on the shard.
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<input type="hidden" name="function" value="change_password">
|
||||||
|
<input type="hidden" name="target_id" value="{$target_id}">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label"></label>
|
||||||
|
<div class="controls">
|
||||||
|
<button type="submit" class="btn btn-primary" style="margin-left:5px; margin-top:10px;">Change Password</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!--/span-->
|
||||||
|
|
||||||
|
|
||||||
|
<div class="box span4">
|
||||||
|
<div class="box-header well" data-original-title="">
|
||||||
|
<h2><i class="icon-th"></i> Add User</h2>
|
||||||
|
<div class="box-icon">
|
||||||
|
<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
|
||||||
|
<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box-content">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<form id="addUser" class="form-vertical" method="post" action="index.php?page=settings&id={$target_id}">
|
||||||
|
<legend>Add User</legend>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Username</label>
|
||||||
|
<div class="controls">
|
||||||
|
<div class="input-prepend">
|
||||||
|
<span style="margin-left:5px;" class="add-on"><i class="icon-user"></i></span>
|
||||||
|
<input type="text" value="Username" placeholder="Username" name="Username" id="Username" class="input-xlarge">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group ">
|
||||||
|
<label class="control-label">Password</label>
|
||||||
|
<div class="controls">
|
||||||
|
<div class="input-prepend">
|
||||||
|
<span style="margin-left:5px;" class="add-on"><i class="icon-lock"></i></span>
|
||||||
|
<input type="password" placeholder="Password" name="Password" id="Password" class="input-xlarge">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group ">
|
||||||
|
<label class="control-label">Confirm Password</label>
|
||||||
|
<div class="controls">
|
||||||
|
<div class="input-prepend">
|
||||||
|
<span style="margin-left:5px;" class="add-on"><i class="icon-lock"></i></span>
|
||||||
|
<input type="password" placeholder="Confirm Password" name="ConfirmPass" id="ConfirmPass" class="input-xlarge">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group ">
|
||||||
|
<label class="control-label">Email</label>
|
||||||
|
<div class="controls">
|
||||||
|
<div class="input-prepend">
|
||||||
|
<span style="margin-left:5px;" class="add-on"><i class="icon-envelope"></i></span>
|
||||||
|
<input type="text" value="Email" placeholder="Email" name="Email" id="Email" class="input-xlarge">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"}
|
||||||
|
<div class="alert alert-success">
|
||||||
|
The user is created!
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "SHARDOFF"}
|
||||||
|
<div class="alert alert-warning">
|
||||||
|
The user can't be created.
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<input type="hidden" name="function" value="add_user">
|
||||||
|
<input type="hidden" name="target_id" value="{$target_id}">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label"></label>
|
||||||
|
<div class="controls">
|
||||||
|
<button type="submit" class="btn btn-primary" style="margin-left:5px; margin-top:10px;">Create User</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!--/span-->
|
||||||
|
|
||||||
|
|
||||||
|
<div class="box span4">
|
||||||
|
<div class="box-header well" data-original-title="">
|
||||||
|
<h2><i class="icon-th"></i> Create User</h2>
|
||||||
|
<div class="box-icon">
|
||||||
|
<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
|
||||||
|
<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box-content">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<form id="changePassword" class="form-vertical" method="post" action="index.php?page=settings&id={$target_id}">
|
||||||
|
<legend>Create User</legend>
|
||||||
|
|
||||||
|
{if !isset($changesOther) or $changesOther eq "FALSE"}
|
||||||
|
<div class="control-group {if isset($MATCH_ERROR) and $MATCH_ERROR eq "TRUE"}error{else if
|
||||||
|
isset($match_error_message) and $match_error_message neq "fail"}success{else}{/if}">
|
||||||
|
<label class="control-label">Create User</label>
|
||||||
|
<div class="controls">
|
||||||
|
<div class="input-prepend">
|
||||||
|
<span class="add-on" style="margin-left:5px;"><i class="icon-lock"></i></span>
|
||||||
|
<input type="password" class="input-xlarge" id="CurrentPass" name="CurrentPass" placeholder="Your current password" {if isset($prevCurrentPass)}value="{$prevCurrentPass}"{/if}>
|
||||||
|
{if isset($MATCH_ERROR) and $MATCH_ERROR eq "TRUE"}<span class="help-inline">The password is incorrect</span>{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
<div class="control-group {if isset($NEWPASSWORD_ERROR) and $NEWPASSWORD_ERROR eq "TRUE"}error{else if
|
||||||
|
isset($newpass_error_message) and $newpass_error_message eq "success"}success{else}{/if}">
|
||||||
|
<label class="control-label">New Password</label>
|
||||||
|
<div class="controls">
|
||||||
|
<div class="input-prepend">
|
||||||
|
<span class="add-on" style="margin-left:5px;"><i class="icon-tag"></i></span>
|
||||||
|
<input type="password" class="input-xlarge" id="NewPass" name="NewPass" placeholder="Your new password" {if isset($prevNewPass)}value="{$prevNewPass}"{/if}>
|
||||||
|
{if isset($NEWPASSWORD_ERROR) and $NEWPASSWORD_ERROR eq "TRUE"}<span class="help-inline">{$newpass_error_message}</span>{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group {if isset($CNEWPASSWORD_ERROR) and $CNEWPASSWORD_ERROR eq "TRUE"}error{else if
|
||||||
|
isset($confirmnewpass_error_message) and $confirmnewpass_error_message eq "success"}success{else}{/if}">
|
||||||
|
<label class="control-label">Confirm New Password</label>
|
||||||
|
<div class="controls">
|
||||||
|
<div class="input-prepend">
|
||||||
|
<span class="add-on" style="margin-left:5px;"><i class="icon-tags"></i></span>
|
||||||
|
<input type="password" class="input-xlarge" id="ConfirmNewPass" name="ConfirmNewPass" placeholder="Re-enter the new password" {if isset($prevConfirmNewPass)}value="{$prevConfirmNewPass}"{/if}>
|
||||||
|
{if isset($CNEWPASSWORD_ERROR) and $CNEWPASSWORD_ERROR eq "TRUE"}<span class="help-inline">{$confirmnewpass_error_message}</span>{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"}
|
{if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"}
|
||||||
<div class="alert alert-success">
|
<div class="alert alert-success">
|
||||||
The password has been changed!
|
The password has been changed!
|
||||||
|
|
Loading…
Reference in a new issue