3 * User password change tool
6 * @link http://www.open-emr.org
7 * @author Roberto Vasquez <robertogagliotta@gmail.com>
8 * @author Brady Miller <brady.g.miller@gmail.com>
9 * @copyright Copyright (c) 2017 Roberto Vasquez <robertogagliotta@gmail.com>
10 * @copyright Copyright (c) 2017 Brady Miller <brady.g.miller@gmail.com>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE CNU General Public License 3
14 require_once("../globals.php");
15 require_once("$srcdir/auth.inc");
17 use OpenEMR\Core\Header
;
19 if ($GLOBALS['use_active_directory']) {
25 <?php Header
::setupHeader(); ?
>
26 <title
><?php
echo xlt('Change Password'); ?
></title
>
28 <script src
="checkpwd_validation.js" type
="text/javascript"></script
>
30 <script language
='JavaScript'>
31 //Validating password and display message if password field is empty - starts
32 var webroot
='<?php echo $webroot?>';
33 function update_password()
40 $
.post("user_info_ajax.php",
42 curPass
: $
("input[name='curPass']").val(),
43 newPass
: $
("input[name='newPass']").val(),
44 newPass2
: $
("input[name='newPass2']").val(),
48 $
("input[type='password']").val("");
49 $
("#display_msg").html(data
);
58 <body
class="body_top" onload
="document.forms[0].curPass.focus()">
62 $ip=$_SERVER['REMOTE_ADDR'];
63 $res = sqlStatement("select fname,lname,username from users where id=?", array($_SESSION["authId"]));
64 $row = sqlFetchArray($res);
67 <div
class="container">
69 <div
class="col-xs-12">
70 <div
class="page-header">
71 <h3
><?php
echo xlt('Change Password'); ?
></h3
>
76 <div
class="col-xs-12">
77 <div id
="display_msg"></div
>
82 <div
class="col-xs-12">
83 <form method
='post' action
='user_info.php' class='form-horizontal' onsubmit
='return update_password()'>
84 <input type
=hidden name
=secure_pwd value
="<?php echo $GLOBALS['secure_password']; ?>">
85 <div
class="form-group">
86 <label
class='control-label col-sm-2'><?php
echo xlt('Full Name') . ":"; ?
></label
>
87 <div
class="col-sm-10">
88 <p
class="form-control-static"><?php
echo text($iter["fname"]) . " " . text($iter["lname"]) ?
></p
>
91 <div
class="form-group">
92 <label
class='control-label col-sm-2'><?php
echo xlt('User Name') . ":"; ?
></label
>
93 <div
class="col-sm-10">
94 <p
class="form-control-static"><?php
echo text($iter["username"]) ?
></p
>
97 <div
class="form-group">
98 <label
for='curPass' class='control-label col-sm-2'><?php
echo xlt('Current Password') . ":"; ?
></label
>
99 <div
class='col-sm-3'>
100 <input type
='password' class='form-control' name
='curPass' id
='curPass' value
="" autocomplete
='off'>
103 <div
class="form-group">
104 <label
class='control-label col-sm-2'><?php
echo xlt('New Password') . ":"; ?
></label
>
105 <div
class='col-sm-3'>
106 <input type
='password' class='form-control' name
='newPass' value
="" autocomplete
='off'>
109 <div
class="form-group">
110 <label
class='control-label col-sm-2'><?php
echo xlt('Repeat New Password') . ":"; ?
></label
>
111 <div
class='col-sm-3'>
112 <input type
='password' class='form-control' name
=newPass2 value
="" autocomplete
='off'>
115 <div
class="form-group">
116 <div
class='col-sm-offset-2 col-sm-10'>
117 <button type
="Submit" class='btn btn-default btn-save'><?php
echo xlt('Save Changes'); ?
></button
>
129 // da39a3ee5e6b4b0d3255bfef95601890afd80709 == blank