mb_app.edit.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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="JavaScript:void(0);" class="current"><span>下载设置</span></a></li>
  8. <li><a href="index.php?act=mb_app&op=mb_qr"><span>生成二维码</span></a></li>
  9. </ul>
  10. </div>
  11. </div>
  12. <div class="fixed-empty"></div>
  13. <table class="table tb-type2" id="prompt">
  14. <tbody>
  15. <tr class="space odd">
  16. <th colspan="12"><div class="title"><h5><?php echo $lang['nc_prompts'];?></h5><span class="arrow"></span></div></th>
  17. </tr>
  18. <tr>
  19. <td>
  20. <ul>
  21. <li>当前安卓安装包版本用于安卓包在线升级,请保证所填版本号与提供下载的apk文件保持一致</li>
  22. <li>下载地址为完整的网址,以“http://”开头,“生成二维码”中网址为程序自动生成</li>
  23. </ul></td>
  24. </tr>
  25. </tbody>
  26. </table>
  27. <form id="post_form" method="post">
  28. <input type="hidden" name="form_submit" value="ok" />
  29. <table class="table tb-type2">
  30. <tbody>
  31. <tr class="noborder">
  32. <td colspan="2" class="required"><label class="" for="mobile_apk">安卓安装包:</label></td>
  33. </tr>
  34. <tr class="noborder">
  35. <td class="vatop rowform">
  36. <input type="text" name="mobile_apk" id="mobile_apk" value="<?php echo $output['mobile_apk']['value'];?>" class="txt"></td>
  37. <td class="vatop tips"></td>
  38. </tr>
  39. <tr class="noborder">
  40. <td colspan="2" class="required"><label class="" for="mobile_apk">当前安卓安装包版本:</label></td>
  41. </tr>
  42. <tr class="noborder">
  43. <td class="vatop rowform">
  44. <input type="text" name="mobile_apk_version" id="mobile_apk_version" value="<?php echo $output['mobile_version']['value'];?>" class="txt"></td>
  45. <td class="vatop tips"></td>
  46. </tr>
  47. <tr>
  48. <td colspan="2" class="required"><label class="" for="mobile_ios">iOS版:</label></td>
  49. </tr>
  50. <tr class="noborder">
  51. <td class="vatop rowform">
  52. <input type="text" name="mobile_ios" id="mobile_ios" value="<?php echo $output['mobile_ios']['value'];?>" class="txt" >
  53. </td>
  54. <td class="vatop tips"></td>
  55. </tr>
  56. <tr class="noborder">
  57. <td colspan="2" class="required"><label class="" for="mobile_ios">当前IOS安装包版本:</label></td>
  58. </tr>
  59. <tr class="noborder">
  60. <td class="vatop rowform">
  61. <input type="text" name="mobile_ios_version" id="mobile_ios_version" value="<?php echo $output['mobile_ios_version']['value'];?>" class="txt"></td>
  62. <td class="vatop tips"></td>
  63. </tr>
  64. <tr>
  65. <td colspan="2" class="required"><label class="" for="mobile_ios">版本更新提示语:</label></td>
  66. </tr>
  67. <tr class="noborder">
  68. <td class="vatop rowform">
  69. <input type="text" name="mobile_update_tips" id="mobile_update_tips" value="<?php echo $output['mobile_update_tips']['value'];?>" class="txt"></td>
  70. <td class="vatop tips"></td>
  71. </tr>
  72. <tfoot>
  73. <tr class="tfoot">
  74. <td colspan="15"><a href="JavaScript:void(0);" class="btn" id="submitBtn"><span><?php echo $lang['nc_submit'];?></span></a></td>
  75. </tr>
  76. </tfoot>
  77. </table>
  78. </form>
  79. </div>
  80. <script>
  81. //按钮先执行验证再提交表单
  82. $(function(){$("#submitBtn").click(function(){
  83. if($("#post_form").valid()){
  84. $("#post_form").submit();
  85. }
  86. });
  87. });
  88. //
  89. $(document).ready(function()
  90. {
  91. $('#post_form').validate({
  92. errorPlacement: function(error, element){
  93. error.appendTo(element.parent().parent().prev().find('td:first'));
  94. },
  95. rules : {
  96. mobile_apk : {
  97. url : true
  98. },
  99. // mobile_ios : {
  100. // url : true
  101. // }
  102. },
  103. messages : {
  104. mobile_apk : {
  105. url : '链接格式不正确'
  106. },
  107. // mobile_ios : {
  108. // url : '链接格式不正确'
  109. // }
  110. }
  111. });
  112. });
  113. </script>