Changeset 31372


Ignore:
Timestamp:
02/27/16 08:52:46 (4 years ago)
Author:
ddtddt
Message:

[extensions] - AntiAspi - update page admin ip ban / update language

Location:
extensions/AntiAspi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/AntiAspi/admin.php

    r31371 r31372  
    3131          $template->assign( 
    3232       'ipbangest', array( 
    33        'A' => 'a' 
     33       'A' => 'a', 
    3434    )); 
    3535        $ipban = pwg_query("SELECT * FROM " . ANTIASPI_TABLE . ";"); 
    36  
     36    $antiaspi = safe_unserialize($conf['antiaspi']); 
    3737         
    3838    $admin_base_url = ANTIASPI_ADMIN . '-ipban'; 
     
    6666    pwg_query($query); 
    6767        redirect($admin_base_url); 
    68 } 
    69    
     68  } 
     69  if (isset($_POST['submitdeletedeprecated'])) { 
     70        $query = 'DELETE FROM ' . ANTIASPI_TABLE . ' WHERE date < ADDTIME(NOW(), "-' . $antiaspi['banned during'] . '");'; 
     71        pwg_query($query); 
     72        redirect($admin_base_url); 
     73  } 
    7074        break; 
    7175        case 'ipconfig': 
     
    9296 
    9397$onlyguest = array( 
    94 l10n('yes'), 
    95 l10n('no'), 
     98l10n('Yes'), 
     99l10n('No'), 
    96100); 
    97101$onlyguestv = array( 
     
    100104); 
    101105$onlypicture = array( 
    102 l10n('yes'), 
    103 l10n('no'), 
     106l10n('Yes'), 
     107l10n('No'), 
    104108); 
    105109$onlypicturev = array( 
  • extensions/AntiAspi/admin.tpl

    r31371 r31372  
    4343                <form method="post" > 
    4444                        <div style="text-align:center;"> 
    45                                 <input class="submit" name="submitdeleteall" type="submit" "onclick="return confirm('{'Are you sure?'|@translate}');" value="{'Delete all IP Ban'|@translate}"/> 
     45                                <input class="submit" name="submitdeleteall" type="submit" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');" value="{'Delete all IP Ban'|@translate}"/> 
     46                                <input class="submit" name="submitdeletedeprecated" type="submit" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');" value="{'Delete deprecated IP Ban'|@translate}"/> 
    4647                        </div> 
    47                 </form>   
     48                </form> 
    4849        </fieldset> 
    4950<form method="post" > 
  • extensions/AntiAspi/language/en_UK/plugin.lang.php

    r31366 r31372  
    44$lang['IP ban'] = 'IP ban'; 
    55$lang['IP ban deleted'] = 'IP ban deleted'; 
    6 $lang['Ip ban update'] = 'Ip ban update'; 
    7 $lang['Ip ban insert'] = 'Ip ban insert'; 
    8 $lang['Add IP ban'] = 'Add IP ban'; 
    9 $lang['IP banned'] = 'IP banned'; 
    106$lang['List IP banned'] = 'List IP banned'; 
    11 $lang['IP banned edit'] = 'IP banned edit'; 
     7$lang['Action IP banned'] = 'Action IP banned'; 
     8$lang['IP banned if'] = 'IP banned if'; 
     9$lang['different pages viewed in'] = 'different pages viewed in'; 
     10$lang['IP banned if same'] = 'IP banned if same'; 
     11$lang['different pages viewed in <span></span> seconds'] = 'different pages viewed in <span></span> seconds'; 
     12$lang['only guest'] = 'only guest'; 
     13$lang['If yes, don\'t ban registered users'] = 'If yes, don\'t ban registered users'; 
     14$lang['only picture'] = 'only picture'; 
     15$lang['If yes, apply antiaspi only on picture page'] = 'If yes, apply antiaspi only on picture page'; 
     16$lang['Add IP allowed'] = 'Add IP allowed'; 
     17$lang['IP'] = 'IP'; 
     18$lang['IP already allowed'] = 'IP already allowed'; 
    1219 
  • extensions/AntiAspi/main.inc.php

    r31370 r31372  
    6161    FROM ' . ANTIASPI_TABLE . ' 
    6262    WHERE ip="' . $Vip . '" 
    63     AND date > ADDTIME(NOW(), "-' . $antiaspi['banned during'] . '");'; 
     63        AND date > ADDTIME(NOW(), "-' . $antiaspi['banned during'] . '");'; 
     64    
     65        /* Change for subdate for change conf by nb day; 
     66        AND date > SUBDATE(NOW(), INTERVAL ' . $antiaspi['banned during'] . ' DAY);'; 
     67        */ 
    6468 
    6569  $result = pwg_query($query); 
Note: See TracChangeset for help on using the changeset viewer.