-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmodule.zpm
228 lines (194 loc) · 9.27 KB
/
module.zpm
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
<div class="zmodule_title" id="zmodule_title_<@ ModuleName @>"><img src="<@ ModuleIcon @>" border="0"><@ ModuleName @></div>
<div class="zmodule_content" id="zmodule_header_<@ ModuleName @>">
<div class="zmodule_desc" id="zmodule_desc_<@ ModuleName @>"><p><@ ModuleDesc @></p></div>
<% if ModuleMode %>
<% loop FlashDebugMessages %><div class="alert alert-info"><& debug &></div><% endloop %>
<% endif %>
<% loop FlashErrorMessages %><div class="alert alert-danger"><& error &></div><% endloop %>
<% if isIndex %>
<div class="pull-right">
<a href="/?module=zvps_zpanelcp_htpasswd&control=CreateProtection" class="button-loader btn btn-success btn-small">
Create
</a>
</div>
<div class="clearfix"> </div>
<table class="table table-stripped table-bordered" style="margin-top: 20px; width:100%; margin-left:auto; margin-right:auto;">
<tr>
<td style="text-align: center;"><strong>Protected Directory</strong></td>
<td style="text-align: center;"><strong>Message</strong></td>
<td style="text-align: center;"><strong>Created On</strong></td>
<td style="text-align: center;"><strong>Manage</strong></td>
</tr>
<% loop FileList %>
<tr>
<td><& x_zvps_htpasswd_file_target &></td>
<td><& x_zvps_htpasswd_file_message &></td>
<td><& x_zvps_htpasswd_file_created &></td>
<td>
<a href="/?module=zvps_zpanelcp_htpasswd&control=EditProtection&id=<& x_zvps_htpasswd_file_id &>" class="button-loader btn btn-primary btn-small">
Edit
</a>
<a href="/?module=zvps_zpanelcp_htpasswd&control=DeleteProtection&id=<& x_zvps_htpasswd_file_id &>" class="button-loader btn btn-danger btn-small">
Delete
</a>
</td>
</tr>
<% endloop %>
</table>
<% endif %>
<% if isEditProtection %>
<div class="pull-right">
<a href="/?module=zvps_zpanelcp_htpasswd&control=Index" class="button-loader btn btn-default">Back</a>
</div>
<div class="clearfix"> </div>
<form action="/?module=zvps_zpanelcp_htpasswd&control=EditProtection&action=EditProtection&id=<@ Id @>" method="post" name="EditProtection">
<table class="table table-stripped table-bordered" style="width:700px; margin-left:auto; margin-right:auto;">
<tr>
<td><strong>Protected Directory</strong></td>
<td><strong>Message</strong></td>
<td><strong>Created On</strong></td>
<td> </td>
</tr>
<% loop File %>
<tr>
<td><& x_zvps_htpasswd_file_target &></td>
<td>
<input type="text" name="message" value="<& x_zvps_htpasswd_file_message &>" class="input input-medium">
</td>
<td style="white-space: nowrap;"><& x_zvps_htpasswd_file_created &></td>
<td>
<input type="submit" name="submitCreateProtection" value="Update" class="btn btn-primary">
<@ CSFR_Tag @>
</td>
</tr>
<% endloop %>
</table>
</form>
<div class="pull-right">
<a href="/?module=zvps_zpanelcp_htpasswd&control=CreateUser&id=<@ Id @>" class="button-loader btn btn-success btn-small">
Create
</a>
</div>
<div class="clearfix"> </div>
<table class="table table-stripped table-bordered" style="margin-top: 20px; width:100%; margin-left:auto; margin-right:auto;">
<tr>
<td style="text-align: center;"><strong>Username</strong></td>
<td style="text-align: center;"><strong>Created On</strong></td>
<td style="text-align: center;"><strong>Manage</strong></td>
</tr>
<% loop UserFileList %>
<tr>
<td><& x_zvps_htpasswd_user_username &></td>
<td><& x_zvps_htpasswd_user_created &></td>
<td>
<a href="/?module=zvps_zpanelcp_htpasswd&control=DeleteUser&id=<& x_zvps_htpasswd_file_id &>&userid=<& x_zvps_htpasswd_user_id &>" class="button-loader btn btn-danger btn-small">
Delete
</a>
<a href="/?module=zvps_zpanelcp_htpasswd&control=EditUser&id=<& x_zvps_htpasswd_file_id &>&userid=<& x_zvps_htpasswd_user_id &>" class="button-loader btn btn-primary btn-small">
Edit
</a>
</td>
</tr>
<% endloop %>
</table>
<% endif %>
<% if isCreateProtection %>
<div><h3>Protect A Directory</h3></div>
<div class="clearfix"> </div>
<div class="pull-right">
<a href="/?module=zvps_zpanelcp_htpasswd&control=Index" class="button-loader btn btn-default">Back</a>
</div>
<div class="clearfix"> </div>
<div>Protect a directory inside <@ HostDir @><# ui_tpl_username #>/public_html/<br><br><br></div>
<div class="clearfix"> </div>
<form action="/?module=zvps_zpanelcp_htpasswd&control=CreateProtection&action=CreateProtection" method="post" name="CreateProtection">
<label>File Path:</label>
<@ HostDir @><# ui_tpl_username #>/public_html/
<input type="text" name="file" class="input input-medium">
<label>Message:</label>
<input type="text" name="message" class="input input-medium">
<br><br>
<input type="submit" name="submitCreateProtection" value="Submit" class="btn btn-primary">
<@ CSFR_Tag @>
</form>
<% endif %>
<% if isDeleteProtection %>
<div>Please confirm the delete request:</div>
<form action="/?module=zvps_zpanelcp_htpasswd&control=DeleteProtection&action=DeleteProtection&id=<@ Id @>" method="post" name="DeleteProtection">
<input type="submit" name="submitDeleteProtection" value="Submit" class="btn btn-primary">
<@ CSFR_Tag @>
</form>
<% endif %>
<% if isCreateUser %>
<div class="pull-right">
<a href="/?module=zvps_zpanelcp_htpasswd&control=EditProtection&id=<@ Id @>" class="button-loader btn btn-default">Back</a>
</div>
<div class="clearfix"> </div>
<table class="table table-stripped table-bordered" style="width:700px; margin-left:auto; margin-right:auto;">
<tr>
<td><strong>Protected Directory</strong></td>
<td><strong>Message</strong></td>
<td><strong>Created On</strong></td>
</tr>
<% loop File %>
<tr>
<td><& x_zvps_htpasswd_file_target &></td>
<td>
<& x_zvps_htpasswd_file_message &>
</td>
<td style="white-space: nowrap;"><& x_zvps_htpasswd_file_created &></td>
</tr>
<% endloop %>
</table>
<div class="clearfix"> </div>
<form action="/?module=zvps_zpanelcp_htpasswd&control=CreateUser&action=CreateUser&id=<@ Id @>" method="post" name="CreateUser">
<label>Username:</label>
<input type="text" name="username" class="input input-medium">
<label>Password:</label>
<input type="password" name="password" class="input input-medium">
<br><br>
<input type="submit" name="submitCreateUser" value="Submit" class="btn btn-primary">
<@ CSFR_Tag @>
</form>
<% endif %>
<% if isEditUser %>
<div class="pull-right">
<a href="/?module=zvps_zpanelcp_htpasswd&control=EditProtection&id=<@ Id @>" class="button-loader btn btn-default">Back</a>
</div>
<div class="clearfix"> </div>
<table class="table table-stripped table-bordered" style="width:700px; margin-left:auto; margin-right:auto;">
<tr>
<td><strong>Protected Directory</strong></td>
<td><strong>Message</strong></td>
<td><strong>Created On</strong></td>
</tr>
<% loop File %>
<tr>
<td><& x_zvps_htpasswd_file_target &></td>
<td>
<& x_zvps_htpasswd_file_message &>
</td>
<td style="white-space: nowrap;"><& x_zvps_htpasswd_file_created &></td>
</tr>
<% endloop %>
</table>
<div class="clearfix"> </div>
<form action="/?module=zvps_zpanelcp_htpasswd&control=EditUser&action=EditUser&id=<@ Id @>&userid=<@ UserId @>" method="post" name="EditUser">
<label>Username:</label>
<% loop User %>
<& x_zvps_htpasswd_user_username &>
<% endloop %>
<label>Password:</label>
<input type="password" name="password" class="input input-medium">
<br><br>
<input type="submit" name="submitEditUser" value="Submit" class="btn btn-primary">
<@ CSFR_Tag @>
</form>
<% endif %>
<% if isDeleteUser %>
<div>Please confirm the user delete request:</div>
<form action="/?module=zvps_zpanelcp_htpasswd&control=DeleteUser&action=DeleteUser&id=<@ Id @>&userid=<@ UserId @>" method="post" name="DeleteUser">
<input type="submit" name="submitDeleteUser" value="Submit" class="btn btn-primary">
<@ CSFR_Tag @>
</form>
<% endif %>