bc166f0cc1714394bc87b6d0fc2b9535.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <?php /*a:3:{s:62:"/data/web/mall.valimart.net/app/admin/view/message/mobile.html";i:1657785098;s:61:"/data/web/mall.valimart.net/app/admin/view/public/header.html";i:1657785098;s:66:"/data/web/mall.valimart.net/app/admin/view/public/admin_items.html";i:1657785098;}*/ ?>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <title><?php echo htmlentities((isset($html_title) && ($html_title !== '')?$html_title:config('ds_config.site_name'))); ?><?php echo htmlentities(lang('system_backend')); ?></title>
  8. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  9. <link rel="stylesheet" href="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/css/admin.css">
  10. <link rel="stylesheet" href="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.css">
  11. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery-2.1.4.min.js"></script>
  12. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.validate.min.js"></script>
  13. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.cookie.js"></script>
  14. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/common.js"></script>
  15. <script src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/js/admin.js"></script>
  16. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.js"></script>
  17. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery.ui.datepicker-zh-CN.js"></script>
  18. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/perfect-scrollbar.min.js"></script>
  19. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/layer/layer.js"></script>
  20. <script type="text/javascript">
  21. var BASESITEROOT = "<?php echo htmlentities(BASE_SITE_ROOT); ?>";
  22. var ADMINSITEROOT = "<?php echo htmlentities(ADMIN_SITE_ROOT); ?>";
  23. var BASESITEURL = "<?php echo htmlentities(BASE_SITE_URL); ?>";
  24. var HOMESITEURL = "<?php echo htmlentities(HOME_SITE_URL); ?>";
  25. var ADMINSITEURL = "<?php echo htmlentities(ADMIN_SITE_URL); ?>";
  26. </script>
  27. </head>
  28. <body>
  29. <div id="append_parent"></div>
  30. <div id="ajaxwaitid"></div>
  31. <div class="page">
  32. <div class="fixed-bar">
  33. <div class="item-title">
  34. <div class="subject">
  35. <h3><?php echo htmlentities(lang('ds_message')); ?></h3>
  36. <h5></h5>
  37. </div>
  38. <?php if($admin_item): ?>
  39. <ul class="tab-base ds-row">
  40. <?php if(is_array($admin_item) || $admin_item instanceof \think\Collection || $admin_item instanceof \think\Paginator): if( count($admin_item)==0 ) : echo "" ;else: foreach($admin_item as $key=>$item): ?>
  41. <li><a href="<?php echo htmlentities($item['url']); ?>" <?php if($item['name'] == $curitem): ?>class="current"<?php endif; ?>><span><?php echo htmlentities($item['text']); ?></span></a></li>
  42. <?php endforeach; endif; else: echo "" ;endif; ?>
  43. </ul>
  44. <?php endif; ?>
  45. </div>
  46. </div>
  47. <form method="post">
  48. <table class="ds-default-table">
  49. <tbody>
  50. <tr>
  51. <td class="required w120"><?php echo htmlentities(lang('smscf_sign')); ?></td>
  52. <td class="vatop rowform">
  53. <input type="text" name="smscf_sign" id="smscf_sign" value="<?php echo htmlentities($list_config['smscf_sign']); ?>" class="w200"/>
  54. </td>
  55. <td class="vatop tips"><?php echo htmlentities(lang('smscf_sign_tips')); ?></td>
  56. </tr>
  57. <tr>
  58. <td class="required w120"><?php echo htmlentities(lang('smscf_type')); ?></td>
  59. <td class="vatop rowform">
  60. <select id="smscf_type" name="smscf_type">
  61. <option value="wj" <?php if($list_config['smscf_type']=='wj'): ?>selected<?php endif; ?>><?php echo htmlentities(lang('smscf_type_wj')); ?></option>
  62. <option value="ali" <?php if($list_config['smscf_type']=='ali'): ?>selected<?php endif; ?>><?php echo htmlentities(lang('smscf_type_ali')); ?></option>
  63. <option value="ten" <?php if($list_config['smscf_type']=='ten'): ?>selected<?php endif; ?>><?php echo htmlentities(lang('smscf_type_ten')); ?></option>
  64. </select>
  65. </td>
  66. <td class="vatop tips"></td>
  67. </tr>
  68. <tr class="noborder smscf_type_wj" <?php if($list_config['smscf_type']!='wj'): ?>style="display:none"<?php endif; ?>>
  69. <td class="required w120"><?php echo htmlentities(lang('smscf_wj_username')); ?></td>
  70. <td class="vatop rowform">
  71. <input type="text" name="smscf_wj_username" id="smscf_wj_username" value="<?php echo htmlentities($list_config['smscf_wj_username']); ?>" class="w200"/>
  72. </td>
  73. <td class="vatop tips"></td>
  74. </tr>
  75. <tr class="noborder smscf_type_wj" <?php if($list_config['smscf_type']!='wj'): ?>style="display:none"<?php endif; ?>>
  76. <td class="required w120"><?php echo htmlentities(lang('smscf_wj_key')); ?></td>
  77. <td class="vatop rowform">
  78. <input type="text" name="smscf_wj_key" id="smscf_wj_key" value="<?php echo htmlentities($list_config['smscf_wj_key']); ?>" class="w200"/>
  79. <a href="http://sms.webchinese.com.cn/" target="_blank" class="btn btn-blue btn-mini"><?php echo htmlentities(lang('ds_apply')); ?></a>
  80. </td>
  81. <td class="vatop tips"></td>
  82. </tr>
  83. <?php if(!(empty($smscf_num) || (($smscf_num instanceof \think\Collection || $smscf_num instanceof \think\Paginator ) && $smscf_num->isEmpty()))): ?>
  84. <tr class="noborder">
  85. <td class="required w120"><?php echo htmlentities(lang('smscf_num')); ?></td>
  86. <td><?php echo htmlentities($smscf_num); ?></td>
  87. <td class="vatop tips"></td>
  88. </tr>
  89. <?php endif; ?>
  90. <tr class="noborder smscf_type_ali" <?php if($list_config['smscf_type']!='ali'): ?>style="display:none"<?php endif; ?>>
  91. <td class="required w120"><?php echo htmlentities(lang('smscf_ali_id')); ?></td>
  92. <td class="vatop rowform">
  93. <input type="text" name="smscf_ali_id" id="smscf_ali_id" value="<?php echo htmlentities($list_config['smscf_ali_id']); ?>" class="w200"/>
  94. <a href="https://www.aliyun.com/product/sms" target="_blank" class="btn btn-blue btn-mini"><?php echo htmlentities(lang('ds_apply')); ?></a>
  95. </td>
  96. <td class="vatop tips"></td>
  97. </tr>
  98. <tr class="noborder smscf_type_ali" <?php if($list_config['smscf_type']!='ali'): ?>style="display:none"<?php endif; ?>>
  99. <td class="required w120"><?php echo htmlentities(lang('smscf_ali_secret')); ?></td>
  100. <td class="vatop rowform">
  101. <input type="text" name="smscf_ali_secret" id="smscf_ali_secret" value="<?php echo htmlentities($list_config['smscf_ali_secret']); ?>" class="w200"/>
  102. </td>
  103. <td class="vatop tips"></td>
  104. </tr>
  105. <tr class="noborder smscf_type_ten" <?php if($list_config['smscf_type']!='ten'): ?>style="display:none"<?php endif; ?>>
  106. <td class="required w120"><?php echo htmlentities(lang('smscf_ten_id')); ?></td>
  107. <td class="vatop rowform">
  108. <input type="text" name="smscf_ten_id" id="smscf_ten_id" value="<?php echo htmlentities($list_config['smscf_ten_id']); ?>" class="w200"/>
  109. <a href="https://cloud.tencent.com/product/sms" target="_blank" class="btn btn-blue btn-mini"><?php echo htmlentities(lang('ds_apply')); ?></a>
  110. </td>
  111. <td class="vatop tips"></td>
  112. </tr>
  113. <tr class="noborder smscf_type_ten" <?php if($list_config['smscf_type']!='ten'): ?>style="display:none"<?php endif; ?>>
  114. <td class="required w120"><?php echo htmlentities(lang('smscf_ten_secret')); ?></td>
  115. <td class="vatop rowform">
  116. <input type="text" name="smscf_ten_secret" id="smscf_ten_secret" value="<?php echo htmlentities($list_config['smscf_ten_secret']); ?>" class="w200"/>
  117. </td>
  118. <td class="vatop tips"></td>
  119. </tr>
  120. <tr class="noborder">
  121. <td class="required w120"><?php echo htmlentities(lang('sms_register')); ?></td>
  122. <td class="vatop rowform">
  123. <div class="onoff">
  124. <label for="sms_register_show1" class="cb-enable <?php if($list_config['sms_register'] == 1): ?>selected<?php endif; ?>"><?php echo htmlentities(lang('ds_yes')); ?></label>
  125. <label for="sms_register_show0" class="cb-disable <?php if($list_config['sms_register'] == 0): ?>selected<?php endif; ?>"><?php echo htmlentities(lang('ds_no')); ?></label>
  126. <input id="sms_register_show1" name="sms_register" value="1" type="radio" <?php if($list_config['sms_register'] == 1): ?> checked="checked"<?php endif; ?>>
  127. <input id="sms_register_show0" name="sms_register" value="0" type="radio" <?php if($list_config['sms_register'] == 0): ?> checked="checked"<?php endif; ?>>
  128. </div>
  129. </td>
  130. <td class="vatop tips"></td>
  131. </tr>
  132. <tr class="noborder">
  133. <td class="required"><?php echo htmlentities(lang('sms_login')); ?></td>
  134. <td class="vatop rowform">
  135. <div class="onoff">
  136. <label for="sms_login_show1" class="cb-enable <?php if($list_config['sms_login'] == 1): ?>selected<?php endif; ?>"><?php echo htmlentities(lang('ds_yes')); ?></label>
  137. <label for="sms_login_show0" class="cb-disable <?php if($list_config['sms_login'] == 0): ?>selected<?php endif; ?>"><?php echo htmlentities(lang('ds_no')); ?></label>
  138. <input id="sms_login_show1" name="sms_login" value="1" type="radio" <?php if($list_config['sms_login'] == 1): ?> checked="checked"<?php endif; ?>>
  139. <input id="sms_login_show0" name="sms_login" value="0" type="radio" <?php if($list_config['sms_login'] == 0): ?> checked="checked"<?php endif; ?>>
  140. </div>
  141. </td>
  142. </tr>
  143. <tr class="noborder">
  144. <td class="required"><?php echo htmlentities(lang('sms_password')); ?></td>
  145. <td class="vatop rowform">
  146. <div class="onoff">
  147. <label for="sms_password_show1" class="cb-enable <?php if($list_config['sms_password'] == 1): ?>selected<?php endif; ?>"><?php echo htmlentities(lang('ds_yes')); ?></label>
  148. <label for="sms_password_show0" class="cb-disable <?php if($list_config['sms_password'] == 0): ?>selected<?php endif; ?>"><?php echo htmlentities(lang('ds_no')); ?></label>
  149. <input id="sms_password_show1" name="sms_password" value="1" type="radio" <?php if($list_config['sms_password'] == 1): ?> checked="checked"<?php endif; ?>>
  150. <input id="sms_password_show0" name="sms_password" value="0" type="radio" <?php if($list_config['sms_password'] == 0): ?> checked="checked"<?php endif; ?>>
  151. </div>
  152. </td>
  153. </tr>
  154. <tr class="noborder">
  155. <td class="required w120"><?php echo htmlentities(lang('test_mobile_address')); ?></td>
  156. <td class="vatop rowform">
  157. <input type="text" name="mobile_test" id="mobile_test" value="" class="w200"/>
  158. <input type="button" value="<?php echo htmlentities(lang('test_mail')); ?>" name="send_test_mobile" class="btn btn-small" id="send_test_mobile" >
  159. </td>
  160. </tr>
  161. <tr class="noborder smscf_type_ali" <?php if($list_config['smscf_type']!='ali'): ?>style="display:none"<?php endif; ?>>
  162. <td class="required w120"><?php echo htmlentities(lang('ali_template_code')); ?></td>
  163. <td class="vatop rowform">
  164. <input type="text" name="ali_template_code" id="ali_template_code" value="" class="w200"/>
  165. </td>
  166. </tr>
  167. <tr class="noborder smscf_type_ali" <?php if($list_config['smscf_type']!='ali'): ?>style="display:none"<?php endif; ?>>
  168. <td class="required w120"><?php echo htmlentities(lang('ali_template_content')); ?></td>
  169. <td class="vatop rowform">
  170. <textarea name="ali_template_content" id="ali_template_content" class="w200"></textarea>
  171. </td>
  172. <td class="vatop tips"></td>
  173. </tr>
  174. <tr class="noborder smscf_type_ali" <?php if($list_config['smscf_type']!='ali'): ?>style="display:none"<?php endif; ?>>
  175. <td class="required w120"><?php echo htmlentities(lang('ali_template_param')); ?></td>
  176. <td class="vatop rowform">
  177. <textarea name="ali_template_param" id="ali_template_param" class="w200"></textarea>
  178. </td>
  179. <td class="vatop tips"><?php echo htmlentities(lang('ali_template_param_tips')); ?></td>
  180. </tr>
  181. <tr class="noborder smscf_type_ten" <?php if($list_config['smscf_type']!='ten'): ?>style="display:none"<?php endif; ?>>
  182. <td class="required w120"><?php echo htmlentities(lang('ten_template_code')); ?></td>
  183. <td class="vatop rowform">
  184. <input type="text" name="ten_template_code" id="ten_template_code" value="" class="w200"/>
  185. </td>
  186. </tr>
  187. <tr class="noborder smscf_type_ten" <?php if($list_config['smscf_type']!='ten'): ?>style="display:none"<?php endif; ?>>
  188. <td class="required w120"><?php echo htmlentities(lang('ten_template_content')); ?></td>
  189. <td class="vatop rowform">
  190. <textarea name="ten_template_content" id="ten_template_content" class="w200"></textarea>
  191. </td>
  192. <td class="vatop tips"></td>
  193. </tr>
  194. <tr class="noborder smscf_type_ten" <?php if($list_config['smscf_type']!='ten'): ?>style="display:none"<?php endif; ?>>
  195. <td class="required w120"><?php echo htmlentities(lang('ten_template_param')); ?></td>
  196. <td class="vatop rowform">
  197. <textarea name="ten_template_param" id="ten_template_param" class="w200"></textarea>
  198. </td>
  199. <td class="vatop tips"><?php echo htmlentities(lang('ten_template_param_tips')); ?></td>
  200. </tr>
  201. <tr class="noborder smscf_type_wj" <?php if($list_config['smscf_type']!='wj'): ?>style="display:none"<?php endif; ?>>
  202. <td class="required w120"><?php echo htmlentities(lang('test_mobile_content')); ?></td>
  203. <td class="vatop rowform">
  204. <textarea name="mobile_test_content" id="mobile_test_content" class="w200"></textarea>
  205. </td>
  206. </tr>
  207. </tbody>
  208. <tfoot>
  209. <tr class="tfoot">
  210. <td></td>
  211. <td colspan="15"><input class="btn" type="submit" value="<?php echo htmlentities(lang('ds_submit')); ?>"/></td>
  212. </tr>
  213. </tfoot>
  214. </table>
  215. </form>
  216. </div>
  217. <script>
  218. $(document).ready(function(){
  219. $('#send_test_mobile').click(function(){
  220. $.ajax({
  221. type:'POST',
  222. url:"<?php echo url('Message/mobile_testing'); ?>",
  223. data:{
  224. 'smscf_sign':$('#smscf_sign').val(),
  225. 'smscf_type':$('#smscf_type').val(),
  226. 'smscf_ali_secret':$('#smscf_ali_secret').val(),
  227. 'smscf_ali_id':$('#smscf_ali_id').val(),
  228. 'ali_template_content':$('#ali_template_content').val(),
  229. 'ali_template_param':$('#ali_template_param').val(),
  230. 'ali_template_code':$('#ali_template_code').val(),
  231. 'smscf_ten_secret':$('#smscf_ten_secret').val(),
  232. 'smscf_ten_id':$('#smscf_ten_id').val(),
  233. 'ten_template_content':$('#ten_template_content').val(),
  234. 'ten_template_param':$('#ten_template_param').val(),
  235. 'ten_template_code':$('#ten_template_code').val(),
  236. 'mobile_test_content':$('#mobile_test_content').val(),
  237. 'smscf_wj_username':$('#smscf_wj_username').val(),
  238. 'smscf_wj_key':$('#smscf_wj_key').val(),
  239. 'mobile_test':$('#mobile_test').val()
  240. },
  241. error:function(html){
  242. layer.alert('<?php echo htmlentities(lang('ds_common_op_fail')); ?>');
  243. },
  244. success:function(html){
  245. if(html.msg){
  246. layer.alert(html.msg);
  247. }
  248. },
  249. dataType:'json'
  250. });
  251. });
  252. $('#smscf_type').change(function(){
  253. if($(this).val()=='wj'){
  254. $('.smscf_type_ali').hide()
  255. $('.smscf_type_wj').show()
  256. $('.smscf_type_ten').hide()
  257. }
  258. if($(this).val()=='ali'){
  259. $('.smscf_type_ali').show()
  260. $('.smscf_type_wj').hide()
  261. $('.smscf_type_ten').hide()
  262. }
  263. if($(this).val()=='ten'){
  264. $('.smscf_type_ali').hide()
  265. $('.smscf_type_wj').hide()
  266. $('.smscf_type_ten').show()
  267. }
  268. })
  269. });
  270. </script>