forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist_firewall.html
More file actions
143 lines (130 loc) · 6.28 KB
/
Copy pathlist_firewall.html
File metadata and controls
143 lines (130 loc) · 6.28 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
<div class="l-center">
<div class="l-sort clearfix noselect">
<a href="/add/firewall/" class="l-sort__create-btn" title="<?=str_replace(' ', ' ', __('Add Rule'))?>"></a>
<div class="l-sort-toolbar clearfix">
<table>
<tr>
<td class="step-right">
<? if(!empty($_SESSION['FIREWALL_EXTENSION'])) {
echo '<a class="vst" href="/list/firewall/banlist/"> '.__('list fail2ban').'</a>';
} ?>
</td>
<td class="l-sort-toolbar__search-box step-left">
<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>
<form action="/bulk/firewall/" method="post">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
<div class="l-select">
<select name="action" id="">
<option value=""><?=__('apply to selected')?></option>
<option value="delete"><?php print __('delete') ?></option>
</select>
</div>
<input type="submit" value="" class="l-sort-toolbar__filter-apply" />
</td>
</tr>
</table>
</div>
</div>
<? display_error_block(); ?>
<!-- /.l-sort -->
</div>
<div class="l-separator"></div>
<!-- /.l-separator -->
<div class="l-center">
<?php
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['SUSPENDED'] == 'yes') {
$status = 'suspended';
$spnd_action = 'unsuspend' ;
$spnd_confirmation = 'UNSUSPEND_RULE_CONFIRMATION' ;
} else {
$status = 'active';
$spnd_action = 'suspend' ;
$spnd_confirmation = 'SUSPEND_RULE_CONFIRMATION' ;
}
?>
<div class="l-unit<? if($status == 'suspended') echo ' l-unit--suspended';?>">
<div class="l-unit-toolbar clearfix">
<div class="l-unit-toolbar__col l-unit-toolbar__col--left">
<input id="check<?php echo $i ?>" class="ch-toggle" type="checkbox" name="rule[]" value="<?php echo $key ?>">
<label for="check<?php echo $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"><a href="/edit/firewall/?rule=<?=$key?>"><?=__('edit')?> <i></i></a></div>
<div class="actions-panel__col actions-panel__<?=$spnd_action?>">
<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 ?>/firewall/?rule=<?=$data[$key]['RULE']?>&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>
</div>
<div class="actions-panel__col actions-panel__delete">
<a id="delete_link_<?=$i?>" class="data-controls do_delete">
<?=__('delete')?> <i class="do_delete"></i>
<input type="hidden" name="delete_url" value="/delete/firewall/?rule=<?=$data[$key]['RULE']?>&token=<?=$_SESSION['token']?>" />
<div id="delete_dialog_<?=$i?>" class="confirmation-text-delete hidden" title="<?=__('Confirmation')?>">
<p class="confirmation"><?=__('DELETE_RULE_CONFIRMATION',$data[$key]['RULE'])?></p>
</div>
</a>
</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__suspended""><?=__('suspended')?></div>
</div>
<!-- /.l-unit__col -->
<div class="l-unit__col l-unit__col--right">
<div class="l-unit__stats">
<div class="clearfix l-unit__stat-col--left"><b><?=$data[$key]['ACTION'] ?></b></div>
<div class="clearfix l-unit__stat-col--left compact"><b><?=$data[$key]['PROTOCOL']?></b></div>
<div class="clearfix l-unit__stat-col--left wide-2"><? if(!empty($data[$key]['COMMENT'])) echo '/ ' . $data[$key]['COMMENT']; else echo " "; ?></div>
<div class="clearfix l-unit__stat-col--left wide"><b><?=$data[$key]['PORT'] ?></b></div>
<div class="clearfix l-unit__stat-col--left"><b><?=$data[$key]['IP'] ?></b></div>
</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>
<!-- /form -->
<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 rule');
} else {
echo __('%s rules',$i);
}
?>
</div>
</div>
</div>
</div>