Changeset 31394


Ignore:
Timestamp:
03/04/16 22:34:26 (4 years ago)
Author:
ddtddt
Message:

[extensions] - BanIP - update disign / language

Location:
extensions/BanIP
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/BanIP/admin.php

    r31375 r31394  
    4141 
    4242    $tabsheet = new tabsheet(); 
    43     $tabsheet->add('banip', l10n('IP ban'), BANIP_ADMIN . '-banip'); 
     43    $tabsheet->add('banip', l10n('Ban IP'), BANIP_ADMIN . '-banip'); 
    4444    $tabsheet->select($page['tab']); 
    4545    $tabsheet->assign(); 
     
    4747switch ($page['tab']) { 
    4848    case 'banip': 
    49           $template->assign( 
     49    $admin_base_url = BANIP_ADMIN . '-banip';    
     50        $template->assign( 
    5051       'ipbangest', array( 
    51        'A' => 'a' 
     52          'U_DELETEALL' => $admin_base_url . '&deleteall', 
    5253    )); 
    5354        $ipban = pwg_query("SELECT * FROM " . BANIP_TABLE . ";"); 
     
    5556        $template->func_combine_css(array('id'=>'dst','path'=>BANIP_PATH.'banip.css')); 
    5657         
    57     $admin_base_url = BANIP_ADMIN . '-banip'; 
     58    
    5859        if (pwg_db_num_rows($ipban)) { 
    5960            while ($ipban2 = pwg_db_fetch_assoc($ipban)) { 
     
    9293 
    9394 
    94 if (isset($_POST['submitdeleteall'])) { 
     95  if (isset($_GET['deleteall'])) { 
    9596        $query = 'DELETE FROM ' . BANIP_TABLE . ';'; 
    9697    pwg_query($query); 
    9798        redirect($admin_base_url); 
    98 } 
     99  } 
     100 
    99101 
    100102//add ban 
  • extensions/BanIP/admin.tpl

    r31375 r31394  
     1{footer_script} 
     2jQuery(document).ready(function(){ 
     3 
     4  jQuery('#submitipban').click(function(){ 
     5    jQuery("#banip_edit").toggle(); 
     6        jQuery("#ipedit").hide(); 
     7    jQuery("input[name=submitaddipban]").focus(); 
     8  }); 
     9   
     10  jQuery('.lip').mouseover(function(){ 
     11    jQuery(this).children('span').show(); 
     12  }); 
     13  jQuery('.lip').mouseout(function(){ 
     14    jQuery(this).children('span').hide(); 
     15  }); 
     16 
     17}); 
     18{/footer_script} 
     19 
    120<div class="titrePage"> 
    2   <h2>{'IP ban'|@translate}</h2> 
     21  <h2>{'Ban IP'|@translate}</h2> 
    322</div> 
     23{if isset ($ipbangest)} 
     24        <p class="showCreateAlbum" id="showAddIP"> 
     25          <a href="#" id="submitipban" class="icon-plus-circled mouse">{'Ban new IP address'|translate}</a> 
     26    | <a href="{$ipbangest.U_DELETEALL}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><span class="icon-trash mouse"></span>{'Delete all IP Ban'|@translate}</a>   
     27 
     28        </p> 
     29{/if} 
     30  <div id="banip_edit" style="display: none;"> 
     31        <form method="post"> 
     32                <fieldset> 
     33                        <legend>{'Ban new IP address'|@translate}</legend> 
     34                        {'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]?|\*)$"> 
     35                        <br> 
     36                        <br> 
     37                        <input class="submit" name="submitaddipban" type="submit" value="{'Add'|@translate}" /> 
     38                </fieldset> 
     39        </form> 
     40  </div> 
    441{if isset ($ipbangest)} 
    542<form method="post" > 
    643        <fieldset> 
    7                 <input class="submit" name="submitipban" type="submit" value="{'Add IP ban or IP address range'|@translate}" /> 
    8                 <input class="submit" name="submitdeleteall" type="submit" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');" value="{'Delete all IP Ban'|@translate}"/> 
    9         </fieldset> 
    10 </form> 
    11 {/if} 
    12 {if isset ($ipban_add)} 
    13         <form method="post"> 
    14                 <fieldset> 
    15                         <legend>{'Add IP ban or IP address range'|@translate}</legend> 
    16                         {'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]?|\*)$"> 
    17                         <br> 
    18                         <br> 
    19                                 <div style="text-align:center;"> 
    20                                 <input class="submit" name="submitaddipban" type="submit" value="{'Submit'|@translate}" /> 
    21                                 </div> 
    22                 </fieldset> 
    23         </form> 
    24 {/if} 
    25 {if isset ($ipbangest)} 
    26 <form method="post" > 
    27         <fieldset> 
    28           <legend>{'List IP banned and IP address range'|@translate}</legend> 
    29            <table class="lban"> 
     44          <legend>{'List IP banned'|@translate}</legend> 
    3045                {foreach from=$ipban2 item=ipban} 
    31                   <tr> 
    32                         <td><!-- {$ipban.ID} --> {$ipban.IP}</td> 
    33                         <td> 
    34                         <a href="{$ipban.U_EDIT}"> 
    35                                 <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/edit_s.png" alt="{'edit'|@translate}" title="{'edit'|@translate}" /> 
    36                         </a> 
    37                         <a href="{$ipban.U_DELETE}" onclick="return confirm( document.getElementById('btn_delete').title + '\n\n' + '{'Are you sure?'|@translate|@escape:'javascript'}');"> 
    38                                 <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/delete.png" id="btn_delete" alt="{'delete'|@translate}" title="{'Delete'|@translate}" /> 
    39                         </a> 
    40                         </td> 
    41                   </tr> 
     46                        <div class="lip"> 
     47                        <!-- {$ipban.ID} --> {$ipban.IP} 
     48                          <span class="actionip" style="display: none"> 
     49                                <a href="{$ipban.U_EDIT}"><span class="icon-pencil"></span>{'Edit'|@translate}</a> 
     50                                | <a href="{$ipban.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><span class="icon-trash"></span>{'delete'|@translate}</a> 
     51                          </span> 
     52                        </div> 
    4253                {/foreach} 
    4354         </table> 
     
    4657{/if} 
    4758{if isset ($ipban_edit)} 
    48         <form method="post" > 
     59        <form method="post" id="ipedit"> 
    4960                <fieldset> 
    50                         <legend>{'Edit IP banned or IP address range'|@translate}</legend> 
     61                        <legend>{'Edit IP banned'|@translate}</legend> 
    5162                        <input type="hidden" name="invisibleID" value="{$ipban_edit.ID}"> 
    5263                        {'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]?|\*)$"> 
    5364                        <br>     
    5465                        <br> 
    55                                 <div style="text-align:center;"> 
    56                                 <input class="submit" name="submitaddipban2" data-ip type="submit" value="{'Submit'|@translate}" /> 
    57                                 </div> 
     66                        <input class="submit" name="submitaddipban2" data-ip type="submit" value="{'Update'|@translate}" /> 
    5867                </fieldset> 
    5968        </form> 
  • extensions/BanIP/banip.css

    r31368 r31394  
    1 input:required{ 
    2   background:url(aste.jpg) 98% center no-repeat; 
    3 } 
    41input:focus:invalid{ 
    52  border-color:#FF0000; 
     
    2118  background-color:green; 
    2219} 
     20 
     21.mouse:hover{ 
     22    cursor:pointer; 
     23} 
  • extensions/BanIP/language/en_UK/description.txt

    r31375 r31394  
    1 Ban adresse IP or range adresse IP 
     1Ban adresse IP or range adresse IP. 
  • extensions/BanIP/language/en_UK/plugin.lang.php

    r31375 r31394  
    2222//admin 
    2323$lang['IP ban'] = 'IP ban'; 
     24$lang['Range IP address banned'] = 'Range IP address banned'; 
     25$lang['Ban IP'] = 'Ban IP'; 
    2426$lang['IP ban deleted'] = 'IP ban deleted'; 
    25 $lang['Ip ban update'] = 'Ip ban update'; 
    26 $lang['Ip ban insert'] = 'Ip ban insert'; 
    27 $lang['Add IP ban or IP address range'] = 'Add IP ban or IP address range'; 
    28 $lang['IP banned'] = 'IP banned'; 
    29 $lang['List IP banned and IP address range'] = 'List IP banned and IP address range'; 
    30 $lang['Edit IP banned or IP address range'] = 'Edit IP banned or IP address range'; 
    31 $lang['IP'] = 'IP'; 
    32 $lang['Ban IP'] = 'Ban IP'; 
    33 $lang['Range IP address banned'] = 'Range IP address banned'; 
    34 $lang['Delete all IP Ban'] = 'Delete all IP Ban'; 
    3527$lang['This Isn\'t an IP'] = 'This Isn\'t an IP'; 
    3628$lang['Range IP already banned'] = 'Range IP already banned'; 
    3729$lang['IP is in a range banned'] = 'IP is in a range banned'; 
    38 $lang['IP is in a range banned'] = 'IP is in a range banned'; 
    3930$lang['IP already banned'] = 'IP already banned'; 
    40 $lang['Range Ip ban update'] = 'Range Ip ban update'; 
     31$lang['Range Ip ban insert'] = 'Range Ip ban insert'; 
     32$lang['Ip ban insert'] = 'Ip ban insert'; 
     33$lang['Ip ban update'] = 'Ip ban update'; 
     34$lang['Delete all banned IP addresses'] = 'Delete all banned IP addresses'; 
     35$lang['Ban new IP address'] = 'Ban new IP address'; 
     36$lang['IP'] = 'IP'; 
     37$lang['List IP banned'] = 'List IP banned'; 
     38$lang['Edit IP banned'] = 'Edit IP banned'; 
     39$lang['Update'] = 'Update'; 
     40 
  • extensions/BanIP/language/fr_FR/description.txt

    r31368 r31394  
    1 Bannir une adresses ip ou une plage d'adresse ip 
     1Bannir une adresses ip ou une plage d'adresse ip. 
  • extensions/BanIP/main.inc.php

    r31373 r31394  
    33Plugin Name: BanIP 
    44Version: auto 
    5 Description: Ban IP 
    6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid= 
     5Description: Ban adresse IP or range adresse IP. 
     6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=824 
    77Author: ddtddt 
    88Author URI: http://www.temmii.com 
Note: See TracChangeset for help on using the changeset viewer.