forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist_web.html
More file actions
341 lines (324 loc) · 17 KB
/
list_web.html
File metadata and controls
341 lines (324 loc) · 17 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
<div class="l-center">
<div class="l-sort clearfix noselect">
<a href="/add/web/" class="l-sort__create-btn" title="<?=str_replace(' ', ' ', __('Add Web Domain'))?>"></a>
<ul class="context-menu sort-order" style="display:none;">
<li entity="sort-date" sort_as_int="1"><span class="name active"><?=__('Date')?></span><span class="up"> </span></li>
<li entity="sort-name"><span class="name"><?=__('Domain')?></span><span class="up"> </span></li>
<li entity="sort-ip" sort_as_int="1"><span class="name"><?=__('IP address')?></span><span class="up"> </span></li>
<li entity="sort-disk" sort_as_int="1"><span class="name"><?=__('Disk')?></span><span class="up"> </span></li>
<li entity="sort-bandwidth" sort_as_int="1"><span class="name"><?=__('Bandwidth')?></span><span class="up"> </span></li>
<li entity="sort-star" sort_as_int="1"><span class="name"><?=__('Starred')?></span><span class="up"> </span></li>
</ul>
<div class="l-sort-toolbar clearfix">
<table>
<tr>
<td class="l-sort-toolbar__search-box">
<form action="/search/" method="get">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
<input type="text" name="q" class="search-input" value="<? echo isset($_POST['q']) ? htmlspecialchars($_POST['q']) : '' ?>" />
<input type="submit" value="" class="l-sort-toolbar__search" onClick="return doSearch('/search/')" />
</form>
</td>
<td class="toggle-all">
<input id="toggle-all" type="checkbox" name="toggle-all" value="toggle-all" onChange="checkedAll('objects');">
<label for="toggle-all" class="check-label toggle-all"><?=__('toggle all')?></label>
</td>
<td class="sort-by">
<?=__('sort by');?>: <span><b><?=__('Date')?></b></span> <i class="l-icon-down-arrow media-top"></i>
</td>
<td>
<form action="/bulk/web/" method="post" id="objects">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
<div class="l-select">
<select name="action">
<option value=""><?=__('apply to selected')?></option>
<option value="suspend"><?=__('suspend')?></option>
<option value="unsuspend"><?=__('unsuspend')?></option>
<option value="delete"><?=__('delete')?></option>
</select>
</div>
<input type="submit" class="l-sort-toolbar__filter-apply" value=""/>
</div>
</td>
</tr>
</table>
<!-- -->
</div>
</div>
<? display_error_block() ?>
<!-- /.l-sort -->
</div>
<div class="l-separator"></div>
<!-- /.l-separator -->
<div class="l-center units narrow">
<?php
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
$spnd_action = 'unsuspend' ;
$spnd_confirmation = 'UNSUSPEND_DOMAIN_CONFIRMATION' ;
} else {
$status = 'active';
$spnd_action = 'suspend' ;
$spnd_confirmation = 'SUSPEND_DOMAIN_CONFIRMATION' ;
}
if (!empty($data[$key]['SSL_HOME'])) {
if ($data[$key]['SSL_HOME'] == 'same') {
$ssl_home = 'public_html';
} else {
$ssl_home = 'public_shtml';
}
} else {
$ssl_home = '';
}
$web_stats='no';
if (!empty($data[$key]['STATS'])) {
$web_stats=$data[$key]['STATS'];
}
$ftp_user='no';
if (!empty($data[$key]['FTP_USER'])) {
$ftp_user=$data[$key]['FTP_USER'];
}
if (strlen($ftp_user) > 24 ) {
$ftp_user = str_replace(':', ', ', $ftp_user);
$ftp_user = substr($ftp_user, 0, 24);
$ftp_user = trim($ftp_user, ":");
$ftp_user = str_replace(':', ', ', $ftp_user);
$ftp_user = $ftp_user.", ...";
} else {
$ftp_user = str_replace(':', ', ', $ftp_user);
}
$backend_support='no';
if (!empty($data[$key]['BACKEND'])) {
$backend_support='yes';
}
$proxy_support='no';
if (!empty($data[$key]['PROXY'])) {
$proxy_support='yes';
}
if (strlen($data[$key]['PROXY_EXT']) > 24 ) {
$proxy_ext_title = str_replace(',', ', ', $data[$key]['PROXY_EXT']);
$proxy_ext = substr($data[$key]['PROXY_EXT'], 0, 24);
$proxy_ext = trim($proxy_ext, ",");
$proxy_ext = str_replace(',', ', ', $proxy_ext);
$proxy_ext = $proxy_ext.", ...";
} else {
$proxy_ext_title = '';
$proxy_ext = str_replace(',', ', ', $data[$key]['PROXY_EXT']);
}
?>
<div class="l-unit <? if($data[$key]['SUSPENDED'] == 'yes') echo 'l-unit--suspended'; if($_SESSION['favourites']['WEB'][$key] == 1) echo ' l-unit--starred'; ?>" v_section="web" v_unit_id="<?=$key?>"
id="web-unit-<?=$i?>" sort-ip="<?=str_replace('.', '', $data[$key]['IP'])?>"
sort-date="<?=strtotime($data[$key]['DATE'].' '.$data[$key]['TIME'])?>"
sort-name="<?=$key?>" sort-bandwidth="<?=$data[$key]['U_BANDWIDTH']?>" sort-disk="<?=$data[$key]['U_DISK']?>" sort-star="<? if($_SESSION['WEB'][$key] == 1) echo '1'; else echo '0';?>">
<div class="l-unit-toolbar clearfix">
<div class="l-unit-toolbar__col l-unit-toolbar__col--left">
<input id="check<?=$i?>" class="ch-toggle" type="checkbox" name="domain[]" value="<?=$key?>">
<label for="check<?=$i?>" class="check-label"></label>
</div>
<!-- l-unit-toolbar__col -->
<div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
<div class="actions-panel clearfix">
<div class="actions-panel__col actions-panel__edit shortcut-enter" key-action="href"><a href="/edit/web/?domain=<?=$key?>"><?=__('edit')?> <i></i></a><span class="shortcut enter"> ↵</span></div>
<div class="actions-panel__col actions-panel__logs shortcut-l" key-action="href"><a href="/list/web-log/?domain=<?php echo $key ?>&type=access#" target="_blank"><?=__('view logs')?> <i></i></a><span class="shortcut"> L</span></div>
<? if (!empty($data[$key]['STATS'])) { ?>
<div class="actions-panel__col actions-panel__logs shortcut-w" key-action="href"><a href="http://<?=$key?>/vstats/" target="_blank"><?=__('open webstats')?> <i></i></a><span class="shortcut"> W</span></div>
<? } ?>
<div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js">
<a id="<?=$spnd_action ?>_link_<?=$i?>" class="data-controls do_<?=$spnd_action?>">
<?=__($spnd_action)?> <i class="do_<?=$spnd_action?>"></i>
<input type="hidden" name="<?=$spnd_action?>_url" value="/<?=$spnd_action?>/web/?domain=<?=$key?>&token=<?=$_SESSION['token']?>" />
<div id="<?=$spnd_action?>_dialog_<?=$i?>" class="confirmation-text-suspention hidden" title="<?=__('Confirmation')?>">
<p class="confirmation"><?=__($spnd_confirmation,$key)?></p>
</div>
</a>
<span class="shortcut"> S</span>
</div>
<div class="actions-panel__col actions-panel__delete shortcut-delete" key-action="js">
<a id="delete_link_<?=$i?>" class="data-controls do_delete">
<?=__('delete')?> <i class="do_delete"></i>
<input type="hidden" name="delete_url" value="/delete/web/?domain=<?=$key?>&token=<?=$_SESSION['token']?>" />
<div id="delete_dialog_<?=$i?>" class="confirmation-text-delete hidden" title="<?=__('Confirmation')?>">
<p class="confirmation"><?=__('DELETE_DOMAIN_CONFIRMATION',$key)?></p>
</div>
</a>
<span class="shortcut delete"> Del</span>
</div>
</div>
<!-- /.actiona-panel -->
</div>
<!-- l-unit-toolbar__col -->
</div>
<!-- /.l-unit-toolbar -->
<div class="l-unit__col l-unit__col--left clearfix">
<div class="l-unit__date">
<?=translate_date($data[$key]['DATE'])?>
</div>
<div class="l-unit__suspended""><?=__('suspended')?></div>
<div class="text-center">
<i class="l-icon-star"></i>
</div>
</div>
<!-- /.l-unit__col -->
<div class="l-unit__col l-unit__col--right">
<div class="l-unit__name" u_name="<?=$key?>">
<?=$key?> <span><?=str_replace(',', ', ', $data[$key]['ALIAS'])?></span>
</div>
<!-- /.l-unit__name -->
<div class="l-unit__ip">
<?=str_replace('.', '<span>.</span>', $data[$key]['IP'])?>
</div>
<!-- /.l-unit__ip -->
<div class="l-unit__stats">
<table>
<tr>
<td>
<div class="l-unit__stat-cols clearfix graph">
<div class="l-unit__stat-col l-unit__stat-col--left">
<?=__('Bandwidth')?>
</div>
<div class="l-unit__stat-col l-unit__stat-col--right text-right volume">
<b><?=humanize_usage_size($data[$key]['U_BANDWIDTH'])?></b> <?=humanize_usage_measure($data[$key]['U_BANDWIDTH'])?>
</div>
</div>
<div class="l-percent">
<div class="l-percent__fill" style="width: <?=get_percentage($data[$key]['U_BANDWIDTH'],$panel[$user]['BANDWIDTH'])?>%"></div>
</div>
<!-- /.percent -->
</td>
<td>
<div class="l-unit__stat-cols clearfix">
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Web Template')?>:</div>
<div class="l-unit__stat-col l-unit__stat-col--right">
<b><?=__($data[$key]['TPL'])?></b>
</div>
</div>
</td>
<td>
<?php if (!empty($_SESSION['PROXY_SYSTEM'])) { echo ""; ?>
<? if($proxy_support == 'no'){ ?>
<div class="l-unit__stat-cols clearfix disabled last"><?=__('Proxy Support')?></div>
<? } else {?>
<div class="l-unit__stat-cols clearfix last">
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Proxy Support')?>:</div>
<div class="l-unit__stat-col l-unit__stat-col--right">
<b><?=__($proxy_support)?></b>
</div>
</div>
<? } ?>
<? } ?>
<?php if (!empty($_SESSION['WEB_BACKEND'])) { echo ""; ?>
<? if($backend_support == 'no'){ ?>
<div class="l-unit__stat-cols clearfix disabled last"><?=__('Backend Support')?></div>
<? } else {?>
<div class="l-unit__stat-cols clearfix last">
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Backend Support')?>:</div>
<div class="l-unit__stat-col l-unit__stat-col--right">
<b><?=__($backend_support)?></b>
</div>
</div>
<? } ?>
<? } ?>
</td>
</tr>
<tr>
<td></td>
<td>
<? if($data[$key]['SSL'] == 'no'){ ?>
<div class="l-unit__stat-cols clearfix disabled"><?=__('SSL Support')?></div>
<? } else {?>
<div class="l-unit__stat-cols clearfix">
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('SSL Support')?>:</div>
<div class="l-unit__stat-col l-unit__stat-col--right">
<b><?=__($data[$key]['SSL'])?></b>
</div>
</div>
<? } ?>
</td>
<td>
<?php if (!empty($_SESSION['PROXY_SYSTEM'])) { echo ""; ?>
<div class="l-unit__stat-cols clearfix last">
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Proxy Template')?>:</div>
<div class="l-unit__stat-col l-unit__stat-col--right">
<b><?=$data[$key]['PROXY']?></b>
</div>
</div>
<? } ?>
<?php if (!empty($_SESSION['WEB_BACKEND'])) { echo ""; ?>
<div class="l-unit__stat-cols clearfix last">
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Backend Template')?>:</div>
<div class="l-unit__stat-col l-unit__stat-col--right">
<b><?=$data[$key]['BACKEND']?></b>
</div>
</div>
<? } ?>
</td>
</tr>
<tr>
<td>
<div class="l-unit__stat-cols clearfix graph">
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Disk')?>:</div>
<div class="l-unit__stat-col l-unit__stat-col--right text-right volume">
<b><?=humanize_usage_size($data[$key]['U_DISK'])?></b> <?=humanize_usage_measure($data[$key]['U_DISK'])?>
</div>
</div>
<div class="l-percent">
<div class="l-percent__fill" style="width: <?=get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA'])?>%"></div>
</div>
<!-- /.percent -->
</td>
<td>
<? if($web_stats == 'no'){ ?>
<div class="l-unit__stat-cols clearfix disabled"><?=__('Web Statistics')?></div>
<? } else {?>
<div class="l-unit__stat-cols clearfix">
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Web Statistics')?>:</div>
<div class="l-unit__stat-col l-unit__stat-col--right">
<b><?=__($web_stats)?></b>
</div>
</div>
<? } ?>
</td>
<td>
<? if($ftp_user == 'no'){ ?>
<div class="l-unit__stat-cols clearfix last disabled"><?=__('Additional FTP Account')?></div>
<? } else {?>
<div class="l-unit__stat-cols clearfix last">
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('Additional FTP Account')?>:</div>
<div class="l-unit__stat-col l-unit__stat-col--right">
<b><?=__($ftp_user)?></b>
</div>
</div>
<? } ?>
</td>
</tr>
</table>
</div>
<!-- /.l-unit__stats -->
</div>
<!-- /.l-unit__col -->
</div>
<!-- /.l-unit -->
<!-- div class="l-separator"></div -->
<!-- /.l-separator -->
<?}?>
</div>
<div id="vstobjects">
<div class="l-separator"></div>
<div class="l-center">
<div class="l-unit-ft">
<table class='data'></table>
<div class="l-unit__col l-unit__col--left clearfix"></div>
<div class="data-count l-unit__col l-unit__col--right clearfix">
<?php
if ( $i == 1) {
echo __('1 domain');
} else {
echo __('%s domains',$i);
}
?>
</div>
</div>
</div>
</div>