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.*/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 | {if isset ($ipban2)} |
---|
79 | {foreach from=$ipban2 item=ipban} |
---|
80 | <tr> |
---|
81 | <td> |
---|
82 | <div class="lip"> |
---|
83 | <!-- {$ipban.ID} --> {$ipban.IP} |
---|
84 | <span class="actionip" style="display: none"> |
---|
85 | <a href="{$ipban.U_EDIT}"><span class="icon-pencil"></span>{'Edit'|@translate}</a> |
---|
86 | | <a href="{$ipban.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><span class="icon-trash"></span>{'delete'|@translate}</a> |
---|
87 | </span> |
---|
88 | </div> |
---|
89 | </td> |
---|
90 | </tr> |
---|
91 | {/foreach} |
---|
92 | {/if} |
---|
93 | </tbody> |
---|
94 | </table> |
---|
95 | </fieldset> |
---|
96 | </form> |
---|
97 | {/if} |
---|
98 | {if isset ($ipban_edit)} |
---|
99 | <form method="post" id="ipedit"> |
---|
100 | <fieldset> |
---|
101 | <legend>{'Edit IP banned'|@translate}</legend> |
---|
102 | <input type="hidden" name="invisibleID" value="{$ipban_edit.ID}"> |
---|
103 | {'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]?|\*)$"> |
---|
104 | <br> |
---|
105 | <br> |
---|
106 | <input class="submit" name="submitaddipban2" data-ip type="submit" value="{'Update'|@translate}" /> |
---|
107 | </fieldset> |
---|
108 | </form> |
---|
109 | {/if} |
---|