change password
unknown
php
2 years ago
5.0 kB
2
Indexable
Never
<style> label { color:white; } li { color:black; } </style> <div class="slim-mainpanel card card-body bg-dark"> <div class="container"> <div class="slim-pageheader"> <ol class="breadcrumb slim-breadcrumb"> <li class="breadcrumb-item"><a class="fontHelve" href="#">Home</a></li> <li class="font2 breadcrumb-item active" aria-current="page">CHANGE PASSWORD</li> </ol> </div> <div class="well card card-body bg-dark"> <fieldset style="padding:10px 10px 10px 10px; border:1px gray solid;"> <legend style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size:14px; font-color: black !important; font-weight: bold; padding:10px 10px 10px 10px;"> MANAGE USER </legend> <div class="row"> <div class="form-group form-group-label col-sm-3"> <label class="control-label" for="xx" data-column="xx"> USERNAME <span class="required-mark">*</span> </label> </div> <div class="form-group col-sm-6"> <div class="col-input" style="width:100%;max-width:100%" data-column="xx"> <input id="username" value="<?php echo $username;?>" type="text" class="form-control" READONLY> </div> </div> </div> <div class="row"> <div class="form-group form-group-label col-sm-3"> <label class="control-label" for="xx" data-column="xx"> PASSWORD <span class="required-mark">*</span> </label> </div> <div class="form-group col-sm-6"> <div class="col-input" style="width:100%;max-width:100%" data-column="xx"> <input id="password" name="password" placeholder="XXXXX" value="" type="password" class="form-control" style="border-radius: 15px;" maxlength="100"> </div> </div> </div> <div class="row"> <div class="form-group form-group-label col-sm-3"> <label class="control-label" for="xx" data-column="xx"> RE-TYPE PASSWORD <span class="required-mark">*</span> <label id="password_status" class="badge badge-warning"></label> </label> </div> <div class="form-group col-sm-6"> <div class="col-input" style="width:100%;max-width:100%" data-column="xx"> <input id="retype_password" name="retype_password" placeholder="XXXXX" value="" type="password" class="form-control" style="border-radius: 15px;" maxlength="14"> </div> </div> </div> <div class="col-md-12" align="center"> <div class="col-md-4" align="center"></div> <div class="col-md-4" align="center"> <label id="error" class="badge badge-success"></label> </div> <div class="col-md-4" align="center"></div> </div> <br /> <div class="row"> <div class="form-group form-group-label col-sm-3"> </div> <div class="form-group col-sm-6"> <div class="col-input" style="width:100%;max-width:100%" data-column="xx"> <input type="button" id="change_password" onclick="update_password_user_ajax()" class="btn btn-success" value="UPDATE PASSWORD" style="border-radius: 10px 10px 10px 10px;"> <input type="button" id="change_password" onclick="clear_password_user_ajax()" class="btn btn-danger" value="CLEAR" style="border-radius: 10px 10px 10px 10px;"> <?php $menu6 = 2223; $menu6 = selaktutup($key,$menu6); $menu6 = rawurlencode($menu6); ?> </div> </div> </div> </fieldset> </div> </div> </div> <script> function update_password_user_ajax() { var username = $('#username').val(); var password = $('#password').val(); var retype_password = $('#retype_password').val(); if (password=="" || retype_password=="") { alert("Please check your Password !"); } else { if (password==retype_password) { $.ajax({ url: "ajax_xxx_action.php", //update current password type: "POST", data: { username : username, password : password, retype_password : retype_password, }, success: function (response) { }, error: function(xhr, status, error){ var errorMessage = xhr.status + ': ' + xhr.statusText alert('Error : ' + errorMessage); } }); } else { alert("Password Retype Not Matched !"); } } } </script>