Index: extensions/Mail_supervisor/admin/mail_superv_admin.php
===================================================================
--- extensions/Mail_supervisor/admin/mail_superv_admin.php	(revision 4023)
+++ extensions/Mail_supervisor/admin/mail_superv_admin.php	(revision 4029)
@@ -1,5 +1,31 @@
 <?php
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-load_language('plugin.lang', MAIL_SUPERV_PATH);
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+if ( !defined('PHPWG_ROOT_PATH')) 
+{
+  die('Hacking attempt!');
+}
+
+
 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
 
@@ -10,7 +36,10 @@
 $mails_données=Get_Datas();
 
-	$search=array("D","H","M","S","W");
-	$replace=array(" day"," Hour"," minute"," second"," week");		
+	
+
 		
+	$list_period=array('week','day','hour','minute','seconde');
+	$list_period_label=array(l10n('Week'),l10n('Day'),l10n('Hour'),l10n('Minute'),l10n('Seconde'));
+	
 
 if ( isset($_POST['test_envoie']) ) {
@@ -27,27 +56,10 @@
 	$mails_données['date_mail'] = time();
 	$mails_données['date_spam'] = time();
+	
 	$mails_données['reste'] = 0;
 	
-	 $query = '
-        UPDATE '.MAIL_SUPERV_TABLE.'
-        SET `nb_mails`         = 0,
-			`date_mail`        = '.time().',
-			`nb_mails_maxi`    = '.$mails_données['nb_mails_maxi'].',	
-			`nb_mails_periode`    = "'.$mails_données['nb_mails_periode'].'",	
-					
-			`nb_spams`         = 0,
-			`date_spam`        = '.time().',
-			`nb_spams_maxi`    = '.$mails_données['nb_spams_maxi'].',
-			`nb_spams_periode`    = "'.$mails_données['nb_spams_periode'].'",		
-								
-			`quarantaine`      = "false",
-			`date_quarantaine` = '.time().',
-			
-			`message`          = "'.$mails_données['message'].'",
-			`header_text`      = "'.$mails_données['header_text'].'"
-		WHERE `id` =1 LIMIT 1 ';
-		
-
-      pwg_query($query);
+	$mails_données['quarantaine']=false;
+	
+     sauve_données();
 	
 	array_push($page['infos'], l10n('save_config'));
@@ -70,37 +82,13 @@
 $mails_données['nb_spams_maxi'] = isset($_POST['nb_spams_maxi']) ? $_POST['nb_spams_maxi'] :  $mails_données['nb_spams_maxi']  ;
 $mails_données['nb_spams_periode'] = isset($_POST['nb_spams_periode']) ? $_POST['nb_spams_periode'] :  $mails_données['nb_spams_periode']  ;
+$mails_données['quarantaine_periode'] = isset($_POST['quarantaine_periode']) ? $_POST['quarantaine_periode'] :  $mails_données['quarantaine_periode']  ;
 
 $mails_données['message'] = isset($_POST['content']) ? $_POST['content'] :  $mails_données['message']  ;
 $mails_données['header_text'] = isset($_POST['header_text']) ? $_POST['header_text'] :  $mails_données['header_text']  ;
   //===========================================================================================================
-	$query = '
-    UPDATE '.CONFIG_TABLE.'
-    SET value="'.$mails_options[0]. ',' .$mails_options[1]. ',' .$mails_options[2].',' .$mails_options[3]. ',' .$mails_options[4]. '"
-    WHERE param="mail_superv"
-    LIMIT 1';
-	 pwg_query($query);
+         sauve_options();
 
-
-         $query = '
-        UPDATE '.MAIL_SUPERV_TABLE.'
-        SET `nb_mails`         = '.$mails_données['nb_mails'].',
-			`date_mail`        = '.$mails_données['date_mail'].',
-			`nb_mails_maxi`    = '.$mails_données['nb_mails_maxi'].',	
-			`nb_mails_periode`    = "'.$mails_données['nb_mails_periode'].'",	
-					
-			`nb_spams`         = '.$mails_données['nb_spams'].',
-			`date_spam`        = '.$mails_données['date_spam'].',
-			`nb_spams_maxi`    = '.$mails_données['nb_spams_maxi'].',	
-			`nb_spams_periode`    = "'.$mails_données['nb_spams_periode'].'",	
-								
-			`quarantaine`      = "'.$mails_données['quarantaine'].'",
-			`date_quarantaine` = '.$mails_données['date_quarantaine'].',
-			
-			`message`          = "'.$mails_données['message'].'",
-			`header_text`      = "'.$mails_données['header_text'].'"
-		WHERE `id` =1 LIMIT 1 ';
-		
-
-      pwg_query($query);
+//==============================================================================================
+         sauve_données();
 	  
    //===========================================================================================================
@@ -110,10 +98,13 @@
 }
 
+$mails_données = Get_Datas() ;
+
+	$rest_mail= $mails_données['rest_mail'];  	
+ 	$rest_spam= $mails_données['rest_spam'];  	
+    $reste= $mails_données['reste'];  	
+
+$quarantaine= $mails_données['quarantaine'];  	
+
 	
-	$rest_mail=  $mails_données['date_mail']-time() ; 
-	$rest_mail= "'".int_to_heure($rest_mail)."'";  	
-				
-	$rest_spam=  $mails_données['date_spam']-time() ;
-	$rest_spam= "'".int_to_heure($rest_spam)."'";  	
 
 $template->assign(
@@ -126,20 +117,26 @@
    
    	'nb_mails' => $mails_données['nb_mails'] ,
-   	'date_mail' => "'".date('Y-M-d H:m:s',$mails_données['date_mail'])."'" ,
+   	'date_mail' => "'".date(l10n('formatdate'),$mails_données['date_mail'])."'" ,
    	'nb_mails_maxi' => $mails_données['nb_mails_maxi'] ,	
 	'nb_mails_periode' => "'".$mails_données['nb_mails_periode']."'" ,	
- 	'time_mails_reste' => ( $rest_mail ) ,	
+ 	'time_mails_reste' => "'".int_to_heure( $rest_mail )."'" ,	
 	
   	'nb_spams' => $mails_données['nb_spams'] ,
-	'date_spam' => "'".date('Y-M-d H:m:s',$mails_données['date_spam'])."'" ,
+	'date_spam' => "'".date(l10n('formatdate'),$mails_données['date_spam'])."'" ,
 	'nb_spams_maxi' => $mails_données['nb_spams_maxi'] ,	
 	 'nb_spams_periode' => "'".$mails_données['nb_spams_periode']."'" ,
-	 'time_spams_reste' => ($rest_spam) ,	
+	 'time_spams_reste' => "'".int_to_heure($rest_spam)."'" ,	
 	 
-  	'date_quarantaine' => "'".date('Y-M-d H:m:s',$mails_données['date_quarantaine'])."'" ,
-  'reste' => int_to_heure($mails_données['reste']),
+	 'quarantaine' => $mails_données['quarantaine'] ,
+  	'date_quarantaine' => "'".date(l10n('formatdate'),$mails_données['date_quarantaine'])."'" ,
+	'quarantaine_periode' => "'".$mails_données['quarantaine_periode']."'" ,
+     'reste' => "'".int_to_heure($reste)."'",
  
     'message' => $mails_données['message'] ,
 	'header_text' => "'".$mails_données['header_text']."'" ,
+	
+	'list_period' => $list_period ,
+	'list_period_label' => $list_period_label ,
+	
 		 				)
 				);	
