member_group_edit.tpl.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. $("#name").formValidator({onshow:"<?php echo L('input').L('groupname')?>",onfocus:"<?php echo L('groupname').L('between_2_to_8')?>"}).inputValidator({min:2,max:15,onerror:"<?php echo L('groupname').L('between_2_to_8')?>"}).regexValidator({regexp:"ps_username",datatype:"enum",onerror:"<?php echo L('groupname').L('format_incorrect')?>"}).ajaxValidator({
  10. type : "get",
  11. url : "",
  12. data :"m=member&c=member_group&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('groupname_already_exist')?>",
  24. onwait : "<?php echo L('connecting_please_wait')?>"
  25. }).defaultPassed();
  26. $("#group_point").formValidator({tipid:"pointtip",onshow:"<?php echo L('input').L('point')?>",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')?>"});
  27. $("#group_starnum").formValidator({tipid:"starnumtip",onshow:"<?php echo L('input').L('starnum')?>",onfocus:"<?php echo L('starnum').L('between_1_to_8_num')?>"}).regexValidator({regexp:"^\\d{1,8}$",onerror:"<?php echo L('starnum').L('between_1_to_8_num')?>"});
  28. $("#maxmessagenum").formValidator({tipid:"maxmessagenumtip",onshow:"<?php echo L('input').L('maxmessagenum')?>",onfocus:"<?php echo L('maxmessagenum').L('between_1_to_8_num')?>"}).regexValidator({regexp:"^\\d{1,8}$",onerror:"<?php echo L('maxmessagenum').L('between_1_to_8_num')?>"});
  29. $("#allowpostnum").formValidator({tipid:"allowpostnumip",onshow:"<?php echo L('input').L('allowpostnum')?>",onfocus:"<?php echo L('allowpostnum').L('between_1_to_8_num')?>"}).regexValidator({regexp:"^\\d{1,8}$",onerror:"<?php echo L('allowpostnum').L('between_1_to_8_num')?>"});
  30. });
  31. //-->
  32. </script>
  33. <div class="pad-10">
  34. <div class="common-form">
  35. <form name="myform" action="?m=member&c=member_group&a=edit" method="post" id="myform">
  36. <input type="hidden" name="info[groupid]"value="<?php echo $groupinfo['groupid']?>">
  37. <fieldset>
  38. <legend><?php echo L('basic_configuration')?></legend>
  39. <table width="100%" class="table_form">
  40. <tr>
  41. <td width="120"><?php echo L('member_group_name')?></td>
  42. <td><?php if(in_array($groupid, array(1,7,8))) { echo $groupinfo['name'];} else {?><input type="text" name="info[name]" class="input-text" id="name" value="<?php echo $groupinfo['name']?>"><?php }?></td>
  43. </tr>
  44. <tr>
  45. <td><?php echo L('member_group_creditrange')?></td>
  46. <td>
  47. <input type="text" name="info[point]" class="input-text" id="group_point" value="<?php echo $groupinfo['point']?>" size="6"></td>
  48. </tr>
  49. <tr>
  50. <td><?php echo L('member_group_starnum')?></td>
  51. <td><input type="text" name="info[starnum]" class="input-text" id="group_starnum" value="<?php echo $groupinfo['starnum']?>" size="6"></td>
  52. </tr>
  53. </table>
  54. </fieldset>
  55. <div class="bk15"></div>
  56. <fieldset>
  57. <legend><?php echo L('more_configuration')?></legend>
  58. <table width="100%" class="table_form">
  59. <tr>
  60. <td><?php echo L('member_group_permission')?></td>
  61. <td>
  62. <span class="ik lf" style="width:120px;">
  63. <input type="checkbox" name="info[allowpost]" <?php if($groupinfo['allowpost']){?>checked<?php }?> />
  64. <?php echo L('member_group_publish')?>
  65. </span>
  66. <span class="ik lf" style="width:120px;">
  67. <input type="checkbox" name="info[allowpostverify]" <?php if($groupinfo['allowpostverify']){?>checked<?php }?>>
  68. <?php echo L('member_group_publish_verify')?>
  69. </span>
  70. <span class="ik lf" style="width:120px;">
  71. <input type="checkbox" name="info[allowupgrade]" <?php if($groupinfo['allowupgrade']){?>checked<?php }?> />
  72. <?php echo L('member_group_upgrade')?>
  73. </span>
  74. <span class="ik lf" style="width:120px;">
  75. <input type="checkbox" name="info[allowsendmessage]" <?php if($groupinfo['allowsendmessage']){?>checked<?php }?>>
  76. <?php echo L('member_group_sendmessage')?>
  77. </span>
  78. <?php
  79. if($groupinfo['groupid']!=8) {?>
  80. <span class="ik lf" style="width:120px;">
  81. <input type="checkbox" name="info[allowattachment]" <?php if($groupinfo['allowattachment']){?>checked<?php }?>>
  82. <?php echo L('allowattachment')?>
  83. </span>
  84. <?php }?>
  85. <span class="ik lf" style="width:120px;">
  86. <input type="checkbox" name="info[allowsearch]" <?php if($groupinfo['allowsearch']){?>checked<?php }?>>
  87. <?php echo L('allowsearch')?>
  88. </span>
  89. </td>
  90. </tr>
  91. <tr>
  92. <td width="80"><?php echo L('member_group_upgradeprice')?></td>
  93. <td>
  94. <span class="ik lf" style="width:120px;">
  95. <?php echo L('member_group_dayprice')?>:
  96. <input type="text" name="info[price_d]" class="input-text" value="<?php echo $groupinfo['price_d']?>" size="6">
  97. </span>
  98. <span class="ik lf" style="width:120px;">
  99. <?php echo L('member_group_monthprice')?>:
  100. <input type="text" name="info[price_m]" class="input-text" value="<?php echo $groupinfo['price_m']?>" size="6">
  101. </span>
  102. <span class="ik lf" style="width:120px;">
  103. <?php echo L('member_group_yearprice')?>:
  104. <input type="text" name="info[price_y]" class="input-text" value="<?php echo $groupinfo['price_y']?>" size="6">
  105. </span>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td width="80"><?php echo L('member_group_maxmessagenum')?></td>
  110. <td><input type="text" name="info[allowmessage]" class="input-text" id="maxmessagenum" value="<?php echo $groupinfo['allowmessage']?>" size="8"></td>
  111. </tr>
  112. <tr>
  113. <td width="80"><?php echo L('member_group_username_color')?></td>
  114. <td><input type="text" name="info[usernamecolor]" class="input-text" id="usernamecolor" size="8" value="<?php echo $groupinfo['usernamecolor']?>" ></td>
  115. </tr>
  116. <tr>
  117. <td width="80"><?php echo L('allowpostnum')?></td>
  118. <td><input type="text" name="info[allowpostnum]" class="input-text" id="allowpostnum" size="8" value="<?php echo $groupinfo['allowpostnum']?>"> <?php echo L('zero_nolimit')?></td>
  119. </tr>
  120. <tr>
  121. <td width="80"><?php echo L('member_group_icon')?></td>
  122. <td><input type="text" name="info[icon]" class="input-text" id="icon" value="<?php echo $groupinfo['icon']?>" size="40"></td>
  123. </tr>
  124. <tr>
  125. <td width="80"><?php echo L('member_group_description')?></td>
  126. <td><input type="text" name="info[description]" class="input-text" value="<?php echo $groupinfo['description']?>" size="60"></td>
  127. </tr>
  128. </table>
  129. </fieldset>
  130. <div class="bk15"></div>
  131. <input name="dosubmit" type="submit" id="dosubmit" value="<?php echo L('submit')?>" class="dialog">
  132. </form>
  133. </div>
  134. </div>
  135. </body>
  136. </html>