mb_payment.edit.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <?php defined('InShopNC') or exit('Access Invalid!');?>
  2. <div class="page">
  3. <div class="fixed-bar">
  4. <div class="item-title">
  5. <h3>手机支付</h3>
  6. <ul class="tab-base">
  7. <li><a href="<?php echo urlAdmin('mb_payment', 'payment_list');?>"><span>列表</span></a></li>
  8. <li><a class="current"><span><?php echo $lang['nc_edit'];?></span></a></li>
  9. </ul>
  10. </div>
  11. </div>
  12. <div class="fixed-empty"></div>
  13. <form id="post_form" method="post" name="form1" action="<?php echo urlAdmin('mb_payment', 'payment_save');?>">
  14. <input type="hidden" name="payment_id" value="<?php echo $output['payment']['payment_id'];?>" />
  15. <input type="hidden" name="payment_code" value="<?php echo $output['payment']['payment_code'];?>" />
  16. <table class="table tb-type2 nobdb">
  17. <tbody>
  18. <tr class="noborder">
  19. <td class="vatop rowform"><?php echo $output['payment']['payment_name'];?></td>
  20. <td class="vatop tips"></td>
  21. </tr>
  22. <?php if ($output['payment']['payment_code'] == 'alipay') { ?>
  23. <tr>
  24. <td colspan="2" class="required"><label class="validation">支付宝账号:</label></td>
  25. </tr>
  26. <tr class="noborder">
  27. <td class="vatop rowform">
  28. <input name="alipay_account" id="alipay_account" value="<?php echo $output['payment']['payment_config']['alipay_account'];?>" class="txt" type="text">
  29. </td>
  30. <td class="vatop tips"></td>
  31. </tr>
  32. <tr>
  33. <td colspan="2" class="required"><label class="validation">交易安全校验码(key):</label> </td>
  34. </tr>
  35. <tr class="noborder">
  36. <td class="vatop rowform">
  37. <input name="alipay_key" id="alipay_key" value="<?php echo $output['payment']['payment_config']['alipay_key'];?>" class="txt" type="text">
  38. </td>
  39. <td class="vatop tips"></td>
  40. </tr>
  41. <tr>
  42. <td colspan="2" class="required"><label class="validation">合作者身份(partner ID):</label> </td>
  43. </tr>
  44. <tr class="noborder">
  45. <td class="vatop rowform">
  46. <input name="alipay_partner" id="alipay_partner" value="<?php echo $output['payment']['payment_config']['alipay_partner'];?>" class="txt" type="text">
  47. </td>
  48. <td class="vatop tips"></td>
  49. </tr>
  50. <?php } ?>
  51. <?php if ($output['payment']['payment_code'] == 'wxpay') { ?>
  52. <tr>
  53. <td colspan="2" class="required"><label class="validation">合作者身份(partner ID):</label> </td>
  54. </tr>
  55. <tr class="noborder">
  56. <td class="vatop rowform"><input name="wxpay_partner" id="wxpay_partner" value="<?php echo $output['payment']['payment_config']['wxpay_partner'];?>" class="txt" type="text"></td>
  57. <td class="vatop tips"></td>
  58. </tr>
  59. <tr>
  60. <td colspan="2" class="required"><label class="validation">交易安全校验码(key): </label></td>
  61. </tr>
  62. <tr class="noborder">
  63. <td class="vatop rowform"><input name="wxpay_key" id="wxpay_key" value="<?php echo $output['payment']['payment_config']['wxpay_key'];?>" class="txt" type="text"></td>
  64. <td class="vatop tips"></td>
  65. </tr>
  66. <?php } ?>
  67. <tr>
  68. <td colspan="2" class="required">启用: </td>
  69. </tr>
  70. <tr class="noborder">
  71. <td class="vatop rowform onoff"><label for="payment_state1" class="cb-enable <?php if($output['payment']['payment_state'] == '1'){ ?>selected<?php } ?>" ><span><?php echo $lang['nc_yes'];?></span></label>
  72. <label for="payment_state2" class="cb-disable <?php if($output['payment']['payment_state'] == '0'){ ?>selected<?php } ?>" ><span><?php echo $lang['nc_no'];?></span></label>
  73. <input type="radio" <?php if($output['payment']['payment_state'] == '1'){ ?>checked="checked"<?php }?> value="1" name="payment_state" id="payment_state1">
  74. <input type="radio" <?php if($output['payment']['payment_state'] == '0'){ ?>checked="checked"<?php }?> value="0" name="payment_state" id="payment_state2"></td>
  75. <td class="vatop tips"></td>
  76. </tr>
  77. </tbody>
  78. <tfoot>
  79. <tr class="tfoot">
  80. <td colspan="15"><a href="JavaScript:void(0);" class="btn" id="btn_submit" ><span><?php echo $lang['nc_submit'];?></span></a></td>
  81. </tr>
  82. </tfoot>
  83. </table>
  84. </form>
  85. </div>
  86. <script>
  87. $(document).ready(function(){
  88. $('#post_form').validate({
  89. errorPlacement: function(error, element){
  90. error.appendTo(element.parentsUntil('tr').parent().prev().find('td:first'));
  91. },
  92. <?php if ($output['payment']['payment_code'] == 'alipay') { ?>
  93. rules : {
  94. alipay_account : {
  95. required : true
  96. },
  97. alipay_key : {
  98. required : true
  99. },
  100. alipay_partner : {
  101. required : true
  102. }
  103. },
  104. messages : {
  105. alipay_account : {
  106. required : '支付宝账号不能为空'
  107. },
  108. alipay_key : {
  109. required : '交易安全校验码不能为空'
  110. },
  111. alipay_partner : {
  112. required : '合作者身份不能为空'
  113. }
  114. }
  115. <?php } ?>
  116. <?php if ($output['payment']['payment_code'] == 'wxpay') { ?>
  117. rules : {
  118. wxpay_key : {
  119. required : true
  120. },
  121. wxpay_partner : {
  122. required : true
  123. }
  124. },
  125. messages : {
  126. wxpay_key : {
  127. required : '交易安全校验码不能为空'
  128. },
  129. wxpay_partner : {
  130. required : '合作者身份不能为空'
  131. }
  132. }
  133. <?php } ?>
  134. });
  135. $('#btn_submit').on('click', function() {
  136. $('#post_form').submit();
  137. });
  138. });
  139. </script>