admin_edit_pwd.tpl.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. $show_validator = true;include $this->admin_tpl('header');?>
  4. <script type="text/javascript">
  5. $(document).ready(function() {
  6. $.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
  7. $("#old_password").formValidator({empty:true,onshow:"<?php echo L('not_change_the_password_please_leave_a_blank')?>",onfocus:"<?php echo L('password').L('between_6_to_20')?>",oncorrect:"<?php echo L('old_password_right')?>"}).inputValidator({min:6,max:20,onerror:"<?php echo L('password').L('between_6_to_20')?>"}).ajaxValidator({
  8. type : "get",
  9. url : "",
  10. data :"m=admin&c=admin_manage&a=public_password_ajx",
  11. datatype : "html",
  12. async:'false',
  13. success : function(data){
  14. if( data == "1" )
  15. {
  16. return true;
  17. }
  18. else
  19. {
  20. return false;
  21. }
  22. },
  23. buttons: $("#dosubmit"),
  24. onerror : "<?php echo L('old_password_wrong')?>",
  25. onwait : "<?php echo L('connecting_please_wait')?>"
  26. });
  27. $("#new_password").formValidator({empty:true,onshow:"<?php echo L('not_change_the_password_please_leave_a_blank')?>",onfocus:"<?php echo L('password').L('between_6_to_20')?>"}).inputValidator({min:6,max:20,onerror:"<?php echo L('password').L('between_6_to_20')?>"});
  28. $("#new_pwdconfirm").formValidator({empty:true,onshow:"<?php echo L('not_change_the_password_please_leave_a_blank')?>",onfocus:"<?php echo L('input').L('passwords_not_match')?>",oncorrect:"<?php echo L('passwords_match')?>"}).compareValidator({desid:"new_password",operateor:"=",onerror:"<?php echo L('input').L('passwords_not_match')?>"});
  29. })
  30. </script>
  31. <div class="pad_10">
  32. <div class="common-form">
  33. <form name="myform" action="?m=admin&c=admin_manage&a=public_edit_pwd" method="post" id="myform">
  34. <input type="hidden" name="info[userid]" value="<?php echo $userid?>"></input>
  35. <input type="hidden" name="info[username]" value="<?php echo $username?>"></input>
  36. <table width="100%" class="table_form contentWrap">
  37. <tr>
  38. <td width="80"><?php echo L('username')?></td>
  39. <td><?php echo $username?> (<?php echo L('realname')?> <?php echo $realname?>)</td>
  40. </tr>
  41. <tr>
  42. <td><?php echo L('email')?></td>
  43. <td>
  44. <?php echo $email?>
  45. </td>
  46. </tr>
  47. <tr>
  48. <td><?php echo L('old_password')?></td>
  49. <td><input type="password" name="old_password" id="old_password" class="input-text"></input></td>
  50. </tr>
  51. <tr>
  52. <td><?php echo L('new_password')?></td>
  53. <td><input type="password" name="new_password" id="new_password" class="input-text"></input></td>
  54. </tr>
  55. <tr>
  56. <td><?php echo L('new_pwdconfirm')?></td>
  57. <td><input type="password" name="new_pwdconfirm" id="new_pwdconfirm" class="input-text"></input></td>
  58. </tr>
  59. </table>
  60. <div class="bk15"></div>
  61. <input name="dosubmit" type="submit" value="<?php echo L('submit')?>" class="button" id="dosubmit">
  62. </form>
  63. </div>
  64. </div>
  65. </body>
  66. </html>