voucher.setting.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php defined('InShopNC') or exit('Access Invalid!');?>
  2. <div class="page">
  3. <!-- 页面导航 -->
  4. <div class="fixed-bar">
  5. <div class="item-title">
  6. <h3><?php echo $lang['nc_voucher_price_manage'];?></h3>
  7. <ul class="tab-base">
  8. <?php foreach($output['menu'] as $menu) { if($menu['menu_key'] == $output['menu_key']) { ?>
  9. <li><a href="JavaScript:void(0);" class="current"><span><?php echo $menu['menu_name'];?></span></a></li>
  10. <?php } else { ?>
  11. <li><a href="<?php echo $menu['menu_url'];?>" ><span><?php echo $menu['menu_name'];?></span></a></li>
  12. <?php } } ?>
  13. </ul>
  14. </div>
  15. </div>
  16. <div class="fixed-empty"></div>
  17. <!-- <form id="add_form" method="post" enctype="multipart/form-data" action="index.php?act=voucher&op=setting"> -->
  18. <form id="add_form" method="post" action="index.php?act=voucher&op=setting">
  19. <input type="hidden" id="form_submit" name="form_submit" value="ok"/>
  20. <table class="table tb-type2">
  21. <tbody>
  22. <tr class="noborder">
  23. <td colspan="2" class="required"><label class="validation"><?php echo $lang['admin_voucher_setting_price'].$lang['nc_colon'];?></label></td>
  24. </tr>
  25. <tr class="noborder">
  26. <td class="vatop rowform">
  27. <input type="text" id="promotion_voucher_price" name="promotion_voucher_price" value="<?php echo $output['setting']['promotion_voucher_price'];?>" class="txt">
  28. </td>
  29. <td class="vatop tips"><?php echo $lang['admin_voucher_setting_price_tip'];?></td>
  30. </tr>
  31. <tr class="noborder">
  32. <td colspan="2" class="required"><label class="validation"><?php echo $lang['admin_voucher_setting_storetimes'].$lang['nc_colon'];?></label></td>
  33. </tr>
  34. <tr class="noborder">
  35. <td class="vatop rowform">
  36. <input type="text" id="promotion_voucher_storetimes_limit" name="promotion_voucher_storetimes_limit" value="<?php echo $output['setting']['promotion_voucher_storetimes_limit'];?>" class="txt">
  37. </td>
  38. <td class="vatop tips"><?php echo $lang['admin_voucher_setting_storetimes_tip'];?></td>
  39. </tr>
  40. <tr class="noborder">
  41. <td colspan="2" class="required"><label class="validation"><?php echo $lang['admin_voucher_setting_buyertimes'].$lang['nc_colon'];?></label></td>
  42. </tr>
  43. <tr class="noborder">
  44. <td class="vatop rowform">
  45. <input type="text" id="promotion_voucher_buyertimes_limit" name="promotion_voucher_buyertimes_limit" value="<?php echo $output['setting']['promotion_voucher_buyertimes_limit'];?>" class="txt">
  46. </td>
  47. <td class="vatop tips"><?php echo $lang['admin_voucher_setting_buyertimes_tip'];?></td>
  48. </tr>
  49. </tbody>
  50. <tfoot>
  51. <tr class="tfoot">
  52. <td colspan="15"><a href="JavaScript:void(0);" class="btn" id="submitBtn"><span><?php echo $lang['nc_submit'];?></span></a></td>
  53. </tr>
  54. </tfoot>
  55. </table>
  56. </form>
  57. </div>
  58. <script>
  59. $(document).ready(function(){
  60. $("#submitBtn").click(function(){
  61. $("#add_form").submit();
  62. });
  63. //页面输入内容验证
  64. $("#add_form").validate({
  65. errorPlacement: function(error, element){
  66. error.appendTo(element.parent().parent().prev().find('td:first'));
  67. },
  68. rules : {
  69. promotion_voucher_price: {
  70. required : true,
  71. digits : true,
  72. min : 1
  73. },
  74. promotion_voucher_storetimes_limit: {
  75. required : true,
  76. digits : true,
  77. min : 1
  78. },
  79. promotion_voucher_buyertimes_limit: {
  80. required : true,
  81. digits : true,
  82. min : 1
  83. }
  84. },
  85. messages : {
  86. promotion_voucher_price: {
  87. required : '<?php echo $lang['admin_voucher_setting_price_error'];?>',
  88. digits : '<?php echo $lang['admin_voucher_setting_price_error'];?>',
  89. min : '<?php echo $lang['admin_voucher_setting_price_error'];?>'
  90. },
  91. promotion_voucher_storetimes_limit: {
  92. required : '<?php echo $lang['admin_voucher_setting_storetimes_error'];?>',
  93. digits : '<?php echo $lang['admin_voucher_setting_storetimes_error'];?>',
  94. min : '<?php echo $lang['admin_voucher_setting_storetimes_error'];?>'
  95. },
  96. promotion_voucher_buyertimes_limit: {
  97. required : '<?php echo $lang['admin_voucher_setting_buyertimes_error'];?>',
  98. digits : '<?php echo $lang['admin_voucher_setting_buyertimes_error'];?>',
  99. min : '<?php echo $lang['admin_voucher_setting_buyertimes_error'];?>'
  100. }
  101. }
  102. });
  103. });
  104. </script>