admin_edit.tpl.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. $("#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')?>"});
  8. $("#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:"password",operateor:"=",onerror:"<?php echo L('input').L('passwords_not_match')?>"});
  9. $("#email").formValidator({onshow:"<?php echo L('input').L('email')?>",onfocus:"<?php echo L('email').L('format_incorrect')?>",oncorrect:"<?php echo L('email').L('format_right')?>"}).regexValidator({regexp:"email",datatype:"enum",onerror:"<?php echo L('email').L('format_incorrect')?>"});
  10. })
  11. </script>
  12. <div class="pad_10">
  13. <div class="common-form">
  14. <form name="myform" action="?m=admin&c=admin_manage&a=edit" method="post" id="myform">
  15. <input type="hidden" name="info[userid]" value="<?php echo $userid?>"></input>
  16. <input type="hidden" name="info[username]" value="<?php echo $username?>"></input>
  17. <table width="100%" class="table_form contentWrap">
  18. <tr>
  19. <td width="80"><?php echo L('username')?></td>
  20. <td><?php echo $username?></td>
  21. </tr>
  22. <tr>
  23. <td><?php echo L('password')?></td>
  24. <td><input type="password" name="info[password]" id="password" class="input-text"></input></td>
  25. </tr>
  26. <tr>
  27. <td><?php echo L('cofirmpwd')?></td>
  28. <td><input type="password" name="info[pwdconfirm]" id="pwdconfirm" class="input-text"></input></td>
  29. </tr>
  30. <tr>
  31. <td><?php echo L('email')?></td>
  32. <td>
  33. <input type="text" name="info[email]" value="<?php echo $email?>" class="input-text" id="email" size="30"></input>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td><?php echo L('realname')?></td>
  38. <td>
  39. <input type="text" name="info[realname]" value="<?php echo $realname?>" class="input-text" id="realname"></input>
  40. </td>
  41. </tr>
  42. <?php if ($_SESSION['roleid']==1) {?>
  43. <tr>
  44. <td><?php echo L('userinrole')?></td>
  45. <td>
  46. <select name="info[roleid]">
  47. <?php
  48. foreach($roles as $role)
  49. {
  50. ?>
  51. <option value="<?php echo $role['roleid']?>" <?php echo (($role['roleid']==$roleid) ? 'selected' : '')?>><?php echo $role['rolename']?></option>
  52. <?php
  53. }
  54. ?>
  55. </select>
  56. </td>
  57. </tr>
  58. <?php }?>
  59. </table>
  60. <div class="bk15"></div>
  61. <input type="hidden" name="info[admin_manage_code]" value="<?php echo $admin_manage_code?>" id="admin_manage_code"></input>
  62. <input name="dosubmit" type="submit" value="<?php echo L('submit')?>" class="dialog" id="dosubmit">
  63. </form>
  64. </div>
  65. </div>
  66. </body>
  67. </html>