setting.tpl 128 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916
  1. {include file='admin/main.tpl'}
  2. <main class="content">
  3. <div class="content-header ui-content-header">
  4. <div class="container">
  5. <h1 class="content-heading">设置中心</h1>
  6. </div>
  7. </div>
  8. <div class="container">
  9. <div class="col-xx-12 col-sm-12">
  10. <div class="card quickadd">
  11. <div class="card-main">
  12. <div class="card-inner">
  13. <nav class="tab-nav margin-top-no">
  14. <ul class="nav nav-list">
  15. <li class="active">
  16. <a data-toggle="tab" href="#payment_settings"><i class="icon icon-lg">payment</i>&nbsp;支付</a>
  17. </li>
  18. <li>
  19. <a data-toggle="tab" href="#mail_settings"><i class="icon icon-lg">email</i>&nbsp;邮件</a>
  20. </li>
  21. <li>
  22. <a data-toggle="tab" href="#customer_service_system_settings"><i class="icon icon-lg">message</i>&nbsp;客服</a>
  23. </li>
  24. <li>
  25. <a data-toggle="tab" href="#verification_code_settings"><i class="icon icon-lg">verified_user</i>&nbsp;验证</a>
  26. </li>
  27. <li>
  28. <a data-toggle="tab" href="#personalise_settings"><i class="icon icon-lg">color_lens</i>&nbsp;个性化</a>
  29. </li>
  30. <li>
  31. <a data-toggle="tab" href="#registration_settings"><i class="icon icon-lg">group_add</i>&nbsp;注册</a>
  32. </li>
  33. <li>
  34. <a data-toggle="tab" href="#invitation_settings"><i class="icon icon-lg">loyalty</i>&nbsp;邀请</a>
  35. </li>
  36. <li>
  37. <a data-toggle="tab" href="#telegram_settings"><i class="icon icon-lg">send</i>&nbsp;Telegram</a>
  38. </li>
  39. </ul>
  40. </nav>
  41. <div class="card-inner">
  42. <div class="tab-content">
  43. <div class="tab-pane fade" id="mail_settings">
  44. <nav class="tab-nav margin-top-no">
  45. <ul class="nav nav-list">
  46. <li class="active">
  47. <a data-toggle="tab" href="#email_auth_settings"><i class="icon icon-lg">settings</i>&nbsp;设置</a>
  48. </li>
  49. <li>
  50. <a data-toggle="tab" href="#email_backup_settings"><i class="icon icon-lg">backup</i>&nbsp;备份</a>
  51. </li>
  52. <li>
  53. <a data-toggle="tab" href="#smtp"><i class="icon icon-lg">contact_mail</i>&nbsp;smtp</a>
  54. </li>
  55. <li>
  56. <a data-toggle="tab" href="#sendgrid"><i class="icon icon-lg">markunread_mailbox</i>&nbsp;sendgrid</a>
  57. </li>
  58. <li>
  59. <a data-toggle="tab" href="#mailgun"><i class="icon icon-lg">send</i>&nbsp;mailgun</a>
  60. </li>
  61. <li>
  62. <a data-toggle="tab" href="#ses"><i class="icon icon-lg">arrow_forward</i>&nbsp;ses</a>
  63. </li>
  64. </ul>
  65. </nav>
  66. <div class="tab-pane fade active in" id="email_auth_settings">
  67. <!-- mail_driver -->
  68. <div class="form-group form-group-label">
  69. <label class="floating-label">邮件服务</label>
  70. <select id="mail_driver" class="form-control maxwidth-edit">
  71. <option value="none" {if $settings['mail_driver'] == "none"}selected{/if}>none</option>
  72. <option value="mailgun" {if $settings['mail_driver'] == "mailgun"}selected{/if}>mailgun</option>
  73. <option value="sendgrid" {if $settings['mail_driver'] == "sendgrid"}selected{/if}>sendgrid</option>
  74. <option value="ses" {if $settings['mail_driver'] == "ses"}selected{/if}>ses</option>
  75. <option value="smtp" {if $settings['mail_driver'] == "smtp"}selected{/if}>smtp</option>
  76. </select>
  77. </div>
  78. <button id="submit_mail" type="submit" class="btn btn-brand btn-dense">提交</button>
  79. <!-- smtp_test_recipient -->
  80. <div class="form-group form-group-label">
  81. <label class="floating-label">测试邮件收件人</label>
  82. <input class="form-control maxwidth-edit" id="testing_email_recipients">
  83. <p class="form-control-guide"><i class="material-icons">info</i>邮件配置保存完成后,如需验证是否可用,可在上方填写一个有效邮箱,系统将发送一封测试邮件到该邮箱。如果能够正常接收,则说明配置可用</p>
  84. {if $settings['mail_driver'] == "none"}
  85. <p class="form-control-guide"><i class="material-icons">info</i>如需使用发信测试功能,请先在上方选择一个发信方式,并配置有效的相关参数</p>
  86. {/if}
  87. </div>
  88. <button id="submit_email_test" type="submit" class="btn btn-brand btn-dense" {if $settings['mail_driver'] == "none"}disabled{/if}>测试</button>
  89. </div>
  90. <div class="tab-pane fade" id="email_backup_settings">
  91. <p class="form-control-guide"><i class="material-icons">info</i>需添加定时任务:php /this/is/your/website/path/xcat Backup full / simple</p>
  92. <p class="form-control-guide"><i class="material-icons">info</i>full 将整体数据备份;simple 将只备份核心数据</p>
  93. <!-- auto_backup_email -->
  94. <div class="form-group form-group-label">
  95. <label class="floating-label">接收备份的邮箱</label>
  96. <input class="form-control maxwidth-edit" id="auto_backup_email" value="{$settings['auto_backup_email']}">
  97. </div>
  98. <!-- auto_backup_password -->
  99. <div class="form-group form-group-label">
  100. <label class="floating-label">备份的压缩密码</label>
  101. <input class="form-control maxwidth-edit" id="auto_backup_password" value="{$settings['auto_backup_password']}">
  102. <p class="form-control-guide"><i class="material-icons">info</i>留空将不加密备份压缩包</p>
  103. </div>
  104. <!-- auto_backup_notify -->
  105. <div class="form-group form-group-label">
  106. <label class="floating-label">备份是否通知到TG群中</label>
  107. <select id="auto_backup_notify" class="form-control maxwidth-edit">
  108. <option value="0" {if $settings['auto_backup_notify'] == "0"}selected{/if}>关闭</option>
  109. <option value="1" {if $settings['auto_backup_notify'] == "1"}selected{/if}>开启</option>
  110. </select>
  111. </div>
  112. <button id="submit_email_backup" type="submit" class="btn btn-brand btn-dense">提交</button>
  113. </div>
  114. <div class="tab-pane fade" id="smtp">
  115. <!-- smtp_host -->
  116. <div class="form-group form-group-label">
  117. <label class="floating-label">SMTP主机地址</label>
  118. <input class="form-control maxwidth-edit" id="smtp_host" value="{$settings['smtp_host']}">
  119. <p class="form-control-guide"><i class="material-icons">info</i>例如:smtpdm-ap-southeast-1.aliyun.com</p>
  120. </div>
  121. <!-- smtp_username -->
  122. <div class="form-group form-group-label">
  123. <label class="floating-label">SMTP账户名</label>
  124. <input class="form-control maxwidth-edit" id="smtp_username" value="{$settings['smtp_username']}">
  125. <p class="form-control-guide"><i class="material-icons">info</i>例如:[email protected]</p>
  126. </div>
  127. <!-- smtp_password -->
  128. <div class="form-group form-group-label">
  129. <label class="floating-label">SMTP账户密码</label>
  130. <input class="form-control maxwidth-edit" id="smtp_password" value="{$settings['smtp_password']}">
  131. <p class="form-control-guide"><i class="material-icons">info</i>如果你使用 QQ 邮箱或 163 邮箱,此处应当填写单独的授权码</p>
  132. </div>
  133. <!-- smtp_port -->
  134. <div class="form-group form-group-label">
  135. <label class="floating-label">SMTP端口</label>
  136. <select id="smtp_port" class="form-control maxwidth-edit">
  137. <option value="465" {if $settings['smtp_port'] == "465"}selected{/if}>465</option>
  138. <option value="587" {if $settings['smtp_port'] == "587"}selected{/if}>587</option>
  139. <option value="2525" {if $settings['smtp_port'] == "2525"}selected{/if}>2525</option>
  140. <option value="25" {if $settings['smtp_port'] == "25"}selected{/if}>25</option>
  141. </select>
  142. <p class="form-control-guide"><i class="material-icons">info</i>常见端口一般就这些</p>
  143. </div>
  144. <!-- smtp_name -->
  145. <div class="form-group form-group-label">
  146. <label class="floating-label">SMTP发信名称</label>
  147. <input class="form-control maxwidth-edit" id="smtp_name" value="{$settings['smtp_name']}">
  148. <p class="form-control-guide"><i class="material-icons">info</i>这里的设置在邮箱的邮件列表中可见。你可以设置为网站名称</p>
  149. </div>
  150. <!-- smtp_sender -->
  151. <div class="form-group form-group-label">
  152. <label class="floating-label">SMTP账户发信地址</label>
  153. <input class="form-control maxwidth-edit" id="smtp_sender" value="{$settings['smtp_sender']}">
  154. <p class="form-control-guide"><i class="material-icons">info</i>如不知道填什么,请与此项保持一致:SMTP账户名</p>
  155. </div>
  156. <!-- smtp_ssl -->
  157. <div class="form-group form-group-label">
  158. <label class="floating-label">是否使用 TLS/SSL 发信</label>
  159. <select id="smtp_ssl" class="form-control maxwidth-edit">
  160. <option value="1" {if $settings['smtp_ssl'] == true}selected{/if}>开启</option>
  161. <option value="0" {if $settings['smtp_ssl'] == false}selected{/if}>关闭</option>
  162. </select>
  163. </div>
  164. <!-- smtp_bbc -->
  165. <div class="form-group form-group-label">
  166. <label class="floating-label">发给用户的邮件密送给指定邮箱备份</label>
  167. <input class="form-control maxwidth-edit" id="smtp_bbc" value="{$settings['smtp_bbc']}">
  168. <p class="form-control-guide"><i class="material-icons">info</i>如无需使用此功能,请留空</p>
  169. </div>
  170. <button id="submit_smtp" type="submit" class="btn btn-brand btn-dense">提交</button>
  171. </div>
  172. <div class="tab-pane fade" id="sendgrid">
  173. <!-- sendgrid_key -->
  174. <div class="form-group form-group-label">
  175. <label class="floating-label">Sendgrid 密钥</label>
  176. <input class="form-control maxwidth-edit" id="sendgrid_key" value="{$settings['sendgrid_key']}">
  177. </div>
  178. <!-- sendgrid_sender -->
  179. <div class="form-group form-group-label">
  180. <label class="floating-label">Sendgrid 发件邮箱</label>
  181. <input class="form-control maxwidth-edit" id="sendgrid_sender" value="{$settings['sendgrid_sender']}">
  182. </div>
  183. <!-- sendgrid_name -->
  184. <div class="form-group form-group-label">
  185. <label class="floating-label">Sendgrid 发件人名称</label>
  186. <input class="form-control maxwidth-edit" id="sendgrid_name" value="{$settings['sendgrid_name']}">
  187. </div>
  188. <button id="submit_sendgrid" type="submit" class="btn btn-brand btn-dense">提交</button>
  189. </div>
  190. <div class="tab-pane fade" id="mailgun">
  191. <!-- mailgun_key -->
  192. <div class="form-group form-group-label">
  193. <label class="floating-label">Mailgun 密钥</label>
  194. <input class="form-control maxwidth-edit" id="mailgun_key" value="{$settings['mailgun_key']}">
  195. </div>
  196. <!-- mailgun_domain -->
  197. <div class="form-group form-group-label">
  198. <label class="floating-label">Mailgun 域名</label>
  199. <input class="form-control maxwidth-edit" id="mailgun_domain" value="{$settings['mailgun_domain']}">
  200. </div>
  201. <!-- mailgun_sender -->
  202. <div class="form-group form-group-label">
  203. <label class="floating-label">Mailgun 发送者</label>
  204. <input class="form-control maxwidth-edit" id="mailgun_sender" value="{$settings['mailgun_sender']}">
  205. </div>
  206. <button id="submit_mailgun" type="submit" class="btn btn-brand btn-dense">提交</button>
  207. </div>
  208. <div class="tab-pane fade" id="ses">
  209. <!-- aws_access_key_id -->
  210. <div class="form-group form-group-label">
  211. <label class="floating-label">密钥 ID</label>
  212. <input class="form-control maxwidth-edit" id="aws_access_key_id" value="{$settings['aws_access_key_id']}">
  213. </div>
  214. <!-- aws_secret_access_key -->
  215. <div class="form-group form-group-label">
  216. <label class="floating-label">密钥 KEY</label>
  217. <input class="form-control maxwidth-edit" id="aws_secret_access_key" value="{$settings['aws_secret_access_key']}">
  218. </div>
  219. <button id="submit_ses" type="submit" class="btn btn-brand btn-dense">提交</button>
  220. </div>
  221. </div>
  222. <div class="tab-pane fade active in" id="payment_settings">
  223. <nav class="tab-nav margin-top-no">
  224. <ul class="nav nav-list">
  225. <li class="active">
  226. <a data-toggle="tab" href="#public_payment_settings"><i class="icon icon-lg">settings</i>&nbsp;设置</a>
  227. </li>
  228. {foreach $payment_gateways as $key => $value}
  229. <li>
  230. <a data-toggle="tab" href="#{$value}">{$key}</a>
  231. </li>
  232. {/foreach}
  233. </ul>
  234. </nav>
  235. <div class="tab-pane fade active in" id="public_payment_settings">
  236. <!-- payment_gateway
  237. <div class="form-group form-group-label">
  238. <label class="floating-label">支付网关</label>
  239. <select id="payment_gateway" class="form-control maxwidth-edit">
  240. {foreach $payment_gateways as $key => $value}
  241. <option value="{$value}" {if $settings['payment_gateway'] == "{$value}"}selected{/if}>{$key}</option>
  242. {/foreach}
  243. </select>
  244. </div> -->
  245. <div class="form-group form-group-label">
  246. {foreach $payment_gateways as $key => $value}
  247. <div class="checkbox switch">
  248. <label for="{$value}_switch">
  249. <input class="access-hide" type="checkbox" id="{$value}_switch" name="{$value}_switch"
  250. {if in_array($value, $active_payment_gateway)}
  251. checked
  252. {/if}
  253. ><span class="switch-toggle"></span>{$key}
  254. </label>
  255. </div>
  256. {/foreach}
  257. </div>
  258. <button id="submit_payment" type="submit" class="btn btn-block btn-brand">提交</button>
  259. </div>
  260. <div class="tab-pane fade" id="payjs">
  261. <p class="form-control-guide"><i class="material-icons">info</i>此处申请: <a href="https://payjs.cn" target="view_window">https://payjs.cn</a></p>
  262. <!-- payjs_url -->
  263. <div class="form-group form-group-label">
  264. <label class="floating-label">payjs_url</label>
  265. <input class="form-control maxwidth-edit" id="payjs_url" value="{$settings['payjs_url']}">
  266. </div>
  267. <!-- payjs_mchid -->
  268. <div class="form-group form-group-label">
  269. <label class="floating-label">payjs_mchid</label>
  270. <input class="form-control maxwidth-edit" id="payjs_mchid" value="{$settings['payjs_mchid']}">
  271. </div>
  272. <!-- payjs_key -->
  273. <div class="form-group form-group-label">
  274. <label class="floating-label">payjs_key</label>
  275. <input class="form-control maxwidth-edit" id="payjs_key" value="{$settings['payjs_key']}">
  276. </div>
  277. <button id="submit_payjs_pay" type="submit" class="btn btn-block btn-brand">提交</button>
  278. </div>
  279. <div class="tab-pane fade" id="paymentwall">
  280. <p class="form-control-guide"><i class="material-icons">info</i>此处申请: <a href="https://www.paymentwall.com/cn" target="view_window">https://www.paymentwall.com/cn</a></p>
  281. <!-- pmw_publickey -->
  282. <div class="form-group form-group-label">
  283. <label class="floating-label">pmw公钥</label>
  284. <textarea class="form-control maxwidth-edit" id="pmw_publickey" rows="5">{$settings['pmw_publickey']}</textarea>
  285. </div>
  286. <!-- pmw_privatekey -->
  287. <div class="form-group form-group-label">
  288. <label class="floating-label">pmw私钥</label>
  289. <textarea class="form-control maxwidth-edit" id="pmw_privatekey" rows="7">{$settings['pmw_privatekey']}</textarea>
  290. </div>
  291. <!-- pmw_widget -->
  292. <div class="form-group form-group-label">
  293. <label class="floating-label">pmw_widget</label>
  294. <input class="form-control maxwidth-edit" id="pmw_widget" value="{$settings['pmw_widget']}">
  295. </div>
  296. <!-- pmw_height -->
  297. <div class="form-group form-group-label">
  298. <label class="floating-label">pmw_height</label>
  299. <input class="form-control maxwidth-edit" id="pmw_height" value="{$settings['pmw_height']}">
  300. </div>
  301. <button id="submit_paymentwall" type="submit" class="btn btn-block btn-brand">提交</button>
  302. </div>
  303. <div class="tab-pane fade" id="theadpay">
  304. <p class="form-control-guide"><i class="material-icons">info</i>此处申请:<a href="https://theadpay.com" target="view_window">https://theadpay.com</a></p>
  305. <!-- theadpay_url -->
  306. <div class="form-group form-group-label">
  307. <label class="floating-label">theadpay_url</label>
  308. <input class="form-control maxwidth-edit" id="theadpay_url" value="{$settings['theadpay_url']}">
  309. </div>
  310. <!-- theadpay_mchid -->
  311. <div class="form-group form-group-label">
  312. <label class="floating-label">theadpay_mchid</label>
  313. <input class="form-control maxwidth-edit" id="theadpay_mchid" value="{$settings['theadpay_mchid']}">
  314. </div>
  315. <!-- theadpay_key -->
  316. <div class="form-group form-group-label">
  317. <label class="floating-label">theadpay_key</label>
  318. <input class="form-control maxwidth-edit" id="theadpay_key" value="{$settings['theadpay_key']}">
  319. </div>
  320. <button id="submit_theadpay" type="submit" class="btn btn-block btn-brand">提交</button>
  321. </div>
  322. <div class="tab-pane fade" id="stripe_card">
  323. <p class="form-control-guide"><i class="material-icons">warning</i>提供虚拟专用网络业务符合 Stripe 用户协议,但可能不符合 Stripe 提供的部分支付通道(如支付宝、微信)用户协议,相关支付通道可能存在被关闭的风险</p>
  324. <h5>支付渠道</h5>
  325. <!-- stripe_card_select -->
  326. <div class="form-group form-group-label">
  327. <label class="floating-label">银行卡支付</label>
  328. <select id="stripe_card_select" class="form-control maxwidth-edit">
  329. <option value="0">停用</option>
  330. <option value="1" {if $settings['stripe_card'] == true}selected{/if}>
  331. 启用
  332. </option>
  333. </select>
  334. </div>
  335. <h5>支付设置</h5>
  336. <!-- stripe_currency -->
  337. <div class="form-group form-group-label">
  338. <label class="floating-label">货币单位</label>
  339. <input class="form-control maxwidth-edit" id="stripe_currency" value="{$settings['stripe_currency']}">
  340. </div>
  341. <!-- stripe_min_recharge -->
  342. <div class="form-group form-group-label">
  343. <label class="floating-label">最低充值限额(整数)</label>
  344. <input class="form-control maxwidth-edit" id="stripe_min_recharge" value="{$settings['stripe_min_recharge']}">
  345. </div>
  346. <!-- stripe_max_recharge -->
  347. <div class="form-group form-group-label">
  348. <label class="floating-label">最高充值限额(整数)</label>
  349. <input class="form-control maxwidth-edit" id="stripe_max_recharge" value="{$settings['stripe_max_recharge']}">
  350. </div>
  351. <!-- stripe_pk -->
  352. <div class="form-group form-group-label">
  353. <label class="floating-label">stripe_pk</label>
  354. <input class="form-control maxwidth-edit" id="stripe_pk" value="{$settings['stripe_pk']}">
  355. </div>
  356. <!-- stripe_sk -->
  357. <div class="form-group form-group-label">
  358. <label class="floating-label">stripe_sk</label>
  359. <input class="form-control maxwidth-edit" id="stripe_sk" value="{$settings['stripe_sk']}">
  360. </div>
  361. <!-- stripe_webhook_key -->
  362. <div class="form-group form-group-label">
  363. <label class="floating-label">WebHook密钥</label>
  364. <input class="form-control maxwidth-edit" id="stripe_webhook_key" value="{$settings['stripe_webhook_key']}">
  365. </div>
  366. <button id="submit_stripe" type="submit" class="btn btn-block btn-brand">提交</button>
  367. </div>
  368. <div class="tab-pane fade" id="vmqpay">
  369. <p class="form-control-guide"><i class="material-icons">info</i>此支付方式需自建网关并配置各项参数。访问 <a href="https://github.com/szvone/vmqphp" target="view_window">https://github.com/szvone/vmqphp</a> 了解更多</p>
  370. <p class="form-control-guide"><i class="material-icons">info</i>开源的 Android 监听端(推荐):<a href="https://gitee.com/yuniks/VMQAPK" target="view_window">https://gitee.com/yuniks/VMQAPK</a></p>
  371. <p class="form-control-guide"><i class="material-icons">info</i>不开源的 Windows 监听端(不推荐):<a href="https://toscode.gitee.com/pmhw/Vpay" target="view_window">https://toscode.gitee.com/pmhw/Vpay</a></p>
  372. <!-- vmq_gateway -->
  373. <div class="form-group form-group-label">
  374. <label class="floating-label">V免签网关</label>
  375. <input class="form-control maxwidth-edit" id="vmq_gateway" value="{$settings['vmq_gateway']}">
  376. <p class="form-control-guide"><i class="material-icons">info</i>形如:https://pay.com</p>
  377. </div>
  378. <!-- vmq_key -->
  379. <div class="form-group form-group-label">
  380. <label class="floating-label">V免签密钥</label>
  381. <input class="form-control maxwidth-edit" id="vmq_key" value="{$settings['vmq_key']}">
  382. </div>
  383. <button id="submit_vmq_pay" type="submit" class="btn btn-block btn-brand">提交</button>
  384. </div>
  385. <div class="tab-pane fade" id="f2fpay">
  386. <p class="form-control-guide"><i class="material-icons">info</i>此处申请: <a href="https://b.alipay.com/signing/productDetailV2.htm?productId=I1011000290000001003" target="view_window">https://b.alipay.com/signing/productDetailV2.htm?productId=I1011000290000001003</a></p>
  387. <!-- f2f_pay_app_id -->
  388. <div class="form-group form-group-label">
  389. <label class="floating-label">App ID</label>
  390. <input class="form-control maxwidth-edit" id="f2f_pay_app_id" value="{$settings['f2f_pay_app_id']}">
  391. </div>
  392. <!-- f2f_pay_pid -->
  393. <div class="form-group form-group-label">
  394. <label class="floating-label">PID</label>
  395. <input class="form-control maxwidth-edit" id="f2f_pay_pid" value="{$settings['f2f_pay_pid']}">
  396. <p class="form-control-guide"><i class="material-icons">info</i>此项可留空,不影响使用</p>
  397. </div>
  398. <!-- f2f_pay_public_key -->
  399. <div class="form-group form-group-label">
  400. <label class="floating-label">公钥</label>
  401. <textarea class="form-control maxwidth-edit" id="f2f_pay_public_key" rows="4">{$settings['f2f_pay_public_key']}</textarea>
  402. </div>
  403. <!-- f2f_pay_private_key -->
  404. <div class="form-group form-group-label">
  405. <label class="floating-label">私钥</label>
  406. <textarea class="form-control maxwidth-edit" id="f2f_pay_private_key" rows="12">{$settings['f2f_pay_private_key']}</textarea>
  407. </div>
  408. <!-- f2f_pay_notify_url -->
  409. <div class="form-group form-group-label">
  410. <label class="floating-label">自定义回调地址</label>
  411. <input class="form-control maxwidth-edit" id="f2f_pay_notify_url" value="{$settings['f2f_pay_notify_url']}">
  412. <p class="form-control-guide"><i class="material-icons">info</i>此项可留空,不影响使用</p>
  413. </div>
  414. <button id="submit_f2f_pay" type="submit" class="btn btn-block btn-brand">提交</button>
  415. </div>
  416. <div class="tab-pane fade" id="epay">
  417. <p class="form-control-guide"><i class="material-icons">info</i> SSPanel-UIM Dev Team提醒您注意:易支付商家经常跑路!造成的损失由您自行承担</p>
  418. <!-- epay_url -->
  419. <div class="form-group form-group-label">
  420. <label class="floating-label">易支付URL</label>
  421. <input class="form-control maxwidth-edit" id="epay_url" value="{$settings['epay_url']}">
  422. <p class="form-control-guide"><i class="material-icons">info</i>不同易支付url后缀不同,1:域名后面带/ 2:域名后面带submit.php/</p>
  423. </div>
  424. <!-- epay_pid -->
  425. <div class="form-group form-group-label">
  426. <label class="floating-label">商户ID</label>
  427. <input class="form-control maxwidth-edit" id="epay_pid" value="{$settings['epay_pid']}">
  428. <p class="form-control-guide"><i class="material-icons">info</i>必填</p>
  429. </div>
  430. <!-- epay_key -->
  431. <div class="form-group form-group-label">
  432. <label class="floating-label">商户Key</label>
  433. <input class="form-control maxwidth-edit" id="epay_key" value="{$settings['epay_key']}">
  434. <p class="form-control-guide"><i class="material-icons">info</i>必填</p>
  435. </div>
  436. <button id="submit_e_pay" type="submit" class="btn btn-block btn-brand">提交</button>
  437. </div>
  438. </div>
  439. <div class="tab-pane fade" id="customer_service_system_settings">
  440. <nav class="tab-nav margin-top-no">
  441. <ul class="nav nav-list">
  442. <li class="active">
  443. <a data-toggle="tab" href="#web_customer_service_system"><i class="icon icon-lg">settings</i>&nbsp;网页客服</a>
  444. </li>
  445. <li>
  446. <a data-toggle="tab" href="#admin_contact"><i class="icon icon-lg">call</i>&nbsp;联系站长</a>
  447. </li>
  448. </ul>
  449. </nav>
  450. <div class="tab-pane fade active in" id="web_customer_service_system">
  451. <!-- live_chat -->
  452. <div class="form-group form-group-label">
  453. <label class="floating-label">网页客服系统</label>
  454. <select id="live_chat" class="form-control maxwidth-edit">
  455. <option value="none" {if $settings['live_chat'] == "none"}selected{/if}>不启用</option>
  456. <option value="tawk" {if $settings['live_chat'] == "tawk"}selected{/if}>Tawk</option>
  457. <option value="crisp" {if $settings['live_chat'] == "crisp"}selected{/if}>Crisp</option>
  458. <option value="livechat" {if $settings['live_chat'] == "livechat"}selected{/if}>LiveChat</option>
  459. <option value="mylivechat" {if $settings['live_chat'] == "mylivechat"}selected{/if}>MyLiveChat</option>
  460. </select>
  461. <p class="form-control-guide"><i class="material-icons">info</i>目前仅 Crisp 与 LiveChat 支持在聊天时传递用户部分账户信息(如账户余额、到期时间、已用流量和剩余流量等)</p>
  462. </div>
  463. <!-- tawk_id -->
  464. <div class="form-group form-group-label">
  465. <label class="floating-label">Tawk</label>
  466. <input class="form-control maxwidth-edit" id="tawk_id" value="{$settings['tawk_id']}">
  467. <p class="form-control-guide"><i class="material-icons">info</i>在 <a href="https://tawk.to" target="view_window">https://tawk.to</a> 申请,这应该是 24 位字符</p>
  468. </div>
  469. <!-- crisp_id -->
  470. <div class="form-group form-group-label">
  471. <label class="floating-label">Crisp</label>
  472. <input class="form-control maxwidth-edit" id="crisp_id" value="{$settings['crisp_id']}">
  473. <p class="form-control-guide"><i class="material-icons">info</i>在 <a href="https://crisp.chat/en" target="view_window">https://crisp.chat/en</a> 申请,这应该是一个 UUID</p>
  474. </div>
  475. <!-- livechat_id -->
  476. <div class="form-group form-group-label">
  477. <label class="floating-label">LiveChat</label>
  478. <input class="form-control maxwidth-edit" id="livechat_id" value="{$settings['livechat_id']}">
  479. <p class="form-control-guide"><i class="material-icons">info</i>在 <a href="https://www.livechat.com/cn" target="view_window">https://www.livechat.com/cn</a> 申请,这应该是 8 位数字</p>
  480. </div>
  481. <!-- mylivechat_id -->
  482. <div class="form-group form-group-label">
  483. <label class="floating-label">MyLiveChat</label>
  484. <input class="form-control maxwidth-edit" id="mylivechat_id" value="{$settings['mylivechat_id']}">
  485. <p class="form-control-guide"><i class="material-icons">info</i>在 <a href="https://www.mylivechat.com" target="view_window">https://www.mylivechat.com</a> 申请,这个我不知道</p>
  486. </div>
  487. <button id="submit_web_customer_service_system" type="submit" class="btn btn-block btn-brand">提交</button>
  488. </div>
  489. <div class="tab-pane fade" id="admin_contact">
  490. <p class="form-control-guide"><i class="material-icons">info</i>注意:留空的联系方式将不显示</p>
  491. <p class="form-control-guide"><i class="material-icons">info</i>支持使用 HTML 标签。你可以通过配置 a 标签,达到点击即可唤起对应app会话窗口的效果</p>
  492. <p class="form-control-guide"><i class="material-icons">info</i>若开启此功能,此页面展示的联系方式将显示在:</p>
  493. <p class="form-control-guide"><i class="material-icons">info</i>1. 注册或重置密码页面点击【无法收到验证码】按钮</p>
  494. <p class="form-control-guide"><i class="material-icons">info</i>2. 用户账户被停用的告知页面</p>
  495. <p class="form-control-guide"><i class="material-icons">info</i>3. 充值页面提示充值未到账的用户</p>
  496. <p class="form-control-guide"><i class="material-icons">info</i>4. 用户中心首页公告栏下方</p>
  497. <!-- enable_admin_contact -->
  498. <div class="form-group form-group-label">
  499. <label class="floating-label">是否显示站长联系方式</label>
  500. <select id="enable_admin_contact" class="form-control maxwidth-edit">
  501. <option value="0" {if $settings['enable_admin_contact'] == false}selected{/if}>关闭</option>
  502. <option value="1" {if $settings['enable_admin_contact'] == true}selected{/if}>开启</option>
  503. </select>
  504. </div>
  505. <!-- admin_contact1 -->
  506. <div class="form-group form-group-label">
  507. <label class="floating-label">站长联系方式一</label>
  508. <input class="form-control maxwidth-edit" id="admin_contact1" value="{htmlspecialchars($settings['admin_contact1'])}">
  509. </div>
  510. <!-- admin_contact2 -->
  511. <div class="form-group form-group-label">
  512. <label class="floating-label">站长联系方式二</label>
  513. <input class="form-control maxwidth-edit" id="admin_contact2" value="{htmlspecialchars($settings['admin_contact2'])}">
  514. </div>
  515. <!-- admin_contact3 -->
  516. <div class="form-group form-group-label">
  517. <label class="floating-label">站长联系方式三</label>
  518. <input class="form-control maxwidth-edit" id="admin_contact3" value="{htmlspecialchars($settings['admin_contact3'])}">
  519. </div>
  520. <button id="submit_admin_contact" type="submit" class="btn btn-block btn-brand">提交</button>
  521. </div>
  522. </div>
  523. <div class="tab-pane fade" id="verification_code_settings">
  524. <nav class="tab-nav margin-top-no">
  525. <ul class="nav nav-list">
  526. <li class="active">
  527. <a data-toggle="tab" href="#verification_code_public_settings"><i class="icon icon-lg">settings</i>&nbsp;设置</a>
  528. </li>
  529. <li>
  530. <a data-toggle="tab" href="#recaptcha"><i class="icon icon-lg">face</i>&nbsp;reCAPTCHA</a>
  531. </li>
  532. <li>
  533. <a data-toggle="tab" href="#geetest"><i class="icon icon-lg">extension</i>&nbsp;Geetest</a>
  534. </li>
  535. </ul>
  536. </nav>
  537. <div class="tab-pane fade active in" id="verification_code_public_settings">
  538. <!-- captcha_provider -->
  539. <div class="form-group form-group-label">
  540. <label class="floating-label">验证码提供商</label>
  541. <select id="captcha_provider" class="form-control maxwidth-edit">
  542. <option value="recaptcha" {if $settings['captcha_provider'] == "recaptcha"}selected{/if}>reCaptcha</option>
  543. <option value="geetest" {if $settings['captcha_provider'] == "geetest"}selected{/if}>Geetest</option>
  544. </select>
  545. </div>
  546. <!-- enable_reg_captcha -->
  547. <div class="form-group form-group-label">
  548. <label class="floating-label">注册验证码</label>
  549. <select id="enable_reg_captcha" class="form-control maxwidth-edit">
  550. <option value="0" {if $settings['enable_reg_captcha'] == false}selected{/if}>关闭</option>
  551. <option value="1" {if $settings['enable_reg_captcha'] == true}selected{/if}>开启</option>
  552. </select>
  553. </div>
  554. <!-- enable_login_captcha -->
  555. <div class="form-group form-group-label">
  556. <label class="floating-label">登录验证码</label>
  557. <select id="enable_login_captcha" class="form-control maxwidth-edit">
  558. <option value="0" {if $settings['enable_login_captcha'] == false}selected{/if}>关闭</option>
  559. <option value="1" {if $settings['enable_login_captcha'] == true}selected{/if}>开启</option>
  560. </select>
  561. </div>
  562. <!-- enable_checkin_captcha -->
  563. <div class="form-group form-group-label">
  564. <label class="floating-label">签到验证码</label>
  565. <select id="enable_checkin_captcha" class="form-control maxwidth-edit">
  566. <option value="0" {if $settings['enable_checkin_captcha'] == false}selected{/if}>关闭</option>
  567. <option value="1" {if $settings['enable_checkin_captcha'] == true}selected{/if}>开启</option>
  568. </select>
  569. </div>
  570. <button id="submit_verify_code" type="submit" class="btn btn-block btn-brand">提交</button>
  571. </div>
  572. <div class="tab-pane fade" id="recaptcha">
  573. <p class="form-control-guide"><i class="material-icons">info</i>在 <a href="https://www.google.com/recaptcha/admin/create" target="view_window">https://www.google.com/recaptcha/admin/create</a> 申请,选择【reCAPTCHA 第 2 版】的子选项【进行人机身份验证复选框】</p>
  574. <!-- recaptcha_sitekey -->
  575. <div class="form-group form-group-label">
  576. <label class="floating-label">reCaptcha Site Key</label>
  577. <input class="form-control maxwidth-edit" id="recaptcha_sitekey" value="{$settings['recaptcha_sitekey']}">
  578. </div>
  579. <!-- recaptcha_secret -->
  580. <div class="form-group form-group-label">
  581. <label class="floating-label">reCaptcha Secret</label>
  582. <input class="form-control maxwidth-edit" id="recaptcha_secret" value="{$settings['recaptcha_secret']}">
  583. </div>
  584. <button id="submit_recaptcha" type="submit" class="btn btn-block btn-brand">提交</button>
  585. </div>
  586. <div class="tab-pane fade" id="geetest">
  587. <p class="form-control-guide"><i class="material-icons">info</i>在 <a href="https://gtaccount.geetest.com/sensebot/overview" target="view_window">https://gtaccount.geetest.com/sensebot/overview</a> 申请</p>
  588. <!-- geetest_id -->
  589. <div class="form-group form-group-label">
  590. <label class="floating-label">Geetest ID</label>
  591. <input class="form-control maxwidth-edit" id="geetest_id" value="{$settings['geetest_id']}">
  592. </div>
  593. <!-- geetest_key -->
  594. <div class="form-group form-group-label">
  595. <label class="floating-label">Geetest Key</label>
  596. <input class="form-control maxwidth-edit" id="geetest_key" value="{$settings['geetest_key']}">
  597. </div>
  598. <button id="submit_geetest" type="submit" class="btn btn-block btn-brand">提交</button>
  599. </div>
  600. </div>
  601. <div class="tab-pane fade" id="personalise_settings">
  602. <nav class="tab-nav margin-top-no">
  603. <ul class="nav nav-list">
  604. <li class="active">
  605. <a data-toggle="tab" href="#custom_background_image"><i class="icon icon-lg">image</i>&nbsp;背景图像</a>
  606. </li>
  607. </ul>
  608. </nav>
  609. <div class="tab-pane fade active in" id="custom_background_image">
  610. <p class="form-control-guide"><i class="material-icons">info</i>默认背景图片地址:/theme/material/css/images/bg/amber.jpg <a href="/theme/material/css/images/bg/amber.jpg">预览</a></p>
  611. <p class="form-control-guide"><i class="material-icons">info</i>自带背景图片一地址:/theme/material/css/images/bg/streak.jpg <a href="/theme/material/css/images/bg/streak.jpg">预览</a></p>
  612. <p class="form-control-guide"><i class="material-icons">info</i>自带背景图片二地址:/theme/material/css/images/bg/geometry.jpg <a href="/theme/material/css/images/bg/geometry.jpg">预览</a></p>
  613. <p class="form-control-guide"><i class="material-icons">info</i>如需自定义,图片地址可以指向 public 目录或图床图片地址</p>
  614. <!-- user_center_bg -->
  615. <div class="form-group form-group-label">
  616. <label class="floating-label">是否启用自定义用户中心背景图片</label>
  617. <select id="user_center_bg" class="form-control maxwidth-edit">
  618. <option value="0" {if $settings['user_center_bg'] == false}selected{/if}>关闭</option>
  619. <option value="1" {if $settings['user_center_bg'] == true}selected{/if}>开启</option>
  620. </select>
  621. </div>
  622. <!-- admin_center_bg -->
  623. <div class="form-group form-group-label">
  624. <label class="floating-label">是否启用自定义管理中心背景图片</label>
  625. <select id="admin_center_bg" class="form-control maxwidth-edit">
  626. <option value="0" {if $settings['admin_center_bg'] == false}selected{/if}>关闭</option>
  627. <option value="1" {if $settings['admin_center_bg'] == true}selected{/if}>开启</option>
  628. </select>
  629. </div>
  630. <!-- user_center_bg_addr -->
  631. <div class="form-group form-group-label">
  632. <label class="floating-label">用户中心背景图片地址</label>
  633. <input class="form-control maxwidth-edit" id="user_center_bg_addr" value="{$settings['user_center_bg_addr']}">
  634. </div>
  635. <!-- admin_center_bg_addr -->
  636. <div class="form-group form-group-label">
  637. <label class="floating-label">管理中心背景图片地址</label>
  638. <input class="form-control maxwidth-edit" id="admin_center_bg_addr" value="{$settings['admin_center_bg_addr']}">
  639. </div>
  640. <button id="submit_custom_background_image" type="submit" class="btn btn-block btn-brand">提交</button>
  641. </div>
  642. </div>
  643. <div class="tab-pane fade" id="registration_settings">
  644. <nav class="tab-nav margin-top-no">
  645. <ul class="nav nav-list">
  646. <li class="active">
  647. <a data-toggle="tab" href="#reg_mode_and_verify"><i class="icon icon-lg">vpn_key</i>&nbsp;注册模式与验证</a>
  648. </li>
  649. <li>
  650. <a data-toggle="tab" href="#register_default_value"><i class="icon icon-lg">sd_card</i>&nbsp;默认值</a>
  651. </li>
  652. </ul>
  653. </nav>
  654. <div class="tab-pane fade active in" id="reg_mode_and_verify">
  655. <!-- reg_mode -->
  656. <div class="form-group form-group-label">
  657. <label class="floating-label">注册模式设置</label>
  658. <select id="reg_mode" class="form-control maxwidth-edit">
  659. <option value="close" {if $settings['reg_mode'] == 'close'}selected{/if}>关闭公共注册</option>
  660. <option value="open" {if $settings['reg_mode'] == 'open'}selected{/if}>开启公共注册</option>
  661. <option value="invite" {if $settings['reg_mode'] == 'invite'}selected{/if}>仅限用户邀请注册</option>
  662. </select>
  663. </div>
  664. <!-- reg_email_verify -->
  665. <div class="form-group form-group-label">
  666. <label class="floating-label">注册邮箱验证码验证</label>
  667. <select id="reg_email_verify" class="form-control maxwidth-edit">
  668. <option value="0" {if $settings['reg_email_verify'] == false}selected{/if}>关闭</option>
  669. <option value="1" {if $settings['reg_email_verify'] == true}selected{/if}>开启</option>
  670. </select>
  671. </div>
  672. <!-- email_verify_ttl -->
  673. <div class="form-group form-group-label">
  674. <label class="floating-label">注册邮箱验证码有效期(单位:秒)</label>
  675. <input class="form-control maxwidth-edit" id="email_verify_ttl" value="{$settings['email_verify_ttl']}">
  676. </div>
  677. <!-- email_verify_ip_limit -->
  678. <div class="form-group form-group-label">
  679. <label class="floating-label">验证码有效期内单个ip可请求的发件次数</label>
  680. <input class="form-control maxwidth-edit" id="email_verify_ip_limit" value="{$settings['email_verify_ip_limit']}">
  681. </div>
  682. <button type="submit" class="btn btn-block btn-brand submit_register_settings">提交</button>
  683. </div>
  684. <div class="tab-pane fade" id="register_default_value">
  685. <h5>注册默认</h5>
  686. <!-- random_group -->
  687. <div class="form-group form-group-label">
  688. <label class="floating-label">注册时随机分配到的分组,多个分组请用英文半角逗号分隔</label>
  689. <input class="form-control maxwidth-edit" id="random_group" value="{$settings['random_group']}">
  690. </div>
  691. <!-- min_port -->
  692. <div class="form-group form-group-label">
  693. <label class="floating-label">用户端口池最小值,0为用户在注册的时候不会被分配多用户端口</label>
  694. <input class="form-control maxwidth-edit" id="min_port" value="{$settings['min_port']}">
  695. </div>
  696. <!-- max_port -->
  697. <div class="form-group form-group-label">
  698. <label class="floating-label">用户端口池最大值,0为用户在注册的时候不会被分配多用户端口</label>
  699. <input class="form-control maxwidth-edit" id="max_port" value="{$settings['max_port']}">
  700. </div>
  701. <!-- sign_up_for_free_traffic -->
  702. <div class="form-group form-group-label">
  703. <label class="floating-label">注册时赠送的流量(单位:GB)</label>
  704. <input class="form-control maxwidth-edit" id="sign_up_for_free_traffic" value="{$settings['sign_up_for_free_traffic']}">
  705. </div>
  706. <!-- free_user_reset_day -->
  707. <div class="form-group form-group-label">
  708. <label class="floating-label">免费用戶的流量重置日,0为不重置</label>
  709. <input class="form-control maxwidth-edit" id="free_user_reset_day" value="{$settings['free_user_reset_day']}">
  710. </div>
  711. <!-- free_user_reset_bandwidth -->
  712. <div class="form-group form-group-label">
  713. <label class="floating-label">需要重置的免费流量,0为不重置</label>
  714. <input class="form-control maxwidth-edit" id="free_user_reset_bandwidth" value="{$settings['free_user_reset_bandwidth']}">
  715. </div>
  716. <!-- sign_up_for_free_time -->
  717. <div class="form-group form-group-label">
  718. <label class="floating-label">注册时赠送的时长(单位:天)</label>
  719. <input class="form-control maxwidth-edit" id="sign_up_for_free_time" value="{$settings['sign_up_for_free_time']}">
  720. </div>
  721. <!-- sign_up_for_class -->
  722. <div class="form-group form-group-label">
  723. <label class="floating-label">注册时设定的等级</label>
  724. <input class="form-control maxwidth-edit" id="sign_up_for_class" value="{$settings['sign_up_for_class']}">
  725. </div>
  726. <!-- sign_up_for_class_time -->
  727. <div class="form-group form-group-label">
  728. <label class="floating-label">注册时设定的等级过期时间(单位:天)</label>
  729. <input class="form-control maxwidth-edit" id="sign_up_for_class_time" value="{$settings['sign_up_for_class_time']}">
  730. </div>
  731. <h5>注册限制</h5>
  732. <!-- sign_up_for_invitation_codes -->
  733. <div class="form-group form-group-label">
  734. <label class="floating-label">初始邀请注册链接使用次数限制</label>
  735. <input class="form-control maxwidth-edit" id="sign_up_for_invitation_codes" value="{$settings['sign_up_for_invitation_codes']}">
  736. </div>
  737. <!-- connection_device_limit -->
  738. <div class="form-group form-group-label">
  739. <label class="floating-label">连接设备限制</label>
  740. <input class="form-control maxwidth-edit" id="connection_device_limit" value="{$settings['connection_device_limit']}">
  741. </div>
  742. <!-- connection_rate_limit -->
  743. <div class="form-group form-group-label">
  744. <label class="floating-label">使用速率限制</label>
  745. <input class="form-control maxwidth-edit" id="connection_rate_limit" value="{$settings['connection_rate_limit']}">
  746. </div>
  747. <h5>SSR 设置</h5>
  748. <!-- sign_up_for_method -->
  749. <div class="form-group form-group-label">
  750. <label class="floating-label">默认加密</label>
  751. <input class="form-control maxwidth-edit" id="sign_up_for_method" value="{$settings['sign_up_for_method']}">
  752. </div>
  753. <!-- sign_up_for_protocol -->
  754. <div class="form-group form-group-label">
  755. <label class="floating-label">默认协议</label>
  756. <input class="form-control maxwidth-edit" id="sign_up_for_protocol" value="{$settings['sign_up_for_protocol']}">
  757. </div>
  758. <!-- sign_up_for_protocol_param -->
  759. <div class="form-group form-group-label">
  760. <label class="floating-label">默认协议参数</label>
  761. <input class="form-control maxwidth-edit" id="sign_up_for_protocol_param" value="{$settings['sign_up_for_protocol_param']}">
  762. </div>
  763. <!-- sign_up_for_obfs -->
  764. <div class="form-group form-group-label">
  765. <label class="floating-label">默认混淆</label>
  766. <input class="form-control maxwidth-edit" id="sign_up_for_obfs" value="{$settings['sign_up_for_obfs']}">
  767. </div>
  768. <!-- sign_up_for_obfs_param -->
  769. <div class="form-group form-group-label">
  770. <label class="floating-label">默认混淆参数</label>
  771. <input class="form-control maxwidth-edit" id="sign_up_for_obfs_param" value="{$settings['sign_up_for_obfs_param']}">
  772. </div>
  773. <!-- mu_suffix -->
  774. <div class="form-group form-group-label">
  775. <label class="floating-label">单端口多用户混淆参数后缀</label>
  776. <input class="form-control maxwidth-edit" id="mu_suffix" value="{$settings['mu_suffix']}">
  777. </div>
  778. <!-- mu_regex -->
  779. <div class="form-group form-group-label">
  780. <label class="floating-label">单端口多用户混淆参数表达式</label>
  781. <input class="form-control maxwidth-edit" id="mu_regex" value="{$settings['mu_regex']}">
  782. </div>
  783. <h5>其他</h5>
  784. <!-- reg_forbidden_ip -->
  785. <div class="form-group form-group-label">
  786. <label class="floating-label">注册时默认禁止访问IP列表</label>
  787. <input class="form-control maxwidth-edit" id="reg_forbidden_ip" value="{$settings['reg_forbidden_ip']}">
  788. </div>
  789. <!-- reg_forbidden_port -->
  790. <div class="form-group form-group-label">
  791. <label class="floating-label">注册时默认禁止访问端口列表</label>
  792. <input class="form-control maxwidth-edit" id="reg_forbidden_port" value="{$settings['reg_forbidden_port']}">
  793. </div>
  794. <!-- sign_up_for_daily_report -->
  795. <div class="form-group form-group-label">
  796. <label class="floating-label">注册后是否默认接收每日用量邮件推送</label>
  797. <select id="sign_up_for_daily_report" class="form-control maxwidth-edit">
  798. <option value="0" {if $settings['sign_up_for_daily_report'] == false}selected{/if}>关闭</option>
  799. <option value="1" {if $settings['sign_up_for_daily_report'] == true}selected{/if}>开启</option>
  800. </select>
  801. </div>
  802. <!-- enable_reg_im -->
  803. <div class="form-group form-group-label">
  804. <label class="floating-label">注册时是否要求用户输入IM联系方式</label>
  805. <select id="enable_reg_im" class="form-control maxwidth-edit">
  806. <option value="0" {if $settings['enable_reg_im'] == false}selected{/if}>关闭</option>
  807. <option value="1" {if $settings['enable_reg_im'] == true}selected{/if}>开启</option>
  808. </select>
  809. </div>
  810. <button type="submit" class="btn btn-block btn-brand submit_register_settings">提交</button>
  811. </div>
  812. </div>
  813. <div class="tab-pane fade" id="invitation_settings">
  814. <nav class="tab-nav margin-top-no">
  815. <ul class="nav nav-list">
  816. <li class="active">
  817. <a data-toggle="tab" href="#rebate_mode"><i class="icon icon-lg">developer_mode</i>&nbsp;模式</a>
  818. </li>
  819. <li>
  820. <a data-toggle="tab" href="#invite_gernal_settings"><i class="icon icon-lg">cog</i>&nbsp;通用设置</a>
  821. </li>
  822. </ul>
  823. </nav>
  824. <div class="tab-pane fade active in" id="rebate_mode">
  825. <!-- invitation_mode -->
  826. <div class="form-group form-group-label">
  827. <label class="floating-label">邀请模式</label>
  828. <select id="invitation_mode" class="form-control maxwidth-edit">
  829. <option value="registration_only" {if $settings['invitation_mode'] == 'registration_only'}selected{/if}>
  830. 仅使用邀请注册功能,不返利</option>
  831. <option value="after_recharge" {if $settings['invitation_mode'] == 'after_recharge'}selected{/if}>
  832. 使用邀请注册功能,并在被邀请用户充值时返利</option>
  833. <option value="after_purchase" {if $settings['invitation_mode'] == 'after_purchase'}selected{/if}>
  834. 使用邀请注册功能,并在被邀请用户购买时返利</option>
  835. </select>
  836. </div>
  837. <!-- invite_rebate_mode -->
  838. <div class="form-group form-group-label">
  839. <label class="floating-label">返利模式</label>
  840. <select id="invite_rebate_mode" class="form-control maxwidth-edit">
  841. <option value="continued" {if $settings['invite_rebate_mode'] == 'continued'}selected{/if}>
  842. 持续返利</option>
  843. <option value="limit_frequency" {if $settings['invite_rebate_mode'] == 'limit_frequency'}selected{/if}>
  844. 限制邀请人能从被邀请人身上获得的总返利次数</option>
  845. <option value="limit_amount" {if $settings['invite_rebate_mode'] == 'limit_amount'}selected{/if}>
  846. 限制邀请人能从被邀请人身上获得的总返利金额</option>
  847. <option value="limit_time_range" {if $settings['invite_rebate_mode'] == 'limit_time_range'}selected{/if}>
  848. 限制邀请人能从被邀请人身上获得返利的时间范围</option>
  849. </select>
  850. </div>
  851. <!-- rebate_ratio -->
  852. <div class="form-group form-group-label">
  853. <label class="floating-label">返利比例。10 元商品反 2 元就填 0.2</label>
  854. <input class="form-control maxwidth-edit" id="rebate_ratio" value="{$settings['rebate_ratio']}">
  855. </div>
  856. <h5>返利限制模式</h5>
  857. <p class="form-control-guide"><i class="material-icons">info</i>以下设置项仅在选择对应返利限制模式时生效</p>
  858. <!-- rebate_time_range_limit -->
  859. <div class="form-group form-group-label">
  860. <label class="floating-label">返利时间范围限制(单位:天)</label>
  861. <input class="form-control maxwidth-edit" id="rebate_time_range_limit" value="{$settings['rebate_time_range_limit']}">
  862. </div>
  863. <!-- rebate_frequency_limit -->
  864. <div class="form-group form-group-label">
  865. <label class="floating-label">返利总次数限制</label>
  866. <input class="form-control maxwidth-edit" id="rebate_frequency_limit" value="{$settings['rebate_frequency_limit']}">
  867. </div>
  868. <p class="form-control-guide"><i class="material-icons">info</i>例如:设置为 3 时,一个被邀请用户先后购买了售价为 10,20,50,100 的商品,则只对前三笔订单返利(假设设置为在购买时返利)</p>
  869. <!-- rebate_amount_limit -->
  870. <div class="form-group form-group-label">
  871. <label class="floating-label">返利总金额限制</label>
  872. <input class="form-control maxwidth-edit" id="rebate_amount_limit" value="{$settings['rebate_amount_limit']}">
  873. </div>
  874. <p class="form-control-guide"><i class="material-icons">info</i>例如:设置为 10 时,一个被邀请用户先后购买了售价为 10,20,50,100 的商品,若返点设置为 20% ,则第一次购买返利为 2;第二次为 4;第三次为 4;第四次及之后的购买,邀请人所能获得的返利均为 0(假设设置为在购买时返利)</p>
  875. <p class="form-control-guide"><i class="material-icons">info</i>在进行第三次返利计算时,按设置应返利订单金额的 20% ,即 10 元。但因已获得历史返利 6 元,则只能获得返利总金额限制与历史返利的差值</p>
  876. <br/>
  877. <button type="submit" class="btn btn-block btn-brand submit_invite_settings">提交</button>
  878. </div>
  879. <div class="tab-pane fade" id="invite_gernal_settings">
  880. <!-- invitation_to_register_balance_reward -->
  881. <div class="form-group form-group-label">
  882. <label class="floating-label">若有人使用现存用户的邀请链接注册,被邀请人所能获得的余额奖励(单位:元)</label>
  883. <input class="form-control maxwidth-edit" id="invitation_to_register_balance_reward" value="{$settings['invitation_to_register_balance_reward']}">
  884. </div>
  885. <!-- invitation_to_register_traffic_reward -->
  886. <div class="form-group form-group-label">
  887. <label class="floating-label">若有人使用现存用户的邀请链接注册,邀请人所能获得的流量奖励(单位:GB)</label>
  888. <input class="form-control maxwidth-edit" id="invitation_to_register_traffic_reward" value="{$settings['invitation_to_register_traffic_reward']}">
  889. </div>
  890. <!-- invite_price -->
  891. <div class="form-group form-group-label">
  892. <label class="floating-label">用户购买邀请码所需要的价格,价格小于0时视为不开放购买</label>
  893. <input class="form-control maxwidth-edit" id="invite_price" value="{$settings['invite_price']}">
  894. </div>
  895. <!-- custom_invite_price -->
  896. <div class="form-group form-group-label">
  897. <label class="floating-label">用户定制邀请码所需要的价格,价格小于0时视为不开放购买</label>
  898. <input class="form-control maxwidth-edit" id="custom_invite_price" value="{$settings['custom_invite_price']}">
  899. </div>
  900. <br/>
  901. <button type="submit" class="btn btn-block btn-brand submit_invite_settings">提交</button>
  902. </div>
  903. </div>
  904. <div class="tab-pane fade" id="telegram_settings">
  905. <nav class="tab-nav margin-top-no">
  906. <ul class="nav nav-list">
  907. <li class="active">
  908. <a data-toggle="tab" href="#telegram_gernal_settings"><i class="icon icon-lg">settings</i>&nbsp;通用设置</a>
  909. </li>
  910. </ul>
  911. </nav>
  912. <div class="tab-pane fade active in" id="telegram_gernal_settings">
  913. <!-- telegram_add_node -->
  914. <div class="form-group form-group-label">
  915. <label class="floating-label">添加节点通知</label>
  916. <select id="telegram_add_node" class="form-control maxwidth-edit">
  917. <option value="0" {if $settings['telegram_add_node'] == false}selected{/if}>关闭</option>
  918. <option value="1" {if $settings['telegram_add_node'] == true}selected{/if}>开启</option>
  919. </select>
  920. </div>
  921. <!-- telegram_add_node_text -->
  922. <div class="form-group form-group-label">
  923. <label class="floating-label">添加节点通知文本</label>
  924. <input class="form-control maxwidth-edit" id="telegram_add_node_text" value="{$settings['telegram_add_node_text']}">
  925. </div>
  926. <!-- telegram_update_node -->
  927. <div class="form-group form-group-label">
  928. <label class="floating-label">修改节点通知</label>
  929. <select id="telegram_update_node" class="form-control maxwidth-edit">
  930. <option value="0" {if $settings['telegram_update_node'] == false}selected{/if}>关闭</option>
  931. <option value="1" {if $settings['telegram_update_node'] == true}selected{/if}>开启</option>
  932. </select>
  933. </div>
  934. <!-- telegram_update_node_text -->
  935. <div class="form-group form-group-label">
  936. <label class="floating-label">修改节点通知文本</label>
  937. <input class="form-control maxwidth-edit" id="telegram_update_node_text" value="{$settings['telegram_update_node_text']}">
  938. </div>
  939. <!-- telegram_delete_node -->
  940. <div class="form-group form-group-label">
  941. <label class="floating-label">删除节点通知</label>
  942. <select id="telegram_delete_node" class="form-control maxwidth-edit">
  943. <option value="0" {if $settings['telegram_delete_node'] == false}selected{/if}>关闭</option>
  944. <option value="1" {if $settings['telegram_delete_node'] == true}selected{/if}>开启</option>
  945. </select>
  946. </div>
  947. <!-- telegram_delete_node_text -->
  948. <div class="form-group form-group-label">
  949. <label class="floating-label">删除节点通知文本</label>
  950. <input class="form-control maxwidth-edit" id="telegram_delete_node_text" value="{$settings['telegram_delete_node_text']}">
  951. </div>
  952. <!-- telegram_node_gfwed -->
  953. <div class="form-group form-group-label">
  954. <label class="floating-label">节点被墙通知</label>
  955. <select id="telegram_node_gfwed" class="form-control maxwidth-edit">
  956. <option value="0" {if $settings['telegram_node_gfwed'] == false}selected{/if}>关闭</option>
  957. <option value="1" {if $settings['telegram_node_gfwed'] == true}selected{/if}>开启</option>
  958. </select>
  959. </div>
  960. <!-- telegram_node_gfwed_text -->
  961. <div class="form-group form-group-label">
  962. <label class="floating-label">节点被墙通知文本</label>
  963. <input class="form-control maxwidth-edit" id="telegram_node_gfwed_text" value="{$settings['telegram_node_gfwed_text']}">
  964. </div>
  965. <!-- telegram_node_ungfwed -->
  966. <div class="form-group form-group-label">
  967. <label class="floating-label">节点被墙恢复通知</label>
  968. <select id="telegram_node_ungfwed" class="form-control maxwidth-edit">
  969. <option value="0" {if $settings['telegram_node_ungfwed'] == false}selected{/if}>关闭</option>
  970. <option value="1" {if $settings['telegram_node_ungfwed'] == true}selected{/if}>开启</option>
  971. </select>
  972. </div>
  973. <!-- telegram_node_ungfwed_text -->
  974. <div class="form-group form-group-label">
  975. <label class="floating-label">节点被墙恢复通知文本</label>
  976. <input class="form-control maxwidth-edit" id="telegram_node_ungfwed_text" value="{$settings['telegram_node_ungfwed_text']}">
  977. </div>
  978. <!-- telegram_node_online -->
  979. <div class="form-group form-group-label">
  980. <label class="floating-label">节点恢复上线通知</label>
  981. <select id="telegram_node_online" class="form-control maxwidth-edit">
  982. <option value="0" {if $settings['telegram_node_online'] == false}selected{/if}>关闭</option>
  983. <option value="1" {if $settings['telegram_node_online'] == true}selected{/if}>开启</option>
  984. </select>
  985. </div>
  986. <!-- telegram_node_online_text -->
  987. <div class="form-group form-group-label">
  988. <label class="floating-label">节点恢复上线通知文本</label>
  989. <input class="form-control maxwidth-edit" id="telegram_node_online_text" value="{$settings['telegram_node_online_text']}">
  990. </div>
  991. <!-- telegram_node_offline -->
  992. <div class="form-group form-group-label">
  993. <label class="floating-label">节点离线通知</label>
  994. <select id="telegram_node_offline" class="form-control maxwidth-edit">
  995. <option value="0" {if $settings['telegram_node_offline'] == false}selected{/if}>关闭</option>
  996. <option value="1" {if $settings['telegram_node_offline'] == true}selected{/if}>开启</option>
  997. </select>
  998. </div>
  999. <!-- telegram_node_offline_text -->
  1000. <div class="form-group form-group-label">
  1001. <label class="floating-label">节点离线通知文本</label>
  1002. <input class="form-control maxwidth-edit" id="telegram_node_offline_text" value="{$settings['telegram_node_offline_text']}">
  1003. </div>
  1004. <!-- telegram_daily_job -->
  1005. <div class="form-group form-group-label">
  1006. <label class="floating-label">每日任务通知</label>
  1007. <select id="telegram_daily_job" class="form-control maxwidth-edit">
  1008. <option value="0" {if $settings['telegram_daily_job'] == false}selected{/if}>关闭</option>
  1009. <option value="1" {if $settings['telegram_daily_job'] == true}selected{/if}>开启</option>
  1010. </select>
  1011. </div>
  1012. <!-- telegram_daily_job_text -->
  1013. <div class="form-group form-group-label">
  1014. <label class="floating-label">每日任务通知文本</label>
  1015. <input class="form-control maxwidth-edit" id="telegram_daily_job_text" value="{$settings['telegram_daily_job_text']}">
  1016. </div>
  1017. <!-- telegram_diary -->
  1018. <div class="form-group form-group-label">
  1019. <label class="floating-label">系统运行状况通知</label>
  1020. <select id="telegram_diary" class="form-control maxwidth-edit">
  1021. <option value="0" {if $settings['telegram_diary'] == false}selected{/if}>关闭</option>
  1022. <option value="1" {if $settings['telegram_diary'] == true}selected{/if}>开启</option>
  1023. </select>
  1024. </div>
  1025. <!-- telegram_diary_text -->
  1026. <div class="form-group form-group-label">
  1027. <label class="floating-label">系统运行状况通知文本</label>
  1028. <input class="form-control maxwidth-edit" id="telegram_diary_text" value="{$settings['telegram_diary_text']}">
  1029. </div>
  1030. <!-- telegram_unbind_kick_member -->
  1031. <div class="form-group form-group-label">
  1032. <label class="floating-label">解绑Telegram账户后自动踢出群组</label>
  1033. <select id="telegram_unbind_kick_member" class="form-control maxwidth-edit">
  1034. <option value="0" {if $settings['telegram_unbind_kick_member'] == false}selected{/if}>关闭</option>
  1035. <option value="1" {if $settings['telegram_unbind_kick_member'] == true}selected{/if}>开启</option>
  1036. </select>
  1037. </div>
  1038. <!-- telegram_group_bound_user -->
  1039. <div class="form-group form-group-label">
  1040. <label class="floating-label">仅允许已绑定Telegram账户的用户加入群组</label>
  1041. <select id="telegram_group_bound_user" class="form-control maxwidth-edit">
  1042. <option value="0" {if $settings['telegram_group_bound_user'] == false}selected{/if}>关闭</option>
  1043. <option value="1" {if $settings['telegram_group_bound_user'] == true}selected{/if}>开启</option>
  1044. </select>
  1045. </div>
  1046. <!-- telegram_show_group_link -->
  1047. <div class="form-group form-group-label">
  1048. <label class="floating-label">启用Telegram机器人显示用户群组链接</label>
  1049. <select id="telegram_show_group_link" class="form-control maxwidth-edit">
  1050. <option value="0" {if $settings['telegram_show_group_link'] == false}selected{/if}>关闭</option>
  1051. <option value="1" {if $settings['telegram_show_group_link'] == true}selected{/if}>开启</option>
  1052. </select>
  1053. </div>
  1054. <!-- telegram_group_link -->
  1055. <div class="form-group form-group-label">
  1056. <label class="floating-label">用户群组链接</label>
  1057. <input class="form-control maxwidth-edit" id="telegram_group_link" value="{$settings['telegram_group_link']}">
  1058. </div>
  1059. <button id="submit_telegram_gernal_settings" type="submit" class="btn btn-block btn-brand">提交</button>
  1060. </div>
  1061. </div>
  1062. </div>
  1063. </div>
  1064. </div>
  1065. </div>
  1066. </div>
  1067. </div>
  1068. {include file='dialog.tpl'}
  1069. </div>
  1070. </main>
  1071. {include file='admin/footer.tpl'}
  1072. <script>
  1073. window.addEventListener('load', () => {
  1074. $$.getElementById('submit_f2f_pay').addEventListener('click', () => {
  1075. $.ajax({
  1076. type: "POST",
  1077. url: "/admin/setting",
  1078. dataType: "json",
  1079. data: {
  1080. class: 'f2f_pay',
  1081. f2f_pay_app_id: $$getValue('f2f_pay_app_id'),
  1082. f2f_pay_pid: $$getValue('f2f_pay_pid'),
  1083. f2f_pay_public_key: $$getValue('f2f_pay_public_key'),
  1084. f2f_pay_private_key: $$getValue('f2f_pay_private_key'),
  1085. f2f_pay_notify_url: $$getValue('f2f_pay_notify_url')
  1086. },
  1087. success: data => {
  1088. $("#result").modal();
  1089. $$.getElementById('msg').innerHTML = data.msg;
  1090. if (data.ret) {
  1091. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1092. }
  1093. },
  1094. error: jqXHR => {
  1095. alert(`发生错误:${
  1096. jqXHR.status
  1097. }`);
  1098. }
  1099. })
  1100. })
  1101. })
  1102. </script>
  1103. <script>
  1104. window.addEventListener('load', () => {
  1105. $$.getElementById('submit_e_pay').addEventListener('click', () => {
  1106. $.ajax({
  1107. type: "POST",
  1108. url: "/admin/setting",
  1109. dataType: "json",
  1110. data: {
  1111. class: 'e_pay',
  1112. epay_url: $$getValue('epay_url'),
  1113. epay_pid: $$getValue('epay_pid'),
  1114. epay_key: $$getValue('epay_key')
  1115. },
  1116. success: data => {
  1117. $("#result").modal();
  1118. $$.getElementById('msg').innerHTML = data.msg;
  1119. if (data.ret) {
  1120. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1121. }
  1122. },
  1123. error: jqXHR => {
  1124. alert(`发生错误:${
  1125. jqXHR.status
  1126. }`);
  1127. }
  1128. })
  1129. })
  1130. })
  1131. </script>
  1132. <script>
  1133. window.addEventListener('load', () => {
  1134. $$.getElementById('submit_payment').addEventListener('click', () => {
  1135. {foreach $payment_gateways as $key => $value}
  1136. if ($$.getElementById("{$value}_switch").checked) {
  1137. var {$value} = 1;
  1138. } else {
  1139. var {$value} = 0;
  1140. }
  1141. {/foreach}
  1142. $.ajax({
  1143. type: "POST",
  1144. url: "/admin/setting/payment",
  1145. dataType: "json",
  1146. data: {
  1147. {foreach $payment_gateways as $key => $value}
  1148. {$value},
  1149. {/foreach}
  1150. class: 'payment'
  1151. },
  1152. success: data => {
  1153. $("#result").modal();
  1154. $$.getElementById('msg').innerHTML = data.msg;
  1155. if (data.ret) {
  1156. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1157. }
  1158. },
  1159. error: jqXHR => {
  1160. alert(`发生错误:${
  1161. jqXHR.status
  1162. }`);
  1163. }
  1164. })
  1165. })
  1166. })
  1167. </script>
  1168. <script>
  1169. window.addEventListener('load', () => {
  1170. $$.getElementById('submit_vmq_pay').addEventListener('click', () => {
  1171. $.ajax({
  1172. type: "POST",
  1173. url: "/admin/setting",
  1174. dataType: "json",
  1175. data: {
  1176. class: 'vmq_pay',
  1177. vmq_gateway: $$getValue('vmq_gateway'),
  1178. vmq_key: $$getValue('vmq_key')
  1179. },
  1180. success: data => {
  1181. $("#result").modal();
  1182. $$.getElementById('msg').innerHTML = data.msg;
  1183. if (data.ret) {
  1184. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1185. }
  1186. },
  1187. error: jqXHR => {
  1188. alert(`发生错误:${
  1189. jqXHR.status
  1190. }`);
  1191. }
  1192. })
  1193. })
  1194. })
  1195. </script>
  1196. <script>
  1197. window.addEventListener('load', () => {
  1198. $$.getElementById('submit_mail').addEventListener('click', () => {
  1199. $.ajax({
  1200. type: "POST",
  1201. url: "/admin/setting",
  1202. dataType: "json",
  1203. data: {
  1204. class: 'mail',
  1205. mail_driver: $$getValue('mail_driver')
  1206. },
  1207. success: data => {
  1208. $("#result").modal();
  1209. $$.getElementById('msg').innerHTML = data.msg;
  1210. if (data.ret) {
  1211. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1212. }
  1213. },
  1214. error: jqXHR => {
  1215. alert(`发生错误:${
  1216. jqXHR.status
  1217. }`);
  1218. }
  1219. })
  1220. })
  1221. })
  1222. </script>
  1223. <script>
  1224. window.addEventListener('load', () => {
  1225. $$.getElementById('submit_smtp').addEventListener('click', () => {
  1226. $.ajax({
  1227. type: "POST",
  1228. url: "/admin/setting",
  1229. dataType: "json",
  1230. data: {
  1231. class: 'smtp',
  1232. smtp_host: $$getValue('smtp_host'),
  1233. smtp_username: $$getValue('smtp_username'),
  1234. smtp_password: $$getValue('smtp_password'),
  1235. smtp_port: $$getValue('smtp_port'),
  1236. smtp_name: $$getValue('smtp_name'),
  1237. smtp_sender: $$getValue('smtp_sender'),
  1238. smtp_ssl: $$getValue('smtp_ssl'),
  1239. smtp_bbc: $$getValue('smtp_bbc')
  1240. },
  1241. success: data => {
  1242. $("#result").modal();
  1243. $$.getElementById('msg').innerHTML = data.msg;
  1244. if (data.ret) {
  1245. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1246. }
  1247. },
  1248. error: jqXHR => {
  1249. alert(`发生错误:${
  1250. jqXHR.status
  1251. }`);
  1252. }
  1253. })
  1254. })
  1255. })
  1256. </script>
  1257. <script>
  1258. window.addEventListener('load', () => {
  1259. $$.getElementById('submit_email_test').addEventListener('click', () => {
  1260. $.ajax({
  1261. type: "POST",
  1262. url: "/admin/setting/email",
  1263. dataType: "json",
  1264. data: {
  1265. recipient: $$getValue('testing_email_recipients')
  1266. },
  1267. success: data => {
  1268. $("#result").modal();
  1269. $$.getElementById('msg').innerHTML = data.msg;
  1270. if (data.ret) {
  1271. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1272. }
  1273. },
  1274. error: jqXHR => {
  1275. alert(`发生错误:${
  1276. jqXHR.status
  1277. }`);
  1278. }
  1279. })
  1280. })
  1281. })
  1282. </script>
  1283. <script>
  1284. window.addEventListener('load', () => {
  1285. $$.getElementById('submit_verify_code').addEventListener('click', () => {
  1286. $.ajax({
  1287. type: "POST",
  1288. url: "/admin/setting",
  1289. dataType: "json",
  1290. data: {
  1291. class: 'verify_code',
  1292. captcha_provider: $$getValue('captcha_provider'),
  1293. enable_reg_captcha: $$getValue('enable_reg_captcha'),
  1294. enable_login_captcha: $$getValue('enable_login_captcha'),
  1295. enable_checkin_captcha: $$getValue('enable_checkin_captcha')
  1296. },
  1297. success: data => {
  1298. $("#result").modal();
  1299. $$.getElementById('msg').innerHTML = data.msg;
  1300. if (data.ret) {
  1301. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1302. }
  1303. },
  1304. error: jqXHR => {
  1305. alert(`发生错误:${
  1306. jqXHR.status
  1307. }`);
  1308. }
  1309. })
  1310. })
  1311. })
  1312. </script>
  1313. <script>
  1314. window.addEventListener('load', () => {
  1315. $$.getElementById('submit_geetest').addEventListener('click', () => {
  1316. $.ajax({
  1317. type: "POST",
  1318. url: "/admin/setting",
  1319. dataType: "json",
  1320. data: {
  1321. class: 'verify_code_geetest',
  1322. geetest_id: $$getValue('geetest_id'),
  1323. geetest_key: $$getValue('geetest_key')
  1324. },
  1325. success: data => {
  1326. $("#result").modal();
  1327. $$.getElementById('msg').innerHTML = data.msg;
  1328. if (data.ret) {
  1329. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1330. }
  1331. },
  1332. error: jqXHR => {
  1333. alert(`发生错误:${
  1334. jqXHR.status
  1335. }`);
  1336. }
  1337. })
  1338. })
  1339. })
  1340. </script>
  1341. <script>
  1342. window.addEventListener('load', () => {
  1343. $$.getElementById('submit_recaptcha').addEventListener('click', () => {
  1344. $.ajax({
  1345. type: "POST",
  1346. url: "/admin/setting",
  1347. dataType: "json",
  1348. data: {
  1349. class: 'verify_code_recaptcha',
  1350. recaptcha_sitekey: $$getValue('recaptcha_sitekey'),
  1351. recaptcha_secret: $$getValue('recaptcha_secret')
  1352. },
  1353. success: data => {
  1354. $("#result").modal();
  1355. $$.getElementById('msg').innerHTML = data.msg;
  1356. if (data.ret) {
  1357. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1358. }
  1359. },
  1360. error: jqXHR => {
  1361. alert(`发生错误:${
  1362. jqXHR.status
  1363. }`);
  1364. }
  1365. })
  1366. })
  1367. })
  1368. </script>
  1369. <script>
  1370. window.addEventListener('load', () => {
  1371. $$.getElementById('submit_mailgun').addEventListener('click', () => {
  1372. $.ajax({
  1373. type: "POST",
  1374. url: "/admin/setting",
  1375. dataType: "json",
  1376. data: {
  1377. class: 'mailgun',
  1378. mailgun_key: $$getValue('mailgun_key'),
  1379. mailgun_domain: $$getValue('mailgun_domain'),
  1380. mailgun_sender: $$getValue('mailgun_sender')
  1381. },
  1382. success: data => {
  1383. $("#result").modal();
  1384. $$.getElementById('msg').innerHTML = data.msg;
  1385. if (data.ret) {
  1386. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1387. }
  1388. },
  1389. error: jqXHR => {
  1390. alert(`发生错误:${
  1391. jqXHR.status
  1392. }`);
  1393. }
  1394. })
  1395. })
  1396. })
  1397. </script>
  1398. <script>
  1399. window.addEventListener('load', () => {
  1400. $$.getElementById('submit_sendgrid').addEventListener('click', () => {
  1401. $.ajax({
  1402. type: "POST",
  1403. url: "/admin/setting",
  1404. dataType: "json",
  1405. data: {
  1406. class: 'sendgrid',
  1407. sendgrid_key: $$getValue('sendgrid_key'),
  1408. sendgrid_sender: $$getValue('sendgrid_sender'),
  1409. sendgrid_name: $$getValue('sendgrid_name')
  1410. },
  1411. success: data => {
  1412. $("#result").modal();
  1413. $$.getElementById('msg').innerHTML = data.msg;
  1414. if (data.ret) {
  1415. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1416. }
  1417. },
  1418. error: jqXHR => {
  1419. alert(`发生错误:${
  1420. jqXHR.status
  1421. }`);
  1422. }
  1423. })
  1424. })
  1425. })
  1426. </script>
  1427. <script>
  1428. window.addEventListener('load', () => {
  1429. $$.getElementById('submit_ses').addEventListener('click', () => {
  1430. $.ajax({
  1431. type: "POST",
  1432. url: "/admin/setting",
  1433. dataType: "json",
  1434. data: {
  1435. class: 'ses',
  1436. aws_access_key_id: $$getValue('aws_access_key_id'),
  1437. aws_secret_access_key: $$getValue('aws_secret_access_key')
  1438. },
  1439. success: data => {
  1440. $("#result").modal();
  1441. $$.getElementById('msg').innerHTML = data.msg;
  1442. if (data.ret) {
  1443. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1444. }
  1445. },
  1446. error: jqXHR => {
  1447. alert(`发生错误:${
  1448. jqXHR.status
  1449. }`);
  1450. }
  1451. })
  1452. })
  1453. })
  1454. </script>
  1455. <script>
  1456. window.addEventListener('load', () => {
  1457. $$.getElementById('submit_email_backup').addEventListener('click', () => {
  1458. $.ajax({
  1459. type: "POST",
  1460. url: "/admin/setting",
  1461. dataType: "json",
  1462. data: {
  1463. class: 'email_backup',
  1464. auto_backup_email: $$getValue('auto_backup_email'),
  1465. auto_backup_password: $$getValue('auto_backup_password'),
  1466. auto_backup_notify: $$getValue('auto_backup_notify')
  1467. },
  1468. success: data => {
  1469. $("#result").modal();
  1470. $$.getElementById('msg').innerHTML = data.msg;
  1471. if (data.ret) {
  1472. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1473. }
  1474. },
  1475. error: jqXHR => {
  1476. alert(`发生错误:${
  1477. jqXHR.status
  1478. }`);
  1479. }
  1480. })
  1481. })
  1482. })
  1483. </script>
  1484. <script>
  1485. window.addEventListener('load', () => {
  1486. $$.getElementById('submit_payjs_pay').addEventListener('click', () => {
  1487. $.ajax({
  1488. type: "POST",
  1489. url: "/admin/setting",
  1490. dataType: "json",
  1491. data: {
  1492. class: 'payjs_pay',
  1493. payjs_url: $$getValue('payjs_url'),
  1494. payjs_mchid: $$getValue('payjs_mchid'),
  1495. payjs_key: $$getValue('payjs_key')
  1496. },
  1497. success: data => {
  1498. $("#result").modal();
  1499. $$.getElementById('msg').innerHTML = data.msg;
  1500. if (data.ret) {
  1501. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1502. }
  1503. },
  1504. error: jqXHR => {
  1505. alert(`发生错误:${
  1506. jqXHR.status
  1507. }`);
  1508. }
  1509. })
  1510. })
  1511. })
  1512. </script>
  1513. <script>
  1514. window.addEventListener('load', () => {
  1515. $$.getElementById('submit_paymentwall').addEventListener('click', () => {
  1516. $.ajax({
  1517. type: "POST",
  1518. url: "/admin/setting",
  1519. dataType: "json",
  1520. data: {
  1521. class: 'paymentwall',
  1522. pmw_publickey: $$getValue('pmw_publickey'),
  1523. pmw_privatekey: $$getValue('pmw_privatekey'),
  1524. pmw_widget: $$getValue('pmw_widget'),
  1525. pmw_height: $$getValue('pmw_height')
  1526. },
  1527. success: data => {
  1528. $("#result").modal();
  1529. $$.getElementById('msg').innerHTML = data.msg;
  1530. if (data.ret) {
  1531. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1532. }
  1533. },
  1534. error: jqXHR => {
  1535. alert(`发生错误:${
  1536. jqXHR.status
  1537. }`);
  1538. }
  1539. })
  1540. })
  1541. })
  1542. </script>
  1543. <script>
  1544. window.addEventListener('load', () => {
  1545. $$.getElementById('submit_admin_contact').addEventListener('click', () => {
  1546. $.ajax({
  1547. type: "POST",
  1548. url: "/admin/setting",
  1549. dataType: "json",
  1550. data: {
  1551. class: 'admin_contact',
  1552. enable_admin_contact: $$getValue('enable_admin_contact'),
  1553. admin_contact1: $$getValue('admin_contact1'),
  1554. admin_contact2: $$getValue('admin_contact2'),
  1555. admin_contact3: $$getValue('admin_contact3')
  1556. },
  1557. success: data => {
  1558. $("#result").modal();
  1559. $$.getElementById('msg').innerHTML = data.msg;
  1560. if (data.ret) {
  1561. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1562. }
  1563. },
  1564. error: jqXHR => {
  1565. alert(`发生错误:${
  1566. jqXHR.status
  1567. }`);
  1568. }
  1569. })
  1570. })
  1571. })
  1572. </script>
  1573. <script>
  1574. window.addEventListener('load', () => {
  1575. $$.getElementById('submit_web_customer_service_system').addEventListener('click', () => {
  1576. $.ajax({
  1577. type: "POST",
  1578. url: "/admin/setting",
  1579. dataType: "json",
  1580. data: {
  1581. class: 'web_customer_service_system',
  1582. live_chat: $$getValue('live_chat'),
  1583. tawk_id: $$getValue('tawk_id'),
  1584. crisp_id: $$getValue('crisp_id'),
  1585. livechat_id: $$getValue('livechat_id'),
  1586. mylivechat_id: $$getValue('mylivechat_id')
  1587. },
  1588. success: data => {
  1589. $("#result").modal();
  1590. $$.getElementById('msg').innerHTML = data.msg;
  1591. if (data.ret) {
  1592. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1593. }
  1594. },
  1595. error: jqXHR => {
  1596. alert(`发生错误:${
  1597. jqXHR.status
  1598. }`);
  1599. }
  1600. })
  1601. })
  1602. })
  1603. </script>
  1604. <script>
  1605. window.addEventListener('load', () => {
  1606. $$.getElementById('submit_theadpay').addEventListener('click', () => {
  1607. $.ajax({
  1608. type: "POST",
  1609. url: "/admin/setting",
  1610. dataType: "json",
  1611. data: {
  1612. class: 'theadpay',
  1613. theadpay_url: $$getValue('theadpay_url'),
  1614. theadpay_mchid: $$getValue('theadpay_mchid'),
  1615. theadpay_key: $$getValue('theadpay_key')
  1616. },
  1617. success: data => {
  1618. $("#result").modal();
  1619. $$.getElementById('msg').innerHTML = data.msg;
  1620. if (data.ret) {
  1621. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1622. }
  1623. },
  1624. error: jqXHR => {
  1625. alert(`发生错误:${
  1626. jqXHR.status
  1627. }`);
  1628. }
  1629. })
  1630. })
  1631. })
  1632. </script>
  1633. <script>
  1634. window.addEventListener('load', () => {
  1635. $$.getElementById('submit_stripe').addEventListener('click', () => {
  1636. $.ajax({
  1637. type: "POST",
  1638. url: "/admin/setting",
  1639. dataType: "json",
  1640. data: {
  1641. class: 'stripe',
  1642. stripe_card: $$getValue('stripe_card_select'),
  1643. stripe_currency: $$getValue('stripe_currency'),
  1644. stripe_min_recharge: $$getValue('stripe_min_recharge'),
  1645. stripe_max_recharge: $$getValue('stripe_max_recharge'),
  1646. stripe_pk: $$getValue('stripe_pk'),
  1647. stripe_sk: $$getValue('stripe_sk'),
  1648. stripe_webhook_key: $$getValue('stripe_webhook_key')
  1649. },
  1650. success: data => {
  1651. $("#result").modal();
  1652. $$.getElementById('msg').innerHTML = data.msg;
  1653. if (data.ret) {
  1654. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1655. }
  1656. },
  1657. error: jqXHR => {
  1658. alert(`发生错误:${
  1659. jqXHR.status
  1660. }`);
  1661. }
  1662. })
  1663. })
  1664. })
  1665. </script>
  1666. <script>
  1667. window.addEventListener('load', () => {
  1668. $$.getElementById('submit_custom_background_image').addEventListener('click', () => {
  1669. $.ajax({
  1670. type: "POST",
  1671. url: "/admin/setting",
  1672. dataType: "json",
  1673. data: {
  1674. class: 'background_image',
  1675. user_center_bg: $$getValue('user_center_bg'),
  1676. admin_center_bg: $$getValue('admin_center_bg'),
  1677. user_center_bg_addr: $$getValue('user_center_bg_addr'),
  1678. admin_center_bg_addr: $$getValue('admin_center_bg_addr')
  1679. },
  1680. success: data => {
  1681. $("#result").modal();
  1682. $$.getElementById('msg').innerHTML = data.msg;
  1683. if (data.ret) {
  1684. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1685. }
  1686. },
  1687. error: jqXHR => {
  1688. alert(`发生错误:${
  1689. jqXHR.status
  1690. }`);
  1691. }
  1692. })
  1693. })
  1694. })
  1695. </script>
  1696. <script>
  1697. window.addEventListener('load', () => {
  1698. $('.submit_register_settings').click( () => {
  1699. $.ajax({
  1700. type: "POST",
  1701. url: "/admin/setting",
  1702. dataType: "json",
  1703. data: {
  1704. class: 'register',
  1705. reg_mode: $$getValue('reg_mode'),
  1706. reg_email_verify: $$getValue('reg_email_verify'),
  1707. email_verify_ttl: $$getValue('email_verify_ttl'),
  1708. email_verify_ip_limit: $$getValue('email_verify_ip_limit'),
  1709. random_group: $$getValue('random_group'),
  1710. min_port: $$getValue('min_port'),
  1711. max_port: $$getValue('max_port'),
  1712. sign_up_for_free_traffic: $$getValue('sign_up_for_free_traffic'),
  1713. free_user_reset_day: $$getValue('free_user_reset_day'),
  1714. free_user_reset_bandwidth: $$getValue('free_user_reset_bandwidth'),
  1715. sign_up_for_free_time: $$getValue('sign_up_for_free_time'),
  1716. sign_up_for_class: $$getValue('sign_up_for_class'),
  1717. sign_up_for_class_time: $$getValue('sign_up_for_class_time'),
  1718. sign_up_for_invitation_codes: $$getValue('sign_up_for_invitation_codes'),
  1719. connection_device_limit: $$getValue('connection_device_limit'),
  1720. connection_rate_limit: $$getValue('connection_rate_limit'),
  1721. sign_up_for_method: $$getValue('sign_up_for_method'),
  1722. sign_up_for_protocol: $$getValue('sign_up_for_protocol'),
  1723. sign_up_for_protocol_param: $$getValue('sign_up_for_protocol_param'),
  1724. sign_up_for_obfs: $$getValue('sign_up_for_obfs'),
  1725. sign_up_for_obfs_param: $$getValue('sign_up_for_obfs_param'),
  1726. mu_suffix: $$getValue('mu_suffix'),
  1727. mu_regex: $$getValue('mu_regex'),
  1728. reg_forbidden_ip: $$getValue('reg_forbidden_ip'),
  1729. reg_forbidden_port: $$getValue('reg_forbidden_port'),
  1730. sign_up_for_daily_report: $$getValue('sign_up_for_daily_report'),
  1731. enable_reg_im: $$getValue('enable_reg_im')
  1732. },
  1733. success: data => {
  1734. $("#result").modal();
  1735. $$.getElementById('msg').innerHTML = data.msg;
  1736. if (data.ret) {
  1737. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1738. }
  1739. },
  1740. error: jqXHR => {
  1741. alert(`发生错误:${
  1742. jqXHR.status
  1743. }`);
  1744. }
  1745. })
  1746. })
  1747. })
  1748. </script>
  1749. <script>
  1750. window.addEventListener('load', () => {
  1751. $('.submit_invite_settings').click( () => {
  1752. $.ajax( {
  1753. type: "POST",
  1754. url: "/admin/setting",
  1755. dataType: "json",
  1756. data: {
  1757. class: 'invite',
  1758. invitation_mode: $$getValue('invitation_mode'),
  1759. invite_rebate_mode: $$getValue('invite_rebate_mode'),
  1760. rebate_ratio: $$getValue('rebate_ratio'),
  1761. rebate_frequency_limit: $$getValue('rebate_frequency_limit'),
  1762. rebate_amount_limit: $$getValue('rebate_amount_limit'),
  1763. rebate_time_range_limit: $$getValue('rebate_time_range_limit'),
  1764. invitation_to_register_balance_reward: $$getValue('invitation_to_register_balance_reward'),
  1765. invitation_to_register_traffic_reward: $$getValue('invitation_to_register_traffic_reward'),
  1766. invite_price: $$getValue('invite_price'),
  1767. custom_invite_price: $$getValue('custom_invite_price')
  1768. },
  1769. success: data => {
  1770. $("#result").modal();
  1771. $$.getElementById('msg').innerHTML = data.msg;
  1772. if (data.ret) {
  1773. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1774. }
  1775. },
  1776. error: jqXHR => {
  1777. alert(`发生错误:${
  1778. jqXHR.status
  1779. }`);
  1780. }
  1781. } )
  1782. } )
  1783. } )
  1784. </script>
  1785. <script>
  1786. window.addEventListener('load', () => {
  1787. $$.getElementById('submit_telegram_gernal_settings').addEventListener('click', () => {
  1788. $.ajax({
  1789. type: "POST",
  1790. url: "/admin/setting",
  1791. dataType: "json",
  1792. data: {
  1793. class: 'telegram',
  1794. telegram_add_node: $$getValue('telegram_add_node'),
  1795. telegram_add_node_text: $$getValue('telegram_add_node_text'),
  1796. telegram_update_node: $$getValue('telegram_update_node'),
  1797. telegram_update_node_text: $$getValue('telegram_update_node_text'),
  1798. telegram_delete_node: $$getValue('telegram_delete_node'),
  1799. telegram_delete_node_text: $$getValue('telegram_delete_node_text'),
  1800. telegram_node_gfwed: $$getValue('telegram_node_gfwed'),
  1801. telegram_node_gfwed_text: $$getValue('telegram_node_gfwed_text'),
  1802. telegram_node_ungfwed: $$getValue('telegram_node_ungfwed'),
  1803. telegram_node_ungfwed_text: $$getValue('telegram_node_ungfwed_text'),
  1804. telegram_node_online: $$getValue('telegram_node_online'),
  1805. telegram_node_online_text: $$getValue('telegram_node_online_text'),
  1806. telegram_node_offline: $$getValue('telegram_node_offline'),
  1807. telegram_node_offline_text: $$getValue('telegram_node_offline_text'),
  1808. telegram_daily_job: $$getValue('telegram_daily_job'),
  1809. telegram_daily_job_text: $$getValue('telegram_daily_job_text'),
  1810. telegram_diary: $$getValue('telegram_diary'),
  1811. telegram_diary_text: $$getValue('telegram_diary_text'),
  1812. telegram_unbind_kick_member: $$getValue('telegram_unbind_kick_member'),
  1813. telegram_group_bound_user: $$getValue('telegram_group_bound_user'),
  1814. telegram_show_group_link: $$getValue('telegram_show_group_link'),
  1815. telegram_group_link: $$getValue('telegram_group_link')
  1816. },
  1817. success: data => {
  1818. $("#result").modal();
  1819. $$.getElementById('msg').innerHTML = data.msg;
  1820. if (data.ret) {
  1821. window.setTimeout("location.href='/admin/setting'", {$config['jump_delay']});
  1822. }
  1823. },
  1824. error: jqXHR => {
  1825. alert(`发生错误:${
  1826. jqXHR.status
  1827. }`);
  1828. }
  1829. })
  1830. })
  1831. })
  1832. </script>