mobile.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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_message}</h3>
  7. <h5></h5>
  8. </div>
  9. {include file="public/admin_items" /}
  10. </div>
  11. </div>
  12. <form method="post">
  13. <table class="ds-default-table">
  14. <tbody>
  15. <tr>
  16. <td class="required w120">{$Think.lang.smscf_sign}</td>
  17. <td class="vatop rowform">
  18. <input type="text" name="smscf_sign" id="smscf_sign" value="{$list_config.smscf_sign}" class="w200"/>
  19. </td>
  20. <td class="vatop tips">{$Think.lang.smscf_sign_tips}</td>
  21. </tr>
  22. <tr>
  23. <td class="required w120">{$Think.lang.smscf_type}</td>
  24. <td class="vatop rowform">
  25. <select id="smscf_type" name="smscf_type">
  26. <option value="wj" {if $list_config.smscf_type=='wj'}selected{/if}>{$Think.lang.smscf_type_wj}</option>
  27. <option value="ali" {if $list_config.smscf_type=='ali'}selected{/if}>{$Think.lang.smscf_type_ali}</option>
  28. <option value="ten" {if $list_config.smscf_type=='ten'}selected{/if}>{$Think.lang.smscf_type_ten}</option>
  29. <option value="chuanglan" {if $list_config.smscf_type=='chuanglan'}selected{/if}>{$Think.lang.smscf_type_chuanglan}</option>
  30. </select>
  31. </td>
  32. <td class="vatop tips"></td>
  33. </tr>
  34. <tr class="noborder smscf_type_wj" {if $list_config.smscf_type!='wj'}style="display:none"{/if}>
  35. <td class="required w120">{$Think.lang.smscf_wj_username}</td>
  36. <td class="vatop rowform">
  37. <input type="text" name="smscf_wj_username" id="smscf_wj_username" value="{$list_config.smscf_wj_username}" class="w200"/>
  38. </td>
  39. <td class="vatop tips"></td>
  40. </tr>
  41. <tr class="noborder smscf_type_wj" {if $list_config.smscf_type!='wj'}style="display:none"{/if}>
  42. <td class="required w120">{$Think.lang.smscf_wj_key}</td>
  43. <td class="vatop rowform">
  44. <input type="text" name="smscf_wj_key" id="smscf_wj_key" value="{$list_config.smscf_wj_key}" class="w200"/>
  45. <a href="http://sms.webchinese.com.cn/" target="_blank" class="btn btn-blue btn-mini">{$Think.lang.ds_apply}</a>
  46. </td>
  47. <td class="vatop tips"></td>
  48. </tr>
  49. {notempty name='smscf_num'}
  50. <tr class="noborder">
  51. <td class="required w120">{$Think.lang.smscf_num}</td>
  52. <td>{$smscf_num}</td>
  53. <td class="vatop tips"></td>
  54. </tr>
  55. {/notempty}
  56. <tr class="noborder smscf_type_ali" {if $list_config.smscf_type!='ali'}style="display:none"{/if}>
  57. <td class="required w120">{$Think.lang.smscf_ali_id}</td>
  58. <td class="vatop rowform">
  59. <input type="text" name="smscf_ali_id" id="smscf_ali_id" value="{$list_config.smscf_ali_id}" class="w200"/>
  60. <a href="https://www.aliyun.com/product/sms" target="_blank" class="btn btn-blue btn-mini">{$Think.lang.ds_apply}</a>
  61. </td>
  62. <td class="vatop tips"></td>
  63. </tr>
  64. <tr class="noborder smscf_type_ali" {if $list_config.smscf_type!='ali'}style="display:none"{/if}>
  65. <td class="required w120">{$Think.lang.smscf_ali_secret}</td>
  66. <td class="vatop rowform">
  67. <input type="text" name="smscf_ali_secret" id="smscf_ali_secret" value="{$list_config.smscf_ali_secret}" class="w200"/>
  68. </td>
  69. <td class="vatop tips"></td>
  70. </tr>
  71. <tr class="noborder smscf_type_ten" {if $list_config.smscf_type!='ten'}style="display:none"{/if}>
  72. <td class="required w120">{$Think.lang.smscf_ten_id}</td>
  73. <td class="vatop rowform">
  74. <input type="text" name="smscf_ten_id" id="smscf_ten_id" value="{$list_config.smscf_ten_id}" class="w200"/>
  75. <a href="https://cloud.tencent.com/product/sms" target="_blank" class="btn btn-blue btn-mini">{$Think.lang.ds_apply}</a>
  76. </td>
  77. <td class="vatop tips"></td>
  78. </tr>
  79. <tr class="noborder smscf_type_ten" {if $list_config.smscf_type!='ten'}style="display:none"{/if}>
  80. <td class="required w120">{$Think.lang.smscf_ten_secret}</td>
  81. <td class="vatop rowform">
  82. <input type="text" name="smscf_ten_secret" id="smscf_ten_secret" value="{$list_config.smscf_ten_secret}" class="w200"/>
  83. </td>
  84. <td class="vatop tips"></td>
  85. </tr>
  86. <tr class="noborder smscf_type_chuanglan" {if $list_config.smscf_type!='chuanglan'}style="display:none"{/if}>
  87. <td class="required w120">{$Think.lang.smscf_chuanglan_appkey}</td>
  88. <td class="vatop rowform">
  89. <input type="text" name="smscf_chuanglan_appkey" id="smscf_chuanglan_appkey" value="{$list_config.smscf_chuanglan_appkey}" class="w200"/>
  90. <a href="https://www.chuanglan.com/" target="_blank" class="btn btn-blue btn-mini">{$Think.lang.ds_apply}</a>
  91. </td>
  92. <td class="vatop tips"></td>
  93. </tr>
  94. <tr class="noborder smscf_type_chuanglan" {if $list_config.smscf_type!='chuanglan'}style="display:none"{/if}>
  95. <td class="required w120">{$Think.lang.smscf_chuanglan_secret}</td>
  96. <td class="vatop rowform">
  97. <input type="text" name="smscf_chuanglan_secret" id="smscf_chuanglan_secret" value="{$list_config.smscf_chuanglan_secret}" class="w200"/>
  98. </td>
  99. <td class="vatop tips"></td>
  100. </tr>
  101. <tr class="noborder">
  102. <td class="required w120">{$Think.lang.sms_register}</td>
  103. <td class="vatop rowform">
  104. <div class="onoff">
  105. <label for="sms_register_show1" class="cb-enable {if condition="$list_config.sms_register eq 1"}selected{/if}">{$Think.lang.ds_yes}</label>
  106. <label for="sms_register_show0" class="cb-disable {if condition="$list_config.sms_register eq 0"}selected{/if}">{$Think.lang.ds_no}</label>
  107. <input id="sms_register_show1" name="sms_register" value="1" type="radio" {if condition="$list_config.sms_register eq 1"} checked="checked"{/if}>
  108. <input id="sms_register_show0" name="sms_register" value="0" type="radio" {if condition="$list_config.sms_register eq 0"} checked="checked"{/if}>
  109. </div>
  110. </td>
  111. <td class="vatop tips"></td>
  112. </tr>
  113. <tr class="noborder">
  114. <td class="required">{$Think.lang.sms_login}</td>
  115. <td class="vatop rowform">
  116. <div class="onoff">
  117. <label for="sms_login_show1" class="cb-enable {if condition="$list_config.sms_login eq 1"}selected{/if}">{$Think.lang.ds_yes}</label>
  118. <label for="sms_login_show0" class="cb-disable {if condition="$list_config.sms_login eq 0"}selected{/if}">{$Think.lang.ds_no}</label>
  119. <input id="sms_login_show1" name="sms_login" value="1" type="radio" {if condition="$list_config.sms_login eq 1"} checked="checked"{/if}>
  120. <input id="sms_login_show0" name="sms_login" value="0" type="radio" {if condition="$list_config.sms_login eq 0"} checked="checked"{/if}>
  121. </div>
  122. </td>
  123. </tr>
  124. <tr class="noborder">
  125. <td class="required">{$Think.lang.sms_password}</td>
  126. <td class="vatop rowform">
  127. <div class="onoff">
  128. <label for="sms_password_show1" class="cb-enable {if condition="$list_config.sms_password eq 1"}selected{/if}">{$Think.lang.ds_yes}</label>
  129. <label for="sms_password_show0" class="cb-disable {if condition="$list_config.sms_password eq 0"}selected{/if}">{$Think.lang.ds_no}</label>
  130. <input id="sms_password_show1" name="sms_password" value="1" type="radio" {if condition="$list_config.sms_password eq 1"} checked="checked"{/if}>
  131. <input id="sms_password_show0" name="sms_password" value="0" type="radio" {if condition="$list_config.sms_password eq 0"} checked="checked"{/if}>
  132. </div>
  133. </td>
  134. </tr>
  135. <tr class="noborder">
  136. <td class="required w120">{$Think.lang.test_mobile_address}</td>
  137. <td class="vatop rowform">
  138. <input type="text" name="mobile_test" id="mobile_test" value="" class="w200"/>
  139. <input type="button" value="{$Think.lang.test_mail}" name="send_test_mobile" class="btn btn-small" id="send_test_mobile" >
  140. </td>
  141. </tr>
  142. <tr class="noborder smscf_type_ali" {if $list_config.smscf_type!='ali'}style="display:none"{/if}>
  143. <td class="required w120">{$Think.lang.ali_template_code}</td>
  144. <td class="vatop rowform">
  145. <input type="text" name="ali_template_code" id="ali_template_code" value="{$list_config.ali_template_code}" class="w200"/>
  146. </td>
  147. </tr>
  148. <tr class="noborder smscf_type_ali" {if $list_config.smscf_type!='ali'}style="display:none"{/if}>
  149. <td class="required w120">{$Think.lang.ali_template_content}</td>
  150. <td class="vatop rowform">
  151. <textarea name="ali_template_content" id="ali_template_content" class="w200"></textarea>
  152. </td>
  153. <td class="vatop tips"></td>
  154. </tr>
  155. <tr class="noborder smscf_type_ali" {if $list_config.smscf_type!='ali'}style="display:none"{/if}>
  156. <td class="required w120">{$Think.lang.ali_template_param}</td>
  157. <td class="vatop rowform">
  158. <textarea name="ali_template_param" id="ali_template_param" class="w200"></textarea>
  159. </td>
  160. <td class="vatop tips">{$Think.lang.ali_template_param_tips}</td>
  161. </tr>
  162. <tr class="noborder smscf_type_ten" {if $list_config.smscf_type!='ten'}style="display:none"{/if}>
  163. <td class="required w120">{$Think.lang.ten_template_code}</td>
  164. <td class="vatop rowform">
  165. <input type="text" name="ten_template_code" id="ten_template_code" value="" class="w200"/>
  166. </td>
  167. </tr>
  168. <tr class="noborder smscf_type_ten" {if $list_config.smscf_type!='ten'}style="display:none"{/if}>
  169. <td class="required w120">{$Think.lang.ten_template_content}</td>
  170. <td class="vatop rowform">
  171. <textarea name="ten_template_content" id="ten_template_content" class="w200"></textarea>
  172. </td>
  173. <td class="vatop tips"></td>
  174. </tr>
  175. <tr class="noborder smscf_type_ten" {if $list_config.smscf_type!='ten'}style="display:none"{/if}>
  176. <td class="required w120">{$Think.lang.ten_template_param}</td>
  177. <td class="vatop rowform">
  178. <textarea name="ten_template_param" id="ten_template_param" class="w200"></textarea>
  179. </td>
  180. <td class="vatop tips">{$Think.lang.ten_template_param_tips}</td>
  181. </tr>
  182. <tr class="noborder smscf_type_wj" {if $list_config.smscf_type!='wj'}style="display:none"{/if}>
  183. <td class="required w120">{$Think.lang.test_mobile_content}</td>
  184. <td class="vatop rowform">
  185. <textarea name="mobile_test_content" id="mobile_test_content" class="w200"></textarea>
  186. </td>
  187. </tr>
  188. <tr class="noborder smscf_type_chuanglan" {if $list_config.smscf_type!='chuanglan'}style="display:none"{/if}>
  189. <td class="required w120">{$Think.lang.test_mobile_content}</td>
  190. <td class="vatop rowform">
  191. <textarea name="chuanglan_test_content" id="chuanglan_test_content" class="w200"></textarea>
  192. </td>
  193. </tr>
  194. </tbody>
  195. <tfoot>
  196. <tr class="tfoot">
  197. <td></td>
  198. <td colspan="15"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  199. </tr>
  200. </tfoot>
  201. </table>
  202. </form>
  203. </div>
  204. <script>
  205. $(document).ready(function(){
  206. $('#send_test_mobile').click(function(){
  207. $.ajax({
  208. type:'POST',
  209. url:"{:url('Message/mobile_testing')}",
  210. data:{
  211. 'smscf_sign':$('#smscf_sign').val(),
  212. 'smscf_type':$('#smscf_type').val(),
  213. 'smscf_ali_secret':$('#smscf_ali_secret').val(),
  214. 'smscf_ali_id':$('#smscf_ali_id').val(),
  215. 'ali_template_content':$('#ali_template_content').val(),
  216. 'ali_template_param':$('#ali_template_param').val(),
  217. 'ali_template_code':$('#ali_template_code').val(),
  218. 'smscf_ten_secret':$('#smscf_ten_secret').val(),
  219. 'smscf_ten_id':$('#smscf_ten_id').val(),
  220. 'ten_template_content':$('#ten_template_content').val(),
  221. 'ten_template_param':$('#ten_template_param').val(),
  222. 'ten_template_code':$('#ten_template_code').val(),
  223. 'mobile_test_content':$('#mobile_test_content').val(),
  224. 'smscf_wj_username':$('#smscf_wj_username').val(),
  225. 'smscf_wj_key':$('#smscf_wj_key').val(),
  226. 'chuanglan_test_content':$('#chuanglan_test_content').val(),
  227. 'mobile_test':$('#mobile_test').val()
  228. },
  229. error:function(html){
  230. layer.alert('{$Think.lang.ds_common_op_fail}');
  231. },
  232. success:function(html){
  233. if(html.msg){
  234. layer.alert(html.msg);
  235. }
  236. },
  237. dataType:'json'
  238. });
  239. });
  240. $('#smscf_type').change(function(){
  241. if($(this).val()=='wj'){
  242. $('.smscf_type_ali').hide()
  243. $('.smscf_type_wj').show()
  244. $('.smscf_type_ten').hide()
  245. $('.smscf_type_chuanglan').hide()
  246. }
  247. if($(this).val()=='ali'){
  248. $('.smscf_type_ali').show()
  249. $('.smscf_type_wj').hide()
  250. $('.smscf_type_ten').hide()
  251. $('.smscf_type_chuanglan').hide()
  252. }
  253. if($(this).val()=='ten'){
  254. $('.smscf_type_ali').hide()
  255. $('.smscf_type_wj').hide()
  256. $('.smscf_type_ten').show()
  257. $('.smscf_type_chuanglan').hide()
  258. }
  259. if($(this).val()=='chuanglan'){
  260. $('.smscf_type_ali').hide()
  261. $('.smscf_type_wj').hide()
  262. $('.smscf_type_ten').hide()
  263. $('.smscf_type_chuanglan').show()
  264. }
  265. })
  266. });
  267. </script>