1 | {combine_script id='common' load='footer' path='admin/themes/default/js/common.js'} |
---|
2 | |
---|
3 | {combine_script id='jquery.dataTables' load='footer' path='themes/default/js/plugins/jquery.dataTables.js'} |
---|
4 | {combine_css path="themes/default/js/plugins/datatables/css/jquery.dataTables.css"} |
---|
5 | |
---|
6 | {footer_script} |
---|
7 | jQuery(document).ready(function(){ |
---|
8 | |
---|
9 | jQuery('#submitipban').click(function(){ |
---|
10 | jQuery("#banip_edit").toggle(); |
---|
11 | jQuery("#ipedit").hide(); |
---|
12 | jQuery("input[name=submitaddipban]").focus(); |
---|
13 | }); |
---|
14 | |
---|
15 | jQuery('.lip').mouseover(function(){ |
---|
16 | jQuery(this).children('span').show(); |
---|
17 | }); |
---|
18 | jQuery('.lip').mouseout(function(){ |
---|
19 | jQuery(this).children('span').hide(); |
---|
20 | }); |
---|
21 | |
---|
22 | $("#tablebanip").dataTable({ |
---|
23 | pageLength: 10, |
---|
24 | "pagingType": "full_numbers", |
---|
25 | language: { |
---|
26 | processing: "{'Loading...'|translate|escape:'javascript'}", |
---|
27 | lengthMenu: sprintf("{'Show %s IP'|translate|escape:'javascript'}", '_MENU_'), |
---|
28 | zeroRecords: "{'No matching IP found'|translate|escape:'javascript'}", |
---|
29 | info: sprintf("{'Showing %s to %s of %s IP'|translate|escape:'javascript'}", '_START_', '_END_', '_TOTAL_'), |
---|
30 | infoEmpty: "{'No matching IP found'|translate|escape:'javascript'}", |
---|
31 | infoFiltered: sprintf("{'(filtered from %s total IP)'|translate|escape:'javascript'}", '_MAX_'), |
---|
32 | search: '<span class="icon-search"></span>'+"{'Search'|translate|escape:'javascript'}", |
---|
33 | loadingRecords: "{'Loading...'|translate|escape:'javascript'}", |
---|
34 | paginate: { |
---|
35 | first: "{'First'|translate|escape:'javascript'}", |
---|
36 | previous: "{'Previous'|translate|escape:'javascript'}", |
---|
37 | next: "{'Next'|translate|escape:'javascript'}", |
---|
38 | last: "{'Last'|translate|escape:'javascript'}", |
---|
39 | } |
---|
40 | } |
---|
41 | }); |
---|
42 | |
---|
43 | }); |
---|
44 | {/footer_script} |
---|
45 | |
---|
46 | <div class="titrePage"> |
---|
47 | <h2>{'Ban IP'|@translate}</h2> |
---|
48 | </div> |
---|
49 | {if isset ($ipbangest)} |
---|
50 | <p class="showCreateAlbum" id="showAddIP"> |
---|
51 | <a href="#" id="submitipban" class="icon-plus-circled mouse">{'Ban new IP address'|translate}</a> |
---|
52 | | <a href="{$ipbangest.U_DELETEALL}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><span class="icon-trash mouse"></span>{'Delete all banned IP addresses'|@translate}</a> |
---|
53 | |
---|
54 | </p> |
---|
55 | {/if} |
---|
56 | <div id="banip_edit" style="display: none;"> |
---|
57 | <form method="post"> |
---|
58 | <fieldset> |
---|
59 | <legend>{'Ban new IP address'|@translate}</legend> |
---|
60 | {'IP'|@translate} <input " type="text" name="inserip" data-ip placeholder="123.123.123.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]?|\*)$"> |
---|
61 | <br> |
---|
62 | <br> |
---|
63 | <input class="submit" name="submitaddipban" type="submit" value="{'Add'|@translate}" /> |
---|
64 | </fieldset> |
---|
65 | </form> |
---|
66 | </div> |
---|
67 | {if isset ($ipbangest)} |
---|
68 | <form method="post" > |
---|
69 | <fieldset> |
---|
70 | <legend>{'List IP banned'|@translate}</legend> |
---|
71 | <table id="tablebanip"> |
---|
72 | <thead> |
---|
73 | <tr> |
---|
74 | <th></th> |
---|
75 | </tr> |
---|
76 | </thead> |
---|
77 | <tbody> |
---|
78 | {foreach from=$ipban2 item=ipban} |
---|
79 | <tr> |
---|
80 | <td> |
---|
81 | <div class="lip"> |
---|
82 | <!-- {$ipban.ID} --> {$ipban.IP} |
---|
83 | <span class="actionip" style="display: none"> |
---|
84 | <a href="{$ipban.U_EDIT}"><span class="icon-pencil"></span>{'Edit'|@translate}</a> |
---|
85 | | <a href="{$ipban.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><span class="icon-trash"></span>{'delete'|@translate}</a> |
---|
86 | </span> |
---|
87 | </div> |
---|
88 | </td> |
---|
89 | </tr> |
---|
90 | {/foreach} |
---|
91 | </tbody> |
---|
92 | </table> |
---|
93 | </fieldset> |
---|
94 | </form> |
---|
95 | {/if} |
---|
96 | {if isset ($ipban_edit)} |
---|
97 | <form method="post" id="ipedit"> |
---|
98 | <fieldset> |
---|
99 | <legend>{'Edit IP banned'|@translate}</legend> |
---|
100 | <input type="hidden" name="invisibleID" value="{$ipban_edit.ID}"> |
---|
101 | {'IP'|@translate} <input " type="text" name="inserip" data-ip="1" placeholder="123.123.123.123/123.123.123.*" value="{$ipban_edit.IP}" 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]?|\*)$"> |
---|
102 | <br> |
---|
103 | <br> |
---|
104 | <input class="submit" name="submitaddipban2" data-ip type="submit" value="{'Update'|@translate}" /> |
---|
105 | </fieldset> |
---|
106 | </form> |
---|
107 | {/if} |
---|