member_add.tpl.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?php defined('IN_ADMIN') or exit('No permission resources.');?>
  2. <?php include $this->admin_tpl('header', 'admin');?>
  3. <script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>formvalidator.js" charset="UTF-8"></script>
  4. <script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>formvalidatorregex.js" charset="UTF-8"></script>
  5. <script type="text/javascript">
  6. <!--
  7. $(function(){
  8. $.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
  9. $("#username").formValidator({onshow:"<?php echo L('input').L('username')?>",onfocus:"<?php echo L('username').L('between_2_to_20')?>"}).inputValidator({min:2,max:20,onerror:"<?php echo L('username').L('between_2_to_20')?>"}).regexValidator({regexp:"ps_username",datatype:"enum",onerror:"<?php echo L('username').L('format_incorrect')?>"}).ajaxValidator({
  10. type : "get",
  11. url : "",
  12. data :"m=member&c=member&a=public_checkname_ajax",
  13. datatype : "html",
  14. async:'false',
  15. success : function(data){
  16. if( data == "1" ) {
  17. return true;
  18. } else {
  19. return false;
  20. }
  21. },
  22. buttons: $("#dosubmit"),
  23. onerror : "<?php echo L('deny_register').L('or').L('user_already_exist')?>",
  24. onwait : "<?php echo L('connecting_please_wait')?>"
  25. });
  26. $("#password").formValidator({onshow:"<?php echo L('input').L('password')?>",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')?>"});
  27. $("#pwdconfirm").formValidator({onshow:"<?php echo L('input').L('cofirmpwd')?>",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')?>"});
  28. $("#point").formValidator({tipid:"pointtip",onshow:"<?php echo L('input').L('point').L('point_notice')?>",onfocus:"<?php echo L('point').L('between_1_to_8_num')?>"}).regexValidator({regexp:"^\\d{1,8}$",onerror:"<?php echo L('point').L('between_1_to_8_num')?>"});
  29. $("#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')?>"}).inputValidator({min:2,max:32,onerror:"<?php echo L('email').L('between_2_to_32')?>"}).regexValidator({regexp:"email",datatype:"enum",onerror:"<?php echo L('email').L('format_incorrect')?>"}).ajaxValidator({
  30. type : "get",
  31. url : "",
  32. data :"m=member&c=member&a=public_checkemail_ajax",
  33. datatype : "html",
  34. async:'false',
  35. success : function(data){
  36. if( data == "1" ) {
  37. return true;
  38. } else {
  39. return false;
  40. }
  41. },
  42. buttons: $("#dosubmit"),
  43. onerror : "<?php echo L('deny_register').L('or').L('email_already_exist')?>",
  44. onwait : "<?php echo L('connecting_please_wait')?>"
  45. });
  46. $("#nickname").formValidator({onshow:"<?php echo L('input').L('nickname')?>",onfocus:"<?php echo L('nickname').L('between_2_to_20')?>"}).inputValidator({min:2,max:20,onerror:"<?php echo L('nickname').L('between_2_to_20')?>"}).regexValidator({regexp:"ps_username",datatype:"enum",onerror:"<?php echo L('nickname').L('format_incorrect')?>"}).ajaxValidator({
  47. type : "get",
  48. url : "",
  49. data :"m=member&c=index&a=public_checknickname_ajax",
  50. datatype : "html",
  51. async:'false',
  52. success : function(data){
  53. if( data == "1" ) {
  54. return true;
  55. } else {
  56. return false;
  57. }
  58. },
  59. buttons: $("#dosubmit"),
  60. onerror : "<?php echo L('already_exist').L('already_exist')?>",
  61. onwait : "<?php echo L('connecting_please_wait')?>"
  62. }).defaultPassed();
  63. });
  64. //-->
  65. </script>
  66. <div class="pad-10">
  67. <div class="common-form">
  68. <form name="myform" action="?m=member&c=member&a=add" method="post" id="myform">
  69. <fieldset>
  70. <legend><?php echo L('basic_configuration')?></legend>
  71. <table width="100%" class="table_form">
  72. <tr>
  73. <td width="80"><?php echo L('username')?></td>
  74. <td><input type="text" name="info[username]" class="input-text" id="username"></input></td>
  75. </tr>
  76. <tr>
  77. <td><?php echo L('password')?></td>
  78. <td><input type="password" name="info[password]" class="input-text" id="password" value=""></input></td>
  79. </tr>
  80. <tr>
  81. <td><?php echo L('cofirmpwd')?></td>
  82. <td><input type="password" name="info[pwdconfirm]" class="input-text" id="pwdconfirm" value=""></input></td>
  83. </tr>
  84. <tr>
  85. <td><?php echo L('nickname')?></td>
  86. <td><input type="text" name="info[nickname]" id="nickname" value="" class="input-text"></input></td>
  87. </tr>
  88. <tr>
  89. <td><?php echo L('email')?></td>
  90. <td>
  91. <input type="text" name="info[email]" value="" class="input-text" id="email" size="30"></input>
  92. </td>
  93. </tr>
  94. <tr>
  95. <td><?php echo L('mp')?></td>
  96. <td>
  97. <input type="text" name="info[mobile]" value="<?php echo $memberinfo['mobile']?>" class="input-text" id="mobile" size="15"></input>
  98. </td>
  99. </tr>
  100. <tr>
  101. <td><?php echo L('member_group')?></td>
  102. <td>
  103. <?php echo form::select($grouplist, '2', 'name="info[groupid]"', '');?>
  104. </td>
  105. </tr>
  106. <tr>
  107. <td><?php echo L('point')?></td>
  108. <td>
  109. <input type="text" name="info[point]" value="" class="input-text" id="point" size="10"></input>
  110. </td>
  111. </tr>
  112. <tr>
  113. <td><?php echo L('member_model')?></td>
  114. <td>
  115. <?php echo form::select($modellist, '44', 'name="info[modelid]"', '');?>
  116. </td>
  117. </tr>
  118. <tr>
  119. <td><?php echo L('vip')?></td>
  120. <td>
  121. <?php echo L('isvip')?> <input type="checkbox" name="info[vip]" value=1 />
  122. <?php echo L('overduedate')?> <?php echo form::date('info[overduedate]', '', 1)?>
  123. </td>
  124. </tr>
  125. </table>
  126. </fieldset>
  127. <div class="bk15"></div>
  128. <input name="dosubmit" type="submit" id="dosubmit" value="<?php echo L('submit')?>" class="dialog">
  129. </form>
  130. </div>
  131. </div>
  132. </body>
  133. </html>