Index: /extensions/event_cats/admin/autolog_entries.inc.php
===================================================================
--- /extensions/event_cats/admin/autolog_entries.inc.php	(revision 4010)
+++ /extensions/event_cats/admin/autolog_entries.inc.php	(revision 4011)
@@ -38,5 +38,5 @@
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-global $template, $conf, $lang, $test1, $prefixeTable, $ec_err, $page,
+global $template, $conf, $page,
  $ec_lists,   // array of following arrays :
               //   $ec_lists['ec_table'] :
Index: /extensions/event_cats/admin/autolog_new.inc.php
===================================================================
--- /extensions/event_cats/admin/autolog_new.inc.php	(revision 4010)
+++ /extensions/event_cats/admin/autolog_new.inc.php	(revision 4011)
@@ -38,5 +38,5 @@
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-global $template, $conf, $lang, $test1, $prefixeTable, $ec_err, $page,
+global $template, $conf, $page,
  $ec_lists,   // array of following arrays :
               //   $ec_lists['ec_table'] :
@@ -54,5 +54,4 @@
 /****************************************************************************/
 
-$code_list = array();
 build_ec_lists(); // in evntcats_funcs.php
 
@@ -61,8 +60,26 @@
 *****************************************************************************/
 
+if (isset($_POST['ec_act1']) and $_POST['ec_act1'] == 'duplicate_entry') {
+  if (isset($_POST['ec_entry_sel'])) {
+    if (array_key_exists($_POST['ec_entry_sel'], $ec_lists['ec_table'])) {
+      // Des variables donnant les valeur par défaut des champs à modifier lors
+      // d'une nouvelle entrée, prennent les valeurs établies trouvées dans la table
+      // (si quelqu'un comprend cette phrase...)
+    }
+    else {
+      $page['errors'][] = 'Tentative de duplication d\'une entrée inexistante';
+    }
+  }
+  else {
+    $page['errors'][] = 'Tentative de duplication sans entrée';
+  }
+}
+
+
 /****************************************************************************/
 
+
 $template->assign('ec_ap_ok',$ec_ap_ok);
-$template->assign('code_list',$code_list);
+$template->assign('ec_lists',$ec_lists);
 
 ?>
Index: /extensions/event_cats/admin/evntcats_admin.php
===================================================================
--- /extensions/event_cats/admin/evntcats_admin.php	(revision 4010)
+++ /extensions/event_cats/admin/evntcats_admin.php	(revision 4011)
@@ -71,4 +71,8 @@
 // |                            Tabsheet
 // +-----------------------------------------------------------------------+
+
+// Effectuer quand même un test sur $_POST['act1'] : si demande de création d'entré, mais
+// que cette demande ne peut aboutir, rediriger sur page création d'entrée ; sinon sur entrées existantes.
+
 $page['tab'] = (!($ec_exist_entries = (mysql_fetch_row(pwg_query('
   SELECT * FROM `'.EVNTCATS_TABLE.'`
@@ -98,6 +102,4 @@
                l10n('ec_tab_config'),
                $my_base_url.'&amp;tab=config');
-$tabsheet->select($page['tab']);
-$tabsheet->assign();
 
 $template->assign(
@@ -112,4 +114,7 @@
 include(EVNTCATS_PATH.'admin/'.$page['tab'].'.inc.php');
 
+$tabsheet->select($page['tab']);
+$tabsheet->assign();
+
 /*
 print '<pre>';
@@ -121,5 +126,4 @@
 $template->assign('ec_howto', (count($page['errors']) == 0 and count($page['infos']) == 0));
 
-$template->assign('ec_lists',$ec_lists);
 $template->assign('EVNTCATS_PATH',EVNTCATS_PATH);
 $template->assign('RACINE_URL',ROOT_URL);
Index: /extensions/event_cats/admin/template/autolog_entries.js
===================================================================
--- /extensions/event_cats/admin/template/autolog_entries.js	(revision 4010)
+++ /extensions/event_cats/admin/template/autolog_entries.js	(revision 4011)
@@ -39,4 +39,7 @@
 
 function ec_duplicate_entry(ec_id) {
+  ec_mark_line(ec_id);
+  document.getElementById('ec_act1_id').value = 'duplicate_entry';
+  document.forms['ec_view_codes'].submit();
 }
 
Index: /extensions/event_cats/admin/template/autolog_entries.tpl
===================================================================
--- /extensions/event_cats/admin/template/autolog_entries.tpl	(revision 4010)
+++ /extensions/event_cats/admin/template/autolog_entries.tpl	(revision 4011)
@@ -45,5 +45,7 @@
   <input type = "radio" name = "ec_entry_sel" value = "-1" id = "selection--1" style = "display:none;"/>
   
-  <div style = "text-align:center; font-weight:bold; font-size:120%;">{'ec_entry_table_title'|@translate}</div><br>
+  <div style = "text-align:center; font-weight:bold; font-size:120%;">
+    <a href = "#ec_top" name = "ec_top" title = "{'ec_top_title'|@translate}">{'ec_entry_table_title'|@translate}</a><br>
+  </div><br>
   
   {* <!-- Table to show codes present in MySQL table --> *}
Index: /extensions/event_cats/admin/template/autolog_new.tpl
===================================================================
--- /extensions/event_cats/admin/template/autolog_new.tpl	(revision 4010)
+++ /extensions/event_cats/admin/template/autolog_new.tpl	(revision 4011)
@@ -45,25 +45,13 @@
   
   <div style = "text-align:center;">
-    <span style = "font-weight:bold; font-size:120%;">{'ec_new_entry_table_title'|@translate}</span><br>
+    <a href = "#ec_top" name = "ec_top">
+      <span style = "font-weight:bold; font-size:120%;" title = "{'ec_top_title'|@translate}">{'ec_new_entry_table_title'|@translate}</span>
+    </a><br>
     <br>
     <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{'ec_new_full_auto'|@translate}"
-     id = "ec_submit_gen_full_auto_id" onclick = "ec_gen_full_auto();" style = "margin-top:0;"/>
+     {* id = "ec_submit_gen_full_auto_id" *} onclick = "ec_gen_full_auto();" style = "margin-top:0;"/>
   </div>
   
-  <table style="border-spacing:30px" width = "97%">
-    
-    {* <!-- New entry --> *}
-    {* <!--
-    <tr>
-      <td>
-        <label for = "selection--1">
-          <input type = "radio" name = "ec_entry_sel" value = "-1" id = "selection--1" />
-          <span style = "font-weight:bold; font-style:italic; font-size:120%; text-decoration:underline;">{'ec_create_modify_code'|@translate}</span>
-        </label>
-      </td>
-      <td>
-      </td>
-    </tr>
-    --> *}
+  <table style = "border-spacing:30px" width = "97%">
     
     {* <!-- Code selection --> *}
@@ -77,9 +65,9 @@
         <label for = "ec_in_up_code_id" style = "margin:0;">
           <input class = "submit" type = "button" name = "ec_submit_gen_code" value = "{'ec_new_entry_button'|@translate}"
-           id = "ec_submit_gen_code_id" onclick = "ec_gen_code();" style = "margin:0;"
+           {* id = "ec_submit_gen_code_id" *} onclick = "ec_gen_code();" style = "margin:0;"
           />
         </label>
         {'ec_gen_code_nb_pre'|@translate}
-        <select name = "ec_in_up_auto_code_length" id = "ec_in_up_auto_code_length_id" onchange = "ec_auto_code_digits_nb = this.value;">
+        <select {* name = "ec_in_up_auto_code_length" *} id = "ec_in_up_auto_code_length_id" onchange = "ec_auto_code_digits_nb = this.value;">
           <option value = "4">4</option>
           <option value = "5">5</option>
@@ -104,14 +92,4 @@
       <td>
       <li>
-        {* <!-- None --> *}
-        <label onclick = "ec_mark_user('ec_sel_user_none');">
-          <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none"
-           onclick = "ec_mark_user('ec_sel_user_none');"
-          />
-          {'ec_up_code_lbl_user_none'|@translate}
-        </label><br>
-      </li>
-        
-      <li>
         {* <!-- New user (to create) --> *}
         <label for = "ec_in_up_usr_txt_id" onclick = "ec_mark_user('ec_sel_user_new');">
@@ -123,5 +101,5 @@
         &nbsp;
         <input class = "submit" type = "button" name = "ec_submit_gen_user" value = "{'ec_up_code_lbl_gen_user'|@translate}"
-         id = "ec_submit_gen_user_id" onclick = "ec_gen_user();"
+         {* id = "ec_submit_gen_user_id" *} onclick = "ec_gen_user();"
         /><br>
         <ul><li>
@@ -221,6 +199,6 @@
   </table>
   <p>
-    <input class = "submit" type = "submit" name = "ec_submit" value = "{'Submit'|@translate}"/>
-    <input class = "submit" type = "reset" name = "ec_reset" value = "{'Reset'|@translate}" onclick = "ec_init();"/>
+    <input class = "submit" type = "submit{* button *}" {* name = "ec_submit" *} value = "{'Submit'|@translate}" onclick = "ec_validate();"/>
+    <input class = "submit" type = "reset" {* name = "ec_reset" *} value = "{'Reset'|@translate}" onclick = "ec_init();"/>
   </p>
 </form>
Index: /extensions/event_cats/include/evntcats_funcs.inc.php
===================================================================
--- /extensions/event_cats/include/evntcats_funcs.inc.php	(revision 4010)
+++ /extensions/event_cats/include/evntcats_funcs.inc.php	(revision 4011)
@@ -46,5 +46,4 @@
   
   $ec_lists['ec_table'] = array();
-  // $ec_lists['ec_codes'] = array(); // Useful ?
   
   if (isset($conf['auto_log'])) {
@@ -60,10 +59,6 @@
        'arg2'    => NULL,
        'forced'  => 'false',
-      )) - 1; // key($ec_lists['ec_table']) does not work as expected
+      )) - 1;
       $ec_lists['ec_table'][$ec_current_entry]['id'] = $ec_current_entry;
-      /* $ec_lists['ec_codes'][$ec_current_code] = array(
-       'count' => 1,
-       'id'    => $ec_current_entry
-      ); */
       if (isset($conf['prior_page'])) {
         if (array_key_exists($ec_current_code, $conf['prior_page'])) {
@@ -94,10 +89,6 @@
            'arg2'    => $ec_current_AP,
            'forced'  => 'true',
-          )) - 1; // key($ec_lists['ec_table']) problem
+          )) - 1;
           $ec_lists['ec_table'][$ec_current_entry]['id'] = $ec_current_entry;
-          /* $ec_lists['ec_codes'][$ec_current_code] = array(
-           'id'     => $ec_current_entry,
-           'count'  => 1
-          ); */
         }
       }
@@ -114,14 +105,4 @@
     while ($r = mysql_fetch_assoc($q)) {
       $ec_lists['ec_table'][intval($r['id'])] = $r;
-      /* $ec_current_entry = intval($r['id']);
-      $ec_current_code = $r['code'];
-      if (array_key_exists($ec_current_code, $ec_lists['ec_codes'])) {
-        $ec_lists[$ec_current_code]['count']++;
-      }
-      else {
-        $ec_lists['ec_codes'][$ec_current_code] = array(
-         'id'     => $ec_current_entry,
-         'count'  => 1
-        ); */
     }
   }
@@ -145,4 +126,5 @@
     $first = array();
     $to_correct = array();
+    
     // $to_correct is needed because following code would not work anywhere :
     /*
@@ -159,4 +141,5 @@
     // Internet provider).
     */
+    
     foreach ($ec_lists['ec_table'] as &$ec_entry) { // & is not really needed
       $ec_current_code = $ec_entry['code'];
Index: /extensions/event_cats/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/event_cats/language/fr_FR/plugin.lang.php	(revision 4010)
+++ /extensions/event_cats/language/fr_FR/plugin.lang.php	(revision 4011)
@@ -21,4 +21,5 @@
 $lang['ec_entry_table_title']     = 'Entrées du paramètre "autolog"';
 $lang['ec_new_entry_table_title'] = 'Nouvelle entrée du paramètre "autolog"';
+$lang['ec_top_title']             = 'Placer ce titre en haut de la page';
 // Table
 $lang['ec_col_name_entry']        = 'Entrée';
@@ -45,5 +46,4 @@
 $lang['ec_gen_code_nb_end']       = 'caractères';
 $lang['ec_up_code_lbl_user']      = 'Utilisateur identifié';
-$lang['ec_up_code_lbl_user_none'] = 'Aucun (accès refusé)';
 $lang['ec_up_code_lbl_user_new']  = 'Nouvel utilisateur :';
 $lang['ec_new_user_name']         = 'Nom d\'utilisateur';
