-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmodule.zpm
More file actions
387 lines (348 loc) · 11 KB
/
module.zpm
File metadata and controls
387 lines (348 loc) · 11 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
<@ Init @>
<div class="zmodule_content panel" id="zmodule_header_<@ ModuleName @>">
<div class="panel-heading">
<img src="<@ ModuleIcon @>" width="35" height="35" border="0" alt="<@ ModuleName @>">
<div class="zmodule_title">
<@ ModuleName @>
</div>
<div class="zmodule_desc" id="zmodule_desc_<@ ModuleName @>"><@ ModuleDesc @></div>
</div>
<% if Admin %>
<!--<div class="alert alert-danger" role="alert">-->
<!--<@ CheckPortReq @>-->
<!--</div>-->
<% endif %>
<@ CheckModReq @>
<@ Result @>
<div class="tab">
<button class="tablinks <@ ShowViewCerts @>" onclick="openTABS(event, 'ViewCerts')"><b><u>View Your Certificates</u></b></button>
<button class="tablinks <@ ShowCreateCerts @>" onclick="openTABS(event, 'CreateCerts')"><b><u>Create or Manage Certificates</u></b></button>
</div>
<div style="display: <@ ShowViewCerts @>;" id="ViewCerts" class="tabcontent">
<% if Admin %>
<div class="zgrid_wrapper" >
<table class="table">
<h3><: Your Control Panel Certificate :></h3>
<tr>
<th><: Domain :></th>
<th><: Provider :></th>
<th><: Expiry :></th>
<th><: Actions :></th>
</tr>
<% loop List_of_Active_Panel_SSL %>
<tr>
<td>
<& Active_Panel_Domain &>
</td>
<td>
<& Active_Panel_Provider &>
</td>
<td>
<& Active_Panel_Days &>
</td>
<td>
<& Active_Panel_Button &>
</td>
<td>
<& Active_Panel_Revoke &>
</td>
</tr>
<@ CSFR_Tag @>
<% endloop %>
</table>
</div>
<% endif %>
<div class="zgrid_wrapper" >
<table class="table">
<h3><: Your Domain Certificates :></h3>
<tr>
<th><: Domain :></th>
<th><: Provider :></th>
<th><: Expiry :></th>
<th><: Actions :></th>
</tr>
<% loop List_of_active_domains_ssl %>
<tr>
<td>
<a href="http://<& Domain_AC &>/" target="_blank"><& Domain_AC &></a>
</td>
<td>
<& Vendor_AC &>
</td>
<td>
<& Days_AC &>
</td>
<td>
<& Button_AC &>
</td>
<td>
<& Download_AC &>
<& Revoke_AC &>
</td
</tr>
<% endloop %>
</table>
</div>
</div>
<div style="display: <@ ShowCreateCerts @>;" id="CreateCerts" class="tabcontent">
<h3><: Create a new domain SSL certificate :></h3>
<p>(<: Select a tab that best suits your needs below to get started :>)</p>
<div class="tab">
<button class="tablinks <@ ShowLetsencryptActive @>" onclick="openTABS(event, 'Letsencrypt')"><img src="modules/sencrypt/assets/icon.png">Let's Encrypt<br>Free with Auto-renew</button>
<button class="tablinks <@ ShowThird_partyActive @>" onclick="openTABS(event, 'Third-party')"><img src="modules/sencrypt/assets/third_party.png">Third-Party<br>Self-signed or purchased certificates</button>
<!--<button style="display:block;float:right;" class="tablinks" onclick="openTABS(event, 'Settings')"><img src="modules/sencrypt/assets/settings.png">Settings</button>-->
</div>
</div>
<div style="display: <@ ShowLetsencryptTab @>;" id="Letsencrypt" class="tabcontent">
<h3><: Create a :> Let's Encrypt <: FREE certificate: :></h3>
<div>
(<: Learn more about :> Let's Encrypt <b><a target='blank' href='https://letsencrypt.org/'><: HERE :></a></b>)
<a href="/?module=sencrypt" class="button-loader btn btn-warning pull-right"><: Cancel :></a>
</div>
<% if Admin %>
<% if List_of_Panel_Domains %>
<div class="zgrid_wrapper">
<table class="table">
<h4><: Create a certificate for your Control Panel login: :></h4>
<tr>
<th><: Domain :></th>
<th><: Actions :></th>
</tr>
<% loop List_of_Panel_Domains %>
<tr>
<td>
<& Panel_Domain &>
</td>
<td>
<& Panel_Button &>
</td>
</tr>
<% endloop %>
</table>
</div>
<% endif %>
<% endif %>
<div class="zgrid_wrapper" >
<table class="table">
<h4><: Create certificates for your domains: :></h4>
<tr>
<th><: Domains :></th>
<th><: Actions :></th>
</tr>
<% loop List_of_domains %>
<tr>
<td>
<a href="http://<& Vh_Domain &>/" target="_blank"><& Vh_Domain &></a>
</td>
<td>
<& Vh_Button &>
</td>
</tr>
<% endloop %>
</table>
</div>
</div>
<div style="display: <@ ShowThirdPartyTab @>;" id="Third-party" class="tabcontent">
<h3><: Create, Add, or Manage your own certificates: :></h3>
<h4><: Manage, make a self-signed SSL certificate or add a purchased (third-party) SSL certificate (GoDaddy, Bluehost, etc.) :></h4>
<hr></hr>
<form action="./?module=sencrypt&ShowPanel=third-party&action=select" method="post">
<button class="button-loader btn btn-primary" type="submit" id="button" name="inSSLself" id="inSSLself" value="inSSLself"><: Self-signed :></button>
<button class="button-loader btn btn-primary" type="submit" id="button" name="inSSLCSR" id="inSSLCSR" value="inSSLCSR"><: Certificate Signing Request :></button>
<button class="button-loader btn btn-primary" type="submit" id="button" name="inSSLbought" id="inSSLbought" value="inSSLbought"><: Install Signed Certificate :></button>
<a href="/?module=sencrypt" class="button-loader btn btn-warning"><: Cancel :></a>
<@ CSFR_Tag @>
</form>
<% if isShowCSR %>
<h3><: Certificate Signing Request :></h3>
<div class="zgrid_wrapper" style="position:relative; padding:15px; background-color:#eee;">
<form action="./?module=sencrypt&ShowPanel=third-party&action=MakeCSR" method="post">
<table class="table table-striped">
<tr>
<th nowrap="nowrap"><: Domain :>:</th>
<td>
<select name="inDomain" id="inDomain">
<option value="" selected="selected">-- <: Select a domain :> --</option>
<% loop DomainList %>
<option value="<& domain &>"><& domain &></option>
<% endloop %>
</select>
</td>
</tr>
<tr>
<th nowrap="nowrap"><: Your Name :>:</th>
<td>
<input type="text" name="inName" id="inName" />
</td>
</tr>
<tr>
<th nowrap="nowrap"><: Domain Email :>:</th>
<td>
<input type="text" name="inAddress" id="inAddress" />
</td>
</tr>
<tr>
<th nowrap="nowrap"><: City :>:</th>
<td>
<input type="text" name="inCity" id="inCity" />
</td>
</tr>
<tr>
<th nowrap="nowrap"><: Country :>:</th>
<td>
<select name="inCountry" id="inCountry">
<option value="" selected="selected">-- <: Select country :> --</option>
<@ ListCountry @>
</select>
</td>
</tr>
<tr>
<th nowrap="nowrap"><: Company :>:</th>
<td>
<input type="text" name="inCompany" id="inCompany" />
</td>
</tr>
<tr>
<th nowrap="nowrap"><: Key Password :>:</th>
<td>
<input type="text" name="inPassword" id="inPasword" />
</td>
</tr>
<tr>
<th nowrap="nowrap"><button class="button-loader btn btn-primary" type="submit" id="button" name="inSave" id="inSave"><: Save :></button></th>
<td></td>
</tr>
</table>
<@ CSFR_Tag @>
</form>
</div>
<% endif %>
<% if isShowSelf %>
<h3><: Create a self-signed certificate :></h3>
<div class="zgrid_wrapper" style="position:relative; padding:15px; background-color:#eee;">
<form action="./?module=sencrypt&ShowPanel=third-party&action=Makenew" method="post">
<table class="table table-striped">
<tr>
<th nowrap="nowrap"><: Domain :>:</th>
<td>
<select name="inDomain" id="inDomain">
<option value="" selected="selected">-- <: Select a domain :> --</option>
<% loop DomainList %>
<option value="<& domain &>"><& domain &></option>
<% endloop %>
</select><br>
</td>
</tr>
<tr>
<th nowrap="nowrap"><: Your Name :>:</th>
<td>
<input type="text" name="inName" id="inName" />
</td>
</tr>
<tr>
<th nowrap="nowrap"><: Domain Email :>:</th>
<td>
<input type="text" name="inAddress" id="inAddress" />
</td>
</tr>
<tr>
<th nowrap="nowrap"><: City :>:</th>
<td>
<input type="text" name="inCity" id="inCity" />
</td>
</tr>
<tr>
<th nowrap="nowrap"><: Country :>:</th>
<td>
<select name="inCountry" id="inCountry">
<option value="" selected="selected">-- <: Select country :> --</option>
<@ ListCountry @>
</select>
</td>
</tr>
<tr>
<th nowrap="nowrap"><: Company :>:</th>
<td>
<input type="text" name="inCompany" id="inCompany" />
</td>
</tr>
<tr>
<th nowrap="nowrap"><button class="button-loader btn btn-primary" type="submit" id="button" name="inSave" id="inSave"><: Save :></button></th>
<td></td>
</tr>
</table>
<@ CSFR_Tag @>
</form>
</div>
<% endif %>
<% if isBought %>
<h3><: Install a purchased certificate :></h3>
<div class="zgrid_wrapper" style="position:relative; padding:15px; background-color:#eee;">
<form action="./?module=sencrypt&ShowPanel=third-party&action=UploadSSL" method="post" enctype="multipart/form-data">
<table class="table table-striped">
<tr>
<th nowrap="nowrap"><: Available Domains :>:</th>
<td>
<select name="inDomain" id="inDomain">
<option value="" selected="selected">-- <: Select a domain :> --</option>
<% loop DomainList %>
<option value="<& domain &>"><& domain &></option>
<% endloop %>
</select>
</td>
</tr>
<tr>
<th nowrap="nowrap"><: Upload Domain Signing Certificate Key (.key) :>:</th>
<td>
<input type="file" name="inkey" id="inkey" />
</td>
</tr>
<tr>
<th nowrap="nowrap"><: Upload Signed Server Certificate (.cer) :>:</th>
<td>
<input type="file" name="inWCA" id="inWCA" />
</td>
</tr>
<tr>
<th nowrap="nowrap"><: Upload CA Certificate (.cer) :>:</th>
<td>
<input type="file" name="inICA" id="inICA" />
</td>
</tr>
<tr>
<th nowrap="nowrap"><button class="button-loader btn btn-primary" type="submit" id="button" name="inCreateSSL" id="inCreateSSL"><: Save :></button></th>
<td></td>
</tr>
</table>
<@ CSFR_Tag @>
</form>
</div>
<% endif %>
</div>
<div id="Settings" class="tabcontent">
<h3><: Settings for Sencrypt :></h3>
<h4><: Here you can manage settings for this module :></h4>
<p> </p>
<h3>Coming Soon!</h3>
</div>
<br />
</div>
<script>
function openTABS(evt, tabName)
{
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++)
{
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++)
{
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " active";
}
document.getElementById("ViewCerts").click();
</script>