setting.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. {include file="public/header" /}
  2. <div class="page">
  3. <div class="fixed-bar">
  4. <div class="item-title">
  5. <div class="subject">
  6. <h3>{$Think.lang.ds_points}</h3>
  7. <h5></h5>
  8. </div>
  9. {include file="public/admin_items" /}
  10. </div>
  11. </div>
  12. <form method="post" name="settingForm" id="settingForm">
  13. <table class="ds-default-table">
  14. <thead>
  15. <tr class="space">
  16. <th colspan="16">{$Think.lang.points_ruletip}:</th>
  17. </tr>
  18. <tr class="thead">
  19. <th>{$Think.lang.points_item}</th>
  20. <th>{$Think.lang.points_number}</th>
  21. </tr>
  22. </thead>
  23. <tbody>
  24. <tr class="hover">
  25. <td class="w200">{$Think.lang.points_number_reg}</td>
  26. <td><input id="points_reg" name="points_reg" value="{$list_setting.points_reg}" class="txt" type="text" style="width:60px;"></td>
  27. </tr>
  28. <tr class="hover">
  29. <td>{$Think.lang.points_number_login}</td>
  30. <td><input id="points_login" name="points_login" value="{$list_setting.points_login}" class="txt" type="text" style="width:60px;"></td>
  31. </tr>
  32. <tr class="hover">
  33. <td>{$Think.lang.points_number_comments}</td>
  34. <td><input id="points_comments" name="points_comments" value="{$list_setting.points_comments}" class="txt" type="text" style="width:60px;"></td>
  35. </tr>
  36. <tr class="hover">
  37. <td>{$Think.lang.points_invite}</td>
  38. <td><input id="points_invite" name="points_invite" value="{$list_setting.points_invite}" class="txt" type="text" style="width:60px;">{$Think.lang.points_invite_tips}
  39. </td>
  40. </tr>
  41. <tr class="hover">
  42. <td>{$Think.lang.points_rebate}</td>
  43. <td><input id="points_rebate" name="points_rebate" value="{$list_setting.points_rebate}" class="txt" type="text" style="width:35px;">% &nbsp;&nbsp;&nbsp;{$Think.lang.points_rebate_tips}
  44. </td>
  45. </tr>
  46. </tbody>
  47. </table>
  48. <table class="ds-default-table">
  49. <thead>
  50. <tr class="thead">
  51. <th colspan="2">{$Think.lang.points_number_order}</th>
  52. </tr>
  53. </thead>
  54. <tbody>
  55. <tr class="hover">
  56. <td class="w200">{$Think.lang.points_number_orderrate}</td>
  57. <td><input id="points_orderrate" name="points_orderrate" value="{$list_setting.points_orderrate}" class="txt" type="text" style="width:60px;">
  58. {$Think.lang.points_number_orderrate_tip}
  59. </td>
  60. </tr>
  61. <tr class="hover">
  62. <td>{$Think.lang.points_number_ordermax}</td>
  63. <td><input id="points_ordermax" name="points_ordermax" value="{$list_setting.points_ordermax}" class="txt" type="text" style="width:60px;">
  64. {$Think.lang.points_number_ordermax_tip}
  65. </td>
  66. </tr>
  67. </tbody>
  68. <tfoot>
  69. <tr class="tfoot">
  70. <td colspan="2"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  71. </tr>
  72. </tfoot>
  73. </table>
  74. </form>
  75. </div>
  76. <script>
  77. $(document).ready(function(){
  78. $("#settingForm").validate({
  79. errorPlacement: function(error, element){
  80. error.appendTo(element.parent().parent().find('td:last'));
  81. },
  82. rules : {
  83. points_reg:{
  84. number:true,
  85. min:0
  86. },
  87. points_login :{
  88. number:true,
  89. min:0
  90. },
  91. points_comments :{
  92. number:true,
  93. min:0
  94. },
  95. points_signin :{
  96. number:true,
  97. min:0
  98. },
  99. points_invite :{
  100. number:true,
  101. min:0
  102. },
  103. points_rebate :{
  104. number:true,
  105. min:0
  106. },
  107. points_orderrate :{
  108. number:true,
  109. min:0
  110. },
  111. points_ordermax :{
  112. number:true,
  113. min:0
  114. }
  115. },
  116. messages : {
  117. points_reg:{
  118. number:'{$Think.lang.ds_sort_number}',
  119. min:'{$Think.lang.ds_min_error}0'
  120. },
  121. points_login :{
  122. number:'{$Think.lang.ds_sort_number}',
  123. min:'{$Think.lang.ds_min_error}0'
  124. },
  125. points_comments :{
  126. number:'{$Think.lang.ds_sort_number}',
  127. min:'{$Think.lang.ds_min_error}0'
  128. },
  129. points_signin :{
  130. number:'{$Think.lang.ds_sort_number}',
  131. min:'{$Think.lang.ds_min_error}0'
  132. },
  133. points_invite :{
  134. number:'{$Think.lang.ds_sort_number}',
  135. min:'{$Think.lang.ds_min_error}0'
  136. },
  137. points_rebate :{
  138. number:'{$Think.lang.ds_sort_number}',
  139. min:'{$Think.lang.ds_min_error}0'
  140. },
  141. points_orderrate :{
  142. number:'{$Think.lang.ds_sort_number}',
  143. min:'{$Think.lang.ds_min_error}0'
  144. },
  145. points_ordermax :{
  146. number:'{$Think.lang.ds_sort_number}',
  147. min:'{$Think.lang.ds_min_error}0'
  148. }
  149. }
  150. });
  151. });
  152. </script>