Index: extensions/delete_hit/admin/admin.php
===================================================================
--- extensions/delete_hit/admin/admin.php	(revision 5824)
+++ extensions/delete_hit/admin/admin.php	(revision 5824)
@@ -0,0 +1,157 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+global $template, $conf, $user;
+include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php');
+load_language('plugin.lang', HIT_PATH);
+$my_base_url = get_admin_plugin_menu_link(__FILE__);
+
+// +-----------------------------------------------------------------------+
+// | Check Access and exit when user status is not ok                      |
+// +-----------------------------------------------------------------------+
+check_status(ACCESS_ADMINISTRATOR);
+
+//-------------------------------------------------------- sections definitions
+
+
+
+// Gestion des onglets
+if (!isset($_GET['tab']))
+    $page['tab'] = 'all';
+else
+    $page['tab'] = $_GET['tab'];
+
+$tabsheet = new tabsheet();
+$tabsheet->add('all',
+               l10n('hit_onglet_all'),
+               $my_base_url.'&amp;tab=all');
+$tabsheet->add('photo',
+               l10n('hit_onglet_photo'),
+               $my_base_url.'&amp;tab=photo');
+$tabsheet->add('categorie',
+               l10n('hit_onglet_categorie'),
+               $my_base_url.'&amp;tab=categorie');
+
+$tabsheet->select($page['tab']);
+$tabsheet->assign();
+
+// Onglet gestion par photo
+switch ($page['tab'])
+{
+ case 'all':
+
+  $template->assign(
+    'gestion',
+    array(
+
+      ));
+
+//purge photo
+if (isset($_POST['submitchoixall']) and !is_adviser())
+	{
+	$query = '
+UPDATE ' . IMAGES_TABLE . '
+  SET hit= \'0\'
+    ;';
+$result = pwg_query($query);
+	
+	}
+	  
+    break;
+	
+  case 'photo':
+
+//charge la liste des photos
+$groups = array();
+$query = '
+select id,name
+  FROM ' . IMAGES_TABLE . '
+  ORDER BY id ASC;';
+$result = pwg_query($query);
+
+while ($row = mysql_fetch_array($result))
+	{
+  $groups[$row['id']] = $row['id'].' : '.$row['name'];
+	}
+	
+	$selected = 0;
+	$options[] = l10n('hit_select_photo');
+	$options['a'] = '----------------------';
+	
+foreach($groups as $listid => $listid2)
+	{
+    $options[$listid] = $listid2;
+	}
+  $template->assign(
+    'gestionA',
+    array(
+	  'OPTIONS' => $options,
+      'SELECTED' => $selected
+      ));
+
+//purge photo
+if (isset($_POST['submitchoixphoto']) and is_numeric($_POST['delhitphoto'])and (!$_POST['delhitphoto'])==0 and !is_adviser())
+	{
+	$lire=$_POST['delhitphoto'];
+	$query = '
+UPDATE ' . IMAGES_TABLE . '
+  SET hit= \'0\'
+  WHERE id = \''.$lire.'\'
+    ;';
+$result = pwg_query($query);
+	
+	}
+	  
+    break;
+
+// Onglet gestion des meta categorie
+  case 'categorie':
+
+//charge la liste des catégories
+$groups = array();
+$query = '
+select id,name
+  FROM ' . CATEGORIES_TABLE . '
+  ORDER BY id ASC;';
+$result = pwg_query($query);
+
+while ($row = mysql_fetch_array($result))
+	{
+  $groups[$row['id']] = $row['id'].' : '.$row['name'];
+	}
+	
+	$selected = 0;
+	$options[] = l10n('hit_select_cat');
+	$options['a'] = '----------------------';
+	
+foreach($groups as $listid => $listid2)
+	{
+    $options[$listid] = $listid2;
+	}
+  $template->assign(
+    'gestionB',
+    array(
+	  'OPTIONS' => $options,
+      'SELECTED' => $selected
+      ));
+	
+	
+//purge categorie
+if (isset($_POST['submitchoixcat']) and is_numeric($_POST['delhitcat'])and (!$_POST['delhitcat'])==0 and !is_adviser())
+	{
+	$lire=$_POST['delhitcat'];
+	$query = '
+UPDATE ' . IMAGES_TABLE . '
+  SET hit= \'0\'
+  WHERE storage_category_id = \''.$lire.'\'
+    ;';
+$result = pwg_query($query);
+	
+	}
+ 
+    break;
+	
+} 
+
+$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+?>
Index: extensions/delete_hit/admin/admin.tpl
===================================================================
--- extensions/delete_hit/admin/admin.tpl	(revision 5824)
+++ extensions/delete_hit/admin/admin.tpl	(revision 5824)
@@ -0,0 +1,50 @@
+<div class="titrePage">
+  <h2>meta</h2>
+</div>
+
+{if isset ($gestion)}
+	  <h3>{'hit_all'|@translate}</h3>
+	<div>
+		<form method="post" >
+			<div style="text-align:center;">
+				<input class="submit" name="submitchoixall" type="submit" "onclick="return confirm('{'Are you sure?'|@translate}');" value="{'hit_purgeall'|@translate}" {$TAG_INPUT_ENABLED} />
+			</div>
+		</form>
+	</div>
+{/if}
+
+{if isset ($gestionA)}
+	  <h3>{'hit_photo'|@translate}</h3>
+	<div>
+		<form method="post" >
+			<fieldset>
+				<legend>{'hit_listphoto'|@translate}</legend>
+				
+		{html_options name="delhitphoto" options=$gestionA.OPTIONS selected=$gestionA.SELECTED}
+				<br>	
+				<br>
+					<div style="text-align:center;">
+					<input class="submit" name="submitchoixphoto" type="submit" "onclick="return confirm('{'Are you sure?'|@translate}');" value="{'hit_purgephoto'|@translate}" {$TAG_INPUT_ENABLED} />
+					</div>
+			</fieldset>
+		</form>
+	</div>
+{/if}
+
+{if isset ($gestionB)}
+	  <h3>{'hit_cat'|@translate}</h3>
+	<div>
+		<form method="post" >
+			<fieldset>
+				<legend>{'hit_listcat'|@translate}</legend>
+				
+		{html_options name="delhitcat" options=$gestionB.OPTIONS selected=$gestionB.SELECTED}
+				<br>	
+				<br>
+					<div style="text-align:center;">
+					<input class="submit" name="submitchoixcat" type="submit" "onclick="return confirm('{'Are you sure?'|@translate}');" value="{'hit_purgecat'|@translate}" {$TAG_INPUT_ENABLED} />
+					</div>
+			</fieldset>
+		</form>
+	</div>
+{/if}
Index: extensions/delete_hit/admin/index.php
===================================================================
--- extensions/delete_hit/admin/index.php	(revision 5824)
+++ extensions/delete_hit/admin/index.php	(revision 5824)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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/delete_hit/index.php
===================================================================
--- extensions/delete_hit/index.php	(revision 5824)
+++ extensions/delete_hit/index.php	(revision 5824)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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/delete_hit/language/en_UK/description.txt
===================================================================
--- extensions/delete_hit/language/en_UK/description.txt	(revision 5824)
+++ extensions/delete_hit/language/en_UK/description.txt	(revision 5824)
@@ -0,0 +1,1 @@
+delete hit
Index: extensions/delete_hit/language/en_UK/index.php
===================================================================
--- extensions/delete_hit/language/en_UK/index.php	(revision 5824)
+++ extensions/delete_hit/language/en_UK/index.php	(revision 5824)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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/delete_hit/language/en_UK/plugin.lang.php
===================================================================
--- extensions/delete_hit/language/en_UK/plugin.lang.php	(revision 5824)
+++ extensions/delete_hit/language/en_UK/plugin.lang.php	(revision 5824)
@@ -0,0 +1,23 @@
+<?php
+
+//onglet Purge Hit photo
+$lang['hit_onglet_all'] = 'Purge All';
+$lang['hit_all'] = 'Purge all hits on all pictures gallery';
+$lang['hit_purgeall'] = 'Purge all the hits of the gallery';
+
+//onglet Purge Hit photo
+$lang['hit_onglet_photo'] = 'Purge hit of a photo';
+$lang['hit_select'] = 'Select a photo';
+$lang['hit_select_photo'] = 'Select photo';
+$lang['hit_photo'] = 'Choose the photo when you want to purge';
+$lang['hit_listphoto'] = 'Here is a list of your photos';
+$lang['hit_purgephoto'] = 'Purge hit of the picture select';
+
+//onglet purge hit de toutes les images d'une categorie
+$lang['hit_onglet_categorie'] = 'Purge hits a category';
+$lang['hit_select_cat'] = 'Select la category';
+$lang['hit_cat'] = 'Choose the category when you want to purge';
+$lang['hit_listcat'] = 'Here is a list of your categories';
+$lang['hit_purgecat'] = 'Purge hits on all pictures select category';
+
+?>
Index: extensions/delete_hit/language/fr_FR/description.txt
===================================================================
--- extensions/delete_hit/language/fr_FR/description.txt	(revision 5824)
+++ extensions/delete_hit/language/fr_FR/description.txt	(revision 5824)
@@ -0,0 +1,1 @@
+Permet de purger les Hit d'une photo ou de toutes les photos d'une catégorie 
Index: extensions/delete_hit/language/fr_FR/index.php
===================================================================
--- extensions/delete_hit/language/fr_FR/index.php	(revision 5824)
+++ extensions/delete_hit/language/fr_FR/index.php	(revision 5824)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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/delete_hit/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/delete_hit/language/fr_FR/plugin.lang.php	(revision 5824)
+++ extensions/delete_hit/language/fr_FR/plugin.lang.php	(revision 5824)
@@ -0,0 +1,23 @@
+<?php
+
+//onglet Purge Hit photo
+$lang['hit_onglet_all'] = 'Purge Total';
+$lang['hit_all'] = 'Purge tous les hits de toutes les photos de la galerie';
+$lang['hit_purgeall'] = 'Purge tous les hits de la galerie';
+
+//onglet Purge Hit photo
+$lang['hit_onglet_photo'] = 'Purge le hit d\'une photos';
+$lang['hit_select'] = 'Sélectionne une photo';
+$lang['hit_select_photo'] = 'Sélectionne la photo';
+$lang['hit_photo'] = 'Choisiser la photo que vous voulez purger';
+$lang['hit_listphoto'] = 'Voici la liste de vos photos';
+$lang['hit_purgephoto'] = 'Purger le hit de la photo sélectionner';
+
+//onglet purge hit de toutes les images d'une categorie
+$lang['hit_onglet_categorie'] = 'Purger les hits d\'une catégorie';
+$lang['hit_select_cat'] = 'Sélectionnez la catégorie';
+$lang['hit_cat'] = 'Choisiser la catégorie que vous voulez purger';
+$lang['hit_listcat'] = 'Voici la liste de vos catégories';
+$lang['hit_purgecat'] = 'Purger les hits de toutes les photos de la catégorie sélectionner';
+
+?>
Index: extensions/delete_hit/language/index.php
===================================================================
--- extensions/delete_hit/language/index.php	(revision 5824)
+++ extensions/delete_hit/language/index.php	(revision 5824)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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/delete_hit/main.inc.php
===================================================================
--- extensions/delete_hit/main.inc.php	(revision 5824)
+++ extensions/delete_hit/main.inc.php	(revision 5824)
@@ -0,0 +1,27 @@
+<?php
+/*
+Plugin Name: Delete Hit
+Version: 1.0.2
+Description: delete hit
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=374
+Author: ddtddt
+Author URI: http://piwigo.org/
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $prefixeTable;
+
+define('HIT_DIR' , basename(dirname(__FILE__)));
+define('HIT_PATH' , PHPWG_PLUGINS_PATH . HIT_DIR . '/');
+load_language('plugin.lang', HIT_PATH);
+
+add_event_handler('get_admin_plugin_menu_links', 'hit_admin_menu');
+function hit_admin_menu($menu)
+{
+  array_push($menu, array(
+	'NAME' => 'Delete Hit',
+    'URL' => get_admin_plugin_menu_link(HIT_PATH . 'admin/admin.php')));
+  return $menu;
+}
+?>
