123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799 |
- @extends('admin.layouts')
- @section('css')
- <link href="/assets/global/vendor/bootstrap-select/bootstrap-select.min.css" type="text/css" rel="stylesheet">
- <link href="//cdn.bootcss.com/bootstrap-switch/4.0.0-alpha.1/css/bootstrap-switch.min.css" type="text/css" rel="stylesheet">
- <link href="/assets/global/vendor/dropify/dropify.min.css" type="text/css" rel="stylesheet">
- <style>
- .text-help {
- padding-left: 15px;
- }
- </style>
- @endsection
- @section('content')
- <div class="page-content container-fluid">
- <div class="panel">
- <div class="panel-heading">
- <h1 class="panel-title"><i class="icon wb-settings"></i>通用配置</h1>
- </div>
- <div class="panel-body">
- <div class="nav-tabs-horizontal" data-plugin="tabs">
- <ul class="nav nav-tabs" role="tablist">
- <li class="nav-item" role="presentation">
- <a class="nav-link active" data-toggle="tab" href="#webSetting" aria-controls="webSetting" role="tab">网站常规</a>
- </li>
- <li class="nav-item" role="presentation">
- <a class="nav-link" data-toggle="tab" href="#account" aria-controls="account" role="tab">账号设置</a>
- </li>
- <li class="nav-item" role="presentation">
- <a class="nav-link" data-toggle="tab" href="#node" aria-controls="node" role="tab">节点设置</a>
- </li>
- <li class="nav-item" role="presentation">
- <a class="nav-link" data-toggle="tab" href="#extend" aria-controls="extend" role="tab">拓展功能</a>
- </li>
- <li class="nav-item" role="presentation">
- <a class="nav-link" data-toggle="tab" href="#checkIn" aria-controls="checkIn" role="tab">签到系统</a>
- </li>
- <li class="nav-item" role="presentation">
- <a class="nav-link" data-toggle="tab" href="#promo" aria-controls="promo" role="tab">推广系统</a>
- </li>
- <li class="nav-item" role="presentation">
- <a class="nav-link" data-toggle="tab" href="#notify" aria-controls="notify" role="tab">通知系统</a>
- </li>
- <li class="nav-item" role="presentation">
- <a class="nav-link" data-toggle="tab" href="#auto" aria-controls="auto" role="tab">自动任务</a>
- </li>
- <li class="nav-item" role="presentation">
- <a class="nav-link" data-toggle="tab" href="#other" aria-controls="other" role="tab">LOGO|客服|统计</a>
- </li>
- <li class="nav-item" role="presentation">
- <a class="nav-link" data-toggle="tab" href="#payment" aria-controls="payment" role="tab">支付系统</a>
- </li>
- <li class="dropdown nav-item" role="presentation">
- <a class="dropdown-toggle nav-link" data-toggle="dropdown" href="#" aria-expanded="false">菜单</a>
- <div class="dropdown-menu" role="menu">
- <a class="dropdown-item active" data-toggle="tab" href="#webSetting" aria-controls="webSetting" role="tab">网站常规</a>
- <a class="dropdown-item" data-toggle="tab" href="#account" aria-controls="account" role="tab">账号设置</a>
- <a class="dropdown-item" data-toggle="tab" href="#node" aria-controls="node" role="tab">节点设置</a>
- <a class="dropdown-item" data-toggle="tab" href="#extend" aria-controls="extend" role="tab">拓展功能</a>
- <a class="dropdown-item" data-toggle="tab" href="#checkIn" aria-controls="checkIn" role="tab">签到系统</a>
- <a class="dropdown-item" data-toggle="tab" href="#promo" aria-controls="promo" role="tab">推广系统</a>
- <a class="dropdown-item" data-toggle="tab" href="#notify" aria-controls="notify" role="tab">通知系统</a>
- <a class="dropdown-item" data-toggle="tab" href="#auto" aria-controls="auto" role="tab">自动任务</a>
- <a class="dropdown-item" data-toggle="tab" href="#other" aria-controls="other" role="tab">LOGO|客服|统计</a>
- <a class="dropdown-item" data-toggle="tab" href="#payment" aria-controls="payment" role="tab">支付系统</a>
- </div>
- </li>
- </ul>
- <div class="tab-content py-35 px-35">
- <div class="tab-pane active" id="webSetting" role="tabpanel">
- <form action="#" method="post" role="form" class="form-horizontal" autocomplete="off">
- <div class="form-row">
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3" for="website_name">网站名称</label>
- <div class="col-md-6">
- <div class="input-group">
- <input type="text" class="form-control" name="website_name" id="website_name" value="{{$website_name}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setWebsiteName()">修改</button></span>
- </div>
- </div>
- <span class="offset-md-3 text-help"> 发邮件时展示 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="website_url">网站地址</label>
- <div class="col-md-6">
- <div class="input-group">
- <input type="url" class="form-control" name="website_url" id="website_url" value="{{$website_url}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setWebsiteUrl()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 生成重置密码、在线支付必备 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="AppStore_id">苹果账号</label>
- <div class="col-md-6">
- <div class="input-group">
- <input type="email" class="form-control" name="AppStore_id" id="AppStore_id" value="{{$AppStore_id}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setAppStoreId()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> iOS软件设置教程中使用的苹果账号 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="AppStore_password">苹果密码</label>
- <div class="col-md-6">
- <div class="input-group">
- <input type="password" class="form-control" name="AppStore_password" id="AppStore_password" value="{{$AppStore_password}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setAppStorePassword()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> iOS软件设置教程中使用的苹果密码 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="admin_email">管理员邮箱</label>
- <div class="col-md-6">
- <div class="input-group">
- <input type="email" class="form-control" name="admin_email" id="admin_email" value="{{$admin_email}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setAdminEmail()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 错误提示时会提供管理员邮箱作为联系方式 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="website_security_code">网站安全码</label>
- <div class="col-md-6">
- <div class="input-group">
- <input type="text" class="form-control" name="website_security_code" id="website_security_code" value="{{$website_security_code}}"/>
- <span class="input-group-append">
- <button class="btn btn-info" type="button" onclick="makeWebsiteSecurityCode()">生成</button>
- <button class="btn btn-primary" type="button" onclick="setWebsiteSecurityCode()">修改</button>
- </span>
- </div>
- </div>
- <span class="text-help offset-md-3">非空时必须通过 <a href="/login?securityCode=" target="_blank">安全入口</a> 加上安全码才可访问 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_forbid_china">阻止大陆访问</label>
- <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>
- <span class="text-help offset-md-3"> 开启后大陆IP禁止访问 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_forbid_oversea">阻止海外访问</label>
- <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>
- <span class="text-help offset-md-3"> 开启后海外IP(含港澳台)禁止访问 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_forbid_robot">阻止机器人访问</label>
- <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>
- <span class="text-help offset-md-3"> 如果是机器人、爬虫、代理访问网站则会抛出404错误 </span>
- </div>
- </div>
- </div>
- </form>
- </div>
- <div class="tab-pane" id="account" role="tabpanel">
- <form action="#" method="post" role="form" class="form-horizontal">
- <div class="form-row">
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_register">用户注册</label>
- <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>
- <span class="text-help offset-md-3"> 关闭后无法注册 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_invite_register">邀请注册</label>
- <select class="col-md-3" name="is_invite_register" id="is_invite_register" data-plugin="selectpicker" data-style="btn-outline btn-primary">
- <option value="0" @if($is_invite_register == '0') selected @endif>关闭</option>
- <option value="1" @if($is_invite_register == '1') selected @endif>可选</option>
- <option value="2" @if($is_invite_register == '2') selected @endif>必须</option>
- </select>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_active_register">激活账号</label>
- <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>
- <span class="text-help offset-md-3"> 启用后用户需要通过邮件来激活账号 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_reset_password">重置密码</label>
- <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>
- <span class="text-help offset-md-3"> 启用后用户可以通过邮件重置密码 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_captcha">验证码</label>
- <select class="col-md-5" name="is_captcha" id="is_captcha" data-plugin="selectpicker" data-style="btn-outline btn-primary">
- <option value="0" @if($is_captcha == '0') selected @endif>关闭</option>
- <option value="1" @if($is_captcha == '1') selected @endif>普通验证码</option>
- <option value="2" @if($is_captcha == '2') selected @endif>极验Geetest</option>
- <option value="3" @if($is_captcha == '3') selected @endif>Google reCAPTCHA</option>
- </select>
- <span class="text-help offset-md-3"> 启用后登录、注册需要输入验证码 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_free_code">免费邀请码</label>
- <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>
- <span class="text-help offset-md-3"> 关闭后免费邀请码不可见 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_verify_register">注册校验验证码</label>
- <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>
- <span class="text-help offset-md-3"> 注册时需要先通过邮件获取验证码方可注册,‘激活账号’失效 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label for="is_rand_port" class="col-md-3 col-form-label">随机端口</label>
- <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>
- <span class="text-help offset-md-3"> 注册、添加用户时随机生成端口 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label">端口范围</label>
- <div class="col-md-7">
- <div class="input-group">
- <label for="min_port"></label>
- <input type="number" class="form-control" name="min_port" id="min_port" value="{{$min_port}}"/>
- <div class="input-group-prepend">
- <span class="input-group-text"> ~ </span>
- </div>
- <label for="max_port"></label>
- <input type="number" class="form-control" name="max_port" id="max_port" value="{{$max_port}}"/>
- </div>
- </div>
- <span class="text-help offset-md-3"> 端口范围:1000 - 65535 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_user_rand_port">自定义端口</label>
- <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>
- <span class="text-help offset-md-3"> 用户可以自定义端口 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="default_days">初始有效期</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="default_days" id="default_days" value="{{$default_days}}"/>
- <div class="input-group-append">
- </div>
- <span class="input-group-text">天</span>
- <button class="btn btn-primary" type="button" onclick="setDefaultDays()">修改</button>
- </div>
- </div>
- <span class="text-help offset-md-3"> 用户注册时默认账户有效期,为0即当天到期 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="default_traffic">初始流量</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="default_traffic" id="default_traffic" value="{{$default_traffic}}"/>
- <div class="input-group-append">
- </div>
- <span class="input-group-text">MB</span>
- <button class="btn btn-primary" type="button" onclick="setDefaultTraffic()">修改</button>
- </div>
- </div>
- <span class="text-help offset-md-3"> 用户注册时默认可用流量 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="invite_num">可生成邀请码数</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="invite_num" id="invite_num" value="{{$invite_num}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setInviteNum()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 用户可以生成的邀请码数 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="reset_password_times">重置密码次数</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="reset_password_times" id="reset_password_times" value="{{$reset_password_times}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setResetPasswordTimes()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 24小时内可以通过邮件重置密码次数 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="sensitiveType">邮箱过滤机制</label>
- <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>
- <span class="text-help offset-md-3"> 黑名单时,用户可使用任意黑名单外的邮箱注册;白名单时用户只能选择使用白名单中的邮箱后缀注册 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="active_times">激活账号次数</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="active_times" id="active_times" value="{{$active_times}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setActiveTimes()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 24小时内可以通过邮件激活账号次数 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="register_ip_limit">同IP注册限制</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="register_ip_limit" id="register_ip_limit" value="{{$register_ip_limit}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setRegisterIpLimit()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 同IP在24小时内允许注册数量,为0时不限制 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="initial_labels_for_user">用户初始标签</label>
- <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>
- @foreach($label_list as $label)
- <option value="{{$label->id}}" @if(in_array($label->id, explode(',', $initial_labels_for_user))) selected @endif>{{$label->name}}</option>
- @endforeach
- </select>
- <span class="text-help offset-md-3"> 注册用户时的初始标签,标签用于关联节点 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="user_invite_days">用户-邀请码有效期</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="user_invite_days" id="user_invite_days" value="{{$user_invite_days}}"/>
- <div class="input-group-append">
- </div>
- <span class="input-group-text">天</span>
- <button class="btn btn-primary" type="button" onclick="setUserInviteDays()">修改</button>
- </div>
- </div>
- <span class="text-help offset-md-3"> 用户自行生成邀请的有效期 </span>
- </div>
- </div>
- </div>
- </form>
- </div>
- <div class="tab-pane" id="node" role="tabpanel">
- <form action="#" method="post" role="form" class="form-horizontal">
- <div class="form-row">
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="subscribe_domain">节点订阅地址</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="url" class="form-control" name="subscribe_domain" id="subscribe_domain" value="{{$subscribe_domain}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setSubscribeDomain()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> (推荐)防止面板域名被DNS投毒后无法正常订阅,需带http://或https:// </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="subscribe_max">订阅节点数</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="subscribe_max" id="subscribe_max" value="{{$subscribe_max}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setSubscribeMax()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 客户端订阅时取得几个节点,为0时返回全部节点 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="mix_subscribe">混合订阅</label>
- <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>
- <span class="text-help offset-md-3"> 启用后,订阅信息中将包含V2Ray节点信息(仅支持Shadowrocket、Quantumult、v2rayN) </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="rand_subscribe">随机订阅</label>
- <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>
- <span class="text-help offset-md-3"> 启用后,订阅时将随机返回节点信息,否则按节点排序返回 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_custom_subscribe">高级订阅</label>
- <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>
- <span class="text-help offset-md-3"> 启用后,订阅信息顶部将显示过期时间、剩余流量(Quantumult有特殊效果) </span>
- </div>
- </div>
- </div>
- </form>
- </div>
- <div class="tab-pane" id="extend" role="tabpanel">
- <form action="#" method="post" role="form" class="form-horizontal">
- <div class="form-row">
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_namesilo">Namesilo</label>
- <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>
- <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>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="namesilo_key">Namesilo API KEY</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" name="namesilo_key" id="namesilo_key" value="{{$namesilo_key}}" placeholder="填入Namesilo上申请的API KEY"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setNamesiloKey()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 域名必须是<a href="https://www.namesilo.com/?rid=326ec20pa" target="_blank">www.namesilo.com</a>上购买的 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="admin_invite_days">管理员-邀请码有效期</label>
- <div class="col-md-7">
- <div class="input-group">
- <input class="form-control" type="number" id="admin_invite_days" name="admin_invite_days" value="{{$admin_invite_days}}"/>
- <div class="input-group-append">
- </div>
- <span class="input-group-text">天</span>
- <button class="btn btn-primary" type="button" onclick="setAdminInviteDays()">修改</button>
- </div>
- </div>
- <span class="text-help offset-md-3"> 管理员生成邀请码的有效期 </span>
- </div>
- </div>
- @if($is_captcha == 2)
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="geetest_id">极验ID</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" name="geetest_id" id="geetest_id" value="{{$geetest_id}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setGeetestId()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 本功能需要 <a href="https://auth.geetest.com/login/" target="_blank">极验后台</a> 申请权限及应用 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="geetest_key">极验KEY</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" name="geetest_key" id="geetest_key" value="{{$geetest_key}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setGeetestKey()">修改</button></span>
- </div>
- </div>
- </div>
- </div>
- @elseif($is_captcha == 3)
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="google_captcha_sitekey">网站密钥</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" name="google_captcha_sitekey" id="google_captcha_sitekey" value="{{$google_captcha_sitekey}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setGoogleCaptchaId()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 本功能需要 <a href="https://www.google.com/recaptcha/admin" target="_blank">Google reCAPTCHA后台</a> 申请权限及应用 (申请需科学上网,日常验证不用)</span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 control-label" for="google_captcha_secret">密钥</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" name="google_captcha_secret" id="google_captcha_secret" value="{{$google_captcha_secret}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setGoogleCaptchaKey()">修改</button></span>
- </div>
- </div>
- </div>
- </div>
- @endif
- </div>
- </form>
- </div>
- <div class="tab-pane" id="checkIn" role="tabpanel">
- <form action="#" method="post" role="form" class="form-horizontal">
- <div class="form-row">
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_checkin">签到加流量</label>
- <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>
- <span class="text-help offset-md-3"> 登录时将根据流量范围随机得到流量 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="traffic_limit_time">时间间隔</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="traffic_limit_time" id="traffic_limit_time" value="{{$traffic_limit_time}}"/>
- <div class="input-group-append">
- </div>
- <span class="input-group-text">分钟</span>
- <button class="btn btn-primary" type="button" onclick="setTrafficLimitTime()">修改</button>
- </div>
- </div>
- <span class="text-help offset-md-3"> 间隔多久才可以再次签到</span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label">流量范围</label>
- <div class="col-md-7">
- <div class="input-group">
- <label for="min_rand_traffic"></label>
- <input type="number" class="form-control" name="min_rand_traffic" id="min_rand_traffic" value="{{$min_rand_traffic}}"/>
- <div class="input-group-prepend">
- <span class="input-group-text"> ~ </span>
- </div>
- <label for="max_rand_traffic"></label>
- <input type="number" class="form-control" name="max_rand_traffic" id="max_rand_traffic" value="{{$max_rand_traffic}}"/>
- <div class="input-group-prepend">
- <span class="input-group-text"> MB </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </form>
- </div>
- <div class="tab-pane" id="promo" role="tabpanel">
- <form action="#" method="post" role="form" class="form-horizontal">
- <div class="form-row">
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="referral_status">推广功能</label>
- <div class="col-md-7">
- <div class="input-group">
- <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>
- </div>
- </div>
- <span class="text-help offset-md-3"> 关闭后用户不可见,但是不影响其正常邀请返利 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="referral_traffic">注册送流量</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="referral_gift_traffic" id="referral_traffic" value="{{$referral_traffic}}"/>
- <div class="input-group-append">
- <span class="input-group-text">MB</span>
- <button class="btn btn-primary" type="button" onclick="setReferralTraffic()">修改</button>
- </div>
- </div>
- </div>
- <span class="text-help offset-md-3"> 根据推广链接、邀请码注册则赠送相应的流量 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="referral_percent">返利比例</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="referral_percent" id="referral_percent" value="{{$referral_percent * 100}}"/>
- <div class="input-group-append">
- <span class="input-group-text">%</span>
- <button class="btn btn-primary" type="button" onclick="setReferralPercent()">修改</button>
- </div>
- </div>
- </div>
- <span class="text-help offset-md-3"> 根据推广链接注册的账号每笔消费推广人可以分成的比例 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="referral_money">提现限制</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="referral_money" id="referral_money" value="{{$referral_money}}"/>
- <div class="input-group-append">
- <span class="input-group-text">元</span>
- <button class="btn btn-primary" type="button" onclick="setReferralMoney()">修改</button>
- </div>
- </div>
- </div>
- <span class="text-help offset-md-3"> 满多少元才可以申请提现 </span>
- </div>
- </div>
- </div>
- </form>
- </div>
- <div class="tab-pane" id="notify" role="tabpanel">
- <form action="#" method="post" role="form" class="form-horizontal">
- <div class="row">
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="expire_warning">用户过期警告</label>
- <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>
- <span class="text-help offset-md-3"> 启用后账号距到期还剩阈值设置的值时自动发邮件提醒用户 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="expire_days">过期警告阈值</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="expire_days" id="expire_days" value="{{$expire_days}}"/>
- <div class="input-group-append">
- <span class="input-group-text">天</span>
- <button class="btn btn-primary" type="button" onclick="setExpireDays()">修改</button>
- </div>
- </div>
- </div>
- <span class="text-help offset-md-3"> 账号距离过期还差多少天时发警告邮件 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="traffic_warning">用户流量警告</label>
- <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>
- <span class="text-help offset-md-3"> 启用后账号已使用流量超过警告阈值时自动发邮件提醒用户 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label for="traffic_warning_percent" class="col-md-3 col-form-label">流量警告阈值</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="traffic_warning_percent" id="traffic_warning_percent" value="{{$traffic_warning_percent}}"/>
- <div class="input-group-append">
- <span class="input-group-text">%</span>
- <button class="btn btn-primary" type="button" onclick="setTrafficWarningPercent()">修改</button>
- </div>
- </div>
- </div>
- <span class="text-help offset-md-3"> 建议设置在70%~90% </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_node_crash_warning">节点离线提醒</label>
- <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>
- <span class="text-help offset-md-3"> 启用后如果节点离线则通过ServerChan推送提醒 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="webmaster_email">管理员收信地址</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="email" class="form-control" name="webmaster_email" id="webmaster_email" value="{{$webmaster_email}}" placeholder="master@ssrpanel.com"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setCrashWarningEmail()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 填写此值则节点离线、用户回复工单都会自动提醒 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="nodes_detection">节点阻断检测</label>
- <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>
- <span class="text-help offset-md-3"> 每小时检测节点是否被阻断并提醒 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="numberOfWarningTimes">阻断检测提醒</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="numberOfWarningTimes" id="numberOfWarningTimes" value="{{$numberOfWarningTimes}}"/>
- <div class="input-group-append">
- <span class="input-group-text">次</span>
- <button class="btn btn-primary" type="button" onclick="setNumberOfWarningTimes()">修改</button>
- </div>
- </div>
- </div>
- <span class="text-help offset-md-3"> 提醒N次后自动下线节点,为0时不限制,不超过12 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_server_chan">ServerChan</label>
- <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>
- <span class="text-help offset-md-3"> 推送节点离线提醒、用户流量异常警告、节点使用报告(<a href="http://sc.ftqq.com" target="_blank">绑定微信</a>) </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="server_chan_key">SCKEY</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" name="server_chan_key" id="server_chan_key" value="{{$server_chan_key}}" placeholder="请到ServerChan申请"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setServerChanKey()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 启用ServerChan,请务必填入本值(<a href="http://sc.ftqq.com" target="_blank">申请SCKEY</a>) </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_push_bear">PushBear</label>
- <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>
- <span class="text-help offset-md-3"> 使用PushBear推送微信消息给用户(<a href="https://pushbear.ftqq.com/admin/#/signin" target="_blank">创建消息通道</a>) </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="push_bear_send_key">PushBear SendKey</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" name="push_bear_send_key" id="push_bear_send_key" value="{{$push_bear_send_key}}" placeholder="创建消息通道后即可获取"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setPushBearSendKey()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 启用PushBear,请务必填入本值 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="push_bear_qrcode">PushBear订阅二维码</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="url" class="form-control" name="push_bear_qrcode" id="push_bear_qrcode" value="{{$push_bear_qrcode}}" placeholder="填入消息通道的二维码URL"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setPushBearQrCode()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 创建消息通道后,在二维码上点击右键“复制图片地址”并粘贴至此处 </span>
- </div>
- </div>
- </div>
- </form>
- </div>
- <div class="tab-pane" id="auto" role="tabpanel">
- <form action="#" method="post" role="form" class="form-horizontal">
- <div class="row">
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_clear_log">自动清除日志</label>
- <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>
- <span class="text-help offset-md-3"> (推荐)启用后自动清除无用日志 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="reset_traffic">流量自动重置</label>
- <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>
- <span class="text-help offset-md-3"> 用户会按其购买套餐的日期自动重置可用流量 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_subscribe_ban">订阅异常自动封禁</label>
- <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>
- <span class="text-help offset-md-3"> 启用后用户订阅链接请求超过设定阈值则自动封禁 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="subscribe_ban_times">订阅请求阈值</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="subscribe_ban_times" id="subscribe_ban_times" value="{{$subscribe_ban_times}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setSubscribeBanTimes()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 24小时内订阅链接请求次数限制 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_traffic_ban">异常自动封号</label>
- <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>
- <span class="text-help offset-md-3"> 1小时内流量超过异常阈值则自动封号(仅禁用代理) </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="traffic_ban_value">流量异常阈值</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="traffic_ban_value" id="traffic_ban_value" value="{{$traffic_ban_value}}"/>
- <div class="input-group-append">
- <span class="input-group-text">GB</span>
- <button class="btn btn-primary" type="button" onclick="setTrafficBanValue()">修改</button>
- </div>
- </div>
- </div>
- <span class="text-help offset-md-3"> 1小时内超过该值,则触发自动封号 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="traffic_ban_time">封号时长</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="number" class="form-control" name="traffic_ban_time" id="traffic_ban_time" value="{{$traffic_ban_time}}"/>
- <div class="input-group-append">
- <span class="input-group-text">分钟</span>
- <button class="btn btn-primary" type="button" onclick="setTrafficBanTime()">修改</button>
- </div>
- </div>
- </div>
- <span class="text-help offset-md-3"> 触发流量异常导致用户被封禁的时长,到期后自动解封 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="auto_release_port">端口自动释放</label>
- <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>
- <span class="text-help offset-md-3"> 被封禁和过期一个月的用户端口自动释放 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_ban_status">过期自动封禁</label>
- <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>
- <span class="text-help offset-md-3"> (慎重)封禁整个账号会重置账号的所有数据且会导致用户无法登录 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="node_daily_report">节点使用报告</label>
- <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>
- <span class="text-help offset-md-3"> 每天早上9点推送昨天节点的使用情况 </span>
- </div>
- </div>
- </div>
- </form>
- </div>
- <div class="tab-pane" id="other" role="tabpanel">
- <form action="/admin/setExtend" method="post" enctype="multipart/form-data" class="upload-form" role="form" id="setExtend">
- {{csrf_field()}}
- <div class="form-row">
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-form-label col-md-3" for="website_home_logo">首页LOGO</label>
- <div class="col-md-9">
- <input type="file" name="website_home_logo" id="website_home_logo" data-plugin="dropify" data-default-file={{$website_home_logo?:'/assets/images/noimage.png'}} />
- <button type="submit" class="btn btn-success float-right mt-10"> 提 交</button>
- </div>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-form-label col-md-3" for="website_logo">站内LOGO</label>
- <div class="col-md-9">
- <input type="file" name="website_logo" id="website_logo" data-plugin="dropify" data-default-file={{$website_logo?:'/assets/images/noimage.png'}} />
- <button type="submit" class="btn btn-success float-right mt-10"> 提 交</button>
- </div>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-form-label col-md-3" for="website_analytics">统计代码</label>
- <div class="col-md-9">
- <textarea class="form-control" rows="10" name="website_analytics" id="website_analytics">{{$website_analytics}}</textarea>
- <button type="submit" class="btn btn-success float-right mt-10"> 提 交</button>
- </div>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-form-label col-md-3" for="website_customer_service">客服代码</label>
- <div class="col-md-9">
- <textarea class="form-control" rows="10" name="website_customer_service" id="website_customer_service">{{$website_customer_service}}</textarea>
- <button type="submit" class="btn btn-success float-right mt-10"> 提 交</button>
- </div>
- </div>
- </div>
- </div>
- </form>
- </div>
- <div class="tab-pane" id="payment" role="tabpanel">
- <form action="#" method="post" role="form" class="form-horizontal">
- <div class="form-row pb-70">
- <div class="form-group col-md-12">
- <div class="alert alert-info text-center">
- <button class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span><span class="sr-only">{{trans('home.close')}}</span></button>
- 请在<a href="https://console.youzanyun.com/login" target="_blank" style="color: red;"> 有赞云 </a>设置应用的推送网址为:{{$website_url . '/api/yzy'}}
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_youzan">有赞支付</label>
- <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>
- <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>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="kdt_id">授权店铺id</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" name="kdt_id" id="kdt_id" value="{{$kdt_id}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setKdtId()">修改</button></span>
- </div>
- </div>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="youzan_client_id">Client_id</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" name="youzan_client_id" id="youzan_client_id" value="{{$youzan_client_id}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setYouzanClientId()">修改</button></span>
- </div>
- </div>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="youzan_client_secret">Client_secret</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" name="youzan_client_secret" id="youzan_client_secret" value="{{$youzan_client_secret}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setYouzanClientSecret()">修改</button></span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row pb-70">
- <div class="form-group col-lg-6">
- <div class="row">
- <label for="is_alipay" class="col-md-3 col-form-label">AliPay国际</label>
- <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>
- <span class="text-help offset-md-3"> 请先到 <a href="https://global.alipay.com/" target="_blank">AliPay国际</a> 申请partner和key </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="alipay_currency">结算币种</label>
- <select class="col-md-5" name="alipay_currency" id="alipay_currency" data-plugin="selectpicker" data-style="btn-outline btn-primary">
- <option value="USD" @if($alipay_currency == 'USD') selected @endif>美元</option>
- <option value="HKD" @if($alipay_currency == 'HKD') selected @endif>港币</option>
- <option value="JPY" @if($alipay_currency == 'JPY') selected @endif>日元</option>
- <option value="EUR" @if($alipay_currency == 'EUR') selected @endif>欧元</option>
- </select>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="alipay_sign_type">加密方式</label>
- <select class="col-md-5" name="alipay_sign_type" id="alipay_sign_type" data-plugin="selectpicker" data-style="btn-outline btn-primary">
- <option value="MD5" @if($alipay_sign_type == 'MD5') selected @endif>MD5</option>
- <option value="RSA" @if($alipay_sign_type == 'RSA') selected @endif>RSA</option>
- </select>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="alipay_transport">启用SSL验证</label>
- <select class="col-md-5" name="alipay_transport" id="alipay_transport" data-plugin="selectpicker" data-style="btn-outline btn-primary">
- <option value="http" @if($alipay_transport == 'http') selected @endif>否</option>
- <option value="https" @if($alipay_transport == 'https') selected @endif>是</option>
- </select>
- <span class="text-help offset-md-3"> HTTPS站点需启用 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="alipay_partner">Partner</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" name="alipay_partner" id="alipay_partner" value="{{$alipay_partner}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setAlipayPartner()">修改</button></span>
- </div>
- </div>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label for="alipay_key" class="col-md-3 col-form-label">Key</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="password" class="form-control" name="alipay_key" id="alipay_key" value="{{$alipay_key}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setAlipayKey()">修改</button></span>
- </div>
- </div>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="alipay_private_key">RSA私钥</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="password" class="form-control" name="alipay_private_key" id="alipay_private_key" value="{{$alipay_private_key}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setAlipayPrivateKey()">修改</button></span>
- </div>
- </div>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="alipay_public_key">RSA公钥</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="password" class="form-control" name="alipay_public_key" id="alipay_public_key" value="{{$alipay_public_key}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setAlipayPublicKey()">修改</button></span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row pb-70">
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="is_f2fpay">支付宝F2F</label>
- <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>
- <span class="text-help offset-md-3"> 本功能需要 <a href="https://open.alipay.com/platform/home.htm" target="_blank">蚂蚁金服开放平台</a> 申请权限及应用 </span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="f2fpay_app_id">应用ID</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" name="f2fpay_app_id" id="f2fpay_app_id" value="{{$f2fpay_app_id}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setF2fpayAppId()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3">即:APPID</span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="f2fpay_private_key">RSA私钥</label>
- <div class="col-md-7">
- <div class="input-group">
- <input class="form-control" type="text" name="f2fpay_private_key" id="f2fpay_private_key" value="{{$f2fpay_private_key}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setF2fpayPrivateKey()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3">即:rsa_private_key,不包括首尾格式</span>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="f2fpay_public_key">支付宝公钥</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" name="f2fpay_public_key" id="f2fpay_public_key" value="{{$f2fpay_public_key}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setF2fpayPublicKey()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 注意不是RSA公钥 </span>
- </div>
- </div>
- </div>
- <div class="form-group col-lg-6">
- <div class="row">
- <label class="col-md-3 col-form-label" for="f2fpay_subject_name">自定义商品名称</label>
- <div class="col-md-7">
- <div class="input-group">
- <input type="text" class="form-control" name="f2fpay_subject_name" id="f2fpay_subject_name" value="{{$f2fpay_subject_name}}"/>
- <span class="input-group-append"><button class="btn btn-primary" type="button" onclick="setF2fpaySubjectName()">修改</button></span>
- </div>
- </div>
- <span class="text-help offset-md-3"> 用于在用户支付宝客户端显示 </span>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- @endsection
- @section('script')
- <script src="/assets/global/vendor/matchheight/jquery.matchHeight-min.js" type="text/javascript"></script>
- <script src="/assets/global/vendor/bootstrap-select/bootstrap-select.min.js" type="text/javascript"></script>
- <script src="//cdn.bootcss.com/bootstrap-switch/4.0.0-alpha.1/js/bootstrap-switch.min.js" type="text/javascript"></script>
- <script src="/assets/global/vendor/dropify/dropify.min.js" type="text/javascript"></script>
- <script src="/assets/global/js/Plugin/bootstrap-select.js" type="text/javascript"></script>
- <script src="/assets/global/js/Plugin/responsive-tabs.js" type="text/javascript"></script>
- <script src="/assets/global/js/Plugin/tabs.js" type="text/javascript"></script>
- <script src="/assets/global/js/Plugin/dropify.js" type="text/javascript"></script>
- <script type="text/javascript">
- $('input[type="checkbox"]').bootstrapSwitch();
- // 注册的默认标签
- $('#initial_labels_for_user').on("changed.bs.select", function () {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'initial_labels_for_user',
- value: $(this).val() ? $(this).val().join(',') : ''
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- });
- // 启用、禁用随机端口
- $('#is_rand_port').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_rand_port',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用屏蔽大陆访问
- $('#is_forbid_china').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_forbid_china',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用屏蔽海外访问
- $('#is_forbid_oversea').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_forbid_oversea',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用机器人访问
- $('#is_forbid_robot').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_forbid_robot',
- value: is_forbid_robot = state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用注册校验验证码
- $('#is_verify_register').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_verify_register',
- value: is_verify_register = state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用自定义端口
- $('#is_user_rand_port').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_user_rand_port',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用登录加流量
- $('#is_checkin').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_checkin',
- value: is_checkin = state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用注册
- $('#is_register').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_register',
- value: is_register = state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、可选、禁用邀请注册
- $("#is_invite_register").on("changed.bs.select", function () {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_invite_register',
- value: $(this).val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- });
- // 启用、禁用用户重置密码
- $('#is_reset_password').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_reset_password',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用验证码
- $('#is_captcha').on("changed.bs.select", function () {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_captcha',
- value: $(this).val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- });
- // 启用、禁用免费邀请码
- $('#is_free_code').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_free_code',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用用户激活用户
- $('#is_active_register').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_active_register',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用用户到期自动邮件提醒
- $('#expire_warning').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'expire_warning',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用节点离线发件提醒管理员
- $('#is_node_crash_warning').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_node_crash_warning',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用节点离线发ServerChan微信消息提醒
- $('#is_server_chan').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_server_chan',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用Namesilo
- $('#is_namesilo').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_namesilo',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用混合订阅
- $('#mix_subscribe').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'mix_subscribe',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用随机订阅
- $('#rand_subscribe').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'rand_subscribe',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用自定义订阅
- $('#is_custom_subscribe').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_custom_subscribe',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用PushBear
- $('#is_push_bear').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_push_bear',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用节点阻断探测
- $('#nodes_detection').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'nodes_detection',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用订阅异常自动封禁
- $('#is_subscribe_ban').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_subscribe_ban',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用退关返利用户可见与否
- $('#referral_status').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'referral_status',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用随机端口
- $('#traffic_warning').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'traffic_warning',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用随机端口
- $('#is_clear_log').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_clear_log',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用流量自动重置
- $('#reset_traffic').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'reset_traffic',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用流量异常自动封号
- $('#is_traffic_ban').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_traffic_ban',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用端口自动释放
- $('#auto_release_port').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'auto_release_port',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用节点使用报告
- $('#node_daily_report').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'node_daily_report',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 过期封禁是否禁止账号
- $('#is_ban_status').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_ban_status',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用有赞云
- $('#is_youzan').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_youzan',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用alipay国际
- $('#is_alipay').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_alipay',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 启用、禁用支付宝当面付
- $('#is_f2fpay').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'is_f2fpay',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 流量异常阈值
- function setTrafficBanValue() {
- const traffic_ban_value = $("#traffic_ban_value").val();
- if (traffic_ban_value < 1) {
- swal.fire({title: '不能小于1', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'traffic_ban_value',
- value: traffic_ban_value
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置用户封号时长
- function setTrafficBanTime() {
- const traffic_ban_time = $("#traffic_ban_time").val();
- if (traffic_ban_time < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'traffic_ban_time',
- value: traffic_ban_time
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置节点离线警告收件地址
- function setCrashWarningEmail() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'webmaster_email',
- value: $("#webmaster_email").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置ServerChan的SCKEY
- function setServerChanKey() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'server_chan_key',
- value: $("#server_chan_key").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置Namesilo API KEY
- function setNamesiloKey() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'namesilo_key',
- value: $("#namesilo_key").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置PushBear的SendKey
- function setPushBearSendKey() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'push_bear_send_key',
- value: $("#push_bear_send_key").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置PushBear的消息通道二维码URL
- function setPushBearQrCode() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'push_bear_qrcode',
- value: $("#push_bear_qrcode").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置TCP阻断检测提醒次数
- function setNumberOfWarningTimes() {
- const numberOfWarningTimes = $("#numberOfWarningTimes").val();
- if (numberOfWarningTimes < 0 || numberOfWarningTimes > 12) {
- swal.fire({title: '只能在0-12之间', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'numberOfWarningTimes',
- value: numberOfWarningTimes
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置订阅封禁阈值
- function setSubscribeBanTimes() {
- const subscribe_ban_times = $("#subscribe_ban_times").val();
- if (subscribe_ban_times < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'subscribe_ban_times',
- value: subscribe_ban_times
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置有赞云的kdt_id
- function setKdtId() {
- $.post("/admin/setConfig", {_token: '{{csrf_token()}}', name: 'kdt_id', value: $("#kdt_id").val()}, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置有赞云的client_id
- function setYouzanClientId() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'youzan_client_id',
- value: $("#youzan_client_id").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置有赞云的client_secret
- function setYouzanClientSecret() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'youzan_client_secret',
- value: $("#youzan_client_secret").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置alipay加密方式
- $('#alipay_sign_type').change(function () {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'alipay_sign_type',
- value: $(this).val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- });
- // 设置alipay是否启用SSL验证
- $('#alipay_transport').change(function () {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'alipay_transport',
- value: $(this).val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- });
- //设置alipay的partner
- function setAlipayPartner() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'alipay_partner',
- value: $("#alipay_partner").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- //设置alipay的key
- function setAlipayKey() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'alipay_key',
- value: $("#alipay_key").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- //设置alipay的私钥
- function setAlipayPrivateKey() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'alipay_private_key',
- value: $("#alipay_private_key").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- //设置alipay的公钥
- function setAlipayPublicKey() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'alipay_public_key',
- value: $("#alipay_public_key").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置alipay结算币种
- $('#alipay_currency').on("changed.bs.select", function () {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'alipay_currency',
- value: $(this).val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- });
- // 设置最小流量
- $("#min_rand_traffic").change(function () {
- const min_rand_traffic = $(this).val();
- const max_rand_traffic = $("#max_rand_traffic").val();
- if (parseInt(min_rand_traffic) < 0) {
- swal.fire({title: '最小流量值不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- if (parseInt(min_rand_traffic) >= parseInt(max_rand_traffic)) {
- swal.fire({title: '最小流量值必须小于最大流量值', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'min_rand_traffic',
- value: min_rand_traffic
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- });
- // 设置最大流量
- $("#max_rand_traffic").change(function () {
- const min_rand_traffic = $("#min_rand_traffic").val();
- const max_rand_traffic = $(this).val();
- if (parseInt(max_rand_traffic) > 99999) {
- swal.fire({title: '最大流量值不能大于99999', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- if (parseInt(min_rand_traffic) >= parseInt(max_rand_traffic)) {
- swal.fire({title: '最大流量值必须大于最小流量值', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'max_rand_traffic',
- value: max_rand_traffic
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- });
- // 设置f2fpay的应用id
- function setF2fpayAppId() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'f2fpay_app_id',
- value: $("#f2fpay_app_id").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置f2fpay的私钥
- function setF2fpayPrivateKey() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'f2fpay_private_key',
- value: $("#f2fpay_private_key").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置f2fpay的公钥
- function setF2fpayPublicKey() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'f2fpay_public_key',
- value: $("#f2fpay_public_key").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 自动去除公钥和私钥中的空格和换行
- $("#alipay_public_key,#alipay_private_key,#f2fpay_public_key,#f2fpay_private_key").on('input', function () {
- $(this).val($(this).val().replace(/(\s+)/g, ''));
- });
- // 设置f2fpay的商品名称
- function setF2fpaySubjectName() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'f2fpay_subject_name',
- value: $("#f2fpay_subject_name").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置极验的Id
- function setGeetestId() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'geetest_id',
- value: $("#geetest_id").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置极验的Key
- function setGeetestKey() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'geetest_key',
- value: $("#geetest_key").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置Google reCAPTCHA的Id
- function setGoogleCaptchaId() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'google_captcha_sitekey',
- value: $("#google_captcha_sitekey").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置Google reCAPTCHA的Key
- function setGoogleCaptchaKey() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'google_captcha_secret',
- value: $("#google_captcha_secret").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置最小端口
- $("#min_port").change(function () {
- const min_port = $(this).val();
- const max_port = $("#max_port").val();
- // 最大端口必须大于最小端口
- if (parseInt(max_port) <= parseInt(min_port)) {
- swal.fire({title: '必须小于最大端口', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- if (parseInt(min_port) < 1000) {
- swal.fire({title: '最小端口不能小于1000', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {_token: '{{csrf_token()}}', name: 'min_port', value: min_port}, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- });
- // 设置最大端口
- $("#max_port").change(function () {
- const min_port = $("#min_port").val();
- const max_port = $(this).val();
- // 最大端口必须大于最小端口
- if (parseInt(max_port) <= parseInt(min_port)) {
- swal.fire({title: '必须大于最小端口', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- if (parseInt(max_port) > 65535) {
- swal.fire({title: '最大端口不能大于65535', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {_token: '{{csrf_token()}}', name: 'max_port', value: max_port}, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- });
- // 邮箱黑白名单切换
- $('#sensitiveType').on({
- 'switchChange.bootstrapSwitch': function (event, state) {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'sensitiveType',
- value: state ? 1 : 0
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- });
- // 设置注册时默认有效期
- function setDefaultDays() {
- const default_days = parseInt($("#default_days").val());
- if (default_days < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'default_days',
- value: default_days
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置注册时默认流量
- function setDefaultTraffic() {
- const default_traffic = parseInt($("#default_traffic").val());
- if (default_traffic < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'default_traffic',
- value: default_traffic
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置可生成邀请码数量
- function setInviteNum() {
- const invite_num = parseInt($("#invite_num").val());
- if (invite_num < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'invite_num',
- value: invite_num
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置重置密码次数
- function setResetPasswordTimes() {
- const reset_password_times = $("#reset_password_times").val();
- if (reset_password_times < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'reset_password_times',
- value: reset_password_times
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置激活用户次数
- function setActiveTimes() {
- const active_times = parseInt($("#active_times").val());
- if (active_times < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'active_times',
- value: active_times
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置节点订阅地址
- function setSubscribeDomain() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'subscribe_domain',
- value: $("#subscribe_domain").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 24小时内同IP注册限制
- function setRegisterIpLimit() {
- const register_ip_limit = parseInt($("#register_ip_limit").val());
- if (register_ip_limit < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'register_ip_limit',
- value: register_ip_limit
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置节点订阅随机展示节点数
- function setSubscribeMax() {
- const subscribe_max = parseInt($("#subscribe_max").val());
- if (subscribe_max < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'subscribe_max',
- value: subscribe_max
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置用户生成邀请码有效期
- function setUserInviteDays() {
- const user_invite_days = parseInt($("#user_invite_days").val());
- if (user_invite_days <= 0) {
- swal.fire({title: '必须大于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'user_invite_days',
- value: user_invite_days
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置管理员生成邀请码有效期
- function setAdminInviteDays() {
- const admin_invite_days = parseInt($("#admin_invite_days").val());
- if (admin_invite_days <= 0) {
- swal.fire({title: '必须大于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'admin_invite_days',
- value: admin_invite_days
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置流量警告阈值
- function setTrafficWarningPercent() {
- const traffic_warning_percent = $("#traffic_warning_percent").val();
- if (traffic_warning_percent < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'traffic_warning_percent',
- value: traffic_warning_percent
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置用户过期提醒阈值
- function setExpireDays() {
- const expire_days = parseInt($("#expire_days").val());
- if (expire_days < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'expire_days',
- value: expire_days
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置网站名称
- function setWebsiteName() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'website_name',
- value: $("#website_name").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置网站地址
- function setWebsiteUrl() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'website_url',
- value: $("#website_url").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置苹果账号
- function setAppStoreId() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'AppStore_id',
- value: $("#AppStore_id").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置苹果密码
- function setAppStorePassword() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'AppStore_password',
- value: $("#AppStore_password").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- //设置管理员邮箱
- function setAdminEmail() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'admin_email',
- value: $("#admin_email").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 生成网站安全码
- function makeWebsiteSecurityCode() {
- $.get("/makeSecurityCode", function (ret) {
- $("#website_security_code").val(ret);
- });
- }
- // 设置网站安全码
- function setWebsiteSecurityCode() {
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'website_security_code',
- value: $("#website_security_code").val()
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 登录加流量的时间间隔
- function setTrafficLimitTime() {
- const traffic_limit_time = parseInt($("#traffic_limit_time").val());
- if (traffic_limit_time < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'traffic_limit_time',
- value: traffic_limit_time
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置根据推广链接注册送流量
- function setReferralTraffic() {
- const referral_traffic = parseInt($("#referral_traffic").val());
- if (referral_traffic < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'referral_traffic',
- value: referral_traffic
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置根据推广链接注册人每产生一笔消费,则推广人可以获得的返利比例
- function setReferralPercent() {
- const referral_percent = $("#referral_percent").val();
- if (referral_percent < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- if (referral_percent > 100) {
- swal.fire({title: '不能大于100', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'referral_percent',
- value: referral_percent
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- // 设置返利满多少元才可以提现
- function setReferralMoney() {
- const referral_money = $("#referral_money").val();
- if (referral_money < 0) {
- swal.fire({title: '不能小于0', type: 'warning', timer: 1000, showConfirmButton: false});
- return;
- }
- $.post("/admin/setConfig", {
- _token: '{{csrf_token()}}',
- name: 'referral_money',
- value: referral_money
- }, function (ret) {
- if (ret.status === 'success') {
- swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
- .then(() => window.location.reload())
- } else {
- swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
- }
- });
- }
- </script>
- @endsection
|