system.blade.php 136 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799
  1. @extends('admin.layouts')
  2. @section('css')
  3. <link href="/assets/global/vendor/bootstrap-select/bootstrap-select.min.css" type="text/css" rel="stylesheet">
  4. <link href="//cdn.bootcss.com/bootstrap-switch/4.0.0-alpha.1/css/bootstrap-switch.min.css" type="text/css" rel="stylesheet">
  5. <link href="/assets/global/vendor/dropify/dropify.min.css" type="text/css" rel="stylesheet">
  6. <style>
  7. .text-help {
  8. padding-left: 15px;
  9. }
  10. </style>
  11. @endsection
  12. @section('content')
  13. <div class="page-content container-fluid">
  14. <div class="panel">
  15. <div class="panel-heading">
  16. <h1 class="panel-title"><i class="icon wb-settings"></i>通用配置</h1>
  17. </div>
  18. <div class="panel-body">
  19. <div class="nav-tabs-horizontal" data-plugin="tabs">
  20. <ul class="nav nav-tabs" role="tablist">
  21. <li class="nav-item" role="presentation">
  22. <a class="nav-link active" data-toggle="tab" href="#webSetting" aria-controls="webSetting" role="tab">网站常规</a>
  23. </li>
  24. <li class="nav-item" role="presentation">
  25. <a class="nav-link" data-toggle="tab" href="#account" aria-controls="account" role="tab">账号设置</a>
  26. </li>
  27. <li class="nav-item" role="presentation">
  28. <a class="nav-link" data-toggle="tab" href="#node" aria-controls="node" role="tab">节点设置</a>
  29. </li>
  30. <li class="nav-item" role="presentation">
  31. <a class="nav-link" data-toggle="tab" href="#extend" aria-controls="extend" role="tab">拓展功能</a>
  32. </li>
  33. <li class="nav-item" role="presentation">
  34. <a class="nav-link" data-toggle="tab" href="#checkIn" aria-controls="checkIn" role="tab">签到系统</a>
  35. </li>
  36. <li class="nav-item" role="presentation">
  37. <a class="nav-link" data-toggle="tab" href="#promo" aria-controls="promo" role="tab">推广系统</a>
  38. </li>
  39. <li class="nav-item" role="presentation">
  40. <a class="nav-link" data-toggle="tab" href="#notify" aria-controls="notify" role="tab">通知系统</a>
  41. </li>
  42. <li class="nav-item" role="presentation">
  43. <a class="nav-link" data-toggle="tab" href="#auto" aria-controls="auto" role="tab">自动任务</a>
  44. </li>
  45. <li class="nav-item" role="presentation">
  46. <a class="nav-link" data-toggle="tab" href="#other" aria-controls="other" role="tab">LOGO|客服|统计</a>
  47. </li>
  48. <li class="nav-item" role="presentation">
  49. <a class="nav-link" data-toggle="tab" href="#payment" aria-controls="payment" role="tab">支付系统</a>
  50. </li>
  51. <li class="dropdown nav-item" role="presentation">
  52. <a class="dropdown-toggle nav-link" data-toggle="dropdown" href="#" aria-expanded="false">菜单</a>
  53. <div class="dropdown-menu" role="menu">
  54. <a class="dropdown-item active" data-toggle="tab" href="#webSetting" aria-controls="webSetting" role="tab">网站常规</a>
  55. <a class="dropdown-item" data-toggle="tab" href="#account" aria-controls="account" role="tab">账号设置</a>
  56. <a class="dropdown-item" data-toggle="tab" href="#node" aria-controls="node" role="tab">节点设置</a>
  57. <a class="dropdown-item" data-toggle="tab" href="#extend" aria-controls="extend" role="tab">拓展功能</a>
  58. <a class="dropdown-item" data-toggle="tab" href="#checkIn" aria-controls="checkIn" role="tab">签到系统</a>
  59. <a class="dropdown-item" data-toggle="tab" href="#promo" aria-controls="promo" role="tab">推广系统</a>
  60. <a class="dropdown-item" data-toggle="tab" href="#notify" aria-controls="notify" role="tab">通知系统</a>
  61. <a class="dropdown-item" data-toggle="tab" href="#auto" aria-controls="auto" role="tab">自动任务</a>
  62. <a class="dropdown-item" data-toggle="tab" href="#other" aria-controls="other" role="tab">LOGO|客服|统计</a>
  63. <a class="dropdown-item" data-toggle="tab" href="#payment" aria-controls="payment" role="tab">支付系统</a>
  64. </div>
  65. </li>
  66. </ul>
  67. <div class="tab-content py-35 px-35">
  68. <div class="tab-pane active" id="webSetting" role="tabpanel">
  69. <form action="#" method="post" role="form" class="form-horizontal" autocomplete="off">
  70. <div class="form-row">
  71. <div class="form-group col-lg-6">
  72. <div class="row">
  73. <label class="col-md-3" for="website_name">网站名称</label>
  74. <div class="col-md-6">
  75. <div class="input-group">
  76. <input type="text" class="form-control" name="website_name" id="website_name" value="{{$website_name}}"/>
  77. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setWebsiteName()">修改</button></span>
  78. </div>
  79. </div>
  80. <span class="offset-md-3 text-help"> 发邮件时展示 </span>
  81. </div>
  82. </div>
  83. <div class="form-group col-lg-6">
  84. <div class="row">
  85. <label class="col-md-3 col-form-label" for="website_url">网站地址</label>
  86. <div class="col-md-6">
  87. <div class="input-group">
  88. <input type="url" class="form-control" name="website_url" id="website_url" value="{{$website_url}}"/>
  89. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setWebsiteUrl()">修改</button></span>
  90. </div>
  91. </div>
  92. <span class="text-help offset-md-3"> 生成重置密码、在线支付必备 </span>
  93. </div>
  94. </div>
  95. <div class="form-group col-lg-6">
  96. <div class="row">
  97. <label class="col-md-3 col-form-label" for="AppStore_id">苹果账号</label>
  98. <div class="col-md-6">
  99. <div class="input-group">
  100. <input type="email" class="form-control" name="AppStore_id" id="AppStore_id" value="{{$AppStore_id}}"/>
  101. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setAppStoreId()">修改</button></span>
  102. </div>
  103. </div>
  104. <span class="text-help offset-md-3"> iOS软件设置教程中使用的苹果账号 </span>
  105. </div>
  106. </div>
  107. <div class="form-group col-lg-6">
  108. <div class="row">
  109. <label class="col-md-3 col-form-label" for="AppStore_password">苹果密码</label>
  110. <div class="col-md-6">
  111. <div class="input-group">
  112. <input type="password" class="form-control" name="AppStore_password" id="AppStore_password" value="{{$AppStore_password}}"/>
  113. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setAppStorePassword()">修改</button></span>
  114. </div>
  115. </div>
  116. <span class="text-help offset-md-3"> iOS软件设置教程中使用的苹果密码 </span>
  117. </div>
  118. </div>
  119. <div class="form-group col-lg-6">
  120. <div class="row">
  121. <label class="col-md-3 col-form-label" for="admin_email">管理员邮箱</label>
  122. <div class="col-md-6">
  123. <div class="input-group">
  124. <input type="email" class="form-control" name="admin_email" id="admin_email" value="{{$admin_email}}"/>
  125. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setAdminEmail()">修改</button></span>
  126. </div>
  127. </div>
  128. <span class="text-help offset-md-3"> 错误提示时会提供管理员邮箱作为联系方式 </span>
  129. </div>
  130. </div>
  131. <div class="form-group col-lg-6">
  132. <div class="row">
  133. <label class="col-md-3 col-form-label" for="website_security_code">网站安全码</label>
  134. <div class="col-md-6">
  135. <div class="input-group">
  136. <input type="text" class="form-control" name="website_security_code" id="website_security_code" value="{{$website_security_code}}"/>
  137. <span class="input-group-append">
  138. <button class="btn btn-info" type="button" onclick="makeWebsiteSecurityCode()">生成</button>
  139. <button class="btn btn-primary" type="button" onclick="setWebsiteSecurityCode()">修改</button>
  140. </span>
  141. </div>
  142. </div>
  143. <span class="text-help offset-md-3">非空时必须通过 <a href="/login?securityCode=" target="_blank">安全入口</a> 加上安全码才可访问 </span>
  144. </div>
  145. </div>
  146. <div class="form-group col-lg-6">
  147. <div class="row">
  148. <label class="col-md-3 col-form-label" for="is_forbid_china">阻止大陆访问</label>
  149. <span class="col-md-9"><input type="checkbox" id="is_forbid_china" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_forbid_china) checked @endif></span>
  150. <span class="text-help offset-md-3"> 开启后大陆IP禁止访问 </span>
  151. </div>
  152. </div>
  153. <div class="form-group col-lg-6">
  154. <div class="row">
  155. <label class="col-md-3 col-form-label" for="is_forbid_oversea">阻止海外访问</label>
  156. <span class="col-md-9"><input type="checkbox" id="is_forbid_oversea" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_forbid_oversea) checked @endif></span>
  157. <span class="text-help offset-md-3"> 开启后海外IP(含港澳台)禁止访问 </span>
  158. </div>
  159. </div>
  160. <div class="form-group col-lg-6">
  161. <div class="row">
  162. <label class="col-md-3 col-form-label" for="is_forbid_robot">阻止机器人访问</label>
  163. <span class="col-md-9"><input type="checkbox" id="is_forbid_robot" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_forbid_robot) checked @endif></span>
  164. <span class="text-help offset-md-3"> 如果是机器人、爬虫、代理访问网站则会抛出404错误 </span>
  165. </div>
  166. </div>
  167. </div>
  168. </form>
  169. </div>
  170. <div class="tab-pane" id="account" role="tabpanel">
  171. <form action="#" method="post" role="form" class="form-horizontal">
  172. <div class="form-row">
  173. <div class="form-group col-lg-6">
  174. <div class="row">
  175. <label class="col-md-3 col-form-label" for="is_register">用户注册</label>
  176. <span class="col-md-9"><input type="checkbox" id="is_register" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_register) checked @endif></span>
  177. <span class="text-help offset-md-3"> 关闭后无法注册 </span>
  178. </div>
  179. </div>
  180. <div class="form-group col-lg-6">
  181. <div class="row">
  182. <label class="col-md-3 col-form-label" for="is_invite_register">邀请注册</label>
  183. <select class="col-md-3" name="is_invite_register" id="is_invite_register" data-plugin="selectpicker" data-style="btn-outline btn-primary">
  184. <option value="0" @if($is_invite_register == '0') selected @endif>关闭</option>
  185. <option value="1" @if($is_invite_register == '1') selected @endif>可选</option>
  186. <option value="2" @if($is_invite_register == '2') selected @endif>必须</option>
  187. </select>
  188. </div>
  189. </div>
  190. <div class="form-group col-lg-6">
  191. <div class="row">
  192. <label class="col-md-3 col-form-label" for="is_active_register">激活账号</label>
  193. <span class="col-md-9"><input type="checkbox" id="is_active_register" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_active_register) checked @endif></span>
  194. <span class="text-help offset-md-3"> 启用后用户需要通过邮件来激活账号 </span>
  195. </div>
  196. </div>
  197. <div class="form-group col-lg-6">
  198. <div class="row">
  199. <label class="col-md-3 col-form-label" for="is_reset_password">重置密码</label>
  200. <span class="col-md-9"><input type="checkbox" id="is_reset_password" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_reset_password) checked @endif></span>
  201. <span class="text-help offset-md-3"> 启用后用户可以通过邮件重置密码 </span>
  202. </div>
  203. </div>
  204. <div class="form-group col-lg-6">
  205. <div class="row">
  206. <label class="col-md-3 col-form-label" for="is_captcha">验证码</label>
  207. <select class="col-md-5" name="is_captcha" id="is_captcha" data-plugin="selectpicker" data-style="btn-outline btn-primary">
  208. <option value="0" @if($is_captcha == '0') selected @endif>关闭</option>
  209. <option value="1" @if($is_captcha == '1') selected @endif>普通验证码</option>
  210. <option value="2" @if($is_captcha == '2') selected @endif>极验Geetest</option>
  211. <option value="3" @if($is_captcha == '3') selected @endif>Google reCAPTCHA</option>
  212. </select>
  213. <span class="text-help offset-md-3"> 启用后登录、注册需要输入验证码 </span>
  214. </div>
  215. </div>
  216. <div class="form-group col-lg-6">
  217. <div class="row">
  218. <label class="col-md-3 col-form-label" for="is_free_code">免费邀请码</label>
  219. <span class="col-md-9"><input type="checkbox" id="is_free_code" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_free_code) checked @endif></span>
  220. <span class="text-help offset-md-3"> 关闭后免费邀请码不可见 </span>
  221. </div>
  222. </div>
  223. <div class="form-group col-lg-6">
  224. <div class="row">
  225. <label class="col-md-3 col-form-label" for="is_verify_register">注册校验验证码</label>
  226. <span class="col-md-9"><input type="checkbox" id="is_verify_register" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_verify_register) checked @endif></span>
  227. <span class="text-help offset-md-3"> 注册时需要先通过邮件获取验证码方可注册,‘激活账号’失效 </span>
  228. </div>
  229. </div>
  230. <div class="form-group col-lg-6">
  231. <div class="row">
  232. <label for="is_rand_port" class="col-md-3 col-form-label">随机端口</label>
  233. <span class="col-md-9"><input type="checkbox" id="is_rand_port" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_rand_port) checked @endif></span>
  234. <span class="text-help offset-md-3"> 注册、添加用户时随机生成端口 </span>
  235. </div>
  236. </div>
  237. <div class="form-group col-lg-6">
  238. <div class="row">
  239. <label class="col-md-3 col-form-label">端口范围</label>
  240. <div class="col-md-7">
  241. <div class="input-group">
  242. <label for="min_port"></label>
  243. <input type="number" class="form-control" name="min_port" id="min_port" value="{{$min_port}}"/>
  244. <div class="input-group-prepend">
  245. <span class="input-group-text"> ~ </span>
  246. </div>
  247. <label for="max_port"></label>
  248. <input type="number" class="form-control" name="max_port" id="max_port" value="{{$max_port}}"/>
  249. </div>
  250. </div>
  251. <span class="text-help offset-md-3"> 端口范围:1000 - 65535 </span>
  252. </div>
  253. </div>
  254. <div class="form-group col-lg-6">
  255. <div class="row">
  256. <label class="col-md-3 col-form-label" for="is_user_rand_port">自定义端口</label>
  257. <span class="col-md-9"><input type="checkbox" id="is_user_rand_port" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_user_rand_port) checked @endif></span>
  258. <span class="text-help offset-md-3"> 用户可以自定义端口 </span>
  259. </div>
  260. </div>
  261. <div class="form-group col-lg-6">
  262. <div class="row">
  263. <label class="col-md-3 col-form-label" for="default_days">初始有效期</label>
  264. <div class="col-md-7">
  265. <div class="input-group">
  266. <input type="number" class="form-control" name="default_days" id="default_days" value="{{$default_days}}"/>
  267. <div class="input-group-append">
  268. </div>
  269. <span class="input-group-text">天</span>
  270. <button class="btn btn-primary" type="button" onclick="setDefaultDays()">修改</button>
  271. </div>
  272. </div>
  273. <span class="text-help offset-md-3"> 用户注册时默认账户有效期,为0即当天到期 </span>
  274. </div>
  275. </div>
  276. <div class="form-group col-lg-6">
  277. <div class="row">
  278. <label class="col-md-3 col-form-label" for="default_traffic">初始流量</label>
  279. <div class="col-md-7">
  280. <div class="input-group">
  281. <input type="number" class="form-control" name="default_traffic" id="default_traffic" value="{{$default_traffic}}"/>
  282. <div class="input-group-append">
  283. </div>
  284. <span class="input-group-text">MB</span>
  285. <button class="btn btn-primary" type="button" onclick="setDefaultTraffic()">修改</button>
  286. </div>
  287. </div>
  288. <span class="text-help offset-md-3"> 用户注册时默认可用流量 </span>
  289. </div>
  290. </div>
  291. <div class="form-group col-lg-6">
  292. <div class="row">
  293. <label class="col-md-3 col-form-label" for="invite_num">可生成邀请码数</label>
  294. <div class="col-md-7">
  295. <div class="input-group">
  296. <input type="number" class="form-control" name="invite_num" id="invite_num" value="{{$invite_num}}"/>
  297. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setInviteNum()">修改</button></span>
  298. </div>
  299. </div>
  300. <span class="text-help offset-md-3"> 用户可以生成的邀请码数 </span>
  301. </div>
  302. </div>
  303. <div class="form-group col-lg-6">
  304. <div class="row">
  305. <label class="col-md-3 col-form-label" for="reset_password_times">重置密码次数</label>
  306. <div class="col-md-7">
  307. <div class="input-group">
  308. <input type="number" class="form-control" name="reset_password_times" id="reset_password_times" value="{{$reset_password_times}}"/>
  309. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setResetPasswordTimes()">修改</button></span>
  310. </div>
  311. </div>
  312. <span class="text-help offset-md-3"> 24小时内可以通过邮件重置密码次数 </span>
  313. </div>
  314. </div>
  315. <div class="form-group col-lg-6">
  316. <div class="row">
  317. <label class="col-md-3 col-form-label" for="sensitiveType">邮箱过滤机制</label>
  318. <span class="col-md-9"><input type="checkbox" id="sensitiveType" data-on-color="primary" data-off-color="danger" data-on-text="黑名单" data-off-text="白名单" data-base-class="bootstrap-switch" @if($sensitiveType) checked @endif></span>
  319. <span class="text-help offset-md-3"> 黑名单时,用户可使用任意黑名单外的邮箱注册;白名单时用户只能选择使用白名单中的邮箱后缀注册 </span>
  320. </div>
  321. </div>
  322. <div class="form-group col-lg-6">
  323. <div class="row">
  324. <label class="col-md-3 col-form-label" for="active_times">激活账号次数</label>
  325. <div class="col-md-7">
  326. <div class="input-group">
  327. <input type="number" class="form-control" name="active_times" id="active_times" value="{{$active_times}}"/>
  328. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setActiveTimes()">修改</button></span>
  329. </div>
  330. </div>
  331. <span class="text-help offset-md-3"> 24小时内可以通过邮件激活账号次数 </span>
  332. </div>
  333. </div>
  334. <div class="form-group col-lg-6">
  335. <div class="row">
  336. <label class="col-md-3 col-form-label" for="register_ip_limit">同IP注册限制</label>
  337. <div class="col-md-7">
  338. <div class="input-group">
  339. <input type="number" class="form-control" name="register_ip_limit" id="register_ip_limit" value="{{$register_ip_limit}}"/>
  340. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setRegisterIpLimit()">修改</button></span>
  341. </div>
  342. </div>
  343. <span class="text-help offset-md-3"> 同IP在24小时内允许注册数量,为0时不限制 </span>
  344. </div>
  345. </div>
  346. <div class="form-group col-lg-6">
  347. <div class="row">
  348. <label class="col-md-3 col-form-label" for="initial_labels_for_user">用户初始标签</label>
  349. <select class="col-md-7 show-tick" name="initial_labels_for_user" id="initial_labels_for_user" data-plugin="selectpicker" data-style="btn-outline btn-primary" multiple>
  350. @foreach($label_list as $label)
  351. <option value="{{$label->id}}" @if(in_array($label->id, explode(',', $initial_labels_for_user))) selected @endif>{{$label->name}}</option>
  352. @endforeach
  353. </select>
  354. <span class="text-help offset-md-3"> 注册用户时的初始标签,标签用于关联节点 </span>
  355. </div>
  356. </div>
  357. <div class="form-group col-lg-6">
  358. <div class="row">
  359. <label class="col-md-3 col-form-label" for="user_invite_days">用户-邀请码有效期</label>
  360. <div class="col-md-7">
  361. <div class="input-group">
  362. <input type="number" class="form-control" name="user_invite_days" id="user_invite_days" value="{{$user_invite_days}}"/>
  363. <div class="input-group-append">
  364. </div>
  365. <span class="input-group-text">天</span>
  366. <button class="btn btn-primary" type="button" onclick="setUserInviteDays()">修改</button>
  367. </div>
  368. </div>
  369. <span class="text-help offset-md-3"> 用户自行生成邀请的有效期 </span>
  370. </div>
  371. </div>
  372. </div>
  373. </form>
  374. </div>
  375. <div class="tab-pane" id="node" role="tabpanel">
  376. <form action="#" method="post" role="form" class="form-horizontal">
  377. <div class="form-row">
  378. <div class="form-group col-lg-6">
  379. <div class="row">
  380. <label class="col-md-3 col-form-label" for="subscribe_domain">节点订阅地址</label>
  381. <div class="col-md-7">
  382. <div class="input-group">
  383. <input type="url" class="form-control" name="subscribe_domain" id="subscribe_domain" value="{{$subscribe_domain}}"/>
  384. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setSubscribeDomain()">修改</button></span>
  385. </div>
  386. </div>
  387. <span class="text-help offset-md-3"> (推荐)防止面板域名被DNS投毒后无法正常订阅,需带http://或https:// </span>
  388. </div>
  389. </div>
  390. <div class="form-group col-lg-6">
  391. <div class="row">
  392. <label class="col-md-3 col-form-label" for="subscribe_max">订阅节点数</label>
  393. <div class="col-md-7">
  394. <div class="input-group">
  395. <input type="number" class="form-control" name="subscribe_max" id="subscribe_max" value="{{$subscribe_max}}"/>
  396. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setSubscribeMax()">修改</button></span>
  397. </div>
  398. </div>
  399. <span class="text-help offset-md-3"> 客户端订阅时取得几个节点,为0时返回全部节点 </span>
  400. </div>
  401. </div>
  402. <div class="form-group col-lg-6">
  403. <div class="row">
  404. <label class="col-md-3 col-form-label" for="mix_subscribe">混合订阅</label>
  405. <span class="col-md-9"><input type="checkbox" id="mix_subscribe" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($mix_subscribe) checked @endif></span>
  406. <span class="text-help offset-md-3"> 启用后,订阅信息中将包含V2Ray节点信息(仅支持Shadowrocket、Quantumult、v2rayN) </span>
  407. </div>
  408. </div>
  409. <div class="form-group col-lg-6">
  410. <div class="row">
  411. <label class="col-md-3 col-form-label" for="rand_subscribe">随机订阅</label>
  412. <span class="col-md-9"><input type="checkbox" id="rand_subscribe" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($rand_subscribe) checked @endif></span>
  413. <span class="text-help offset-md-3"> 启用后,订阅时将随机返回节点信息,否则按节点排序返回 </span>
  414. </div>
  415. </div>
  416. <div class="form-group col-lg-6">
  417. <div class="row">
  418. <label class="col-md-3 col-form-label" for="is_custom_subscribe">高级订阅</label>
  419. <span class="col-md-9"><input type="checkbox" id="is_custom_subscribe" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_custom_subscribe) checked @endif></span>
  420. <span class="text-help offset-md-3"> 启用后,订阅信息顶部将显示过期时间、剩余流量(Quantumult有特殊效果) </span>
  421. </div>
  422. </div>
  423. </div>
  424. </form>
  425. </div>
  426. <div class="tab-pane" id="extend" role="tabpanel">
  427. <form action="#" method="post" role="form" class="form-horizontal">
  428. <div class="form-row">
  429. <div class="form-group col-lg-6">
  430. <div class="row">
  431. <label class="col-md-3 col-form-label" for="is_namesilo">Namesilo</label>
  432. <span class="col-md-9"><input type="checkbox" id="is_namesilo" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_namesilo) checked @endif></span>
  433. <span class="text-help offset-md-3"> 添加、编辑节点的绑定域名时自动更新域名DNS记录值为节点IP(<a href="https://www.namesilo.com/account_api.php?rid=326ec20pa" target="_blank">创建API KEY</a>) </span>
  434. </div>
  435. </div>
  436. <div class="form-group col-lg-6">
  437. <div class="row">
  438. <label class="col-md-3 col-form-label" for="namesilo_key">Namesilo API KEY</label>
  439. <div class="col-md-7">
  440. <div class="input-group">
  441. <input type="text" class="form-control" name="namesilo_key" id="namesilo_key" value="{{$namesilo_key}}" placeholder="填入Namesilo上申请的API KEY"/>
  442. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setNamesiloKey()">修改</button></span>
  443. </div>
  444. </div>
  445. <span class="text-help offset-md-3"> 域名必须是<a href="https://www.namesilo.com/?rid=326ec20pa" target="_blank">www.namesilo.com</a>上购买的 </span>
  446. </div>
  447. </div>
  448. <div class="form-group col-lg-6">
  449. <div class="row">
  450. <label class="col-md-3 col-form-label" for="admin_invite_days">管理员-邀请码有效期</label>
  451. <div class="col-md-7">
  452. <div class="input-group">
  453. <input class="form-control" type="number" id="admin_invite_days" name="admin_invite_days" value="{{$admin_invite_days}}"/>
  454. <div class="input-group-append">
  455. </div>
  456. <span class="input-group-text">天</span>
  457. <button class="btn btn-primary" type="button" onclick="setAdminInviteDays()">修改</button>
  458. </div>
  459. </div>
  460. <span class="text-help offset-md-3"> 管理员生成邀请码的有效期 </span>
  461. </div>
  462. </div>
  463. @if($is_captcha == 2)
  464. <div class="form-group col-lg-6">
  465. <div class="row">
  466. <label class="col-md-3 col-form-label" for="geetest_id">极验ID</label>
  467. <div class="col-md-7">
  468. <div class="input-group">
  469. <input type="text" class="form-control" name="geetest_id" id="geetest_id" value="{{$geetest_id}}"/>
  470. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setGeetestId()">修改</button></span>
  471. </div>
  472. </div>
  473. <span class="text-help offset-md-3"> 本功能需要 <a href="https://auth.geetest.com/login/" target="_blank">极验后台</a> 申请权限及应用 </span>
  474. </div>
  475. </div>
  476. <div class="form-group col-lg-6">
  477. <div class="row">
  478. <label class="col-md-3 col-form-label" for="geetest_key">极验KEY</label>
  479. <div class="col-md-7">
  480. <div class="input-group">
  481. <input type="text" class="form-control" name="geetest_key" id="geetest_key" value="{{$geetest_key}}"/>
  482. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setGeetestKey()">修改</button></span>
  483. </div>
  484. </div>
  485. </div>
  486. </div>
  487. @elseif($is_captcha == 3)
  488. <div class="form-group col-lg-6">
  489. <div class="row">
  490. <label class="col-md-3 col-form-label" for="google_captcha_sitekey">网站密钥</label>
  491. <div class="col-md-7">
  492. <div class="input-group">
  493. <input type="text" class="form-control" name="google_captcha_sitekey" id="google_captcha_sitekey" value="{{$google_captcha_sitekey}}"/>
  494. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setGoogleCaptchaId()">修改</button></span>
  495. </div>
  496. </div>
  497. <span class="text-help offset-md-3"> 本功能需要 <a href="https://www.google.com/recaptcha/admin" target="_blank">Google reCAPTCHA后台</a> 申请权限及应用 (申请需科学上网,日常验证不用)</span>
  498. </div>
  499. </div>
  500. <div class="form-group col-lg-6">
  501. <div class="row">
  502. <label class="col-md-3 control-label" for="google_captcha_secret">密钥</label>
  503. <div class="col-md-7">
  504. <div class="input-group">
  505. <input type="text" class="form-control" name="google_captcha_secret" id="google_captcha_secret" value="{{$google_captcha_secret}}"/>
  506. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setGoogleCaptchaKey()">修改</button></span>
  507. </div>
  508. </div>
  509. </div>
  510. </div>
  511. @endif
  512. </div>
  513. </form>
  514. </div>
  515. <div class="tab-pane" id="checkIn" role="tabpanel">
  516. <form action="#" method="post" role="form" class="form-horizontal">
  517. <div class="form-row">
  518. <div class="form-group col-lg-6">
  519. <div class="row">
  520. <label class="col-md-3 col-form-label" for="is_checkin">签到加流量</label>
  521. <span class="col-md-9"><input type="checkbox" id="is_checkin" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_checkin) checked @endif></span>
  522. <span class="text-help offset-md-3"> 登录时将根据流量范围随机得到流量 </span>
  523. </div>
  524. </div>
  525. <div class="form-group col-lg-6">
  526. <div class="row">
  527. <label class="col-md-3 col-form-label" for="traffic_limit_time">时间间隔</label>
  528. <div class="col-md-7">
  529. <div class="input-group">
  530. <input type="number" class="form-control" name="traffic_limit_time" id="traffic_limit_time" value="{{$traffic_limit_time}}"/>
  531. <div class="input-group-append">
  532. </div>
  533. <span class="input-group-text">分钟</span>
  534. <button class="btn btn-primary" type="button" onclick="setTrafficLimitTime()">修改</button>
  535. </div>
  536. </div>
  537. <span class="text-help offset-md-3"> 间隔多久才可以再次签到</span>
  538. </div>
  539. </div>
  540. <div class="form-group col-lg-6">
  541. <div class="row">
  542. <label class="col-md-3 col-form-label">流量范围</label>
  543. <div class="col-md-7">
  544. <div class="input-group">
  545. <label for="min_rand_traffic"></label>
  546. <input type="number" class="form-control" name="min_rand_traffic" id="min_rand_traffic" value="{{$min_rand_traffic}}"/>
  547. <div class="input-group-prepend">
  548. <span class="input-group-text"> ~ </span>
  549. </div>
  550. <label for="max_rand_traffic"></label>
  551. <input type="number" class="form-control" name="max_rand_traffic" id="max_rand_traffic" value="{{$max_rand_traffic}}"/>
  552. <div class="input-group-prepend">
  553. <span class="input-group-text"> MB </span>
  554. </div>
  555. </div>
  556. </div>
  557. </div>
  558. </div>
  559. </div>
  560. </form>
  561. </div>
  562. <div class="tab-pane" id="promo" role="tabpanel">
  563. <form action="#" method="post" role="form" class="form-horizontal">
  564. <div class="form-row">
  565. <div class="form-group col-lg-6">
  566. <div class="row">
  567. <label class="col-md-3 col-form-label" for="referral_status">推广功能</label>
  568. <div class="col-md-7">
  569. <div class="input-group">
  570. <input type="checkbox" id="referral_status" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($referral_status) checked @endif>
  571. </div>
  572. </div>
  573. <span class="text-help offset-md-3"> 关闭后用户不可见,但是不影响其正常邀请返利 </span>
  574. </div>
  575. </div>
  576. <div class="form-group col-lg-6">
  577. <div class="row">
  578. <label class="col-md-3 col-form-label" for="referral_traffic">注册送流量</label>
  579. <div class="col-md-7">
  580. <div class="input-group">
  581. <input type="number" class="form-control" name="referral_gift_traffic" id="referral_traffic" value="{{$referral_traffic}}"/>
  582. <div class="input-group-append">
  583. <span class="input-group-text">MB</span>
  584. <button class="btn btn-primary" type="button" onclick="setReferralTraffic()">修改</button>
  585. </div>
  586. </div>
  587. </div>
  588. <span class="text-help offset-md-3"> 根据推广链接、邀请码注册则赠送相应的流量 </span>
  589. </div>
  590. </div>
  591. <div class="form-group col-lg-6">
  592. <div class="row">
  593. <label class="col-md-3 col-form-label" for="referral_percent">返利比例</label>
  594. <div class="col-md-7">
  595. <div class="input-group">
  596. <input type="number" class="form-control" name="referral_percent" id="referral_percent" value="{{$referral_percent * 100}}"/>
  597. <div class="input-group-append">
  598. <span class="input-group-text">%</span>
  599. <button class="btn btn-primary" type="button" onclick="setReferralPercent()">修改</button>
  600. </div>
  601. </div>
  602. </div>
  603. <span class="text-help offset-md-3"> 根据推广链接注册的账号每笔消费推广人可以分成的比例 </span>
  604. </div>
  605. </div>
  606. <div class="form-group col-lg-6">
  607. <div class="row">
  608. <label class="col-md-3 col-form-label" for="referral_money">提现限制</label>
  609. <div class="col-md-7">
  610. <div class="input-group">
  611. <input type="number" class="form-control" name="referral_money" id="referral_money" value="{{$referral_money}}"/>
  612. <div class="input-group-append">
  613. <span class="input-group-text">元</span>
  614. <button class="btn btn-primary" type="button" onclick="setReferralMoney()">修改</button>
  615. </div>
  616. </div>
  617. </div>
  618. <span class="text-help offset-md-3"> 满多少元才可以申请提现 </span>
  619. </div>
  620. </div>
  621. </div>
  622. </form>
  623. </div>
  624. <div class="tab-pane" id="notify" role="tabpanel">
  625. <form action="#" method="post" role="form" class="form-horizontal">
  626. <div class="row">
  627. <div class="form-group col-lg-6">
  628. <div class="row">
  629. <label class="col-md-3 col-form-label" for="expire_warning">用户过期警告</label>
  630. <span class="col-md-9"><input type="checkbox" id="expire_warning" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($expire_warning) checked @endif></span>
  631. <span class="text-help offset-md-3"> 启用后账号距到期还剩阈值设置的值时自动发邮件提醒用户 </span>
  632. </div>
  633. </div>
  634. <div class="form-group col-lg-6">
  635. <div class="row">
  636. <label class="col-md-3 col-form-label" for="expire_days">过期警告阈值</label>
  637. <div class="col-md-7">
  638. <div class="input-group">
  639. <input type="number" class="form-control" name="expire_days" id="expire_days" value="{{$expire_days}}"/>
  640. <div class="input-group-append">
  641. <span class="input-group-text">天</span>
  642. <button class="btn btn-primary" type="button" onclick="setExpireDays()">修改</button>
  643. </div>
  644. </div>
  645. </div>
  646. <span class="text-help offset-md-3"> 账号距离过期还差多少天时发警告邮件 </span>
  647. </div>
  648. </div>
  649. <div class="form-group col-lg-6">
  650. <div class="row">
  651. <label class="col-md-3 col-form-label" for="traffic_warning">用户流量警告</label>
  652. <span class="col-md-9"><input type="checkbox" id="traffic_warning" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($traffic_warning) checked @endif></span>
  653. <span class="text-help offset-md-3"> 启用后账号已使用流量超过警告阈值时自动发邮件提醒用户 </span>
  654. </div>
  655. </div>
  656. <div class="form-group col-lg-6">
  657. <div class="row">
  658. <label for="traffic_warning_percent" class="col-md-3 col-form-label">流量警告阈值</label>
  659. <div class="col-md-7">
  660. <div class="input-group">
  661. <input type="number" class="form-control" name="traffic_warning_percent" id="traffic_warning_percent" value="{{$traffic_warning_percent}}"/>
  662. <div class="input-group-append">
  663. <span class="input-group-text">%</span>
  664. <button class="btn btn-primary" type="button" onclick="setTrafficWarningPercent()">修改</button>
  665. </div>
  666. </div>
  667. </div>
  668. <span class="text-help offset-md-3"> 建议设置在70%~90% </span>
  669. </div>
  670. </div>
  671. <div class="form-group col-lg-6">
  672. <div class="row">
  673. <label class="col-md-3 col-form-label" for="is_node_crash_warning">节点离线提醒</label>
  674. <span class="col-md-9"><input type="checkbox" id="is_node_crash_warning" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_node_crash_warning) checked @endif></span>
  675. <span class="text-help offset-md-3"> 启用后如果节点离线则通过ServerChan推送提醒 </span>
  676. </div>
  677. </div>
  678. <div class="form-group col-lg-6">
  679. <div class="row">
  680. <label class="col-md-3 col-form-label" for="webmaster_email">管理员收信地址</label>
  681. <div class="col-md-7">
  682. <div class="input-group">
  683. <input type="email" class="form-control" name="webmaster_email" id="webmaster_email" value="{{$webmaster_email}}" placeholder="master@ssrpanel.com"/>
  684. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setCrashWarningEmail()">修改</button></span>
  685. </div>
  686. </div>
  687. <span class="text-help offset-md-3"> 填写此值则节点离线、用户回复工单都会自动提醒 </span>
  688. </div>
  689. </div>
  690. <div class="form-group col-lg-6">
  691. <div class="row">
  692. <label class="col-md-3 col-form-label" for="nodes_detection">节点阻断检测</label>
  693. <span class="col-md-9"><input type="checkbox" id="nodes_detection" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($nodes_detection) checked @endif></span>
  694. <span class="text-help offset-md-3"> 每小时检测节点是否被阻断并提醒 </span>
  695. </div>
  696. </div>
  697. <div class="form-group col-lg-6">
  698. <div class="row">
  699. <label class="col-md-3 col-form-label" for="numberOfWarningTimes">阻断检测提醒</label>
  700. <div class="col-md-7">
  701. <div class="input-group">
  702. <input type="number" class="form-control" name="numberOfWarningTimes" id="numberOfWarningTimes" value="{{$numberOfWarningTimes}}"/>
  703. <div class="input-group-append">
  704. <span class="input-group-text">次</span>
  705. <button class="btn btn-primary" type="button" onclick="setNumberOfWarningTimes()">修改</button>
  706. </div>
  707. </div>
  708. </div>
  709. <span class="text-help offset-md-3"> 提醒N次后自动下线节点,为0时不限制,不超过12 </span>
  710. </div>
  711. </div>
  712. <div class="form-group col-lg-6">
  713. <div class="row">
  714. <label class="col-md-3 col-form-label" for="is_server_chan">ServerChan</label>
  715. <span class="col-md-9"><input type="checkbox" id="is_server_chan" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_server_chan) checked @endif></span>
  716. <span class="text-help offset-md-3"> 推送节点离线提醒、用户流量异常警告、节点使用报告(<a href="http://sc.ftqq.com" target="_blank">绑定微信</a>) </span>
  717. </div>
  718. </div>
  719. <div class="form-group col-lg-6">
  720. <div class="row">
  721. <label class="col-md-3 col-form-label" for="server_chan_key">SCKEY</label>
  722. <div class="col-md-7">
  723. <div class="input-group">
  724. <input type="text" class="form-control" name="server_chan_key" id="server_chan_key" value="{{$server_chan_key}}" placeholder="请到ServerChan申请"/>
  725. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setServerChanKey()">修改</button></span>
  726. </div>
  727. </div>
  728. <span class="text-help offset-md-3"> 启用ServerChan,请务必填入本值(<a href="http://sc.ftqq.com" target="_blank">申请SCKEY</a>) </span>
  729. </div>
  730. </div>
  731. <div class="form-group col-lg-6">
  732. <div class="row">
  733. <label class="col-md-3 col-form-label" for="is_push_bear">PushBear</label>
  734. <span class="col-md-9"><input type="checkbox" id="is_push_bear" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_push_bear) checked @endif></span>
  735. <span class="text-help offset-md-3"> 使用PushBear推送微信消息给用户(<a href="https://pushbear.ftqq.com/admin/#/signin" target="_blank">创建消息通道</a>) </span>
  736. </div>
  737. </div>
  738. <div class="form-group col-lg-6">
  739. <div class="row">
  740. <label class="col-md-3 col-form-label" for="push_bear_send_key">PushBear SendKey</label>
  741. <div class="col-md-7">
  742. <div class="input-group">
  743. <input type="text" class="form-control" name="push_bear_send_key" id="push_bear_send_key" value="{{$push_bear_send_key}}" placeholder="创建消息通道后即可获取"/>
  744. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setPushBearSendKey()">修改</button></span>
  745. </div>
  746. </div>
  747. <span class="text-help offset-md-3"> 启用PushBear,请务必填入本值 </span>
  748. </div>
  749. </div>
  750. <div class="form-group col-lg-6">
  751. <div class="row">
  752. <label class="col-md-3 col-form-label" for="push_bear_qrcode">PushBear订阅二维码</label>
  753. <div class="col-md-7">
  754. <div class="input-group">
  755. <input type="url" class="form-control" name="push_bear_qrcode" id="push_bear_qrcode" value="{{$push_bear_qrcode}}" placeholder="填入消息通道的二维码URL"/>
  756. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setPushBearQrCode()">修改</button></span>
  757. </div>
  758. </div>
  759. <span class="text-help offset-md-3"> 创建消息通道后,在二维码上点击右键“复制图片地址”并粘贴至此处 </span>
  760. </div>
  761. </div>
  762. </div>
  763. </form>
  764. </div>
  765. <div class="tab-pane" id="auto" role="tabpanel">
  766. <form action="#" method="post" role="form" class="form-horizontal">
  767. <div class="row">
  768. <div class="form-group col-lg-6">
  769. <div class="row">
  770. <label class="col-md-3 col-form-label" for="is_clear_log">自动清除日志</label>
  771. <span class="col-md-9"><input type="checkbox" id="is_clear_log" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_clear_log) checked @endif></span>
  772. <span class="text-help offset-md-3"> (推荐)启用后自动清除无用日志 </span>
  773. </div>
  774. </div>
  775. <div class="form-group col-lg-6">
  776. <div class="row">
  777. <label class="col-md-3 col-form-label" for="reset_traffic">流量自动重置</label>
  778. <span class="col-md-9"><input type="checkbox" id="reset_traffic" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($reset_traffic) checked @endif></span>
  779. <span class="text-help offset-md-3"> 用户会按其购买套餐的日期自动重置可用流量 </span>
  780. </div>
  781. </div>
  782. <div class="form-group col-lg-6">
  783. <div class="row">
  784. <label class="col-md-3 col-form-label" for="is_subscribe_ban">订阅异常自动封禁</label>
  785. <span class="col-md-9"><input type="checkbox" id="is_subscribe_ban" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_subscribe_ban) checked @endif></span>
  786. <span class="text-help offset-md-3"> 启用后用户订阅链接请求超过设定阈值则自动封禁 </span>
  787. </div>
  788. </div>
  789. <div class="form-group col-lg-6">
  790. <div class="row">
  791. <label class="col-md-3 col-form-label" for="subscribe_ban_times">订阅请求阈值</label>
  792. <div class="col-md-7">
  793. <div class="input-group">
  794. <input type="number" class="form-control" name="subscribe_ban_times" id="subscribe_ban_times" value="{{$subscribe_ban_times}}"/>
  795. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setSubscribeBanTimes()">修改</button></span>
  796. </div>
  797. </div>
  798. <span class="text-help offset-md-3"> 24小时内订阅链接请求次数限制 </span>
  799. </div>
  800. </div>
  801. <div class="form-group col-lg-6">
  802. <div class="row">
  803. <label class="col-md-3 col-form-label" for="is_traffic_ban">异常自动封号</label>
  804. <span class="col-md-9"><input type="checkbox" id="is_traffic_ban" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_traffic_ban) checked @endif/></span>
  805. <span class="text-help offset-md-3"> 1小时内流量超过异常阈值则自动封号(仅禁用代理) </span>
  806. </div>
  807. </div>
  808. <div class="form-group col-lg-6">
  809. <div class="row">
  810. <label class="col-md-3 col-form-label" for="traffic_ban_value">流量异常阈值</label>
  811. <div class="col-md-7">
  812. <div class="input-group">
  813. <input type="number" class="form-control" name="traffic_ban_value" id="traffic_ban_value" value="{{$traffic_ban_value}}"/>
  814. <div class="input-group-append">
  815. <span class="input-group-text">GB</span>
  816. <button class="btn btn-primary" type="button" onclick="setTrafficBanValue()">修改</button>
  817. </div>
  818. </div>
  819. </div>
  820. <span class="text-help offset-md-3"> 1小时内超过该值,则触发自动封号 </span>
  821. </div>
  822. </div>
  823. <div class="form-group col-lg-6">
  824. <div class="row">
  825. <label class="col-md-3 col-form-label" for="traffic_ban_time">封号时长</label>
  826. <div class="col-md-7">
  827. <div class="input-group">
  828. <input type="number" class="form-control" name="traffic_ban_time" id="traffic_ban_time" value="{{$traffic_ban_time}}"/>
  829. <div class="input-group-append">
  830. <span class="input-group-text">分钟</span>
  831. <button class="btn btn-primary" type="button" onclick="setTrafficBanTime()">修改</button>
  832. </div>
  833. </div>
  834. </div>
  835. <span class="text-help offset-md-3"> 触发流量异常导致用户被封禁的时长,到期后自动解封 </span>
  836. </div>
  837. </div>
  838. <div class="form-group col-lg-6">
  839. <div class="row">
  840. <label class="col-md-3 col-form-label" for="auto_release_port">端口自动释放</label>
  841. <span class="col-md-9"><input type="checkbox" data-on-color="primary" id="auto_release_port" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($auto_release_port) checked @endif></span>
  842. <span class="text-help offset-md-3"> 被封禁和过期一个月的用户端口自动释放 </span>
  843. </div>
  844. </div>
  845. <div class="form-group col-lg-6">
  846. <div class="row">
  847. <label class="col-md-3 col-form-label" for="is_ban_status">过期自动封禁</label>
  848. <span class="col-md-9"><input type="checkbox" id="is_ban_status" data-on-color="primary" data-off-color="danger" data-on-text="封禁整个账号" data-off-text="仅封禁代理" data-base-class="bootstrap-switch" @if($is_ban_status) checked @endif></span>
  849. <span class="text-help offset-md-3"> (慎重)封禁整个账号会重置账号的所有数据且会导致用户无法登录 </span>
  850. </div>
  851. </div>
  852. <div class="form-group col-lg-6">
  853. <div class="row">
  854. <label class="col-md-3 col-form-label" for="node_daily_report">节点使用报告</label>
  855. <span class="col-md-9"><input type="checkbox" id="node_daily_report" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($node_daily_report) checked @endif></span>
  856. <span class="text-help offset-md-3"> 每天早上9点推送昨天节点的使用情况 </span>
  857. </div>
  858. </div>
  859. </div>
  860. </form>
  861. </div>
  862. <div class="tab-pane" id="other" role="tabpanel">
  863. <form action="/admin/setExtend" method="post" enctype="multipart/form-data" class="upload-form" role="form" id="setExtend">
  864. {{csrf_field()}}
  865. <div class="form-row">
  866. <div class="form-group col-lg-6">
  867. <div class="row">
  868. <label class="col-form-label col-md-3" for="website_home_logo">首页LOGO</label>
  869. <div class="col-md-9">
  870. <input type="file" name="website_home_logo" id="website_home_logo" data-plugin="dropify" data-default-file={{$website_home_logo?:'/assets/images/noimage.png'}} />
  871. <button type="submit" class="btn btn-success float-right mt-10"> 提 交</button>
  872. </div>
  873. </div>
  874. </div>
  875. <div class="form-group col-lg-6">
  876. <div class="row">
  877. <label class="col-form-label col-md-3" for="website_logo">站内LOGO</label>
  878. <div class="col-md-9">
  879. <input type="file" name="website_logo" id="website_logo" data-plugin="dropify" data-default-file={{$website_logo?:'/assets/images/noimage.png'}} />
  880. <button type="submit" class="btn btn-success float-right mt-10"> 提 交</button>
  881. </div>
  882. </div>
  883. </div>
  884. <div class="form-group col-lg-6">
  885. <div class="row">
  886. <label class="col-form-label col-md-3" for="website_analytics">统计代码</label>
  887. <div class="col-md-9">
  888. <textarea class="form-control" rows="10" name="website_analytics" id="website_analytics">{{$website_analytics}}</textarea>
  889. <button type="submit" class="btn btn-success float-right mt-10"> 提 交</button>
  890. </div>
  891. </div>
  892. </div>
  893. <div class="form-group col-lg-6">
  894. <div class="row">
  895. <label class="col-form-label col-md-3" for="website_customer_service">客服代码</label>
  896. <div class="col-md-9">
  897. <textarea class="form-control" rows="10" name="website_customer_service" id="website_customer_service">{{$website_customer_service}}</textarea>
  898. <button type="submit" class="btn btn-success float-right mt-10"> 提 交</button>
  899. </div>
  900. </div>
  901. </div>
  902. </div>
  903. </form>
  904. </div>
  905. <div class="tab-pane" id="payment" role="tabpanel">
  906. <form action="#" method="post" role="form" class="form-horizontal">
  907. <div class="form-row pb-70">
  908. <div class="form-group col-md-12">
  909. <div class="alert alert-info text-center">
  910. <button class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span><span class="sr-only">{{trans('home.close')}}</span></button>
  911. 请在<a href="https://console.youzanyun.com/login" target="_blank" style="color: red;"> 有赞云 </a>设置应用的推送网址为:{{$website_url . '/api/yzy'}}
  912. </div>
  913. </div>
  914. <div class="form-group col-lg-6">
  915. <div class="row">
  916. <label class="col-md-3 col-form-label" for="is_youzan">有赞支付</label>
  917. <span class="col-md-9"><input type="checkbox" id="is_youzan" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_youzan) checked @endif></span>
  918. <span class="text-help offset-md-3"> 请先到 <a href="https://console.youzanyun.com/dashboard">有赞云</a> 申请client_id和client_secret(<a href="https://github.com/ssrpanel/SSRPanel/wiki/%E6%9C%89%E8%B5%9E%E4%BA%91%E6%94%AF%E4%BB%98" target="_blank">申请教程</a>) </span>
  919. </div>
  920. </div>
  921. <div class="form-group col-lg-6">
  922. <div class="row">
  923. <label class="col-md-3 col-form-label" for="kdt_id">授权店铺id</label>
  924. <div class="col-md-7">
  925. <div class="input-group">
  926. <input type="text" class="form-control" name="kdt_id" id="kdt_id" value="{{$kdt_id}}"/>
  927. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setKdtId()">修改</button></span>
  928. </div>
  929. </div>
  930. </div>
  931. </div>
  932. <div class="form-group col-lg-6">
  933. <div class="row">
  934. <label class="col-md-3 col-form-label" for="youzan_client_id">Client_id</label>
  935. <div class="col-md-7">
  936. <div class="input-group">
  937. <input type="text" class="form-control" name="youzan_client_id" id="youzan_client_id" value="{{$youzan_client_id}}"/>
  938. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setYouzanClientId()">修改</button></span>
  939. </div>
  940. </div>
  941. </div>
  942. </div>
  943. <div class="form-group col-lg-6">
  944. <div class="row">
  945. <label class="col-md-3 col-form-label" for="youzan_client_secret">Client_secret</label>
  946. <div class="col-md-7">
  947. <div class="input-group">
  948. <input type="text" class="form-control" name="youzan_client_secret" id="youzan_client_secret" value="{{$youzan_client_secret}}"/>
  949. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setYouzanClientSecret()">修改</button></span>
  950. </div>
  951. </div>
  952. </div>
  953. </div>
  954. </div>
  955. <div class="row pb-70">
  956. <div class="form-group col-lg-6">
  957. <div class="row">
  958. <label for="is_alipay" class="col-md-3 col-form-label">AliPay国际</label>
  959. <span class="col-md-9"><input type="checkbox" id="is_alipay" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_alipay) checked @endif></span>
  960. <span class="text-help offset-md-3"> 请先到 <a href="https://global.alipay.com/" target="_blank">AliPay国际</a> 申请partner和key </span>
  961. </div>
  962. </div>
  963. <div class="form-group col-lg-6">
  964. <div class="row">
  965. <label class="col-md-3 col-form-label" for="alipay_currency">结算币种</label>
  966. <select class="col-md-5" name="alipay_currency" id="alipay_currency" data-plugin="selectpicker" data-style="btn-outline btn-primary">
  967. <option value="USD" @if($alipay_currency == 'USD') selected @endif>美元</option>
  968. <option value="HKD" @if($alipay_currency == 'HKD') selected @endif>港币</option>
  969. <option value="JPY" @if($alipay_currency == 'JPY') selected @endif>日元</option>
  970. <option value="EUR" @if($alipay_currency == 'EUR') selected @endif>欧元</option>
  971. </select>
  972. </div>
  973. </div>
  974. <div class="form-group col-lg-6">
  975. <div class="row">
  976. <label class="col-md-3 col-form-label" for="alipay_sign_type">加密方式</label>
  977. <select class="col-md-5" name="alipay_sign_type" id="alipay_sign_type" data-plugin="selectpicker" data-style="btn-outline btn-primary">
  978. <option value="MD5" @if($alipay_sign_type == 'MD5') selected @endif>MD5</option>
  979. <option value="RSA" @if($alipay_sign_type == 'RSA') selected @endif>RSA</option>
  980. </select>
  981. </div>
  982. </div>
  983. <div class="form-group col-lg-6">
  984. <div class="row">
  985. <label class="col-md-3 col-form-label" for="alipay_transport">启用SSL验证</label>
  986. <select class="col-md-5" name="alipay_transport" id="alipay_transport" data-plugin="selectpicker" data-style="btn-outline btn-primary">
  987. <option value="http" @if($alipay_transport == 'http') selected @endif>否</option>
  988. <option value="https" @if($alipay_transport == 'https') selected @endif>是</option>
  989. </select>
  990. <span class="text-help offset-md-3"> HTTPS站点需启用 </span>
  991. </div>
  992. </div>
  993. <div class="form-group col-lg-6">
  994. <div class="row">
  995. <label class="col-md-3 col-form-label" for="alipay_partner">Partner</label>
  996. <div class="col-md-7">
  997. <div class="input-group">
  998. <input type="text" class="form-control" name="alipay_partner" id="alipay_partner" value="{{$alipay_partner}}"/>
  999. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setAlipayPartner()">修改</button></span>
  1000. </div>
  1001. </div>
  1002. </div>
  1003. </div>
  1004. <div class="form-group col-lg-6">
  1005. <div class="row">
  1006. <label for="alipay_key" class="col-md-3 col-form-label">Key</label>
  1007. <div class="col-md-7">
  1008. <div class="input-group">
  1009. <input type="password" class="form-control" name="alipay_key" id="alipay_key" value="{{$alipay_key}}"/>
  1010. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setAlipayKey()">修改</button></span>
  1011. </div>
  1012. </div>
  1013. </div>
  1014. </div>
  1015. <div class="form-group col-lg-6">
  1016. <div class="row">
  1017. <label class="col-md-3 col-form-label" for="alipay_private_key">RSA私钥</label>
  1018. <div class="col-md-7">
  1019. <div class="input-group">
  1020. <input type="password" class="form-control" name="alipay_private_key" id="alipay_private_key" value="{{$alipay_private_key}}"/>
  1021. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setAlipayPrivateKey()">修改</button></span>
  1022. </div>
  1023. </div>
  1024. </div>
  1025. </div>
  1026. <div class="form-group col-lg-6">
  1027. <div class="row">
  1028. <label class="col-md-3 col-form-label" for="alipay_public_key">RSA公钥</label>
  1029. <div class="col-md-7">
  1030. <div class="input-group">
  1031. <input type="password" class="form-control" name="alipay_public_key" id="alipay_public_key" value="{{$alipay_public_key}}"/>
  1032. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setAlipayPublicKey()">修改</button></span>
  1033. </div>
  1034. </div>
  1035. </div>
  1036. </div>
  1037. </div>
  1038. <div class="row pb-70">
  1039. <div class="form-group col-lg-6">
  1040. <div class="row">
  1041. <label class="col-md-3 col-form-label" for="is_f2fpay">支付宝F2F</label>
  1042. <span class="col-md-9"><input type="checkbox" id="is_f2fpay" data-on-color="primary" data-off-color="danger" data-on-text="启用" data-off-text="关闭" data-base-class="bootstrap-switch" @if($is_f2fpay) checked @endif></span>
  1043. <span class="text-help offset-md-3"> 本功能需要 <a href="https://open.alipay.com/platform/home.htm" target="_blank">蚂蚁金服开放平台</a> 申请权限及应用 </span>
  1044. </div>
  1045. </div>
  1046. <div class="form-group col-lg-6">
  1047. <div class="row">
  1048. <label class="col-md-3 col-form-label" for="f2fpay_app_id">应用ID</label>
  1049. <div class="col-md-7">
  1050. <div class="input-group">
  1051. <input type="text" class="form-control" name="f2fpay_app_id" id="f2fpay_app_id" value="{{$f2fpay_app_id}}"/>
  1052. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setF2fpayAppId()">修改</button></span>
  1053. </div>
  1054. </div>
  1055. <span class="text-help offset-md-3">即:APPID</span>
  1056. </div>
  1057. </div>
  1058. <div class="form-group col-lg-6">
  1059. <div class="row">
  1060. <label class="col-md-3 col-form-label" for="f2fpay_private_key">RSA私钥</label>
  1061. <div class="col-md-7">
  1062. <div class="input-group">
  1063. <input class="form-control" type="text" name="f2fpay_private_key" id="f2fpay_private_key" value="{{$f2fpay_private_key}}"/>
  1064. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setF2fpayPrivateKey()">修改</button></span>
  1065. </div>
  1066. </div>
  1067. <span class="text-help offset-md-3">即:rsa_private_key,不包括首尾格式</span>
  1068. </div>
  1069. </div>
  1070. <div class="form-group col-lg-6">
  1071. <div class="row">
  1072. <label class="col-md-3 col-form-label" for="f2fpay_public_key">支付宝公钥</label>
  1073. <div class="col-md-7">
  1074. <div class="input-group">
  1075. <input type="text" class="form-control" name="f2fpay_public_key" id="f2fpay_public_key" value="{{$f2fpay_public_key}}"/>
  1076. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setF2fpayPublicKey()">修改</button></span>
  1077. </div>
  1078. </div>
  1079. <span class="text-help offset-md-3"> 注意不是RSA公钥 </span>
  1080. </div>
  1081. </div>
  1082. </div>
  1083. <div class="form-group col-lg-6">
  1084. <div class="row">
  1085. <label class="col-md-3 col-form-label" for="f2fpay_subject_name">自定义商品名称</label>
  1086. <div class="col-md-7">
  1087. <div class="input-group">
  1088. <input type="text" class="form-control" name="f2fpay_subject_name" id="f2fpay_subject_name" value="{{$f2fpay_subject_name}}"/>
  1089. <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setF2fpaySubjectName()">修改</button></span>
  1090. </div>
  1091. </div>
  1092. <span class="text-help offset-md-3"> 用于在用户支付宝客户端显示 </span>
  1093. </div>
  1094. </div>
  1095. </form>
  1096. </div>
  1097. </div>
  1098. </div>
  1099. </div>
  1100. </div>
  1101. </div>
  1102. @endsection
  1103. @section('script')
  1104. <script src="/assets/global/vendor/matchheight/jquery.matchHeight-min.js" type="text/javascript"></script>
  1105. <script src="/assets/global/vendor/bootstrap-select/bootstrap-select.min.js" type="text/javascript"></script>
  1106. <script src="//cdn.bootcss.com/bootstrap-switch/4.0.0-alpha.1/js/bootstrap-switch.min.js" type="text/javascript"></script>
  1107. <script src="/assets/global/vendor/dropify/dropify.min.js" type="text/javascript"></script>
  1108. <script src="/assets/global/js/Plugin/bootstrap-select.js" type="text/javascript"></script>
  1109. <script src="/assets/global/js/Plugin/responsive-tabs.js" type="text/javascript"></script>
  1110. <script src="/assets/global/js/Plugin/tabs.js" type="text/javascript"></script>
  1111. <script src="/assets/global/js/Plugin/dropify.js" type="text/javascript"></script>
  1112. <script type="text/javascript">
  1113. $('input[type="checkbox"]').bootstrapSwitch();
  1114. // 注册的默认标签
  1115. $('#initial_labels_for_user').on("changed.bs.select", function () {
  1116. $.post("/admin/setConfig", {
  1117. _token: '{{csrf_token()}}',
  1118. name: 'initial_labels_for_user',
  1119. value: $(this).val() ? $(this).val().join(',') : ''
  1120. }, function (ret) {
  1121. if (ret.status === 'success') {
  1122. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1123. .then(() => window.location.reload())
  1124. } else {
  1125. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1126. }
  1127. });
  1128. });
  1129. // 启用、禁用随机端口
  1130. $('#is_rand_port').on({
  1131. 'switchChange.bootstrapSwitch': function (event, state) {
  1132. $.post("/admin/setConfig", {
  1133. _token: '{{csrf_token()}}',
  1134. name: 'is_rand_port',
  1135. value: state ? 1 : 0
  1136. }, function (ret) {
  1137. if (ret.status === 'success') {
  1138. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1139. .then(() => window.location.reload())
  1140. } else {
  1141. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1142. }
  1143. });
  1144. }
  1145. });
  1146. // 启用、禁用屏蔽大陆访问
  1147. $('#is_forbid_china').on({
  1148. 'switchChange.bootstrapSwitch': function (event, state) {
  1149. $.post("/admin/setConfig", {
  1150. _token: '{{csrf_token()}}',
  1151. name: 'is_forbid_china',
  1152. value: state ? 1 : 0
  1153. }, function (ret) {
  1154. if (ret.status === 'success') {
  1155. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1156. .then(() => window.location.reload())
  1157. } else {
  1158. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1159. }
  1160. });
  1161. }
  1162. });
  1163. // 启用、禁用屏蔽海外访问
  1164. $('#is_forbid_oversea').on({
  1165. 'switchChange.bootstrapSwitch': function (event, state) {
  1166. $.post("/admin/setConfig", {
  1167. _token: '{{csrf_token()}}',
  1168. name: 'is_forbid_oversea',
  1169. value: state ? 1 : 0
  1170. }, function (ret) {
  1171. if (ret.status === 'success') {
  1172. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1173. .then(() => window.location.reload())
  1174. } else {
  1175. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1176. }
  1177. });
  1178. }
  1179. });
  1180. // 启用、禁用机器人访问
  1181. $('#is_forbid_robot').on({
  1182. 'switchChange.bootstrapSwitch': function (event, state) {
  1183. $.post("/admin/setConfig", {
  1184. _token: '{{csrf_token()}}',
  1185. name: 'is_forbid_robot',
  1186. value: is_forbid_robot = state ? 1 : 0
  1187. }, function (ret) {
  1188. if (ret.status === 'success') {
  1189. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1190. .then(() => window.location.reload())
  1191. } else {
  1192. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1193. }
  1194. });
  1195. }
  1196. });
  1197. // 启用、禁用注册校验验证码
  1198. $('#is_verify_register').on({
  1199. 'switchChange.bootstrapSwitch': function (event, state) {
  1200. $.post("/admin/setConfig", {
  1201. _token: '{{csrf_token()}}',
  1202. name: 'is_verify_register',
  1203. value: is_verify_register = state ? 1 : 0
  1204. }, function (ret) {
  1205. if (ret.status === 'success') {
  1206. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1207. .then(() => window.location.reload())
  1208. } else {
  1209. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1210. }
  1211. });
  1212. }
  1213. });
  1214. // 启用、禁用自定义端口
  1215. $('#is_user_rand_port').on({
  1216. 'switchChange.bootstrapSwitch': function (event, state) {
  1217. $.post("/admin/setConfig", {
  1218. _token: '{{csrf_token()}}',
  1219. name: 'is_user_rand_port',
  1220. value: state ? 1 : 0
  1221. }, function (ret) {
  1222. if (ret.status === 'success') {
  1223. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1224. .then(() => window.location.reload())
  1225. } else {
  1226. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1227. }
  1228. });
  1229. }
  1230. });
  1231. // 启用、禁用登录加流量
  1232. $('#is_checkin').on({
  1233. 'switchChange.bootstrapSwitch': function (event, state) {
  1234. $.post("/admin/setConfig", {
  1235. _token: '{{csrf_token()}}',
  1236. name: 'is_checkin',
  1237. value: is_checkin = state ? 1 : 0
  1238. }, function (ret) {
  1239. if (ret.status === 'success') {
  1240. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1241. .then(() => window.location.reload())
  1242. } else {
  1243. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1244. }
  1245. });
  1246. }
  1247. });
  1248. // 启用、禁用注册
  1249. $('#is_register').on({
  1250. 'switchChange.bootstrapSwitch': function (event, state) {
  1251. $.post("/admin/setConfig", {
  1252. _token: '{{csrf_token()}}',
  1253. name: 'is_register',
  1254. value: is_register = state ? 1 : 0
  1255. }, function (ret) {
  1256. if (ret.status === 'success') {
  1257. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1258. .then(() => window.location.reload())
  1259. } else {
  1260. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1261. }
  1262. });
  1263. }
  1264. });
  1265. // 启用、可选、禁用邀请注册
  1266. $("#is_invite_register").on("changed.bs.select", function () {
  1267. $.post("/admin/setConfig", {
  1268. _token: '{{csrf_token()}}',
  1269. name: 'is_invite_register',
  1270. value: $(this).val()
  1271. }, function (ret) {
  1272. if (ret.status === 'success') {
  1273. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1274. .then(() => window.location.reload())
  1275. } else {
  1276. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1277. }
  1278. });
  1279. });
  1280. // 启用、禁用用户重置密码
  1281. $('#is_reset_password').on({
  1282. 'switchChange.bootstrapSwitch': function (event, state) {
  1283. $.post("/admin/setConfig", {
  1284. _token: '{{csrf_token()}}',
  1285. name: 'is_reset_password',
  1286. value: state ? 1 : 0
  1287. }, function (ret) {
  1288. if (ret.status === 'success') {
  1289. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1290. .then(() => window.location.reload())
  1291. } else {
  1292. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1293. }
  1294. });
  1295. }
  1296. });
  1297. // 启用、禁用验证码
  1298. $('#is_captcha').on("changed.bs.select", function () {
  1299. $.post("/admin/setConfig", {
  1300. _token: '{{csrf_token()}}',
  1301. name: 'is_captcha',
  1302. value: $(this).val()
  1303. }, function (ret) {
  1304. if (ret.status === 'success') {
  1305. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1306. .then(() => window.location.reload())
  1307. } else {
  1308. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1309. }
  1310. });
  1311. });
  1312. // 启用、禁用免费邀请码
  1313. $('#is_free_code').on({
  1314. 'switchChange.bootstrapSwitch': function (event, state) {
  1315. $.post("/admin/setConfig", {
  1316. _token: '{{csrf_token()}}',
  1317. name: 'is_free_code',
  1318. value: state ? 1 : 0
  1319. }, function (ret) {
  1320. if (ret.status === 'success') {
  1321. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1322. .then(() => window.location.reload())
  1323. } else {
  1324. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1325. }
  1326. });
  1327. }
  1328. });
  1329. // 启用、禁用用户激活用户
  1330. $('#is_active_register').on({
  1331. 'switchChange.bootstrapSwitch': function (event, state) {
  1332. $.post("/admin/setConfig", {
  1333. _token: '{{csrf_token()}}',
  1334. name: 'is_active_register',
  1335. value: state ? 1 : 0
  1336. }, function (ret) {
  1337. if (ret.status === 'success') {
  1338. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1339. .then(() => window.location.reload())
  1340. } else {
  1341. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1342. }
  1343. });
  1344. }
  1345. });
  1346. // 启用、禁用用户到期自动邮件提醒
  1347. $('#expire_warning').on({
  1348. 'switchChange.bootstrapSwitch': function (event, state) {
  1349. $.post("/admin/setConfig", {
  1350. _token: '{{csrf_token()}}',
  1351. name: 'expire_warning',
  1352. value: state ? 1 : 0
  1353. }, function (ret) {
  1354. if (ret.status === 'success') {
  1355. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1356. .then(() => window.location.reload())
  1357. } else {
  1358. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1359. }
  1360. });
  1361. }
  1362. });
  1363. // 启用、禁用节点离线发件提醒管理员
  1364. $('#is_node_crash_warning').on({
  1365. 'switchChange.bootstrapSwitch': function (event, state) {
  1366. $.post("/admin/setConfig", {
  1367. _token: '{{csrf_token()}}',
  1368. name: 'is_node_crash_warning',
  1369. value: state ? 1 : 0
  1370. }, function (ret) {
  1371. if (ret.status === 'success') {
  1372. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1373. .then(() => window.location.reload())
  1374. } else {
  1375. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1376. }
  1377. });
  1378. }
  1379. });
  1380. // 启用、禁用节点离线发ServerChan微信消息提醒
  1381. $('#is_server_chan').on({
  1382. 'switchChange.bootstrapSwitch': function (event, state) {
  1383. $.post("/admin/setConfig", {
  1384. _token: '{{csrf_token()}}',
  1385. name: 'is_server_chan',
  1386. value: state ? 1 : 0
  1387. }, function (ret) {
  1388. if (ret.status === 'success') {
  1389. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1390. .then(() => window.location.reload())
  1391. } else {
  1392. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1393. }
  1394. });
  1395. }
  1396. });
  1397. // 启用、禁用Namesilo
  1398. $('#is_namesilo').on({
  1399. 'switchChange.bootstrapSwitch': function (event, state) {
  1400. $.post("/admin/setConfig", {
  1401. _token: '{{csrf_token()}}',
  1402. name: 'is_namesilo',
  1403. value: state ? 1 : 0
  1404. }, function (ret) {
  1405. if (ret.status === 'success') {
  1406. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1407. .then(() => window.location.reload())
  1408. } else {
  1409. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1410. }
  1411. });
  1412. }
  1413. });
  1414. // 启用、禁用混合订阅
  1415. $('#mix_subscribe').on({
  1416. 'switchChange.bootstrapSwitch': function (event, state) {
  1417. $.post("/admin/setConfig", {
  1418. _token: '{{csrf_token()}}',
  1419. name: 'mix_subscribe',
  1420. value: state ? 1 : 0
  1421. }, function (ret) {
  1422. if (ret.status === 'success') {
  1423. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1424. .then(() => window.location.reload())
  1425. } else {
  1426. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1427. }
  1428. });
  1429. }
  1430. });
  1431. // 启用、禁用随机订阅
  1432. $('#rand_subscribe').on({
  1433. 'switchChange.bootstrapSwitch': function (event, state) {
  1434. $.post("/admin/setConfig", {
  1435. _token: '{{csrf_token()}}',
  1436. name: 'rand_subscribe',
  1437. value: state ? 1 : 0
  1438. }, function (ret) {
  1439. if (ret.status === 'success') {
  1440. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1441. .then(() => window.location.reload())
  1442. } else {
  1443. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1444. }
  1445. });
  1446. }
  1447. });
  1448. // 启用、禁用自定义订阅
  1449. $('#is_custom_subscribe').on({
  1450. 'switchChange.bootstrapSwitch': function (event, state) {
  1451. $.post("/admin/setConfig", {
  1452. _token: '{{csrf_token()}}',
  1453. name: 'is_custom_subscribe',
  1454. value: state ? 1 : 0
  1455. }, function (ret) {
  1456. if (ret.status === 'success') {
  1457. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1458. .then(() => window.location.reload())
  1459. } else {
  1460. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1461. }
  1462. });
  1463. }
  1464. });
  1465. // 启用、禁用PushBear
  1466. $('#is_push_bear').on({
  1467. 'switchChange.bootstrapSwitch': function (event, state) {
  1468. $.post("/admin/setConfig", {
  1469. _token: '{{csrf_token()}}',
  1470. name: 'is_push_bear',
  1471. value: state ? 1 : 0
  1472. }, function (ret) {
  1473. if (ret.status === 'success') {
  1474. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1475. .then(() => window.location.reload())
  1476. } else {
  1477. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1478. }
  1479. });
  1480. }
  1481. });
  1482. // 启用、禁用节点阻断探测
  1483. $('#nodes_detection').on({
  1484. 'switchChange.bootstrapSwitch': function (event, state) {
  1485. $.post("/admin/setConfig", {
  1486. _token: '{{csrf_token()}}',
  1487. name: 'nodes_detection',
  1488. value: state ? 1 : 0
  1489. }, function (ret) {
  1490. if (ret.status === 'success') {
  1491. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1492. .then(() => window.location.reload())
  1493. } else {
  1494. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1495. }
  1496. });
  1497. }
  1498. });
  1499. // 启用、禁用订阅异常自动封禁
  1500. $('#is_subscribe_ban').on({
  1501. 'switchChange.bootstrapSwitch': function (event, state) {
  1502. $.post("/admin/setConfig", {
  1503. _token: '{{csrf_token()}}',
  1504. name: 'is_subscribe_ban',
  1505. value: state ? 1 : 0
  1506. }, function (ret) {
  1507. if (ret.status === 'success') {
  1508. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1509. .then(() => window.location.reload())
  1510. } else {
  1511. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1512. }
  1513. });
  1514. }
  1515. });
  1516. // 启用、禁用退关返利用户可见与否
  1517. $('#referral_status').on({
  1518. 'switchChange.bootstrapSwitch': function (event, state) {
  1519. $.post("/admin/setConfig", {
  1520. _token: '{{csrf_token()}}',
  1521. name: 'referral_status',
  1522. value: state ? 1 : 0
  1523. }, function (ret) {
  1524. if (ret.status === 'success') {
  1525. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1526. .then(() => window.location.reload())
  1527. } else {
  1528. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1529. }
  1530. });
  1531. }
  1532. });
  1533. // 启用、禁用随机端口
  1534. $('#traffic_warning').on({
  1535. 'switchChange.bootstrapSwitch': function (event, state) {
  1536. $.post("/admin/setConfig", {
  1537. _token: '{{csrf_token()}}',
  1538. name: 'traffic_warning',
  1539. value: state ? 1 : 0
  1540. }, function (ret) {
  1541. if (ret.status === 'success') {
  1542. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1543. .then(() => window.location.reload())
  1544. } else {
  1545. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1546. }
  1547. });
  1548. }
  1549. });
  1550. // 启用、禁用随机端口
  1551. $('#is_clear_log').on({
  1552. 'switchChange.bootstrapSwitch': function (event, state) {
  1553. $.post("/admin/setConfig", {
  1554. _token: '{{csrf_token()}}',
  1555. name: 'is_clear_log',
  1556. value: state ? 1 : 0
  1557. }, function (ret) {
  1558. if (ret.status === 'success') {
  1559. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1560. .then(() => window.location.reload())
  1561. } else {
  1562. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1563. }
  1564. });
  1565. }
  1566. });
  1567. // 启用、禁用流量自动重置
  1568. $('#reset_traffic').on({
  1569. 'switchChange.bootstrapSwitch': function (event, state) {
  1570. $.post("/admin/setConfig", {
  1571. _token: '{{csrf_token()}}',
  1572. name: 'reset_traffic',
  1573. value: state ? 1 : 0
  1574. }, function (ret) {
  1575. if (ret.status === 'success') {
  1576. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1577. .then(() => window.location.reload())
  1578. } else {
  1579. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1580. }
  1581. });
  1582. }
  1583. });
  1584. // 启用、禁用流量异常自动封号
  1585. $('#is_traffic_ban').on({
  1586. 'switchChange.bootstrapSwitch': function (event, state) {
  1587. $.post("/admin/setConfig", {
  1588. _token: '{{csrf_token()}}',
  1589. name: 'is_traffic_ban',
  1590. value: state ? 1 : 0
  1591. }, function (ret) {
  1592. if (ret.status === 'success') {
  1593. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1594. .then(() => window.location.reload())
  1595. } else {
  1596. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1597. }
  1598. });
  1599. }
  1600. });
  1601. // 启用、禁用端口自动释放
  1602. $('#auto_release_port').on({
  1603. 'switchChange.bootstrapSwitch': function (event, state) {
  1604. $.post("/admin/setConfig", {
  1605. _token: '{{csrf_token()}}',
  1606. name: 'auto_release_port',
  1607. value: state ? 1 : 0
  1608. }, function (ret) {
  1609. if (ret.status === 'success') {
  1610. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1611. .then(() => window.location.reload())
  1612. } else {
  1613. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1614. }
  1615. });
  1616. }
  1617. });
  1618. // 启用、禁用节点使用报告
  1619. $('#node_daily_report').on({
  1620. 'switchChange.bootstrapSwitch': function (event, state) {
  1621. $.post("/admin/setConfig", {
  1622. _token: '{{csrf_token()}}',
  1623. name: 'node_daily_report',
  1624. value: state ? 1 : 0
  1625. }, function (ret) {
  1626. if (ret.status === 'success') {
  1627. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1628. .then(() => window.location.reload())
  1629. } else {
  1630. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1631. }
  1632. });
  1633. }
  1634. });
  1635. // 过期封禁是否禁止账号
  1636. $('#is_ban_status').on({
  1637. 'switchChange.bootstrapSwitch': function (event, state) {
  1638. $.post("/admin/setConfig", {
  1639. _token: '{{csrf_token()}}',
  1640. name: 'is_ban_status',
  1641. value: state ? 1 : 0
  1642. }, function (ret) {
  1643. if (ret.status === 'success') {
  1644. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1645. .then(() => window.location.reload())
  1646. } else {
  1647. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1648. }
  1649. });
  1650. }
  1651. });
  1652. // 启用、禁用有赞云
  1653. $('#is_youzan').on({
  1654. 'switchChange.bootstrapSwitch': function (event, state) {
  1655. $.post("/admin/setConfig", {
  1656. _token: '{{csrf_token()}}',
  1657. name: 'is_youzan',
  1658. value: state ? 1 : 0
  1659. }, function (ret) {
  1660. if (ret.status === 'success') {
  1661. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1662. .then(() => window.location.reload())
  1663. } else {
  1664. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1665. }
  1666. });
  1667. }
  1668. });
  1669. // 启用、禁用alipay国际
  1670. $('#is_alipay').on({
  1671. 'switchChange.bootstrapSwitch': function (event, state) {
  1672. $.post("/admin/setConfig", {
  1673. _token: '{{csrf_token()}}',
  1674. name: 'is_alipay',
  1675. value: state ? 1 : 0
  1676. }, function (ret) {
  1677. if (ret.status === 'success') {
  1678. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1679. .then(() => window.location.reload())
  1680. } else {
  1681. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1682. }
  1683. });
  1684. }
  1685. });
  1686. // 启用、禁用支付宝当面付
  1687. $('#is_f2fpay').on({
  1688. 'switchChange.bootstrapSwitch': function (event, state) {
  1689. $.post("/admin/setConfig", {
  1690. _token: '{{csrf_token()}}',
  1691. name: 'is_f2fpay',
  1692. value: state ? 1 : 0
  1693. }, function (ret) {
  1694. if (ret.status === 'success') {
  1695. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1696. .then(() => window.location.reload())
  1697. } else {
  1698. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1699. }
  1700. });
  1701. }
  1702. });
  1703. // 流量异常阈值
  1704. function setTrafficBanValue() {
  1705. const traffic_ban_value = $("#traffic_ban_value").val();
  1706. if (traffic_ban_value < 1) {
  1707. swal.fire({title: '不能小于1', type: 'warning', timer: 1000, showConfirmButton: false});
  1708. return;
  1709. }
  1710. $.post("/admin/setConfig", {
  1711. _token: '{{csrf_token()}}',
  1712. name: 'traffic_ban_value',
  1713. value: traffic_ban_value
  1714. }, function (ret) {
  1715. if (ret.status === 'success') {
  1716. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1717. .then(() => window.location.reload())
  1718. } else {
  1719. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1720. }
  1721. });
  1722. }
  1723. // 设置用户封号时长
  1724. function setTrafficBanTime() {
  1725. const traffic_ban_time = $("#traffic_ban_time").val();
  1726. if (traffic_ban_time < 0) {
  1727. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  1728. return;
  1729. }
  1730. $.post("/admin/setConfig", {
  1731. _token: '{{csrf_token()}}',
  1732. name: 'traffic_ban_time',
  1733. value: traffic_ban_time
  1734. }, function (ret) {
  1735. if (ret.status === 'success') {
  1736. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1737. .then(() => window.location.reload())
  1738. } else {
  1739. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1740. }
  1741. });
  1742. }
  1743. // 设置节点离线警告收件地址
  1744. function setCrashWarningEmail() {
  1745. $.post("/admin/setConfig", {
  1746. _token: '{{csrf_token()}}',
  1747. name: 'webmaster_email',
  1748. value: $("#webmaster_email").val()
  1749. }, function (ret) {
  1750. if (ret.status === 'success') {
  1751. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1752. .then(() => window.location.reload())
  1753. } else {
  1754. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1755. }
  1756. });
  1757. }
  1758. // 设置ServerChan的SCKEY
  1759. function setServerChanKey() {
  1760. $.post("/admin/setConfig", {
  1761. _token: '{{csrf_token()}}',
  1762. name: 'server_chan_key',
  1763. value: $("#server_chan_key").val()
  1764. }, function (ret) {
  1765. if (ret.status === 'success') {
  1766. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1767. .then(() => window.location.reload())
  1768. } else {
  1769. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1770. }
  1771. });
  1772. }
  1773. // 设置Namesilo API KEY
  1774. function setNamesiloKey() {
  1775. $.post("/admin/setConfig", {
  1776. _token: '{{csrf_token()}}',
  1777. name: 'namesilo_key',
  1778. value: $("#namesilo_key").val()
  1779. }, function (ret) {
  1780. if (ret.status === 'success') {
  1781. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1782. .then(() => window.location.reload())
  1783. } else {
  1784. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1785. }
  1786. });
  1787. }
  1788. // 设置PushBear的SendKey
  1789. function setPushBearSendKey() {
  1790. $.post("/admin/setConfig", {
  1791. _token: '{{csrf_token()}}',
  1792. name: 'push_bear_send_key',
  1793. value: $("#push_bear_send_key").val()
  1794. }, function (ret) {
  1795. if (ret.status === 'success') {
  1796. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1797. .then(() => window.location.reload())
  1798. } else {
  1799. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1800. }
  1801. });
  1802. }
  1803. // 设置PushBear的消息通道二维码URL
  1804. function setPushBearQrCode() {
  1805. $.post("/admin/setConfig", {
  1806. _token: '{{csrf_token()}}',
  1807. name: 'push_bear_qrcode',
  1808. value: $("#push_bear_qrcode").val()
  1809. }, function (ret) {
  1810. if (ret.status === 'success') {
  1811. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1812. .then(() => window.location.reload())
  1813. } else {
  1814. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1815. }
  1816. });
  1817. }
  1818. // 设置TCP阻断检测提醒次数
  1819. function setNumberOfWarningTimes() {
  1820. const numberOfWarningTimes = $("#numberOfWarningTimes").val();
  1821. if (numberOfWarningTimes < 0 || numberOfWarningTimes > 12) {
  1822. swal.fire({title: '只能在0-12之间', type: 'warning', timer: 1000, showConfirmButton: false});
  1823. return;
  1824. }
  1825. $.post("/admin/setConfig", {
  1826. _token: '{{csrf_token()}}',
  1827. name: 'numberOfWarningTimes',
  1828. value: numberOfWarningTimes
  1829. }, function (ret) {
  1830. if (ret.status === 'success') {
  1831. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1832. .then(() => window.location.reload())
  1833. } else {
  1834. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1835. }
  1836. });
  1837. }
  1838. // 设置订阅封禁阈值
  1839. function setSubscribeBanTimes() {
  1840. const subscribe_ban_times = $("#subscribe_ban_times").val();
  1841. if (subscribe_ban_times < 0) {
  1842. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  1843. return;
  1844. }
  1845. $.post("/admin/setConfig", {
  1846. _token: '{{csrf_token()}}',
  1847. name: 'subscribe_ban_times',
  1848. value: subscribe_ban_times
  1849. }, function (ret) {
  1850. if (ret.status === 'success') {
  1851. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1852. .then(() => window.location.reload())
  1853. } else {
  1854. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1855. }
  1856. });
  1857. }
  1858. // 设置有赞云的kdt_id
  1859. function setKdtId() {
  1860. $.post("/admin/setConfig", {_token: '{{csrf_token()}}', name: 'kdt_id', value: $("#kdt_id").val()}, function (ret) {
  1861. if (ret.status === 'success') {
  1862. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1863. .then(() => window.location.reload())
  1864. } else {
  1865. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1866. }
  1867. });
  1868. }
  1869. // 设置有赞云的client_id
  1870. function setYouzanClientId() {
  1871. $.post("/admin/setConfig", {
  1872. _token: '{{csrf_token()}}',
  1873. name: 'youzan_client_id',
  1874. value: $("#youzan_client_id").val()
  1875. }, function (ret) {
  1876. if (ret.status === 'success') {
  1877. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1878. .then(() => window.location.reload())
  1879. } else {
  1880. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1881. }
  1882. });
  1883. }
  1884. // 设置有赞云的client_secret
  1885. function setYouzanClientSecret() {
  1886. $.post("/admin/setConfig", {
  1887. _token: '{{csrf_token()}}',
  1888. name: 'youzan_client_secret',
  1889. value: $("#youzan_client_secret").val()
  1890. }, function (ret) {
  1891. if (ret.status === 'success') {
  1892. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1893. .then(() => window.location.reload())
  1894. } else {
  1895. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1896. }
  1897. });
  1898. }
  1899. // 设置alipay加密方式
  1900. $('#alipay_sign_type').change(function () {
  1901. $.post("/admin/setConfig", {
  1902. _token: '{{csrf_token()}}',
  1903. name: 'alipay_sign_type',
  1904. value: $(this).val()
  1905. }, function (ret) {
  1906. if (ret.status === 'success') {
  1907. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1908. .then(() => window.location.reload())
  1909. } else {
  1910. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1911. }
  1912. });
  1913. });
  1914. // 设置alipay是否启用SSL验证
  1915. $('#alipay_transport').change(function () {
  1916. $.post("/admin/setConfig", {
  1917. _token: '{{csrf_token()}}',
  1918. name: 'alipay_transport',
  1919. value: $(this).val()
  1920. }, function (ret) {
  1921. if (ret.status === 'success') {
  1922. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1923. .then(() => window.location.reload())
  1924. } else {
  1925. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1926. }
  1927. });
  1928. });
  1929. //设置alipay的partner
  1930. function setAlipayPartner() {
  1931. $.post("/admin/setConfig", {
  1932. _token: '{{csrf_token()}}',
  1933. name: 'alipay_partner',
  1934. value: $("#alipay_partner").val()
  1935. }, function (ret) {
  1936. if (ret.status === 'success') {
  1937. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1938. .then(() => window.location.reload())
  1939. } else {
  1940. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1941. }
  1942. });
  1943. }
  1944. //设置alipay的key
  1945. function setAlipayKey() {
  1946. $.post("/admin/setConfig", {
  1947. _token: '{{csrf_token()}}',
  1948. name: 'alipay_key',
  1949. value: $("#alipay_key").val()
  1950. }, function (ret) {
  1951. if (ret.status === 'success') {
  1952. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1953. .then(() => window.location.reload())
  1954. } else {
  1955. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1956. }
  1957. });
  1958. }
  1959. //设置alipay的私钥
  1960. function setAlipayPrivateKey() {
  1961. $.post("/admin/setConfig", {
  1962. _token: '{{csrf_token()}}',
  1963. name: 'alipay_private_key',
  1964. value: $("#alipay_private_key").val()
  1965. }, function (ret) {
  1966. if (ret.status === 'success') {
  1967. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1968. .then(() => window.location.reload())
  1969. } else {
  1970. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1971. }
  1972. });
  1973. }
  1974. //设置alipay的公钥
  1975. function setAlipayPublicKey() {
  1976. $.post("/admin/setConfig", {
  1977. _token: '{{csrf_token()}}',
  1978. name: 'alipay_public_key',
  1979. value: $("#alipay_public_key").val()
  1980. }, function (ret) {
  1981. if (ret.status === 'success') {
  1982. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1983. .then(() => window.location.reload())
  1984. } else {
  1985. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  1986. }
  1987. });
  1988. }
  1989. // 设置alipay结算币种
  1990. $('#alipay_currency').on("changed.bs.select", function () {
  1991. $.post("/admin/setConfig", {
  1992. _token: '{{csrf_token()}}',
  1993. name: 'alipay_currency',
  1994. value: $(this).val()
  1995. }, function (ret) {
  1996. if (ret.status === 'success') {
  1997. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  1998. .then(() => window.location.reload())
  1999. } else {
  2000. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2001. }
  2002. });
  2003. });
  2004. // 设置最小流量
  2005. $("#min_rand_traffic").change(function () {
  2006. const min_rand_traffic = $(this).val();
  2007. const max_rand_traffic = $("#max_rand_traffic").val();
  2008. if (parseInt(min_rand_traffic) < 0) {
  2009. swal.fire({title: '最小流量值不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2010. return;
  2011. }
  2012. if (parseInt(min_rand_traffic) >= parseInt(max_rand_traffic)) {
  2013. swal.fire({title: '最小流量值必须小于最大流量值', type: 'warning', timer: 1000, showConfirmButton: false});
  2014. return;
  2015. }
  2016. $.post("/admin/setConfig", {
  2017. _token: '{{csrf_token()}}',
  2018. name: 'min_rand_traffic',
  2019. value: min_rand_traffic
  2020. }, function (ret) {
  2021. if (ret.status === 'success') {
  2022. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2023. .then(() => window.location.reload())
  2024. } else {
  2025. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2026. }
  2027. });
  2028. });
  2029. // 设置最大流量
  2030. $("#max_rand_traffic").change(function () {
  2031. const min_rand_traffic = $("#min_rand_traffic").val();
  2032. const max_rand_traffic = $(this).val();
  2033. if (parseInt(max_rand_traffic) > 99999) {
  2034. swal.fire({title: '最大流量值不能大于99999', type: 'warning', timer: 1000, showConfirmButton: false});
  2035. return;
  2036. }
  2037. if (parseInt(min_rand_traffic) >= parseInt(max_rand_traffic)) {
  2038. swal.fire({title: '最大流量值必须大于最小流量值', type: 'warning', timer: 1000, showConfirmButton: false});
  2039. return;
  2040. }
  2041. $.post("/admin/setConfig", {
  2042. _token: '{{csrf_token()}}',
  2043. name: 'max_rand_traffic',
  2044. value: max_rand_traffic
  2045. }, function (ret) {
  2046. if (ret.status === 'success') {
  2047. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2048. .then(() => window.location.reload())
  2049. } else {
  2050. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2051. }
  2052. });
  2053. });
  2054. // 设置f2fpay的应用id
  2055. function setF2fpayAppId() {
  2056. $.post("/admin/setConfig", {
  2057. _token: '{{csrf_token()}}',
  2058. name: 'f2fpay_app_id',
  2059. value: $("#f2fpay_app_id").val()
  2060. }, function (ret) {
  2061. if (ret.status === 'success') {
  2062. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2063. .then(() => window.location.reload())
  2064. } else {
  2065. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2066. }
  2067. });
  2068. }
  2069. // 设置f2fpay的私钥
  2070. function setF2fpayPrivateKey() {
  2071. $.post("/admin/setConfig", {
  2072. _token: '{{csrf_token()}}',
  2073. name: 'f2fpay_private_key',
  2074. value: $("#f2fpay_private_key").val()
  2075. }, function (ret) {
  2076. if (ret.status === 'success') {
  2077. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2078. .then(() => window.location.reload())
  2079. } else {
  2080. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2081. }
  2082. });
  2083. }
  2084. // 设置f2fpay的公钥
  2085. function setF2fpayPublicKey() {
  2086. $.post("/admin/setConfig", {
  2087. _token: '{{csrf_token()}}',
  2088. name: 'f2fpay_public_key',
  2089. value: $("#f2fpay_public_key").val()
  2090. }, function (ret) {
  2091. if (ret.status === 'success') {
  2092. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2093. .then(() => window.location.reload())
  2094. } else {
  2095. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2096. }
  2097. });
  2098. }
  2099. // 自动去除公钥和私钥中的空格和换行
  2100. $("#alipay_public_key,#alipay_private_key,#f2fpay_public_key,#f2fpay_private_key").on('input', function () {
  2101. $(this).val($(this).val().replace(/(\s+)/g, ''));
  2102. });
  2103. // 设置f2fpay的商品名称
  2104. function setF2fpaySubjectName() {
  2105. $.post("/admin/setConfig", {
  2106. _token: '{{csrf_token()}}',
  2107. name: 'f2fpay_subject_name',
  2108. value: $("#f2fpay_subject_name").val()
  2109. }, function (ret) {
  2110. if (ret.status === 'success') {
  2111. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2112. .then(() => window.location.reload())
  2113. } else {
  2114. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2115. }
  2116. });
  2117. }
  2118. // 设置极验的Id
  2119. function setGeetestId() {
  2120. $.post("/admin/setConfig", {
  2121. _token: '{{csrf_token()}}',
  2122. name: 'geetest_id',
  2123. value: $("#geetest_id").val()
  2124. }, function (ret) {
  2125. if (ret.status === 'success') {
  2126. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2127. .then(() => window.location.reload())
  2128. } else {
  2129. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2130. }
  2131. });
  2132. }
  2133. // 设置极验的Key
  2134. function setGeetestKey() {
  2135. $.post("/admin/setConfig", {
  2136. _token: '{{csrf_token()}}',
  2137. name: 'geetest_key',
  2138. value: $("#geetest_key").val()
  2139. }, function (ret) {
  2140. if (ret.status === 'success') {
  2141. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2142. .then(() => window.location.reload())
  2143. } else {
  2144. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2145. }
  2146. });
  2147. }
  2148. // 设置Google reCAPTCHA的Id
  2149. function setGoogleCaptchaId() {
  2150. $.post("/admin/setConfig", {
  2151. _token: '{{csrf_token()}}',
  2152. name: 'google_captcha_sitekey',
  2153. value: $("#google_captcha_sitekey").val()
  2154. }, function (ret) {
  2155. if (ret.status === 'success') {
  2156. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2157. .then(() => window.location.reload())
  2158. } else {
  2159. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2160. }
  2161. });
  2162. }
  2163. // 设置Google reCAPTCHA的Key
  2164. function setGoogleCaptchaKey() {
  2165. $.post("/admin/setConfig", {
  2166. _token: '{{csrf_token()}}',
  2167. name: 'google_captcha_secret',
  2168. value: $("#google_captcha_secret").val()
  2169. }, function (ret) {
  2170. if (ret.status === 'success') {
  2171. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2172. .then(() => window.location.reload())
  2173. } else {
  2174. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2175. }
  2176. });
  2177. }
  2178. // 设置最小端口
  2179. $("#min_port").change(function () {
  2180. const min_port = $(this).val();
  2181. const max_port = $("#max_port").val();
  2182. // 最大端口必须大于最小端口
  2183. if (parseInt(max_port) <= parseInt(min_port)) {
  2184. swal.fire({title: '必须小于最大端口', type: 'warning', timer: 1000, showConfirmButton: false});
  2185. return;
  2186. }
  2187. if (parseInt(min_port) < 1000) {
  2188. swal.fire({title: '最小端口不能小于1000', type: 'warning', timer: 1000, showConfirmButton: false});
  2189. return;
  2190. }
  2191. $.post("/admin/setConfig", {_token: '{{csrf_token()}}', name: 'min_port', value: min_port}, function (ret) {
  2192. if (ret.status === 'success') {
  2193. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2194. .then(() => window.location.reload())
  2195. } else {
  2196. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2197. }
  2198. });
  2199. });
  2200. // 设置最大端口
  2201. $("#max_port").change(function () {
  2202. const min_port = $("#min_port").val();
  2203. const max_port = $(this).val();
  2204. // 最大端口必须大于最小端口
  2205. if (parseInt(max_port) <= parseInt(min_port)) {
  2206. swal.fire({title: '必须大于最小端口', type: 'warning', timer: 1000, showConfirmButton: false});
  2207. return;
  2208. }
  2209. if (parseInt(max_port) > 65535) {
  2210. swal.fire({title: '最大端口不能大于65535', type: 'warning', timer: 1000, showConfirmButton: false});
  2211. return;
  2212. }
  2213. $.post("/admin/setConfig", {_token: '{{csrf_token()}}', name: 'max_port', value: max_port}, function (ret) {
  2214. if (ret.status === 'success') {
  2215. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2216. .then(() => window.location.reload())
  2217. } else {
  2218. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2219. }
  2220. });
  2221. });
  2222. // 邮箱黑白名单切换
  2223. $('#sensitiveType').on({
  2224. 'switchChange.bootstrapSwitch': function (event, state) {
  2225. $.post("/admin/setConfig", {
  2226. _token: '{{csrf_token()}}',
  2227. name: 'sensitiveType',
  2228. value: state ? 1 : 0
  2229. }, function (ret) {
  2230. if (ret.status === 'success') {
  2231. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2232. .then(() => window.location.reload())
  2233. } else {
  2234. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2235. }
  2236. });
  2237. }
  2238. });
  2239. // 设置注册时默认有效期
  2240. function setDefaultDays() {
  2241. const default_days = parseInt($("#default_days").val());
  2242. if (default_days < 0) {
  2243. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2244. return;
  2245. }
  2246. $.post("/admin/setConfig", {
  2247. _token: '{{csrf_token()}}',
  2248. name: 'default_days',
  2249. value: default_days
  2250. }, function (ret) {
  2251. if (ret.status === 'success') {
  2252. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2253. .then(() => window.location.reload())
  2254. } else {
  2255. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2256. }
  2257. });
  2258. }
  2259. // 设置注册时默认流量
  2260. function setDefaultTraffic() {
  2261. const default_traffic = parseInt($("#default_traffic").val());
  2262. if (default_traffic < 0) {
  2263. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2264. return;
  2265. }
  2266. $.post("/admin/setConfig", {
  2267. _token: '{{csrf_token()}}',
  2268. name: 'default_traffic',
  2269. value: default_traffic
  2270. }, function (ret) {
  2271. if (ret.status === 'success') {
  2272. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2273. .then(() => window.location.reload())
  2274. } else {
  2275. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2276. }
  2277. });
  2278. }
  2279. // 设置可生成邀请码数量
  2280. function setInviteNum() {
  2281. const invite_num = parseInt($("#invite_num").val());
  2282. if (invite_num < 0) {
  2283. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2284. return;
  2285. }
  2286. $.post("/admin/setConfig", {
  2287. _token: '{{csrf_token()}}',
  2288. name: 'invite_num',
  2289. value: invite_num
  2290. }, function (ret) {
  2291. if (ret.status === 'success') {
  2292. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2293. .then(() => window.location.reload())
  2294. } else {
  2295. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2296. }
  2297. });
  2298. }
  2299. // 设置重置密码次数
  2300. function setResetPasswordTimes() {
  2301. const reset_password_times = $("#reset_password_times").val();
  2302. if (reset_password_times < 0) {
  2303. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2304. return;
  2305. }
  2306. $.post("/admin/setConfig", {
  2307. _token: '{{csrf_token()}}',
  2308. name: 'reset_password_times',
  2309. value: reset_password_times
  2310. }, function (ret) {
  2311. if (ret.status === 'success') {
  2312. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2313. .then(() => window.location.reload())
  2314. } else {
  2315. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2316. }
  2317. });
  2318. }
  2319. // 设置激活用户次数
  2320. function setActiveTimes() {
  2321. const active_times = parseInt($("#active_times").val());
  2322. if (active_times < 0) {
  2323. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2324. return;
  2325. }
  2326. $.post("/admin/setConfig", {
  2327. _token: '{{csrf_token()}}',
  2328. name: 'active_times',
  2329. value: active_times
  2330. }, function (ret) {
  2331. if (ret.status === 'success') {
  2332. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2333. .then(() => window.location.reload())
  2334. } else {
  2335. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2336. }
  2337. });
  2338. }
  2339. // 设置节点订阅地址
  2340. function setSubscribeDomain() {
  2341. $.post("/admin/setConfig", {
  2342. _token: '{{csrf_token()}}',
  2343. name: 'subscribe_domain',
  2344. value: $("#subscribe_domain").val()
  2345. }, function (ret) {
  2346. if (ret.status === 'success') {
  2347. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2348. .then(() => window.location.reload())
  2349. } else {
  2350. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2351. }
  2352. });
  2353. }
  2354. // 24小时内同IP注册限制
  2355. function setRegisterIpLimit() {
  2356. const register_ip_limit = parseInt($("#register_ip_limit").val());
  2357. if (register_ip_limit < 0) {
  2358. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2359. return;
  2360. }
  2361. $.post("/admin/setConfig", {
  2362. _token: '{{csrf_token()}}',
  2363. name: 'register_ip_limit',
  2364. value: register_ip_limit
  2365. }, function (ret) {
  2366. if (ret.status === 'success') {
  2367. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2368. .then(() => window.location.reload())
  2369. } else {
  2370. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2371. }
  2372. });
  2373. }
  2374. // 设置节点订阅随机展示节点数
  2375. function setSubscribeMax() {
  2376. const subscribe_max = parseInt($("#subscribe_max").val());
  2377. if (subscribe_max < 0) {
  2378. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2379. return;
  2380. }
  2381. $.post("/admin/setConfig", {
  2382. _token: '{{csrf_token()}}',
  2383. name: 'subscribe_max',
  2384. value: subscribe_max
  2385. }, function (ret) {
  2386. if (ret.status === 'success') {
  2387. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2388. .then(() => window.location.reload())
  2389. } else {
  2390. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2391. }
  2392. });
  2393. }
  2394. // 设置用户生成邀请码有效期
  2395. function setUserInviteDays() {
  2396. const user_invite_days = parseInt($("#user_invite_days").val());
  2397. if (user_invite_days <= 0) {
  2398. swal.fire({title: '必须大于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2399. return;
  2400. }
  2401. $.post("/admin/setConfig", {
  2402. _token: '{{csrf_token()}}',
  2403. name: 'user_invite_days',
  2404. value: user_invite_days
  2405. }, function (ret) {
  2406. if (ret.status === 'success') {
  2407. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2408. .then(() => window.location.reload())
  2409. } else {
  2410. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2411. }
  2412. });
  2413. }
  2414. // 设置管理员生成邀请码有效期
  2415. function setAdminInviteDays() {
  2416. const admin_invite_days = parseInt($("#admin_invite_days").val());
  2417. if (admin_invite_days <= 0) {
  2418. swal.fire({title: '必须大于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2419. return;
  2420. }
  2421. $.post("/admin/setConfig", {
  2422. _token: '{{csrf_token()}}',
  2423. name: 'admin_invite_days',
  2424. value: admin_invite_days
  2425. }, function (ret) {
  2426. if (ret.status === 'success') {
  2427. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2428. .then(() => window.location.reload())
  2429. } else {
  2430. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2431. }
  2432. });
  2433. }
  2434. // 设置流量警告阈值
  2435. function setTrafficWarningPercent() {
  2436. const traffic_warning_percent = $("#traffic_warning_percent").val();
  2437. if (traffic_warning_percent < 0) {
  2438. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2439. return;
  2440. }
  2441. $.post("/admin/setConfig", {
  2442. _token: '{{csrf_token()}}',
  2443. name: 'traffic_warning_percent',
  2444. value: traffic_warning_percent
  2445. }, function (ret) {
  2446. if (ret.status === 'success') {
  2447. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2448. .then(() => window.location.reload())
  2449. } else {
  2450. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2451. }
  2452. });
  2453. }
  2454. // 设置用户过期提醒阈值
  2455. function setExpireDays() {
  2456. const expire_days = parseInt($("#expire_days").val());
  2457. if (expire_days < 0) {
  2458. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2459. return;
  2460. }
  2461. $.post("/admin/setConfig", {
  2462. _token: '{{csrf_token()}}',
  2463. name: 'expire_days',
  2464. value: expire_days
  2465. }, function (ret) {
  2466. if (ret.status === 'success') {
  2467. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2468. .then(() => window.location.reload())
  2469. } else {
  2470. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2471. }
  2472. });
  2473. }
  2474. // 设置网站名称
  2475. function setWebsiteName() {
  2476. $.post("/admin/setConfig", {
  2477. _token: '{{csrf_token()}}',
  2478. name: 'website_name',
  2479. value: $("#website_name").val()
  2480. }, function (ret) {
  2481. if (ret.status === 'success') {
  2482. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2483. .then(() => window.location.reload())
  2484. } else {
  2485. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2486. }
  2487. });
  2488. }
  2489. // 设置网站地址
  2490. function setWebsiteUrl() {
  2491. $.post("/admin/setConfig", {
  2492. _token: '{{csrf_token()}}',
  2493. name: 'website_url',
  2494. value: $("#website_url").val()
  2495. }, function (ret) {
  2496. if (ret.status === 'success') {
  2497. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2498. .then(() => window.location.reload())
  2499. } else {
  2500. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2501. }
  2502. });
  2503. }
  2504. // 设置苹果账号
  2505. function setAppStoreId() {
  2506. $.post("/admin/setConfig", {
  2507. _token: '{{csrf_token()}}',
  2508. name: 'AppStore_id',
  2509. value: $("#AppStore_id").val()
  2510. }, function (ret) {
  2511. if (ret.status === 'success') {
  2512. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2513. .then(() => window.location.reload())
  2514. } else {
  2515. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2516. }
  2517. });
  2518. }
  2519. // 设置苹果密码
  2520. function setAppStorePassword() {
  2521. $.post("/admin/setConfig", {
  2522. _token: '{{csrf_token()}}',
  2523. name: 'AppStore_password',
  2524. value: $("#AppStore_password").val()
  2525. }, function (ret) {
  2526. if (ret.status === 'success') {
  2527. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2528. .then(() => window.location.reload())
  2529. } else {
  2530. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2531. }
  2532. });
  2533. }
  2534. //设置管理员邮箱
  2535. function setAdminEmail() {
  2536. $.post("/admin/setConfig", {
  2537. _token: '{{csrf_token()}}',
  2538. name: 'admin_email',
  2539. value: $("#admin_email").val()
  2540. }, function (ret) {
  2541. if (ret.status === 'success') {
  2542. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2543. .then(() => window.location.reload())
  2544. } else {
  2545. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2546. }
  2547. });
  2548. }
  2549. // 生成网站安全码
  2550. function makeWebsiteSecurityCode() {
  2551. $.get("/makeSecurityCode", function (ret) {
  2552. $("#website_security_code").val(ret);
  2553. });
  2554. }
  2555. // 设置网站安全码
  2556. function setWebsiteSecurityCode() {
  2557. $.post("/admin/setConfig", {
  2558. _token: '{{csrf_token()}}',
  2559. name: 'website_security_code',
  2560. value: $("#website_security_code").val()
  2561. }, function (ret) {
  2562. if (ret.status === 'success') {
  2563. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2564. .then(() => window.location.reload())
  2565. } else {
  2566. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2567. }
  2568. });
  2569. }
  2570. // 登录加流量的时间间隔
  2571. function setTrafficLimitTime() {
  2572. const traffic_limit_time = parseInt($("#traffic_limit_time").val());
  2573. if (traffic_limit_time < 0) {
  2574. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2575. return;
  2576. }
  2577. $.post("/admin/setConfig", {
  2578. _token: '{{csrf_token()}}',
  2579. name: 'traffic_limit_time',
  2580. value: traffic_limit_time
  2581. }, function (ret) {
  2582. if (ret.status === 'success') {
  2583. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2584. .then(() => window.location.reload())
  2585. } else {
  2586. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2587. }
  2588. });
  2589. }
  2590. // 设置根据推广链接注册送流量
  2591. function setReferralTraffic() {
  2592. const referral_traffic = parseInt($("#referral_traffic").val());
  2593. if (referral_traffic < 0) {
  2594. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2595. return;
  2596. }
  2597. $.post("/admin/setConfig", {
  2598. _token: '{{csrf_token()}}',
  2599. name: 'referral_traffic',
  2600. value: referral_traffic
  2601. }, function (ret) {
  2602. if (ret.status === 'success') {
  2603. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2604. .then(() => window.location.reload())
  2605. } else {
  2606. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2607. }
  2608. });
  2609. }
  2610. // 设置根据推广链接注册人每产生一笔消费,则推广人可以获得的返利比例
  2611. function setReferralPercent() {
  2612. const referral_percent = $("#referral_percent").val();
  2613. if (referral_percent < 0) {
  2614. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2615. return;
  2616. }
  2617. if (referral_percent > 100) {
  2618. swal.fire({title: '不能大于100', type: 'warning', timer: 1000, showConfirmButton: false});
  2619. return;
  2620. }
  2621. $.post("/admin/setConfig", {
  2622. _token: '{{csrf_token()}}',
  2623. name: 'referral_percent',
  2624. value: referral_percent
  2625. }, function (ret) {
  2626. if (ret.status === 'success') {
  2627. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2628. .then(() => window.location.reload())
  2629. } else {
  2630. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2631. }
  2632. });
  2633. }
  2634. // 设置返利满多少元才可以提现
  2635. function setReferralMoney() {
  2636. const referral_money = $("#referral_money").val();
  2637. if (referral_money < 0) {
  2638. swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
  2639. return;
  2640. }
  2641. $.post("/admin/setConfig", {
  2642. _token: '{{csrf_token()}}',
  2643. name: 'referral_money',
  2644. value: referral_money
  2645. }, function (ret) {
  2646. if (ret.status === 'success') {
  2647. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  2648. .then(() => window.location.reload())
  2649. } else {
  2650. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  2651. }
  2652. });
  2653. }
  2654. </script>
  2655. @endsection