Index: extensions/nbc_HistoryIPExcluder/tags/2.0.0/admin/HIPE_admin.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/tags/2.0.0/admin/HIPE_admin.php	(revision 5132)
+++ extensions/nbc_HistoryIPExcluder/tags/2.0.0/admin/HIPE_admin.php	(revision 5132)
@@ -0,0 +1,211 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+load_language('plugin.lang', HIPE_PATH);
+
+
+$ip_geolocalisation1 = '<a href="http://www.geoiptool.com/fr/?IP=';
+$ip_geolocalisation2 = '" title="Geo IP localisation" target="_blank"><img src="'.HIPE_PATH.'/geoip.ico" class="button" alt="'.l10n('IP_geolocalisation').'"></a>';
+
+$ip_ripe1 = '<a href="http://www.ripe.net/whois?form_type=simple&amp;full_query_string=&amp;searchtext=';
+$ip_ripe2 = '+&amp;do_search=Search" title="Ripe Whois" target="_blank">';
+$ip_ripe3 = '</a>';
+
+
+
+if ( isset($_POST['submit']) and !is_adviser() )
+{
+  $v = $_POST['HIPE_IPs_Excluded'];
+  $v = str_replace( "\r\n", ",", $v );
+  $v = str_replace( ",,", ",", $v );
+
+  $conf['nbc_HistoryIPExcluder'] = stripslashes($v);
+
+  $query = '
+    UPDATE '.CONFIG_TABLE.'
+    SET value="'.$conf['nbc_HistoryIPExcluder'].'"
+    WHERE param="nbc_HistoryIPExcluder"
+    LIMIT 1';
+  pwg_query($query);
+
+  // information message
+  array_push($page['infos'], l10n('HIPE_save_config'));
+}
+elseif ( isset($_POST['CleanHist']) )
+{
+  $conf_HIPE = explode("," , $conf['nbc_HistoryIPExcluder']);
+
+  foreach ( $conf_HIPE as $Exclusion )
+  {
+    $query = '
+      delete FROM '.HISTORY_TABLE.' where
+      IP like \''.$Exclusion.'\';';
+    pwg_query($query);
+   }
+
+
+  $query = '
+    truncate '.HISTORY_SUMMARY_TABLE.';';
+  pwg_query($query);
+
+  $query = '
+    UPDATE '.HISTORY_TABLE.'
+    SET summarized = \'false\';';
+  pwg_query($query);
+
+  // information message
+  array_push($page['infos'], l10n('HIPE_hist_cleaned'));
+}
+elseif ( isset($_POST['HIPE_IPByMember']) )
+{
+  $template->assign(
+    array(
+      'HIPE_DESCRIPTION2' => l10n('HIPE_IPByMember_description'),
+    )
+  );
+
+  $query = '
+    select distinct h.ip, u.username
+    from '.HISTORY_TABLE.' as h
+    inner join '.USERS_TABLE.' as u on u.id = h.user_id
+    where h.user_id <> 2
+    order by h.ip
+  ;';
+  
+  $subresult = pwg_query($query);
+
+  while ($subrow = mysql_fetch_array($subresult))
+  {
+    $template->assign(
+      'resultat',
+      array(
+        'HIPE_RESULTAT1' => $ip_geolocalisation1.$subrow['ip'].$ip_geolocalisation2.' '.$ip_ripe1.$subrow['ip'].$ip_ripe2.$subrow['ip'].$ip_ripe3,
+        'HIPE_RESULTAT2' => $subrow['username'],
+      )
+    );    
+  }
+
+  // information message
+  array_push($page['infos'], l10n('HIPE_resquet_ok'));
+}
+elseif ( isset($_POST['HIPE_OnlyGuest']) )
+{
+  $template->assign(
+    array(
+      'HIPE_DESCRIPTION2' => l10n('HIPE_OnlyGuest_description'),
+    )
+  );
+
+  $query1 = '
+    select distinct h.ip
+    from '.HISTORY_TABLE.' as h
+    where h.user_id <> 2
+  ;';
+  
+  $IPsMember = array_from_query($query1, 'ip');
+
+  $query = '
+    select h.ip, count(h.ip) as nbreIP
+    from '.HISTORY_TABLE.' as h
+    where h.ip not in (\''.implode('\',\'', $IPsMember).'\')
+    group by h.ip
+    order by nbreIP desc
+  ;';
+  
+  $subresult = pwg_query($query);
+
+  while ($subrow = mysql_fetch_array($subresult))
+  {
+    $template->assign(
+      'resultat',
+      array(
+        'HIPE_RESULTAT1' => $ip_geolocalisation1.$subrow['ip'].$ip_geolocalisation2.' '.$ip_ripe1.$subrow['ip'].$ip_ripe2.$subrow['ip'].$ip_ripe3,
+        'HIPE_RESULTAT2' => $subrow['nbreIP'],
+      )
+    );    
+  }
+
+  // information message
+  array_push($page['infos'], l10n('HIPE_resquet_ok'));
+}
+elseif ( isset($_POST['HIPE_IPForMember']) and isset($_POST['HIPE_input']))
+{
+  $template->assign(
+    array(
+      'HIPE_DESCRIPTION2' => l10n('HIPE_IPForMember_description'),
+    )
+  );
+
+  $query = '
+    select h.ip, u.username
+    from '.HISTORY_TABLE.' as h 
+    inner join '.USERS_TABLE.' as u on u.id = h.user_id
+    where u.username like \''.$_POST['HIPE_input'].'\'
+    group by h.ip
+    order by h.ip
+  ;';
+  
+  $subresult = pwg_query($query);
+
+  while ($subrow = mysql_fetch_array($subresult))
+  {
+    $template->assign(
+      'resultat',
+      array(
+        'HIPE_RESULTAT1' => $subrow['username'],
+        'HIPE_RESULTAT2' => $ip_geolocalisation1.$subrow['ip'].$ip_geolocalisation2.' '.$ip_ripe1.$subrow['ip'].$ip_ripe2.$subrow['ip'].$ip_ripe3,
+      )
+    );    
+  }
+
+  // information message
+  array_push($page['infos'], l10n('HIPE_resquet_ok'));
+}
+elseif ( isset($_POST['HIPE_MemberForIp']) and isset($_POST['HIPE_input']))
+{
+  $template->assign(
+    array(
+      'HIPE_DESCRIPTION2' => l10n('HIPE_MemberForIp_description'),
+    )
+  );
+
+  $query = '
+    select h.ip, u.username
+    from '.HISTORY_TABLE.' as h 
+    inner join '.USERS_TABLE.' as u on u.id = h.user_id
+    where h.ip like \''.$_POST['HIPE_input'].'\'
+    group by u.username
+    order by u.username
+  ;';
+  
+  $subresult = pwg_query($query);
+
+  while ($subrow = mysql_fetch_array($subresult))
+  {
+    $template->assign(
+      'resultat',
+      array(
+        'HIPE_RESULTAT1' => $ip_geolocalisation1.$subrow['ip'].$ip_geolocalisation2.' '.$ip_ripe1.$subrow['ip'].$ip_ripe2.$subrow['ip'].$ip_ripe3,
+        'HIPE_RESULTAT2' => $subrow['username'],
+      )
+    );    
+  }
+
+  // information message
+  array_push($page['infos'], l10n('HIPE_resquet_ok'));
+}
+
+$conf_HIPE = explode("," , $conf['nbc_HistoryIPExcluder']);
+
+$template->assign(
+  array(
+    'HIPE_F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=plugin&section=nbc_HistoryIPExcluder%2Fadmin%2FHIPE_admin.php',
+    'IPs_EXCLUDED' => implode("\n", $conf_HIPE),
+  )
+);
+
+  $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/HIPE_admin.tpl');
+  $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+
+?>
Index: extensions/nbc_HistoryIPExcluder/tags/2.0.0/admin/HIPE_admin.tpl
===================================================================
--- extensions/nbc_HistoryIPExcluder/tags/2.0.0/admin/HIPE_admin.tpl	(revision 5132)
+++ extensions/nbc_HistoryIPExcluder/tags/2.0.0/admin/HIPE_admin.tpl	(revision 5132)
@@ -0,0 +1,59 @@
+<div class="titrePage">
+  <h2>{'HIPE_admin_title'|@translate}</h2>
+</div>
+
+<p>{'HIPE_description'|@translate}</p>
+
+<form method="post" action="{$HIPE_F_ACTION}" class="general">
+  <fieldset>
+    <legend>{'HIPE_admin_section1'|@translate}</legend>
+
+    <br>
+
+    <label>{'HIPE_admin_description1'|@translate}</label>
+    
+    <div style="text-align:center;">
+      <textarea name="HIPE_IPs_Excluded" rows="10" cols="60" {$TAG_INPUT_ENABLED}>{$IPs_EXCLUDED}</textarea>
+    </div>
+    
+    <p><input type="submit" name="submit" value="{'submit'|@translate}" class="bouton" {$TAG_INPUT_ENABLED}> <input type="submit" name="CleanHist" value="{'HIPE_CleanHist'|@translate}" class="bouton" {$TAG_INPUT_ENABLED}></p>
+  
+  </fieldset>
+
+  <fieldset>
+    <legend>{'HIPE_admin_section2'|@translate}</legend>
+  
+      <p style="text-align:center;">
+        <input type="submit" name="HIPE_IPByMember" value="{'HIPE_IPByMember'|@translate}" class="bouton" {$TAG_INPUT_ENABLED}>
+        <input type="submit" name="HIPE_OnlyGuest" value="{'HIPE_OnlyGuest'|@translate}" class="bouton" {$TAG_INPUT_ENABLED}>
+      </p>
+  
+      <p style="text-align:center;">
+        <input type="submit" name="HIPE_MemberForIp" value="{'HIPE_MemberForIp'|@translate}" class="bouton" {$TAG_INPUT_ENABLED}>
+		    <input type="text" name="HIPE_input" value="" size="20" style="text-align: center;" {$TAG_INPUT_ENABLED}>
+        <input type="submit" name="HIPE_IPForMember" value="{'HIPE_IPForMember'|@translate}" class="bouton" {$TAG_INPUT_ENABLED}>
+      </p>
+
+    <fieldset>
+      <legend>{'HIPE_admin_section3'|@translate}</legend>
+	 
+      <label>{$HIPE_DESCRIPTION2}</label>
+
+      <p style="text-align:center;">
+      <table>
+      <!-- BEGIN resultat -->
+        <tr>
+          <td>{$resultat.HIPE_RESULTAT1}</td>
+          <td>{$resultat.HIPE_RESULTAT2}</td>
+          <td>{$resultat.HIPE_RESULTAT3}</td>
+          <td>{$resultat.HIPE_RESULTAT4}</td>
+          <td>{$resultat.HIPE_RESULTAT5}</td>
+        </tr>
+      <!-- END resultat -->
+      </table>
+
+    </fieldset>
+    
+  </fieldset>
+
+</form>
Index: extensions/nbc_HistoryIPExcluder/tags/2.0.0/admin/index.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/tags/2.0.0/admin/index.php	(revision 5132)
+++ extensions/nbc_HistoryIPExcluder/tags/2.0.0/admin/index.php	(revision 5132)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/nbc_HistoryIPExcluder/tags/2.0.0/index.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/tags/2.0.0/index.php	(revision 5132)
+++ extensions/nbc_HistoryIPExcluder/tags/2.0.0/index.php	(revision 5132)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/en_UK/index.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/en_UK/index.php	(revision 5132)
+++ extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/en_UK/index.php	(revision 5132)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/en_UK/plugin.lang.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/en_UK/plugin.lang.php	(revision 5132)
+++ extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/en_UK/plugin.lang.php	(revision 5132)
@@ -0,0 +1,29 @@
+<?php
+global $lang;
+
+$lang['HIPE_admin_title'] = 'NBC History IP Excluder';
+$lang['HIPE_description'] = 'This plugin allows to exclude from the history and statistics of IP or IP ranges. <br>Its activation blocks record in the table of IP *_history specified in the table below.';
+$lang['HIPE_admin_section1'] = 'IP Exclusion';
+$lang['HIPE_admin_description1'] = 'Enter the complete IP or IP ranges to exclude (one per line) in the box below. To specify an IP range, use the wildcard character "%".<br>Example : 74.6.1.2 or 74.6.%';
+$lang['HIPE_save_config']='Configuration saved.';
+$lang['HIPE_CleanHist']='Clean History';
+
+$lang['HIPE_admin_section2'] = 'Queries on history table';
+$lang['HIPE_admin_section3'] = 'Result of the historic request';
+$lang['HIPE_IPByMember'] = 'IPs by member';
+$lang['HIPE_IPByMember_description'] = 'Show the IPs used by members, sorted by IP';
+$lang['HIPE_OnlyGuest'] = 'Only Guests IPs';
+$lang['HIPE_OnlyGuest_description'] = 'Show the IPs only used by Guests and the number of times it\'s found in the history table, sorted by the number of times';
+$lang['HIPE_IPnoGuest'] = '';
+$lang['HIPE_IPnoGuest_description'] = '';
+
+$lang['HIPE_IPForMember'] = 'IPs for a member';
+$lang['HIPE_IPForMember_description'] = 'Search and displays the IPs associated with a registered user (sorted by IP)';
+$lang['HIPE_MemberForIp'] = 'Members for one IP';
+$lang['HIPE_MemberForIp_description'] = 'Search and display users attached to one IP (sorted by name)';
+
+$lang['HIPE_resquet_ok'] = 'Request OK.';
+$lang['HIPE_hist_cleaned'] = 'Cleaning of the history table done.';
+
+$lang['IP_geolocalisation'] = 'Geolocalisation';
+?>
Index: extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/fr_FR/index.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/fr_FR/index.php	(revision 5132)
+++ extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/fr_FR/index.php	(revision 5132)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/fr_FR/plugin.lang.php	(revision 5132)
+++ extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/fr_FR/plugin.lang.php	(revision 5132)
@@ -0,0 +1,29 @@
+<?php
+global $lang;
+
+$lang['HIPE_admin_title'] = 'NBC History IP Excluder';
+$lang['HIPE_description'] = 'Ce plugin permet d\'exclure de l\'historique et des statistiques des IP ou plages d\'IP.<br>Son activation bloque l\'enregistrement dans la table *_history des IP spécifiées dans le tableau ci-dessous.';
+$lang['HIPE_admin_section1'] = 'IP à exclure';
+$lang['HIPE_admin_description1'] = 'Saisissez les IP complètes ou plages d\'IP à exclure (une par ligne) dans le cadre ci-dessous. Pour indiquer une plage d\'IP, utilisez le caractère joker "%".<br>Par exemple : 74.6.2.1 ou 74.6.%<br><br>';
+$lang['HIPE_save_config']='Configuration enregistrée.';
+$lang['HIPE_CleanHist']='Nettoyer l\'historique';
+
+$lang['HIPE_admin_section2'] = 'Requêtes sur l\'historique';
+$lang['HIPE_admin_section3'] = 'Résultat de la requête sur l\'historique';
+$lang['HIPE_IPByMember'] = 'IP d\'utilisateurs';
+$lang['HIPE_IPByMember_description'] = 'Recherche et affiche les IP d\'utilisateurs inscrits, (tri par IP)';
+$lang['HIPE_OnlyGuest'] = 'IP d\'invités seulement';
+$lang['HIPE_OnlyGuest_description'] = 'Recherche et affiche uniquement les IP utilisées par des invités, et le nombre de visites associées (tri par nombre de visites par IP)';
+$lang['HIPE_IPnoGuest'] = '';
+$lang['HIPE_IPnoGuest_description'] = '';
+
+$lang['HIPE_IPForMember'] = 'IP d\'un utilisateur';
+$lang['HIPE_IPForMember_description'] = 'Recherche et affiche les IP associées à un utilisateur inscrit (tri par IP)';
+$lang['HIPE_MemberForIp'] = 'Utilisateurs d\'une IP';
+$lang['HIPE_MemberForIp_description'] = 'Recherche et affiche les utilisateurs attachés à une IP (tri par utilisateur)';
+
+$lang['HIPE_resquet_ok'] = 'Requête exécutée.';
+$lang['HIPE_hist_cleaned'] = 'Nettoyage de l\'historique effectué.';
+
+$lang['IP_geolocalisation'] = 'Géolocalisation';
+?>
Index: extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/index.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/index.php	(revision 5132)
+++ extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/index.php	(revision 5132)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/it_IT/index.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/it_IT/index.php	(revision 5132)
+++ extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/it_IT/index.php	(revision 5132)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/it_IT/plugin.lang.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/it_IT/plugin.lang.php	(revision 5132)
+++ extensions/nbc_HistoryIPExcluder/tags/2.0.0/language/it_IT/plugin.lang.php	(revision 5132)
@@ -0,0 +1,29 @@
+<?php
+global $lang;
+
+$lang['HIPE_admin_title'] = 'NBC History IP Excluder';
+$lang['HIPE_description'] = 'Questo plugin permette di escludere dalla storia e le statistiche di IP o intervalli di indirizzi IP.<br> il suo record di attivazione blocchi nella tabella di IP *_history specificato nella tabella sottostante.';
+$lang['HIPE_admin_section1'] = 'Esclusione d\'IP';
+$lang['HIPE_admin_description1'] = 'Riempite le tabella sottostante con gli indirizzi IP o intervalli da escludere (uno per riga). Potete usare degli IP completi o una serie usando il carattere jolly "%".<br>Per esempio : 74.6.2.1 o 74.6.%<br><br>';
+$lang['HIPE_save_config']='Configurazione registrata.';
+$lang['HIPE_CleanHist']='Ripulire la cronologgia';
+
+$lang['HIPE_admin_section2'] = 'Selezioni sulla cronologgia';
+$lang['HIPE_admin_section3'] = 'Risultato della selezione';
+$lang['HIPE_IPByMember'] = 'IP per utente';
+$lang['HIPE_IPByMember_description'] = 'Visualizza gli indirizzi IP legati a degli utenti, per indirizzo';
+$lang['HIPE_OnlyGuest'] = 'IP solo degli ospiti';
+$lang['HIPE_OnlyGuest_description'] = 'Visualizza gli indirizzi IP usati unicamente dagli ospiti e il numero di volte che appaiono nella base, per numero di volte per IP';
+$lang['HIPE_IPnoGuest'] = '';
+$lang['HIPE_IPnoGuest_description'] = '';
+
+$lang['HIPE_IPForMember'] = 'IP di un\'utente';
+$lang['HIPE_IPForMember_description'] = 'Visualizza gli indirizzi IP legati agli utenti, per IP';
+$lang['HIPE_MemberForIp'] = 'Utenti di un\'indirizzo IP';
+$lang['HIPE_MemberForIp_description'] = 'Visualizza gli utenti legati ad un\'indirizzo IP, per utente';
+
+$lang['HIPE_resquet_ok'] = 'Esecuzzione della selezzione riuscita.';
+$lang['HIPE_hist_cleaned'] = 'Operazzione di "pulizzia" della cronologgia riuscito.';
+
+$lang['IP_geolocalisation'] = 'Geolocalizzazione';
+?>
Index: extensions/nbc_HistoryIPExcluder/tags/2.0.0/main.inc.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/tags/2.0.0/main.inc.php	(revision 5132)
+++ extensions/nbc_HistoryIPExcluder/tags/2.0.0/main.inc.php	(revision 5132)
@@ -0,0 +1,65 @@
+<?php
+/*
+Plugin Name: NBC History IP Excluder
+Version: 2.0.0
+Description: Permet l'exclusion d'une IP ou d'une plage d'IP de l historique - Excludes one IP or a range of IP from the history. plugin directement derive de Stats Ip Excluder de Eric 
+Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=147
+Author: Nicco, Eric
+Author URI: http://gallery-nicco.no-ip.org - http://www.infernoweb.net
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+if (!defined('HIPE_DIR')) define('HIPE_DIR' , basename(dirname(__FILE__)));
+if (!defined('HIPE_PATH')) define('HIPE_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
+
+load_language('plugin.lang', HIPE_PATH);
+
+add_event_handler('pwg_log_allowed', 'HIPE_IP_Filtrer');
+add_event_handler('get_admin_plugin_menu_links', 'HIPE_admin_menu');
+
+/* Set the administration panel of the plugin */
+function HIPE_admin_menu($menu)
+{
+  array_push($menu,
+    array(
+      'NAME' => 'History IP Excluder',
+      'URL' => get_admin_plugin_menu_link(HIPE_PATH.'admin/HIPE_admin.php')
+    )
+  );
+    
+  return $menu;
+}
+
+
+function HIPE_IP_Filtrer($do_log)
+{
+  global $conf;
+
+  $conf_HIPE = explode("," , $conf['nbc_HistoryIPExcluder']);
+
+  if (!$do_log)
+    return $do_log;
+  else
+  {
+    $IP_Client = explode('.', $_SERVER['REMOTE_ADDR']);
+  
+    foreach ($conf_HIPE as $Exclusion)
+    {
+      $IP_Exclude = explode('.', $Exclusion);
+  
+      if (
+        (($IP_Client[0] == $IP_Exclude[0]) or ($IP_Exclude[0] == '%')) and
+        (!isset($IP_Exclude[1]) or ($IP_Client[1] == $IP_Exclude[1]) or ($IP_Exclude[1] == '%')) and
+        (!isset($IP_Exclude[2]) or ($IP_Client[2] == $IP_Exclude[2]) or ($IP_Exclude[2] == '%')) and
+        (!isset($IP_Exclude[3]) or ($IP_Client[3] == $IP_Exclude[3]) or ($IP_Exclude[3] == '%'))
+      )
+      {
+        $do_log = false;
+      }    
+    }
+     
+    return $do_log;
+  }
+}
+?>
Index: extensions/nbc_HistoryIPExcluder/tags/2.0.0/maintain.inc.php
===================================================================
--- extensions/nbc_HistoryIPExcluder/tags/2.0.0/maintain.inc.php	(revision 5132)
+++ extensions/nbc_HistoryIPExcluder/tags/2.0.0/maintain.inc.php	(revision 5132)
@@ -0,0 +1,33 @@
+<?php
+
+function plugin_install()
+{
+  global $conf;
+  
+  $default= array();
+
+  $q = '
+INSERT INTO '.CONFIG_TABLE.' (param,value,comment)
+VALUES ("nbc_HistoryIPExcluder","","Parametres nbc History IP Excluder");
+';
+      
+  pwg_query($q);
+}
+
+
+function plugin_uninstall()
+{
+  global $conf;
+
+  if (isset($conf['nbc_HistoryIPExcluder']))
+  {
+    $q = '
+DELETE FROM '.CONFIG_TABLE.'
+WHERE param="nbc_HistoryIPExcluder" LIMIT 1;
+';
+
+    pwg_query($q);
+  }
+}
+
+?>
