1 | {combine_script id='common' load='footer' path='admin/themes/default/js/common.js'} |
---|
2 | {combine_script id='jquery.ui.slider' require='jquery.ui' load='footer' path='themes/default/js/ui/minified/jquery.ui.slider.min.js'} |
---|
3 | {combine_css path="themes/default/js/ui/theme/jquery.ui.slider.css"} |
---|
4 | {footer_script} |
---|
5 | |
---|
6 | jQuery(function($) { |
---|
7 | // slide |
---|
8 | $('.range').each(function(){ |
---|
9 | var cls=$(this).attr('class'); |
---|
10 | var elem=$(this).parent(); |
---|
11 | var input=elem.find('input'); |
---|
12 | var options={}; |
---|
13 | elem.append('<div class="uirange"></div>'); |
---|
14 | options.slide=function(event,ui){ |
---|
15 | elem.find('label span').empty().append(ui.value); |
---|
16 | input.val(ui.value); |
---|
17 | } |
---|
18 | options.value=input.val(); |
---|
19 | options.range='min'; |
---|
20 | options.min=$(this).data('min'); |
---|
21 | options.max=$(this).data('max'); |
---|
22 | elem.find('.uirange').slider(options); |
---|
23 | elem.find('label span').empty().append(input.val()); |
---|
24 | input.hide(); |
---|
25 | }); |
---|
26 | |
---|
27 | jQuery('.add-ip-allowed-form-toggle').click(function(e) { |
---|
28 | jQuery('.add-ip-allowed-form').toggle(); |
---|
29 | e.preventDefault(); |
---|
30 | }) |
---|
31 | }); |
---|
32 | |
---|
33 | {/footer_script} |
---|
34 | |
---|
35 | {html_style} |
---|
36 | .uirange{ |
---|
37 | margin:10px; |
---|
38 | margin-left: 40px; |
---|
39 | } |
---|
40 | {/html_style} |
---|
41 | |
---|
42 | <div class="titrePage"> |
---|
43 | <h2>{'AntiAspi'|@translate}</h2> |
---|
44 | </div> |
---|
45 | {if isset ($ipbangest)} |
---|
46 | |
---|
47 | <fieldset> |
---|
48 | <legend>{'Banned IP addresses'|@translate}</legend> |
---|
49 | <form method="post" > |
---|
50 | <div style="text-align:center;margin-bottom: 30px;"> |
---|
51 | |
---|
52 | <button name="submitdeleteall" type="submit" class="buttonLike" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');"> |
---|
53 | <i class="icon-trash"></i> {'Delete all'|@translate} |
---|
54 | </button> |
---|
55 | |
---|
56 | <button name="submitdeletedeprecated" type="submit" class="buttonLike" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');"> |
---|
57 | <i class="icon-trash"></i> {'Delete deprecated only'|@translate} |
---|
58 | </button> |
---|
59 | |
---|
60 | </div> |
---|
61 | </form> |
---|
62 | |
---|
63 | <table class="lban"> |
---|
64 | {foreach from=$ipban2 item=ipban} |
---|
65 | <tr> |
---|
66 | <td><!-- {$ipban.ID} --> {$ipban.IP}</td> |
---|
67 | <td>{$ipban.DATE}</td> |
---|
68 | <td><span class="badge badge-{$ipban.STATUS}">{$ipban.STATUS_LABEL}</span></td> |
---|
69 | <td> |
---|
70 | <a href="{$ipban.U_DELETE}" onclick="return confirm( document.getElementById('btn_delete').title + '\n\n' + '{'Are you sure?'|@translate|@escape:'javascript'}');"> |
---|
71 | <i class="icon-trash" id="btn_delete" title="{'Delete'|@translate}"></i> |
---|
72 | </a> |
---|
73 | </td> |
---|
74 | </tr> |
---|
75 | {/foreach} |
---|
76 | </table> |
---|
77 | </fieldset> |
---|
78 | |
---|
79 | <fieldset class="antiaspi-whitelist"> |
---|
80 | <legend>{'Whitelist (allowed ip addresses)'|translate}</legend> |
---|
81 | <form method="post"> |
---|
82 | <a href="#" class="icon-plus-circled add-ip-allowed-form-toggle">{'Add allowed IP'|@translate}</a> |
---|
83 | <span class="add-ip-allowed-form"> |
---|
84 | {'IP'|@translate} <input " type="text" name="insipallowed" data-ip placeholder="123.123.123.123" value="" size="50" maxlenght="50" required pattern="^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"> |
---|
85 | <input class="submit" name="submitaddipallowed" type="submit" value="{'Add IP'|@translate}" /> |
---|
86 | </span> |
---|
87 | </form> |
---|
88 | <table class="lban"> |
---|
89 | {foreach from=$allowip item=allowip2} |
---|
90 | <tr> |
---|
91 | <td>{$allowip2.IP}</td> |
---|
92 | <td> |
---|
93 | <a href="{$allowip2.U_DELETE}" onclick="return confirm( document.getElementById('btn_delete').title + '\n\n' + '{'Are you sure?'|@translate|@escape:'javascript'}');"> |
---|
94 | <i class="icon-trash" id="btn_delete" title="{'Delete'|@translate}"></i> |
---|
95 | </a> |
---|
96 | </td> |
---|
97 | </tr> |
---|
98 | {/foreach} |
---|
99 | </table> |
---|
100 | </fieldset> |
---|
101 | {/if} |
---|
102 | |
---|
103 | {if isset ($ipconfiggest)} |
---|
104 | <form method="post"> |
---|
105 | <fieldset> |
---|
106 | <legend>{'Configuration'|translate}</legend> |
---|
107 | <p class="input" style="width: 700px;"> |
---|
108 | <label for="insdiffa"><strong>{'IP banned if '|@translate}<span></span></strong></label> |
---|
109 | <input type="text" name="insdiffa" data-min="10" data-max="500" class="range" value="{$ipconfiggest.DIFFA}"/> |
---|
110 | </p> |
---|
111 | <p class="input" style="width: 700px;"> |
---|
112 | <label for="insdiffb"><strong>{' different pages viewed in <span></span> seconds'|@translate} </strong></label> |
---|
113 | <input type="text" name="insdiffb" data-min="5" data-max="3599" class="range" value="{$ipconfiggest.DIFFB}"/> |
---|
114 | </p> |
---|
115 | |
---|
116 | <p class="input" style="width: 700px;margin-top: 50px;"> |
---|
117 | <label for="inssamea"><strong>{'IP banned if same page viewed '|@translate}<span></span></strong></label> |
---|
118 | <input type="text" name="inssamea" data-min="10" data-max="500" class="range" value="{$ipconfiggest.SAMEA}"/> |
---|
119 | </p> |
---|
120 | <p class="input" style="width: 700px;margin-bottom: 50px;"> |
---|
121 | <label for="inssameb"><strong>{' times viewed in <span></span> seconds'|@translate} </strong></label> |
---|
122 | <input type="text" name="inssameb" data-min="5" data-max="3599" class="range" value="{$ipconfiggest.SAMEB}"/> |
---|
123 | </p> |
---|
124 | |
---|
125 | <p> |
---|
126 | <label class="font-checkbox"> |
---|
127 | <span class="icon-check"></span> |
---|
128 | <input type="checkbox" name="insonlyguest" {if ($ipconfiggest.ONLYGUEST)}checked="checked"{/if}> |
---|
129 | {'only guest'|@translate} <span class="configSettingHelp"><i class="icon-help-circled"></i>{'If yes, don\'t ban registered users'|@translate}</span> |
---|
130 | </label> |
---|
131 | </p> |
---|
132 | <p> |
---|
133 | <label class="font-checkbox"> |
---|
134 | <span class="icon-check"></span> |
---|
135 | <input type="checkbox" name="insonlypicture" {if ($ipconfiggest.ONLYPICTURE)}checked="checked"{/if}> |
---|
136 | {'only picture'|@translate} <span class="configSettingHelp"><i class="icon-help-circled"></i>{'If yes, apply antiaspi only on picture page'|@translate}</span> |
---|
137 | </label> |
---|
138 | </p> |
---|
139 | <p style="margin-top: 50px"> |
---|
140 | <button name="submitconfban" type="submit" class="buttonLike"> |
---|
141 | <i class="icon-floppy"></i> {'Save Settings'|@translate} |
---|
142 | </button> |
---|
143 | </p> |
---|
144 | </fieldset> |
---|
145 | </form> |
---|
146 | {/if} |
---|