-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathLegendsock 2.2 订阅功能添加步骤.html
126 lines (115 loc) · 84.1 KB
/
Legendsock 2.2 订阅功能添加步骤.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- common.css -->
<style>* {-webkit-tap-highlight-color: rgba(0,0,0,0);}html {-webkit-text-size-adjust: none;}body {font-family: -apple-system, Helvetica, Arial, sans-serif;margin: 0;padding: 20px;color: #333;word-wrap: break-word;}h1, h2, h3, h4, h5, h6 {line-height: 1.1;}img {max-width: 100% !important;}blockquote {margin: 0;padding: 0 15px;color: #777;border-left: 4px solid #ddd;}hr {background-color: #ddd;border: 0;height: 1px;margin: 15px 0;}code {font-family: Menlo, Consolas, 'Ubuntu Mono', Monaco, 'source-code-pro', monospace;line-height: 1.4;margin: 0;padding: 0.2em 0;font-size: 90%;background-color: rgba(0,0,0,0.04);border-radius: 3px;}pre > code {margin: 0;padding: 0;font-size: 100%;word-break: normal;background: transparent;border: 0;}ol {list-style-type: decimal;}ol ol, ul ol {list-style-type: lower-latin;}ol ol ol, ul ol ol, ul ul ol, ol ul ol {list-style-type: lower-roman;}table {border-spacing: 0;border-collapse: collapse;margin-top: 0;margin-bottom: 16px;}table th {font-weight: bold;}table th, table td {padding: 6px 13px;border: 1px solid #ddd;}table tr {border-top: 1px solid #ccc;}table tr:nth-child(even) {background-color: #f8f8f8;}input[type="checkbox"] {cursor: default;margin-right: 0.5em;font-size: 13px;}.task-list-item {list-style-type: none;}.task-list-item+.task-list-item {margin-top: 3px;}.task-list-item input {float: left;margin: 0.3em 1em 0.25em -1.6em;vertical-align: middle;}#tag-field {margin: 8px 2px 10px;}#tag-field .tag {display: inline-block;background: #cadff3;border-radius: 4px;padding: 1px 8px;color: black;font-size: 12px;margin-right: 10px;line-height: 1.4;}</style>
<!-- ace-static.css -->
<style>.ace_static_highlight {white-space: pre-wrap;}.ace_static_highlight .ace_gutter {width: 2em;text-align: right;padding: 0 3px 0 0;margin-right: 3px;}.ace_static_highlight.ace_show_gutter > .ace_line {padding-left: 2.6em;}.ace_static_highlight .ace_line {position: relative;}.ace_static_highlight .ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;top: 0;bottom: 0;left: 0;position: absolute;}.ace_static_highlight .ace_gutter-cell:before {content: counter(ace_line, decimal);counter-increment: ace_line;}.ace_static_highlight {counter-reset: ace_line;}</style>
<style>.ace-chrome .ace_gutter {background: #ebebeb;color: #333;overflow : hidden;}.ace-chrome .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-chrome {background-color: #FFFFFF;color: black;}.ace-chrome .ace_cursor {color: black;}.ace-chrome .ace_invisible {color: rgb(191, 191, 191);}.ace-chrome .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-chrome .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-chrome .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-chrome .ace_invalid {background-color: rgb(153, 0, 0);color: white;}.ace-chrome .ace_fold {}.ace-chrome .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-chrome .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-chrome .ace_support.ace_type,.ace-chrome .ace_support.ace_class.ace-chrome .ace_support.ace_other {color: rgb(109, 121, 222);}.ace-chrome .ace_variable.ace_parameter {font-style:italic;color:#FD971F;}.ace-chrome .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-chrome .ace_comment {color: #236e24;}.ace-chrome .ace_comment.ace_doc {color: #236e24;}.ace-chrome .ace_comment.ace_doc.ace_tag {color: #236e24;}.ace-chrome .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-chrome .ace_variable {color: rgb(49, 132, 149);}.ace-chrome .ace_xml-pe {color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-chrome .ace_heading {color: rgb(12, 7, 255);}.ace-chrome .ace_list {color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_gutter-active-line {background-color : #dcdcdc;}.ace-chrome .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_storage,.ace-chrome .ace_keyword,.ace-chrome .ace_meta.ace_tag {color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-chrome .ace_string {color: #1A1AA6;}.ace-chrome .ace_entity.ace_other.ace_attribute-name {color: #994409;}.ace-chrome .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}</style>
<!-- export.css -->
<style>
body{margin:0 auto;max-width:800px;line-height:1.4}
#nav{margin:5px 0 10px;font-size:15px}
#titlearea{border-bottom:1px solid #ccc;font-size:17px;padding:10px 0;}
#contentarea{font-size:15px;margin:16px 0}
.cell{outline:0;min-height:20px;margin:5px 0;padding:5px 0;}
.code-cell{font-family:Menlo,Consolas,'Ubuntu Mono',Monaco,'source-code-pro',monospace;font-size:12px;}
.latex-cell{white-space:pre-wrap;}
</style>
<!-- User CSS -->
<style> .text-cell {font-size: 15px;}.code-cell {font-size: 12px;}.markdown-cell {font-size: 15px;}.latex-cell {font-size: 15px;}</style>
</head>
<body>
<div id="titlearea">
<h2>Legendsock 2.2 订阅功能添加步骤</h2>
</div>
<div id="contentarea"><div class="cell text-cell"><h3 style="box-sizing: border-box; font-family: 'Microsoft Yahei', Helvetica, Arial, sans-serif; font-weight: 400; color: rgb(63, 63, 63); margin-top: 0px; margin-bottom: 10px; font-size: 24px; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);">Legendsock 2.2 订阅功能添加步骤</h3><div class="article-text" style="box-sizing: border-box; color: rgb(85, 85, 85); font-family: 'Microsoft Yahei', Helvetica, Arial, sans-serif; font-size: 14px; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"><p style="box-sizing: border-box; margin: 0px 0px 10px;">2017.09.23 22:55 UPDATE</p><p style="box-sizing: border-box; margin: 0px 0px 10px;">首先,建立文件,subscribe.php 在WHMCS 根目录,</p><p style="box-sizing: border-box; margin: 0px 0px 10px;">内容:</p><pre class="lang-php prettyprint prettyprinted" data-lang="php" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; word-wrap: break-word; color: rgb(51, 51, 51); background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;"><span class="pun" style="box-sizing: border-box;"><?</span><span class="pln" style="box-sizing: border-box;">php
require_once </span><span class="str" style="box-sizing: border-box;">'init.php'</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
require_once </span><span class="str" style="box-sizing: border-box;">'modules/addons/legendsock/class.php'</span><span class="pun" style="box-sizing: border-box;">;</span><span class="kwd" style="box-sizing: border-box;">function</span><span class="pln" style="box-sizing: border-box;"> base64url_encode</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$data</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="kwd" style="box-sizing: border-box;">return</span><span class="pln" style="box-sizing: border-box;"> rtrim</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">strtr</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">base64_encode</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$data</span><span class="pun" style="box-sizing: border-box;">),</span><span class="str" style="box-sizing: border-box;">'+/'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">'-_'</span><span class="pun" style="box-sizing: border-box;">),</span><span class="str" style="box-sizing: border-box;">'='</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pun" style="box-sizing: border-box;">}</span><span class="kwd" style="box-sizing: border-box;">function</span><span class="typ" style="box-sizing: border-box;">GetRandStr</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;"> $len </span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
$chars </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">"a"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"b"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"c"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"d"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"e"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"f"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"g"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"h"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"i"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"j"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"k"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"l"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"m"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"n"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"o"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"p"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"q"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"r"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"s"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"t"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"u"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"v"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"w"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"x"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"y"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"z"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"A"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"B"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"C"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"D"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"E"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"F"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"G"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"H"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"I"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"J"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"K"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"L"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"M"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"N"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"O"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"P"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"Q"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"R"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"S"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"T"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"U"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"V"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"W"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"X"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"Y"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"Z"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"0"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"1"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"2"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"3"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"4"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"5"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"6"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"7"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"8"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">"9"</span><span class="pun" style="box-sizing: border-box;">];</span><span class="pln" style="box-sizing: border-box;">
$charsLen </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> count</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$chars</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">-</span><span class="lit" style="box-sizing: border-box;">1</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
shuffle</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$chars</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pln" style="box-sizing: border-box;">
$output </span><span class="pun" style="box-sizing: border-box;">=</span><span class="str" style="box-sizing: border-box;">""</span><span class="pun" style="box-sizing: border-box;">;</span><span class="kwd" style="box-sizing: border-box;">for</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$i</span><span class="pun" style="box-sizing: border-box;">=</span><span class="lit" style="box-sizing: border-box;">0</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;"> $i</span><span class="pun" style="box-sizing: border-box;"><</span><span class="pln" style="box-sizing: border-box;">$len</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;"> $i</span><span class="pun" style="box-sizing: border-box;">++)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
$output </span><span class="pun" style="box-sizing: border-box;">.=</span><span class="pln" style="box-sizing: border-box;"> $chars</span><span class="pun" style="box-sizing: border-box;">[</span><span class="pln" style="box-sizing: border-box;">mt_rand</span><span class="pun" style="box-sizing: border-box;">(</span><span class="lit" style="box-sizing: border-box;">0</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> $charsLen</span><span class="pun" style="box-sizing: border-box;">)];</span><span class="pun" style="box-sizing: border-box;">}</span><span class="kwd" style="box-sizing: border-box;">return</span><span class="pln" style="box-sizing: border-box;"> $output</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pun" style="box-sizing: border-box;">}</span><span class="kwd" style="box-sizing: border-box;">if</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;"> $_REQUEST</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'action'</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">==</span><span class="str" style="box-sizing: border-box;">'reSet'</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
$newpasswd </span><span class="pun" style="box-sizing: border-box;">=</span><span class="typ" style="box-sizing: border-box;">GetRandStr</span><span class="pun" style="box-sizing: border-box;">(</span><span class="lit" style="box-sizing: border-box;">12</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pln" style="box-sizing: border-box;">
$sid </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pun" style="box-sizing: border-box;">(</span><span class="kwd" style="box-sizing: border-box;">int</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pln" style="box-sizing: border-box;"> $_REQUEST</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'sid'</span><span class="pun" style="box-sizing: border-box;">];</span><span class="pln" style="box-sizing: border-box;">
$userid </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pun" style="box-sizing: border-box;">(</span><span class="kwd" style="box-sizing: border-box;">int</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pln" style="box-sizing: border-box;"> $_REQUEST</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'uid'</span><span class="pun" style="box-sizing: border-box;">];</span><span class="pln" style="box-sizing: border-box;">
$data </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> \WHMCS\Database\Capsule</span><span class="pun" style="box-sizing: border-box;">::</span><span class="pln" style="box-sizing: border-box;">table</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'tblhosting'</span><span class="pun" style="box-sizing: border-box;">)-></span><span class="kwd" style="box-sizing: border-box;">where</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'id'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> $sid</span><span class="pun" style="box-sizing: border-box;">)-></span><span class="pln" style="box-sizing: border-box;">first</span><span class="pun" style="box-sizing: border-box;">();</span><span class="kwd" style="box-sizing: border-box;">if</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;"> $userid </span><span class="pun" style="box-sizing: border-box;">!=</span><span class="pln" style="box-sizing: border-box;"> $data</span><span class="pun" style="box-sizing: border-box;">-></span><span class="pln" style="box-sizing: border-box;">userid </span><span class="kwd" style="box-sizing: border-box;">or</span><span class="pln" style="box-sizing: border-box;"> empty</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$userid</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
$result </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'status'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="str" style="box-sizing: border-box;">'error'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">'msg'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="str" style="box-sizing: border-box;">'参数错误'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pun" style="box-sizing: border-box;">];</span><span class="pun" style="box-sizing: border-box;">}</span><span class="kwd" style="box-sizing: border-box;">else</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
$result </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> \WHMCS\Database\Capsule</span><span class="pun" style="box-sizing: border-box;">::</span><span class="pln" style="box-sizing: border-box;">table</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'tblhosting'</span><span class="pun" style="box-sizing: border-box;">)-></span><span class="kwd" style="box-sizing: border-box;">where</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'id'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> $sid</span><span class="pun" style="box-sizing: border-box;">)-></span><span class="pln" style="box-sizing: border-box;">update</span><span class="pun" style="box-sizing: border-box;">([</span><span class="str" style="box-sizing: border-box;">'dedicatedip'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="pln" style="box-sizing: border-box;"> $newpasswd</span><span class="pun" style="box-sizing: border-box;">]);</span><span class="kwd" style="box-sizing: border-box;">if</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;"> empty</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;"> $result </span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
$result </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'status'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="str" style="box-sizing: border-box;">'error'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">'msg'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="str" style="box-sizing: border-box;">'重置失败'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pun" style="box-sizing: border-box;">];</span><span class="pun" style="box-sizing: border-box;">}</span><span class="kwd" style="box-sizing: border-box;">else</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
$result </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'status'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="str" style="box-sizing: border-box;">'success'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">'msg'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="pln" style="box-sizing: border-box;"> $newpasswd</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pun" style="box-sizing: border-box;">];</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pln" style="box-sizing: border-box;">
echo json_encode</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$result</span><span class="pun" style="box-sizing: border-box;">);</span><span class="kwd" style="box-sizing: border-box;">die</span><span class="pun" style="box-sizing: border-box;">();</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pln" style="box-sizing: border-box;">
$sid </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pun" style="box-sizing: border-box;">(</span><span class="kwd" style="box-sizing: border-box;">int</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pln" style="box-sizing: border-box;"> $_GET</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'sid'</span><span class="pun" style="box-sizing: border-box;">];</span><span class="pln" style="box-sizing: border-box;">
$token </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> $_GET</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'token'</span><span class="pun" style="box-sizing: border-box;">];</span><span class="pln" style="box-sizing: border-box;">
$product </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> \WHMCS\Database\Capsule</span><span class="pun" style="box-sizing: border-box;">::</span><span class="pln" style="box-sizing: border-box;">table</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'tblhosting'</span><span class="pun" style="box-sizing: border-box;">)-></span><span class="kwd" style="box-sizing: border-box;">where</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'dedicatedip'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> $token</span><span class="pun" style="box-sizing: border-box;">)-></span><span class="kwd" style="box-sizing: border-box;">where</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'id'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> $sid</span><span class="pun" style="box-sizing: border-box;">)-></span><span class="pln" style="box-sizing: border-box;">first</span><span class="pun" style="box-sizing: border-box;">();</span><span class="kwd" style="box-sizing: border-box;">if</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;"> empty</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;"> $product </span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="kwd" style="box-sizing: border-box;">die</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'什么也没输出'</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pun" style="box-sizing: border-box;">}</span><span class="kwd" style="box-sizing: border-box;">if</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;"> $token </span><span class="pun" style="box-sizing: border-box;">==</span><span class="pln" style="box-sizing: border-box;"> $product</span><span class="pun" style="box-sizing: border-box;">-></span><span class="pln" style="box-sizing: border-box;">dedicatedip </span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
$hosts </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> \WHMCS\Database\Capsule</span><span class="pun" style="box-sizing: border-box;">::</span><span class="pln" style="box-sizing: border-box;">table</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'tblproducts'</span><span class="pun" style="box-sizing: border-box;">)-></span><span class="kwd" style="box-sizing: border-box;">where</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'id'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> $product</span><span class="pun" style="box-sizing: border-box;">-></span><span class="pln" style="box-sizing: border-box;">packageid</span><span class="pun" style="box-sizing: border-box;">)-></span><span class="pln" style="box-sizing: border-box;">first</span><span class="pun" style="box-sizing: border-box;">()-></span><span class="pln" style="box-sizing: border-box;">configoption12</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
$servers </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> \WHMCS\Database\Capsule</span><span class="pun" style="box-sizing: border-box;">::</span><span class="pln" style="box-sizing: border-box;">table</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'ls_setting'</span><span class="pun" style="box-sizing: border-box;">)-></span><span class="kwd" style="box-sizing: border-box;">where</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'sid'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> $product</span><span class="pun" style="box-sizing: border-box;">-></span><span class="pln" style="box-sizing: border-box;">server</span><span class="pun" style="box-sizing: border-box;">)-></span><span class="pln" style="box-sizing: border-box;">first</span><span class="pun" style="box-sizing: border-box;">()-></span><span class="pln" style="box-sizing: border-box;">node</span><span class="pun" style="box-sizing: border-box;">;</span><span class="kwd" style="box-sizing: border-box;">if</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pun" style="box-sizing: border-box;">!</span><span class="pln" style="box-sizing: border-box;">empty</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;"> $hosts </span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
$hosts </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> explode</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">PHP_EOL</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> $hosts</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pun" style="box-sizing: border-box;">}</span><span class="kwd" style="box-sizing: border-box;">else</span><span class="pun" style="box-sizing: border-box;">{</span><span class="kwd" style="box-sizing: border-box;">if</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pun" style="box-sizing: border-box;">!</span><span class="pln" style="box-sizing: border-box;">empty</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;"> $servers </span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
$hosts </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> explode</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">PHP_EOL</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> $servers</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pln" style="box-sizing: border-box;">
$i </span><span class="pun" style="box-sizing: border-box;">=</span><span class="lit" style="box-sizing: border-box;">0</span><span class="pun" style="box-sizing: border-box;">;</span><span class="kwd" style="box-sizing: border-box;">foreach</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$hosts </span><span class="kwd" style="box-sizing: border-box;">as</span><span class="pln" style="box-sizing: border-box;"> $host</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
list</span><span class="pun" style="box-sizing: border-box;">(,</span><span class="pln" style="box-sizing: border-box;"> $hosts</span><span class="pun" style="box-sizing: border-box;">[</span><span class="pln" style="box-sizing: border-box;">$i</span><span class="pun" style="box-sizing: border-box;">])</span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> explode</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'|'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> $host</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pln" style="box-sizing: border-box;">
list</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$remark</span><span class="pun" style="box-sizing: border-box;">[</span><span class="pln" style="box-sizing: border-box;">$i</span><span class="pun" style="box-sizing: border-box;">])</span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> explode</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'|'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> $host</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pun" style="box-sizing: border-box;">++</span><span class="pln" style="box-sizing: border-box;">$i</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pln" style="box-sizing: border-box;">
$i </span><span class="pun" style="box-sizing: border-box;">=</span><span class="lit" style="box-sizing: border-box;">0</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
$ls </span><span class="pun" style="box-sizing: border-box;">=</span><span class="kwd" style="box-sizing: border-box;">new</span><span class="pln" style="box-sizing: border-box;"> \LegendSock\Extended</span><span class="pun" style="box-sizing: border-box;">();</span><span class="pln" style="box-sizing: border-box;">
$db </span><span class="pun" style="box-sizing: border-box;">=</span><span class="kwd" style="box-sizing: border-box;">new</span><span class="pln" style="box-sizing: border-box;"> \LegendSock\Database</span><span class="pun" style="box-sizing: border-box;">();</span><span class="pln" style="box-sizing: border-box;">
$data </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> $ls</span><span class="pun" style="box-sizing: border-box;">-></span><span class="pln" style="box-sizing: border-box;">getConnect</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$product</span><span class="pun" style="box-sizing: border-box;">-></span><span class="pln" style="box-sizing: border-box;">server</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pln" style="box-sizing: border-box;">
$getData </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> $data</span><span class="pun" style="box-sizing: border-box;">-></span><span class="pln" style="box-sizing: border-box;">runSQL</span><span class="pun" style="box-sizing: border-box;">([</span><span class="str" style="box-sizing: border-box;">'action'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'user'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'sql'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="str" style="box-sizing: border-box;">'SELECT u,d,t,port,obfs,method,protocol,passwd,transfer_enable FROM user WHERE pid = ?'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">'pre'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="pun" style="box-sizing: border-box;">[</span><span class="pln" style="box-sizing: border-box;">
$product</span><span class="pun" style="box-sizing: border-box;">-></span><span class="pln" style="box-sizing: border-box;">id
</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">],</span><span class="str" style="box-sizing: border-box;">'trans'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="kwd" style="box-sizing: border-box;">false</span><span class="pun" style="box-sizing: border-box;">]);</span><span class="kwd" style="box-sizing: border-box;">if</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">empty</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$getData</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'user'</span><span class="pun" style="box-sizing: border-box;">][</span><span class="str" style="box-sizing: border-box;">'result'</span><span class="pun" style="box-sizing: border-box;">]))</span><span class="pun" style="box-sizing: border-box;">{</span><span class="kwd" style="box-sizing: border-box;">throw</span><span class="kwd" style="box-sizing: border-box;">new</span><span class="typ" style="box-sizing: border-box;">Exception</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'无法从数据库中取得当前产品的信息,请检查产品是否并未处于开通状态'</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pln" style="box-sizing: border-box;">
$get </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> $getData</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'user'</span><span class="pun" style="box-sizing: border-box;">][</span><span class="str" style="box-sizing: border-box;">'result'</span><span class="pun" style="box-sizing: border-box;">];</span><span class="pln" style="box-sizing: border-box;">
$output </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> array</span><span class="pun" style="box-sizing: border-box;">();</span><span class="kwd" style="box-sizing: border-box;">foreach</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$hosts </span><span class="kwd" style="box-sizing: border-box;">as</span><span class="pln" style="box-sizing: border-box;"> $host</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
$temp</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'remark'</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> $remark</span><span class="pun" style="box-sizing: border-box;">[</span><span class="pln" style="box-sizing: border-box;">$i</span><span class="pun" style="box-sizing: border-box;">++];</span><span class="pln" style="box-sizing: border-box;">
$temp</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'port'</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> $get</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'port'</span><span class="pun" style="box-sizing: border-box;">];</span><span class="pln" style="box-sizing: border-box;">
$temp</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'hostname'</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> $host</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pln" style="box-sizing: border-box;">
$temp</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'password'</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> $get</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'passwd'</span><span class="pun" style="box-sizing: border-box;">];</span><span class="pln" style="box-sizing: border-box;">
$temp</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'obfs'</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> $get</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'obfs'</span><span class="pun" style="box-sizing: border-box;">];</span><span class="pln" style="box-sizing: border-box;">
$temp</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'method'</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> $get</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'method'</span><span class="pun" style="box-sizing: border-box;">];</span><span class="pln" style="box-sizing: border-box;">
$temp</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'protocol'</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> $get</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'protocol'</span><span class="pun" style="box-sizing: border-box;">];</span><span class="pln" style="box-sizing: border-box;">
array_push</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$output</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> $temp</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pln" style="box-sizing: border-box;">
$text </span><span class="pun" style="box-sizing: border-box;">=</span><span class="str" style="box-sizing: border-box;">''</span><span class="pun" style="box-sizing: border-box;">;</span><span class="kwd" style="box-sizing: border-box;">foreach</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$output </span><span class="kwd" style="box-sizing: border-box;">as</span><span class="pln" style="box-sizing: border-box;"> $val</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
$code </span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;"> $val</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'hostname'</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">.</span><span class="str" style="box-sizing: border-box;">':'</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;"> $val</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'port'</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">.</span><span class="str" style="box-sizing: border-box;">':'</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;"> $val</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'protocol'</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">.</span><span class="str" style="box-sizing: border-box;">':'</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;"> $val</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'method'</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">.</span><span class="str" style="box-sizing: border-box;">':'</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;"> $val</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'obfs'</span><span class="pun" style="box-sizing: border-box;">]</span><span class="pun" style="box-sizing: border-box;">.</span><span class="str" style="box-sizing: border-box;">':'</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;"> base64_encode</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$temp</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'password'</span><span class="pun" style="box-sizing: border-box;">]);</span><span class="pln" style="box-sizing: border-box;">
$result </span><span class="pun" style="box-sizing: border-box;">.=</span><span class="str" style="box-sizing: border-box;">'ssr://'</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;"> base64url_encode</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;"> $code </span><span class="pun" style="box-sizing: border-box;">.</span><span class="str" style="box-sizing: border-box;">'/?obfsparam=&remarks='</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;"> base64url_encode</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$val</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'remark'</span><span class="pun" style="box-sizing: border-box;">])</span><span class="pun" style="box-sizing: border-box;">.</span><span class="str" style="box-sizing: border-box;">'&group='</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;">base64url_encode</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$GLOBALS</span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'CONFIG'</span><span class="pun" style="box-sizing: border-box;">][</span><span class="str" style="box-sizing: border-box;">'CompanyName'</span><span class="pun" style="box-sizing: border-box;">]).</span><span class="str" style="box-sizing: border-box;">'&udpport=0&uot=0'</span><span class="pun" style="box-sizing: border-box;">).</span><span class="pln" style="box-sizing: border-box;"> PHP_EOL</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pun" style="box-sizing: border-box;">}</span><span class="kwd" style="box-sizing: border-box;">if</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;"> $product</span><span class="pun" style="box-sizing: border-box;">-></span><span class="pln" style="box-sizing: border-box;">domainstatus </span><span class="pun" style="box-sizing: border-box;">==</span><span class="str" style="box-sizing: border-box;">'Active'</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="kwd" style="box-sizing: border-box;">exit</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">base64_encode</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">$result</span><span class="pun" style="box-sizing: border-box;">));</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pun" style="box-sizing: border-box;">}</span></pre><p style="box-sizing: border-box; margin: 0px 0px 10px;">然后编辑LS 2.2 客户端模板 WHMCS/modules/server/legendsock/templates/主题名称/client.tpl</p><p style="box-sizing: border-box; margin: 0px 0px 10px;">在页面内加入:</p><pre class="lang-html prettyprint prettyprinted" data-lang="html" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; word-wrap: break-word; color: rgb(51, 51, 51); background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;"><span class="tag" style="box-sizing: border-box;"><link</span><span class="atn" style="box-sizing: border-box;">rel</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"stylesheet"</span><span class="atn" style="box-sizing: border-box;">href</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"{$systemurl}modules/servers/legendsock/templates/NeWorld/sweetalert.css?v2"</span><span class="tag" style="box-sizing: border-box;">></span><span class="tag" style="box-sizing: border-box;"><script</span><span class="atn" style="box-sizing: border-box;">type</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"text/javascript"</span><span class="atn" style="box-sizing: border-box;">src</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"{$systemurl}modules/servers/legendsock/templates/NeWorld/sweetalert.min.js"</span><span class="tag" style="box-sizing: border-box;">></script></span><span class="pln" style="box-sizing: border-box;">
{literal}
</span><span class="tag" style="box-sizing: border-box;"><script></span><span class="kwd" style="box-sizing: border-box;">var</span><span class="pln" style="box-sizing: border-box;"> completeFlag </span><span class="pun" style="box-sizing: border-box;">=</span><span class="kwd" style="box-sizing: border-box;">true</span><span class="pun" style="box-sizing: border-box;">;</span><span class="kwd" style="box-sizing: border-box;">function</span><span class="typ" style="box-sizing: border-box;">SubScribe</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">sID</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> token</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="kwd" style="box-sizing: border-box;">if</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;"> token</span><span class="pun" style="box-sizing: border-box;">==</span><span class="kwd" style="box-sizing: border-box;">undefined</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
subscribeurl </span><span class="pun" style="box-sizing: border-box;">=</span><span class="str" style="box-sizing: border-box;">"{/literal}{$LS_LANG['subscribe']['ResetURL']}{literal}"</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pun" style="box-sizing: border-box;">}</span><span class="kwd" style="box-sizing: border-box;">else</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
subscribeurl </span><span class="pun" style="box-sizing: border-box;">=</span><span class="str" style="box-sizing: border-box;">"{/literal}{$systemurl}{literal}subscribe/"</span><span class="pun" style="box-sizing: border-box;">+</span><span class="pln" style="box-sizing: border-box;">sID</span><span class="pun" style="box-sizing: border-box;">+</span><span class="str" style="box-sizing: border-box;">"/"</span><span class="pun" style="box-sizing: border-box;">+</span><span class="pln" style="box-sizing: border-box;">token</span><span class="pun" style="box-sizing: border-box;">+</span><span class="str" style="box-sizing: border-box;">"/"</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pln" style="box-sizing: border-box;">
swal</span><span class="pun" style="box-sizing: border-box;">({</span><span class="pln" style="box-sizing: border-box;">
title</span><span class="pun" style="box-sizing: border-box;">:</span><span class="str" style="box-sizing: border-box;">"{/literal}{$LS_LANG['subscribe']['url']}{literal}"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
text</span><span class="pun" style="box-sizing: border-box;">:</span><span class="pln" style="box-sizing: border-box;"> subscribeurl</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
type</span><span class="pun" style="box-sizing: border-box;">:</span><span class="str" style="box-sizing: border-box;">"info"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
showCancelButton</span><span class="pun" style="box-sizing: border-box;">:</span><span class="kwd" style="box-sizing: border-box;">true</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
closeOnConfirm</span><span class="pun" style="box-sizing: border-box;">:</span><span class="kwd" style="box-sizing: border-box;">false</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
showLoaderOnConfirm</span><span class="pun" style="box-sizing: border-box;">:</span><span class="kwd" style="box-sizing: border-box;">true</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
cancelButtonText</span><span class="pun" style="box-sizing: border-box;">:</span><span class="str" style="box-sizing: border-box;">"{/literal}{$LANG.cancel}{literal}"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
confirmButtonText</span><span class="pun" style="box-sizing: border-box;">:</span><span class="str" style="box-sizing: border-box;">"{/literal}{$LS_LANG['subscribe']['Reset']}{literal}"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pun" style="box-sizing: border-box;">},</span><span class="kwd" style="box-sizing: border-box;">function</span><span class="pun" style="box-sizing: border-box;">(){</span><span class="kwd" style="box-sizing: border-box;">if</span><span class="pun" style="box-sizing: border-box;">(!</span><span class="pln" style="box-sizing: border-box;">completeFlag</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="kwd" style="box-sizing: border-box;">return</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pln" style="box-sizing: border-box;">
$</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;">ajax</span><span class="pun" style="box-sizing: border-box;">({</span><span class="pln" style="box-sizing: border-box;">
method</span><span class="pun" style="box-sizing: border-box;">:</span><span class="str" style="box-sizing: border-box;">"GET"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
url</span><span class="pun" style="box-sizing: border-box;">:</span><span class="str" style="box-sizing: border-box;">"{/literal}{$systemurl}{literal}subscribe.php?action=reSet"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
data</span><span class="pun" style="box-sizing: border-box;">:</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">sid</span><span class="pun" style="box-sizing: border-box;">:</span><span class="pln" style="box-sizing: border-box;"> sID</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;"> uid</span><span class="pun" style="box-sizing: border-box;">:</span><span class="str" style="box-sizing: border-box;">'{/literal}{$clientsdetails['</span><span class="pln" style="box-sizing: border-box;">userid</span><span class="str" style="box-sizing: border-box;">']}{literal}'</span><span class="pun" style="box-sizing: border-box;">},</span><span class="pln" style="box-sizing: border-box;">
dataType</span><span class="pun" style="box-sizing: border-box;">:</span><span class="str" style="box-sizing: border-box;">'json'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
cache</span><span class="pun" style="box-sizing: border-box;">:</span><span class="kwd" style="box-sizing: border-box;">false</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
beforeSend</span><span class="pun" style="box-sizing: border-box;">:</span><span class="kwd" style="box-sizing: border-box;">function</span><span class="pun" style="box-sizing: border-box;">()</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
completeFlag </span><span class="pun" style="box-sizing: border-box;">=</span><span class="kwd" style="box-sizing: border-box;">false</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pun" style="box-sizing: border-box;">},</span><span class="pln" style="box-sizing: border-box;">
complete</span><span class="pun" style="box-sizing: border-box;">:</span><span class="kwd" style="box-sizing: border-box;">function</span><span class="pun" style="box-sizing: border-box;">()</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
completeFlag </span><span class="pun" style="box-sizing: border-box;">=</span><span class="kwd" style="box-sizing: border-box;">true</span><span class="pun" style="box-sizing: border-box;">;</span><span class="pun" style="box-sizing: border-box;">},</span><span class="pln" style="box-sizing: border-box;">
success</span><span class="pun" style="box-sizing: border-box;">:</span><span class="kwd" style="box-sizing: border-box;">function</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">data</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="kwd" style="box-sizing: border-box;">if</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">data</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;">status</span><span class="pun" style="box-sizing: border-box;">==</span><span class="str" style="box-sizing: border-box;">'success'</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
swal</span><span class="pun" style="box-sizing: border-box;">({</span><span class="pln" style="box-sizing: border-box;">
title</span><span class="pun" style="box-sizing: border-box;">:</span><span class="str" style="box-sizing: border-box;">"{/literal}{$LS_LANG['subscribe']['ResetSuccess']}{literal}"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
text</span><span class="pun" style="box-sizing: border-box;">:</span><span class="str" style="box-sizing: border-box;">"{/literal}{$systemurl}{literal}subscribe/"</span><span class="pun" style="box-sizing: border-box;">+</span><span class="pln" style="box-sizing: border-box;">sID</span><span class="pun" style="box-sizing: border-box;">+</span><span class="str" style="box-sizing: border-box;">"/"</span><span class="pun" style="box-sizing: border-box;">+</span><span class="pln" style="box-sizing: border-box;">data</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;">msg</span><span class="pun" style="box-sizing: border-box;">+</span><span class="str" style="box-sizing: border-box;">"/"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
type</span><span class="pun" style="box-sizing: border-box;">:</span><span class="str" style="box-sizing: border-box;">"success"</span><span class="pun" style="box-sizing: border-box;">});</span><span class="pun" style="box-sizing: border-box;">}</span><span class="kwd" style="box-sizing: border-box;">else</span><span class="kwd" style="box-sizing: border-box;">if</span><span class="pun" style="box-sizing: border-box;">(</span><span class="pln" style="box-sizing: border-box;">data</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;">status</span><span class="pun" style="box-sizing: border-box;">==</span><span class="str" style="box-sizing: border-box;">'error'</span><span class="pun" style="box-sizing: border-box;">)</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
swal</span><span class="pun" style="box-sizing: border-box;">({</span><span class="pln" style="box-sizing: border-box;">
title</span><span class="pun" style="box-sizing: border-box;">:</span><span class="str" style="box-sizing: border-box;">"{/literal}{$LS_LANG['subscribe']['ResetError']}{literal}"</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
text</span><span class="pun" style="box-sizing: border-box;">:</span><span class="pln" style="box-sizing: border-box;"> data</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;">msg</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">
type</span><span class="pun" style="box-sizing: border-box;">:</span><span class="str" style="box-sizing: border-box;">"error"</span><span class="pun" style="box-sizing: border-box;">});</span><span class="pun" style="box-sizing: border-box;">};</span><span class="pun" style="box-sizing: border-box;">},</span><span class="pln" style="box-sizing: border-box;">
error</span><span class="pun" style="box-sizing: border-box;">:</span><span class="kwd" style="box-sizing: border-box;">function</span><span class="pun" style="box-sizing: border-box;">()</span><span class="pun" style="box-sizing: border-box;">{</span><span class="pln" style="box-sizing: border-box;">
swal</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">"服务器忙,请稍后重试"</span><span class="pun" style="box-sizing: border-box;">);</span><span class="pun" style="box-sizing: border-box;">}</span><span class="pun" style="box-sizing: border-box;">});</span><span class="pun" style="box-sizing: border-box;">});</span><span class="pun" style="box-sizing: border-box;">}</span><span class="tag" style="box-sizing: border-box;"></script></span><span class="pln" style="box-sizing: border-box;">
{/literal}</span></pre><p style="box-sizing: border-box; margin: 0px 0px 10px;">适当的地方加入:</p><pre class="lang-html prettyprint prettyprinted" data-lang="html" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; word-wrap: break-word; color: rgb(51, 51, 51); background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;"><span class="tag" style="box-sizing: border-box;"><div</span><span class="atn" style="box-sizing: border-box;">class</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"col-md-4 col-sm-6"</span><span class="tag" style="box-sizing: border-box;">></span><span class="tag" style="box-sizing: border-box;"><div</span><span class="atn" style="box-sizing: border-box;">class</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"box"</span><span class="tag" style="box-sizing: border-box;">></span><span class="tag" style="box-sizing: border-box;"><h3></span><span class="pln" style="box-sizing: border-box;">{$LS_LANG['subscribe']['title']}</span><span class="tag" style="box-sizing: border-box;"></h3></span><span class="tag" style="box-sizing: border-box;"><ul></span><span class="tag" style="box-sizing: border-box;"><li></span><span class="tag" style="box-sizing: border-box;"><strong></span><span class="pln" style="box-sizing: border-box;">{$LS_LANG['subscribe']['url']}</span><span class="tag" style="box-sizing: border-box;"></strong></span><span class="tag" style="box-sizing: border-box;"><div</span><span class="atn" style="box-sizing: border-box;">class</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"btn-group btn-group-xs"</span><span class="atn" style="box-sizing: border-box;">role</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"group"</span><span class="atn" style="box-sizing: border-box;">aria-label</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"Extra-small button group"</span><span class="tag" style="box-sizing: border-box;">></span><span class="tag" style="box-sizing: border-box;"><a</span><span class="atn" style="box-sizing: border-box;">class</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"btn btn-success btn-xs"</span><span class="atn" style="box-sizing: border-box;">onClick</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"</span><span class="pln" style="box-sizing: border-box;">javascript</span><span class="pun" style="box-sizing: border-box;">:</span><span class="typ" style="box-sizing: border-box;">SubScribe</span><span class="pun" style="box-sizing: border-box;">(</span><span class="str" style="box-sizing: border-box;">'{$serviceid}'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">'{$dedicatedip}'</span><span class="pun" style="box-sizing: border-box;">);</span><span class="atv" style="box-sizing: border-box;">"</span><span class="tag" style="box-sizing: border-box;">></span><span class="tag" style="box-sizing: border-box;"><span</span><span class="atn" style="box-sizing: border-box;">class</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"glyphicon glyphicon-bookmark"</span><span class="atn" style="box-sizing: border-box;">aria-hidden</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"true"</span><span class="tag" style="box-sizing: border-box;">></span></span><span class="pln" style="box-sizing: border-box;"> {$LS_LANG['subscribe']['url']}
</span><span class="tag" style="box-sizing: border-box;"></a></span><span class="tag" style="box-sizing: border-box;"></div></span><span class="tag" style="box-sizing: border-box;"></li></span><span class="tag" style="box-sizing: border-box;"><li></span><span class="tag" style="box-sizing: border-box;"><strong></span><span class="pln" style="box-sizing: border-box;">{$LS_LANG['plugin']['guiconfig']}</span><span class="tag" style="box-sizing: border-box;"></strong></span><span class="tag" style="box-sizing: border-box;"><button</span><span class="atn" style="box-sizing: border-box;">type</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"button"</span><span class="atn" style="box-sizing: border-box;">class</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"btn btn-primary btn-xs autohides"</span><span class="atn" style="box-sizing: border-box;">name</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"guiconfig"</span><span class="atn" style="box-sizing: border-box;">data-guiconfig</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"{$guiconfig['ssr']}"</span><span class="tag" style="box-sizing: border-box;">></span><span class="tag" style="box-sizing: border-box;"><span</span><span class="atn" style="box-sizing: border-box;">class</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"glyphicon glyphicon-export"</span><span class="atn" style="box-sizing: border-box;">aria-hidden</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"true"</span><span class="tag" style="box-sizing: border-box;">></span></span><span class="pln" style="box-sizing: border-box;"> {$LS_LANG['plugin']['ssr']}
</span><span class="tag" style="box-sizing: border-box;"></button></span><span class="tag" style="box-sizing: border-box;"></li></span><span class="tag" style="box-sizing: border-box;"><li></span><span class="tag" style="box-sizing: border-box;"><strong></span><span class="pln" style="box-sizing: border-box;">Surge</span><span class="tag" style="box-sizing: border-box;"></strong></span><span class="tag" style="box-sizing: border-box;"><button</span><span class="atn" style="box-sizing: border-box;">type</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"button"</span><span class="atn" style="box-sizing: border-box;">class</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"btn btn-primary btn-xs autohides"</span><span class="atn" style="box-sizing: border-box;">name</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"guiconfig"</span><span class="atn" style="box-sizing: border-box;">data-guiconfig</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"{$guiconfig['ssr']}"</span><span class="tag" style="box-sizing: border-box;">></span><span class="tag" style="box-sizing: border-box;"><span</span><span class="atn" style="box-sizing: border-box;">class</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"glyphicon glyphicon-export"</span><span class="atn" style="box-sizing: border-box;">aria-hidden</span><span class="pun" style="box-sizing: border-box;">=</span><span class="atv" style="box-sizing: border-box;">"true"</span><span class="tag" style="box-sizing: border-box;">></span></span><span class="pln" style="box-sizing: border-box;"> {$LS_LANG['plugin']['ssr']}
</span><span class="tag" style="box-sizing: border-box;"></button></span><span class="tag" style="box-sizing: border-box;"></li></span><span class="tag" style="box-sizing: border-box;"></ul></span><span class="tag" style="box-sizing: border-box;"></div></span><span class="tag" style="box-sizing: border-box;"></div></span></pre><p style="box-sizing: border-box; margin: 0px 0px 10px;">切记 将 sweetalert 的 css 和 js 放入 使用的模板目录下!<span style="box-sizing: border-box;">请自行下载 SweetAlert 上传!</span></p><p style="box-sizing: border-box; margin: 0px 0px 10px;">WHMCS/modules/servers/legendsock/languages/zh_CN.php</p><p style="box-sizing: border-box; margin: 0px 0px 10px;">新增语言包:</p><pre class="prettyprint prettyprinted" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; word-wrap: break-word; color: rgb(51, 51, 51); background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;"><span class="str" style="box-sizing: border-box;">'subscribe'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="pun" style="box-sizing: border-box;">[</span><span class="str" style="box-sizing: border-box;">'title'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="str" style="box-sizing: border-box;">'订阅信息'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">'url'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="str" style="box-sizing: border-box;">'节点订阅'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">'ResetURL'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="str" style="box-sizing: border-box;">'请点击重置您的订阅地址'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">'Reset'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="str" style="box-sizing: border-box;">'重置'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">'ResetSuccess'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="str" style="box-sizing: border-box;">'订阅地址重置成功'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="str" style="box-sizing: border-box;">'ResetError'</span><span class="pun" style="box-sizing: border-box;">=></span><span class="str" style="box-sizing: border-box;">'订阅地址重置失败'</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pun" style="box-sizing: border-box;">],</span></pre><p style="box-sizing: border-box; margin: 0px 0px 10px;">记得最后增加伪静态规则</p><pre class="lang-bash prettyprint prettyprinted" data-lang="bash" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; word-wrap: break-word; color: rgb(51, 51, 51); background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;"><span class="typ" style="box-sizing: border-box;">Apache 伪静态规则<br style="box-sizing: border-box;">RewriteRule</span><span class="pun" style="box-sizing: border-box;">^</span><span class="pln" style="box-sizing: border-box;">subscribe</span><span class="pun" style="box-sizing: border-box;">/([^/]*)?/?([^/]*)?/?</span><span class="pln" style="box-sizing: border-box;">$ </span><span class="pun" style="box-sizing: border-box;">./</span><span class="pln" style="box-sizing: border-box;">subscribe</span><span class="pun" style="box-sizing: border-box;">.</span><span class="pln" style="box-sizing: border-box;">php</span><span class="pun" style="box-sizing: border-box;">?</span><span class="pln" style="box-sizing: border-box;">sid</span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;">$1</span><span class="pun" style="box-sizing: border-box;">&</span><span class="pln" style="box-sizing: border-box;">token</span><span class="pun" style="box-sizing: border-box;">=</span><span class="pln" style="box-sizing: border-box;">$2 </span><span class="pun" style="box-sizing: border-box;">[</span><span class="pln" style="box-sizing: border-box;">QSA</span><span class="pun" style="box-sizing: border-box;">,</span><span class="pln" style="box-sizing: border-box;">L</span><span class="pun" style="box-sizing: border-box;">]</span></pre><pre class="lang-bash prettyprint prettyprinted" data-lang="bash" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; word-break: break-all; word-wrap: break-word; color: rgb(51, 51, 51); background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;"><span class="pun" style="box-sizing: border-box;">Nginx 伪静态规则<br style="box-sizing: border-box;">rewrite ^/subscribe/([^/]*)?/?([^/]*)?/?$ /./subscribe.php?sid=$1&token=$2 last;</span></pre></div></div></div>
<script></script>
</body>
</html>