Index: extensions/reset_level/admin/admin.php
===================================================================
--- extensions/reset_level/admin/admin.php	(revision 9752)
+++ extensions/reset_level/admin/admin.php	(revision 9752)
@@ -0,0 +1,58 @@
+<?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', DELLE_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
+
+
+
+// Gest tab
+if (!isset($_GET['tab']))
+    $page['tab'] = 'plugdelleall';
+else
+    $page['tab'] = $_GET['tab'];
+
+$tabsheet = new tabsheet();
+$tabsheet->add('plugdelleall',
+               l10n('delle_onglet_all'),
+               $my_base_url.'&amp;tab=plugdelleall');
+$tabsheet->select($page['tab']);
+$tabsheet->assign();
+
+// Onglet gestion par photo
+switch ($page['tab'])
+{
+ case 'plugdelleall':
+
+  $template->assign(
+    'gestion',
+    array(
+
+      ));
+
+//purge photo
+if (isset($_POST['submitchoixall']) and !is_adviser())
+	{
+	$query = '
+UPDATE ' . IMAGES_TABLE . '
+  SET level= \'0\'
+    ;';
+$result = pwg_query($query);
+ invalidate_user_cache();
+	array_push( $page['infos'], l10n('delle_totalok') );
+	}
+	  
+    break;
+}
+	
+$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+?>
Index: extensions/reset_level/admin/admin.tpl
===================================================================
--- extensions/reset_level/admin/admin.tpl	(revision 9752)
+++ extensions/reset_level/admin/admin.tpl	(revision 9752)
@@ -0,0 +1,14 @@
+<div class="titrePage">
+  <h2>Reset Level</h2>
+</div>
+
+{if isset ($gestion)}
+	  <h3>{'delle_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="{'delle_purgeall'|@translate}" {$TAG_INPUT_ENABLED} />
+			</div>
+		</form>
+	</div>
+{/if}
Index: extensions/reset_level/admin/index.php
===================================================================
--- extensions/reset_level/admin/index.php	(revision 9752)
+++ extensions/reset_level/admin/index.php	(revision 9752)
@@ -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/reset_level/index.php
===================================================================
--- extensions/reset_level/index.php	(revision 9752)
+++ extensions/reset_level/index.php	(revision 9752)
@@ -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/reset_level/language/en_UK/description.txt
===================================================================
--- extensions/reset_level/language/en_UK/description.txt	(revision 9752)
+++ extensions/reset_level/language/en_UK/description.txt	(revision 9752)
@@ -0,0 +1,1 @@
+Reset all the levels of confidentiality for all photos in the gallery 'for all'
Index: extensions/reset_level/language/en_UK/index.php
===================================================================
--- extensions/reset_level/language/en_UK/index.php	(revision 9752)
+++ extensions/reset_level/language/en_UK/index.php	(revision 9752)
@@ -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/reset_level/language/en_UK/plugin.lang.php
===================================================================
--- extensions/reset_level/language/en_UK/plugin.lang.php	(revision 9752)
+++ extensions/reset_level/language/en_UK/plugin.lang.php	(revision 9752)
@@ -0,0 +1,8 @@
+<?php
+
+$lang['delle_onglet_all'] = 'Reset Level';
+$lang['delle_all'] = 'Discount level of confidentiality "for all " for all photos in the gallery';
+$lang['delle_purgeall'] = 'Reset levels of privacy';
+$lang['delle_totalok'] = 'All Photos now have a level of confidentiality "for all "';
+
+?>
Index: extensions/reset_level/language/fr_FR/description.txt
===================================================================
--- extensions/reset_level/language/fr_FR/description.txt	(revision 9752)
+++ extensions/reset_level/language/fr_FR/description.txt	(revision 9752)
@@ -0,0 +1,1 @@
+Remettre tous les niveaux de confidentialité de toutes les photos de la galerie à 'pour tous'
Index: extensions/reset_level/language/fr_FR/index.php
===================================================================
--- extensions/reset_level/language/fr_FR/index.php	(revision 9752)
+++ extensions/reset_level/language/fr_FR/index.php	(revision 9752)
@@ -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/reset_level/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/reset_level/language/fr_FR/plugin.lang.php	(revision 9752)
+++ extensions/reset_level/language/fr_FR/plugin.lang.php	(revision 9752)
@@ -0,0 +1,8 @@
+<?php
+
+$lang['delle_onglet_all'] = 'Reset Level';
+$lang['delle_all'] = 'Remise du niveau de confidentialité à "pour tous" pour toutes les photos de la galerie';
+$lang['delle_purgeall'] = 'Réinitialisation des niveaux de confidentialité';
+$lang['delle_totalok'] = 'Toutes les photos ont maintenant un niveau de confidentialité à "pour tous"';
+
+?>
Index: extensions/reset_level/language/index.php
===================================================================
--- extensions/reset_level/language/index.php	(revision 9752)
+++ extensions/reset_level/language/index.php	(revision 9752)
@@ -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/reset_level/main.inc.php
===================================================================
--- extensions/reset_level/main.inc.php	(revision 9752)
+++ extensions/reset_level/main.inc.php	(revision 9752)
@@ -0,0 +1,27 @@
+<?php
+/*
+Plugin Name: reset level
+Version: auto
+Description: reset level
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=517
+Author: ddtddt
+Author URI: http://piwigo.org/
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $prefixeTable;
+
+define('DELLE_DIR' , basename(dirname(__FILE__)));
+define('DELLE_PATH' , PHPWG_PLUGINS_PATH . DELLE_DIR . '/');
+load_language('plugin.lang', DELLE_PATH);
+
+add_event_handler('get_admin_plugin_menu_links', 'delle_admin_menu');
+function delle_admin_menu($menu)
+{
+  array_push($menu, array(
+	'NAME' => 'Reset level',
+    'URL' => get_admin_plugin_menu_link(DELLE_PATH . 'admin/admin.php')));
+  return $menu;
+}
+?>
