',"\n"; if (stristr($ezin_cfg['admin_buttons_pos'], 'U')) { ezin_admin_password_buttons($message); echo '
',"\n"; } if ($errors > 0) { echo '',"\n"; } echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '
Username',$ezin_user['username'],'
Role',$ezin_user['role_name'],'
Old Password
New Password
New Password (repeat)
',"\n"; if (stristr($ezin_cfg['admin_buttons_pos'], 'D') || ! stristr($ezin_cfg['admin_buttons_pos'], 'U')) { echo '
',"\n"; ezin_admin_password_buttons($message); } echo ''; } /* }}} */ function ezin_admin_password_buttons($message) /* {{{ */ { echo '',"\n"; echo '',"\n"; if (strlen($message)) { echo ''; } echo '
',"\n"; echo ''; echo '',$message,'
',"\n"; } /* }}} */ function ezin_admin_password_save($password_old, $password_new, $password_new2) /* {{{ */ { global $ezin_sys; global $ezin_user; global $ezin_db_handle; $ret = array(); if (strcmp(md5($password_old), $ezin_user['password'])) { $ret[] = 'Old password is incorrect.'; } if (strcmp($password_new, $password_new2)) { $ret[] = 'New passwords do not match.'; } if (strlen($password_new) < 3) { $ret[] = 'New password too short.'; } if (count($ret) == 0) { $query = sprintf('UPDATE %s SET password = "%s" WHERE username = "%s"', $ezin_sys['db']['tables']['users'], md5($password_new), $ezin_user['username']); if (mysqli_query($ezin_db_handle, $query) == false) { $ret[] = 'Database error, password unchanged.'; } } return $ret; } /* }}} */ /* * main stuff */ ezin_check_db_handle(); ezin_admin_password_main(); ezin_close_db_connection(); /* Modeline for ViM {{{ * vim: set ts=4: * vim600: fdm=marker fdl=0 fdc=0: * }}} */ ?>