Index: /extensions/event_cats/admin/autolog_new.inc.php
===================================================================
--- /extensions/event_cats/admin/autolog_new.inc.php	(revision 4057)
+++ /extensions/event_cats/admin/autolog_new.inc.php	(revision 4058)
@@ -80,4 +80,5 @@
 
 $ec_default_action = 'create';
+$ec_default_entry  = '-1';
 $ec_def_auto_code_dg_nb = read_ec_conf('auto_code_dg_nb');
 
@@ -86,14 +87,23 @@
 *****************************************************************************/
 
-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']))
-     $ec_default_action = $_POST['ec_entry_sel'];
-    else
-     $page['errors'][] = 'Tentative de duplication d\'une entrée inexistante';
+if (isset($_POST['ec_act1']) and isset($_POST['ec_entry_sel'])) {
+  if (
+    array_key_exists($_POST['ec_entry_sel'], $ec_lists['ec_table']) or
+    $_POST['ec_entry_sel'] == '-1'
+  ) {
+    switch ($_POST['ec_act1']) {
+      case 'duplicate_entry_ask':
+      case 'modify_entry_ask':
+      case 'disable':
+      case 'create':
+        $ec_default_action = $_POST['ec_act1'];
+        $ec_default_entry = $_POST['ec_entry_sel'];
+      break;
+      default:
+        $page['errors'][] = 'Demande inconnue : $_POST[\'ec_act1\'] = '.$_POST['ec_act1'];
+    }
   }
-  else {
-    $page['errors'][] = 'Tentative de duplication sans entrée';
-  }
+  else
+   $page['errors'][] = 'Tentative d\'utilisation d\'une entrée inexistante ($_POST[\'ec_entry_sel\'] = '.$_POST['ec_entry_sel'].')';
 }
 
@@ -108,5 +118,10 @@
   (count($ec_lists['user_ids']) == 0) ? 'style = "display:none;"' : ''
 );
+$template->assign('ec_is_creation',
+  ($ec_default_action == 'duplicate_entry_ask' or
+   $ec_default_action == 'create')
+);
 $template->assign('ec_default_action',$ec_default_action);
+$template->assign('ec_default_entry',$ec_default_entry);
 $template->assign('ec_def_auto_code_dg_nb',$ec_def_auto_code_dg_nb);
 
Index: /extensions/event_cats/admin/evntcats_admin.php
===================================================================
--- /extensions/event_cats/admin/evntcats_admin.php	(revision 4057)
+++ /extensions/event_cats/admin/evntcats_admin.php	(revision 4058)
@@ -81,14 +81,26 @@
   WHERE `code` IS NOT NULL
 '))))) ? 'autolog_new' : 'autolog_entries';
+
+// Rajouter un test pour que si $ec_exist_entries est faux, mais qu'il y a
+// quand même des entrées dans la table (donc pour gérer la duplication de
+// compte), l'onglet sélectionné par défaut soit celui de la gestion de la
+// duplication de compte.
+
 if (isset($_POST['ec_act1'])) {
-  if (
-    $_POST['ec_act1'] == 'autolog_new' or
-    $_POST['ec_act1'] == 'duplicate_entry'
+  if (                                          /*
+    $_POST['ec_act1'] == 'autolog_new' or  // ? */
+    $_POST['ec_act1'] == 'duplicate_entry_ask' or
+    $_POST['ec_act1'] == 'disable' or
+    $_POST['ec_act1'] == 'modify_entry_ask'
   )
    $page['tab'] = 'autolog_new';
   elseif ($_POST['ec_act1'] == 'create')
    $page['tab'] = (ec_create_entry_OK()) ? 'autolog_entries' : 'autolog_new';
-  elseif (is_numeric($_POST['ec_act1'])) // Entry duplication : $_POST['ec_act1'] is entry #
-   $page['tab'] = (ec_duplicate_entry_OK()) ? 'autolog_entries' : 'autolog_new';
+  elseif (isset($_POST['ec_entry_sel']) and is_numeric($_POST['ec_entry_sel'])) {
+    if ($_POST['ec_act1'] == 'duplicate_entry_submit') $page['tab'] =
+     (ec_duplicate_entry_OK()) ? 'autolog_entries' : 'autolog_new';
+    elseif ($_POST['ec_act1'] == 'modify_entry_submit') $page['tab'] =
+     (ec_modify_entry_OK()) ? 'autolog_entries' : 'autolog_new';
+  }
 }
 else if (isset($_GET['tab'])) switch ($_GET['tab']) {
Index: /extensions/event_cats/admin/template/autolog_entries.js
===================================================================
--- /extensions/event_cats/admin/template/autolog_entries.js	(revision 4057)
+++ /extensions/event_cats/admin/template/autolog_entries.js	(revision 4058)
@@ -1,3 +1,8 @@
 /* Event Cats Javascript functions LucMorizur June - ... 2009 */
+
+/*
+déplacer les liens de test et de suppression en-dessous de la table (en-dessous du champ "URL"), éventuellement en les accompagnant des
+icônes ; et y rajouter le lien de modification (envoyer $_POST{['ec_act1'] = 'modify_entry_ask' et $_POST{['ec_entry_sel'] = <# entré concernée>)
+*/
 
 var ec_checked_line = 0;
@@ -40,5 +45,5 @@
 function ec_duplicate_entry(ec_id) {
   ec_mark_line(ec_id);
-  document.getElementById('ec_act1_id').value = 'duplicate_entry';
+  document.getElementById('ec_act1_id').value = 'duplicate_entry_ask';
   document.forms['ec_view_codes'].submit();
 }
Index: /extensions/event_cats/admin/template/autolog_entries.tpl
===================================================================
--- /extensions/event_cats/admin/template/autolog_entries.tpl	(revision 4057)
+++ /extensions/event_cats/admin/template/autolog_entries.tpl	(revision 4058)
@@ -60,15 +60,15 @@
              alt = "{'ec_test_tooltip'|@translate}" title = "{'ec_test_tooltip'|@translate}" />
           </a>
-          <a href = "javascript:void();" onclick = "ec_check_d({$code_line.id}, 'delete');">
+          <a href = "javascript:void(0);" onclick = "ec_check_d({$code_line.id}, 'delete');">
             <img src = "{$EVNTCATS_URLS.ROOT}icon/delete.png" class = "button"
              alt = "{'ec_url_delete'|@translate}" title = "{'ec_url_delete'|@translate}" />
           </a>
           {if $code_line.log_OK}
-            <a href = "javascript:void();" onclick = "ec_check_d({$code_line.id}, 'disable');">
+            <a href = "javascript:void(0);" onclick = "ec_check_d({$code_line.id}, 'disable');">
               <img src = "{$EVNTCATS_URLS.ROOT}icon/disable.png" class = "button"
                alt = "{'ec_url_disable'|@translate}" title = "{'ec_url_disable'|@translate}" />
             </a>
             {if $code_line.Forced == 'true'}
-              <a href = "javascript:void()" title = "{'ec_url_forced'|@translate}" onclick = "ec_toggle_forced({$code_line.id}, false);">
+              <a href = "javascript:void(0);" title = "{'ec_url_forced'|@translate}" onclick = "ec_toggle_forced({$code_line.id}, false);">
                 <img class = "button" src = "{$EVNTCATS_URLS.ROOT}icon/forced.png"
                  {if $code_line.f_pb} style = "border:solid medium red;" {/if}
@@ -77,10 +77,10 @@
               </a>
             {else}
-              <a href = "javascript:void()" title = "{'ec_url_nforced'|@translate}" onclick = "ec_toggle_forced({$code_line.id}, true);">
+              <a href = "javascript:void(0);" title = "{'ec_url_nforced'|@translate}" onclick = "ec_toggle_forced({$code_line.id}, true);">
                 <img class = "button" src = "{$EVNTCATS_URLS.ROOT}icon/nforced.png"
                  alt = "{'ec_url_nforced'|@translate}" title = "{'ec_url_nforced'|@translate}"/>
               </a>
               {if !$code_line.f_pb}
-                <a href = "javascript:void()" title = "{'ec_url_duplicate'|@translate}" onclick = "ec_duplicate_entry({$code_line.id});">
+                <a href = "javascript:void(0);" title = "{'ec_url_duplicate'|@translate}" onclick = "ec_duplicate_entry({$code_line.id});">
                   <img src = "{$EVNTCATS_URLS.ROOT}icon/duplicate.png" class = "button" style = "border:none"
                    alt = "{'ec_url_duplicate'|@translate}" title = "{'ec_url_duplicate'|@translate}" />
Index: /extensions/event_cats/admin/template/autolog_new.js
===================================================================
--- /extensions/event_cats/admin/template/autolog_new.js	(revision 4057)
+++ /extensions/event_cats/admin/template/autolog_new.js	(revision 4058)
@@ -1,7 +1,15 @@
 /* Event Cats Javascript functions LucMorizur June - ... 2009 */
+
+/*
+Attention le résultat du dépôt du formulaire ne peut plus être "create" ou "<numéro de l'entrée dupliquée>"
+car il faut fournir du "create", "duplicate_entry_submit", "modify_entry_submit" avec dans ces deux derniers cas
+le numéro de l'entrée concernée.
+De toutes façons il y a aussi le "cas" modification d'entrée à créer.
+*/
 
 var ec_avoid_infinite_loop      = true;
 var ec_flag1                    = false;
 var ec_flag2                    = false;
+var ec_dont_check               = false;
 var ec_err                      = '';
 var ec_selected_action          = '';
@@ -14,6 +22,9 @@
 var ec_auto_code_digits_nb      = '';
 var ec_default_action           = '';
+var ec_default_entry            = '';
+var ec_up_code_lbl_forced_txt   = '';
+var ec_selected_old_entry       = '-1';
+var ec_selected_old_code        = '-1';
 var ec_selected_old_user        = '-1';
-var ec_selected_old_code        = '-1';
 var ec_selected_AP              = '-1';
 var ec_selected_cat             = '-1';
@@ -22,4 +33,61 @@
 var ec_JS_message               = new Array();
 var ec_duplic_codes             = new Array();
+
+function ec_check_exist_value(ec_id, ec_val) {
+  var e = document.getElementById(ec_id);
+  for (var i = 0; i < e.length; i++) {
+    if (e.options[i].value == ec_val) return true;
+  }
+  return false;
+}
+
+function ec_mark_entry(ec_id) {
+  var i = 0;
+  var t = new Array();
+  var r = /,/g;
+  document.getElementById('ec_act2_id').value = ec_id;
+  t = document.getElementById('ec_in_up_entry_list_id').options[
+   document.getElementById('ec_in_up_entry_list_id').selectedIndex
+  ].label.split(r);
+// t[0] : user_id ; t[1] : action ; t[2] : arg1 ; t[3] : arg2 ; t[4] : forced
+  if (ec_check_exist_value('ec_in_up_usr_list_id', t[0])) {
+    ec_selected_user = 'ec_sel_user_old';
+    ec_selected_old_user = t[0];
+    if (t[2] != '' && t[1].lastIndexOf('ec_ok') != -1) i++;
+    if (t[3] != '') { i++; i++; }
+    switch (i) {
+      case 0: // Home
+        ec_selected_action = 'ec_input_action_home';
+      break;
+      case 1: // Category
+        ec_selected_action = 'ec_input_action_cat';
+        ec_selected_cat = t[2];
+      break;
+      case 2: // Additionnal Page
+        ec_selected_action = 'ec_input_action_add_p';
+        ec_selected_AP = t[3];
+      break;
+      case 3: // Image
+        ec_selected_action = 'ec_input_action_img';
+        ec_selected_cat = t[2];
+        ec_selected_img = t[3];
+      break;
+    }
+    document.getElementById('ec_in_up_forced_id').checked =
+     (t[4] == 'true') ? 'checked' : '';
+    ec_mark_action(ec_selected_action);
+  }
+  else {
+    ec_selected_user = 'ec_sel_user_none';
+    document.getElementById('ec_in_up_forced_id').checked = '';
+    if (ec_check_exist_value('ec_in_up_aps_id', t[3])) {
+      ec_selected_AP = t[3];
+      ec_mark_action('ec_input_action_add_p');
+    }
+    else {
+      ec_mark_action('ec_input_action_refused');
+    }
+  }
+}
 
 function ec_mark_code(ec_id) {
@@ -33,8 +101,12 @@
     switch (ec_selected_code) {
       case 'ec_sel_code_new':
+        document.getElementById('ec_act1_id').value = 'create';
         document.getElementById('ec_in_up_code_list_id').value = '-1';
         document.getElementById('ec_in_up_code_id').value = ec_new_code_text;
       break;
       case 'ec_sel_code_old':
+        document.getElementById('ec_act1_id').value = '????'; // Dépend de ce qui a été demandé au départ
+        document.getElementById('ec_act2_id').value =
+         ec_selected_old_code;
         document.getElementById('ec_in_up_code_list_id').value =
          ec_selected_old_code;
@@ -66,4 +138,12 @@
     document.getElementById(ec_selected_user).checked = 'checked';
     switch (ec_selected_user) {
+      case 'ec_sel_user_none': // None
+        ec_selected_action =
+         (ec_ap_ok && (ec_selected_action != 'ec_input_action_home')) ?
+         'ec_input_action_add_p' : 'ec_input_action_home';
+        document.getElementById('ec_in_up_usr_txt_id').value = '';
+        document.getElementById('ec_in_up_psd_txt_id').value = '';
+        document.getElementById('ec_in_up_usr_list_id').value = '-1';
+      break;
       case 'ec_sel_user_new': // New user
         document.getElementById('ec_in_up_usr_txt_id').value =
@@ -104,4 +184,6 @@
         document.getElementById('ec_in_up_cats_id').value = ec_selected_cat;
         document.getElementById('ec_in_up_imgs_id').value = '';
+        ec_selected_user = (ec_selected_user == 'ec_sel_user_none') ?
+         'ec_sel_user_old' : ec_selected_user;
         document.getElementById('ec_in_up_imgs_warn').innerHTML = '';
       break;
@@ -110,4 +192,6 @@
         document.getElementById('ec_in_up_cats_id').value = ec_selected_cat;
         document.getElementById('ec_in_up_imgs_id').value = ec_selected_img;
+        ec_selected_user = (ec_selected_user == 'ec_sel_user_none') ?
+         'ec_sel_user_old' : ec_selected_user;
         ec_check_img_text();
       break;
@@ -118,4 +202,11 @@
         document.getElementById('ec_in_up_imgs_warn').innerHTML = '';
       break;
+      case 'ec_input_action_refused': // Access denied
+        document.getElementById('ec_in_up_aps_id').value = '-1';
+        document.getElementById('ec_in_up_cats_id').value = '-1';
+        document.getElementById('ec_in_up_imgs_id').value = '';
+        ec_selected_user = 'ec_sel_user_none';
+        document.getElementById('ec_in_up_imgs_warn').innerHTML = '';
+      break;
     }
     if (ec_avoid_infinite_loop) {
@@ -124,5 +215,16 @@
       ec_avoid_infinite_loop = true;
     }
-  }
+    ec_mark_forced();
+  }
+}
+
+function ec_mark_forced() {
+  document.getElementById('ec_style_forced_id').innerHTML =
+    (document.getElementById('ec_in_up_forced_id').checked != '') ?
+     '<span style = "font-weight:bold; color:red;">' +
+     ec_up_code_lbl_forced_txt + '</span>'
+    :
+     ec_up_code_lbl_forced_txt
+  ;
 }
 
@@ -292,4 +394,5 @@
 
 function ec_check_submit() {
+  if (ec_dont_check) return true;
   if ((
     document.getElementById('ec_sel_code_new').checked != '' &&
@@ -338,4 +441,11 @@
 }
 
+function ec_mark_type(ec_id) {
+  document.getElementById('ec_act1_id').value = ec_id;
+  document.getElementById('ec_act2_id').value = '-1';
+  ec_dont_check = true;
+  document.forms['ec_new_code'].submit();
+}
+
 function ec_test() {
   alert('OK.');
@@ -343,72 +453,101 @@
 
 function ec_init() {
-  ec_err = '';
-  ec_selected_user = 'ec_sel_user_old';
-  ec_selected_code = 'ec_sel_code_new';
+  var d = document;
+  ec_err               = '';
+  ec_selected_user     = 'ec_sel_user_old';
+  ec_selected_code     = 'ec_sel_code_new';
   ec_selected_old_user = '-1';
   ec_selected_old_code = '-1';
-  ec_selected_AP = '-1';
-  ec_selected_cat = '-1';
-  ec_selected_action = '';
-  ec_selected_img = '';
-  ec_new_code_text = '';
-  ec_new_user_text = '';
-  ec_new_psd_text = '';
-  ec_old_new_psd_text = '';
-  ec_test_reg = '';
-  document.getElementById('ec_act1_id').value                    =
+  ec_selected_AP       = '-1';
+  ec_selected_cat      = '-1';
+  ec_selected_action   = '';
+  ec_selected_img      = '';
+  ec_new_code_text     = '';
+  ec_new_user_text     = '';
+  ec_new_psd_text      = '';
+  ec_old_new_psd_text  = '';
+  ec_test_reg          = '';
+  d.getElementById('ec_style_forced_id').innerHTML        =
+   ec_up_code_lbl_forced_txt;
+  d.getElementById('ec_act1_id').value                    =
    ec_default_action;
-  document.getElementById('ec_in_up_auto_code_length_id').value  =
-   ec_auto_code_digits_nb;
-  document.getElementById('ec_in_up_code_id').value              = '';
-  document.getElementById('ec_in_up_usr_txt_id').value           = '';
-  document.getElementById('ec_in_up_psd_txt_id').value           = '';
-  document.getElementById('ec_in_up_pwd_warn').innerHTML         = '';
-  document.getElementById('ec_in_up_aps_id').value               = '-1';
-  document.getElementById('ec_in_up_cats_id').value              = '-1';
-  document.getElementById('ec_in_up_imgs_id').value              = '';
-  document.getElementById('ec_in_up_imgs_warn').innerHTML        = '';
-  document.getElementById('ec_input_action_home').checked        = 'checked';
-  document.getElementById('ec_input_action_home').checked        = '';
+  d.getElementById('ec_in_up_usr_txt_id').value           = '';
+  d.getElementById('ec_in_up_psd_txt_id').value           = '';
+  d.getElementById('ec_in_up_pwd_warn').innerHTML         = '';
+  d.getElementById('ec_in_up_aps_id').value               = '-1';
+  d.getElementById('ec_in_up_cats_id').value              = '-1';
+  d.getElementById('ec_in_up_imgs_id').value              = '';
+  d.getElementById('ec_in_up_imgs_warn').innerHTML        = '';
+  d.getElementById('ec_input_action_home').checked        = 'checked';
+  d.getElementById('ec_input_action_home').checked        = '';
   
-  if (ec_default_action == 'create') {
-    document.getElementById('ec_in_up_code_list_id').value       = '-1';
-    document.getElementById('ec_sel_code_old').checked           = 'checked';
-    document.getElementById('ec_sel_code_old').checked           = '';
-    document.getElementById('ec_sel_user_old').checked           = 'checked';
-    document.getElementById('ec_sel_user_old').checked           = '';
-    document.getElementById('ec_in_up_usr_list_id').value        = '-1';
-    document.getElementById('ec_submit_gen_full_auto_id').disabled = '';
-    document.getElementById('ec_submit_gen_code_id').disabled    = '';
-    document.getElementById('ec_in_up_auto_code_length_id').disabled = '';
-    document.getElementById('ec_in_up_code_id').disabled         = '';
-    document.getElementById('ec_sel_code_new').disabled          = '';
-    document.getElementById('ec_sel_code_old').disabled          = '';
-    document.getElementById('ec_in_up_code_list_id').disabled    = '';
-    document.getElementById('ec_sel_user_new').disabled          = '';
-    document.getElementById('ec_submit_gen_user_id').disabled    = '';
-    document.getElementById('ec_in_up_usr_txt_id').disabled      = '';
-    document.getElementById('ec_in_up_psd_txt_id').disabled      = '';
-    document.getElementById('ec_sel_user_old').disabled          = '';
-    document.getElementById('ec_in_up_usr_list_id').disabled     = '';
-  }
-  else {
-    document.getElementById('ec_in_up_code_list_id').value       =
-     ec_default_action;
-    document.getElementById('ec_sel_code_old').checked           = 'checked';
-    document.getElementById('ec_submit_gen_full_auto_id').disabled =
-     'disabled';
-    document.getElementById('ec_submit_gen_code_id').disabled    = 'disabled';
-    document.getElementById('ec_in_up_auto_code_length_id').disabled =
-     'disabled';
-    document.getElementById('ec_in_up_code_id').disabled         = 'disabled';
-    document.getElementById('ec_sel_code_new').disabled          = 'disabled';
-    document.getElementById('ec_sel_code_old').disabled          = 'disabled';
-    document.getElementById('ec_in_up_code_list_id').disabled    = 'disabled';
-    ec_selected_old_code = ec_duplic_codes[ec_default_action];
-    ec_flag2 = true;
-    ec_mark_code('ec_sel_code_old');
-    ec_flag2 = false;
-  }
-  ec_default_action                                              = 'create';
-}
+  if (
+    ec_default_action == 'create' ||
+    ec_default_action == 'duplicate_entry_ask'
+  ) { // Entry creation
+    d.getElementById('ec_in_up_auto_code_length_id').value=
+     ec_auto_code_digits_nb;
+    d.getElementById('ec_in_up_code_id').value            = '';
+    d.getElementById('ec_sel_code_old').checked           = 'checked';
+    d.getElementById('ec_sel_user_old').checked           = 'checked';
+    if (ec_default_action == 'create') {            // Create entry from blank
+      d.getElementById('ec_in_up_usr_list_id').value      = '-1';
+      d.getElementById('ec_in_up_code_list_id').value     = '-1';
+      d.getElementById('ec_sel_code_old').checked         = '';
+      d.getElementById('ec_sel_user_old').checked         = '';
+      d.getElementById('ec_submit_gen_full_auto_id').disabled = '';
+      d.getElementById('ec_submit_gen_code_id').disabled  = '';
+      d.getElementById('ec_in_up_auto_code_length_id').disabled = '';
+      d.getElementById('ec_in_up_code_id').disabled       = '';
+      d.getElementById('ec_sel_code_new').disabled        = '';
+      d.getElementById('ec_sel_code_old').disabled        = '';
+      d.getElementById('ec_in_up_code_list_id').disabled  = '';
+      d.getElementById('ec_sel_user_new').disabled        = '';
+      d.getElementById('ec_submit_gen_user_id').disabled  = '';
+      d.getElementById('ec_in_up_usr_txt_id').disabled    = '';
+      d.getElementById('ec_in_up_psd_txt_id').disabled    = '';
+      d.getElementById('ec_sel_user_old').disabled        = '';
+      d.getElementById('ec_in_up_usr_list_id').disabled   = '';
+    }
+    else {                                          // Duplicate entry
+      d.getElementById('ec_in_up_code_list_id').value     =
+       ec_default_entry;
+      d.getElementById('ec_submit_gen_full_auto_id').disabled =
+       'disabled';
+      d.getElementById('ec_submit_gen_code_id').disabled  = 'disabled';
+      d.getElementById('ec_in_up_auto_code_length_id').disabled =
+       'disabled';
+      d.getElementById('ec_in_up_code_id').disabled       = 'disabled';
+      d.getElementById('ec_sel_code_new').disabled        = 'disabled';
+      d.getElementById('ec_sel_code_old').disabled        = 'disabled';
+      d.getElementById('ec_in_up_code_list_id').disabled  = 'disabled';
+      ec_selected_old_code = ec_duplic_codes[ec_default_entry];
+      ec_flag2 = true;
+      ec_mark_code('ec_sel_code_old');
+      ec_flag2 = false;
+    }
+    ec_default_action                                     = 'create';
+  }
+  else { // Entry modification
+    d.getElementById('ec_sel_user_old').checked           = 'checked';
+    d.getElementById('ec_in_up_forced_id').checked        = '';
+    if (ec_default_action == 'modify_entry_ask') {  // Modify entry
+      d.getElementById('ec_in_up_entry_list_id').value    = '-1';
+      d.getElementById('ec_in_up_usr_list_id').value      = '-1';
+      d.getElementById('ec_sel_user_old').checked         = '';
+      d.getElementById('ec_sel_user_new').disabled        = '';
+      d.getElementById('ec_submit_gen_user_id').disabled  = '';
+      d.getElementById('ec_in_up_usr_txt_id').disabled    = '';
+      d.getElementById('ec_in_up_psd_txt_id').disabled    = '';
+      d.getElementById('ec_sel_user_old').disabled        = '';
+      d.getElementById('ec_in_up_usr_list_id').disabled   = '';
+    }
+    else {                                          // Outdate entry
+      d.getElementById('ec_in_up_entry_list_id').value    =
+       ec_default_entry;
+      ec_mark_entry(ec_default_entry);
+    }
+    ec_default_action                                     =
+     'modify_entry_ask';
+  }
+}
Index: /extensions/event_cats/admin/template/autolog_new.tpl
===================================================================
--- /extensions/event_cats/admin/template/autolog_new.tpl	(revision 4057)
+++ /extensions/event_cats/admin/template/autolog_new.tpl	(revision 4058)
@@ -21,74 +21,116 @@
 <form class = "filter" method = "post" name = "ec_new_code" action = "" onsubmit = "return ec_check_submit();">
   <input type = "hidden" id = "ec_act1_id" name = "ec_act1" />
+  <input type = "hidden" id = "ec_act2_id" name = "ec_entry_sel" />
   
   <div style = "text-align:center;">
-    <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;"/>
+    <span style = "font-weight:bold; font-size:120%;">
+      {if $ec_hidden_when_no_code != ''}
+        <a href = "#ec_top" name = "ec_top" title = "{'ec_top_title'|@translate}">
+      {/if}
+      <label for = "ec_page_type_create" onclick = "ec_mark_type('create');">
+        <input type = "radio" id = "ec_page_type_create" onclick = "ec_mark_type('create');" {if $ec_is_creation} checked = "checked" {/if} />
+        {'ec_new_entry_title'|@translate}
+      </label>
+      {if $ec_hidden_when_no_code == ''}
+        <a href = "#ec_top" name = "ec_top" title = "{'ec_top_title'|@translate}">&nbsp;/&nbsp;
+      {/if}
+      </a>
+      <label for = "ec_page_type_modify" onclick = "ec_mark_type('modify_entry_ask');" {$ec_hidden_when_no_code}>
+        <input type = "radio" id = "ec_page_type_modify" onclick = "ec_mark_type('modify_entry_ask');" {if !$ec_is_creation} checked = "checked" {/if} />
+        {'ec_modify_entry_title'|@translate}
+      </label>
+    </span>
+    {if $ec_is_creation}
+      <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;"/>
+    {/if}
   </div><br>
   
   <table style = "border-spacing:15px" width = "97%">
     
-    {* <!-- Code selection --> *}
     <tr>
-      <td style = "vertical-align:top;"><strong>{'ec_new_entry'|@translate}</strong></td>
+      <td style = "vertical-align:top; font-weight:bold;">
+        {if $ec_is_creation}
+          {'ec_new_entry'|@translate}
+        {else}
+          {'ec_sel_entry'|@translate}
+        {/if}
+      </td>
       <td>
-        <li>
-          {* <!-- New code (to create) --> *}
-          <label for = "ec_in_up_code_id" onclick = "ec_mark_code('ec_sel_code_new');" {$ec_hidden_when_no_code}>
-            <input type = "radio" name = "ec_sel_code" for = "ec_in_up_code_id" value = "new"
-             id = "ec_sel_code_new" onclick = "ec_mark_code('ec_sel_code_new');" {$ec_hidden_when_no_code}
-            />
-            {'ec_up_code_lbl_code_new'|@translate}
-          </label>
-          &nbsp;
-          <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;"
-            />
-          </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;">
-            <option value =  "4" >4{'ec_gen_code_nb_min'|@translate}</option>
-            <option value =  "5" >5</option>
-            <option value =  "8" >8</option>
-            <option value = "10">10</option>
-            <option value = "12">12</option>
-            <option value = "15">15</option>
-            <option value = "16">16</option>
-            <option value = "20">20</option>
-            <option value = "24">24</option>
-            <option value = "25">25</option>
-            <option value = "30">30</option>
-            <option value = "32">32{'ec_gen_code_nb_max'|@translate}</option>
-          </select>
-          {'ec_gen_code_nb_end'|@translate}<br>
-          <ul><li>
-            <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40"
-             id = "ec_in_up_code_id" onblur = "ec_check_code_text();"
-            />
-          </li></ul>
-        </li>
-        
-        <li>
-          {* <!-- Known code --> *}
-          <label for = "ec_in_up_code_list_id" onclick = "ec_mark_code('ec_sel_code_old');" {$ec_hidden_when_no_code} >
-            <input type = "radio" name = "ec_sel_code" for = "ec_in_up_code_list_id" {$ec_hidden_when_no_code}
-             value = "old" id = "ec_sel_code_old" onclick = "ec_mark_code('ec_sel_code_old');"
-            />
-            {'ec_up_code_lbl_code_old'|@translate}
-          </label>
-          <select name = "ec_in_up_code_list" id = "ec_in_up_code_list_id" onclick = "ec_mark_code('ec_sel_code_old');"
-           onchange = "ec_change_code_list(this.value);" {$ec_hidden_when_no_code}
-          >
-            <option label = "------------" value = "-1" {* id = "ec_old_code_-1" *} {$ec_hidden_when_no_code} >------------</option>
-            {foreach from=$ec_lists.duplicable_codes key=ec_key item=ec_val}
-              <option label = "{$ec_val.user_id}" value = "{$ec_val.id}" {* id = "ec_old_code_{$ec_val.id}" *}>{$ec_key}</option>
-            {/foreach}
-          </select><br>
-        </li>
+        {if $ec_is_creation}
+          
+          {* <!-- Code selection --> *}
+          <li>
+            {* <!-- New code (to create) --> *}
+            <label for = "ec_in_up_code_id" onclick = "ec_mark_code('ec_sel_code_new');" {$ec_hidden_when_no_code} >
+              <input type = "radio" name = "ec_sel_code" for = "ec_in_up_code_id" value = "new"
+               id = "ec_sel_code_new" onclick = "ec_mark_code('ec_sel_code_new');"
+              />
+              {'ec_up_code_lbl_code_new'|@translate}
+            </label>
+            &nbsp;
+            <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;"
+              />
+            </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;">
+              <option value =  "4" >4{'ec_gen_code_nb_min'|@translate}</option>
+              <option value =  "5" >5</option>
+              <option value =  "8" >8</option>
+              <option value = "10">10</option>
+              <option value = "12">12</option>
+              <option value = "15">15</option>
+              <option value = "16">16</option>
+              <option value = "20">20</option>
+              <option value = "24">24</option>
+              <option value = "25">25</option>
+              <option value = "30">30</option>
+              <option value = "32">32{'ec_gen_code_nb_max'|@translate}</option>
+            </select>
+            {'ec_gen_code_nb_end'|@translate}<br>
+            <ul><li>
+              <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40"
+               id = "ec_in_up_code_id" onblur = "ec_check_code_text();"
+              />
+            </li></ul>
+          </li>
+          
+          <li>
+            {* <!-- Known code --> *}
+            <label for = "ec_in_up_code_list_id" onclick = "ec_mark_code('ec_sel_code_old');" {$ec_hidden_when_no_code}>
+              <input type = "radio" name = "ec_sel_code" for = "ec_in_up_code_list_id"
+                value = "old" id = "ec_sel_code_old" onclick = "ec_mark_code('ec_sel_code_old');"
+              />
+              {'ec_up_code_lbl_code_old'|@translate}
+            </label>
+            <select name = "ec_in_up_code_list" id = "ec_in_up_code_list_id" onclick = "ec_mark_code('ec_sel_code_old');"
+             onchange = "ec_change_code_list(this.value);" {$ec_hidden_when_no_code}
+            >
+              <option label = "------------" value = "-1">------------</option>
+              {foreach from=$ec_lists.duplicable_codes key=ec_key item=ec_val}
+                <option label = "{$ec_val.user_id}" value = "{$ec_val.id}">{$ec_key}</option>
+              {/foreach}
+            </select><br>
+          </li>
+          
+        {else}
+          
+          {* <!-- Entry selection --> *}
+          <li>
+            {* <!-- Entry choice --> *}
+            <select name = "ec_in_up_entry_list" id = "ec_in_up_entry_list_id" onchange = "ec_mark_entry(this.value);">
+              <option label = "" value = "-1">------------</option>
+              {foreach from=$ec_lists.ec_table item=ec_val}
+                <option value = "{$ec_val.id}" label = "{$ec_val.user_id},{$ec_val.action},{$ec_val.arg1},{$ec_val.arg2},{$ec_val.forced}">
+                  {$ec_val.id} : {$ec_val.code}
+                </option>
+              {/foreach}
+            </select>
+          </li>
+          
+        {/if}
       </td>
     </tr>
@@ -96,6 +138,18 @@
     {* <!-- User to identify --> *}
     <tr>
-      <td style = "vertical-align:top;"><strong>{'ec_up_code_lbl_user'|@translate}</strong></td>
+      <td style = "vertical-align:top; font-weight:bold;">{'ec_up_code_lbl_user'|@translate}</td>
       <td>
+        {if !$ec_is_creation}
+          <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>
+        {/if}
+        
         <li>
           {* <!-- New user (to create) --> *}
@@ -139,7 +193,7 @@
            onchange = "ec_selected_old_user = this.value;" {$ec_hidden_when_no_user}
           >
-            <option label = "------------" value = "-1" {* id = "ec_old_user_-1" *} {$ec_hidden_when_no_user} >------------</option>
+            <option label = "------------" value = "-1" {$ec_hidden_when_no_user} >------------</option>
             {foreach from=$ec_lists.user_ids key=ec_key item=ec_val}
-              <option label = "{$ec_val}" value = "{$ec_key}" {* id = "ec_old_user_{$ec_key}" *} >{$ec_val}</option>
+              <option label = "{$ec_val}" value = "{$ec_key}" >{$ec_val}</option>
             {/foreach}
           </select><br>
@@ -150,10 +204,16 @@
     {* <!-- Page to display --> *}
     <tr>
-      <td style = "vertical-align:top;"><strong>{'ec_up_code_lbl_action'|@translate}</strong></td>
+      <td style = "vertical-align:top;">
+        <span style = "font-weight:bold;">{'ec_up_code_lbl_action'|@translate}</span><br>
+        <label class = "ec_block" for = "ec_in_up_forced_id" style = "margin-top:5px;" onclick = "ec_mark_forced();">
+          <input type = "checkbox" name = "ec_in_up_forced" id = "ec_in_up_forced_id" onclick = "ec_mark_forced();">
+          <span id = "ec_style_forced_id"></span>
+        </label>
+      </td>
       <td>
         
-        {* <!-- Additionnal Page, provided the plugin is activated --> *}
+        {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
         <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "ec_mark_action('ec_input_action_add_p');"
-         {if !$ec_ap_ok}style = "display:none;"{/if}
+         {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;"{/if}
         >
           <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p" for = "ec_in_up_aps_id"
@@ -202,4 +262,14 @@
           {'ec_up_code_lbl_home'|@translate}
         </label>
+        
+        {* <!-- Access denied page (only when modifying an entry) --> *}
+        {if !$ec_is_creation}
+          <label class = "ec_block" onclick = "ec_mark_action('ec_input_action_refused');">
+            <input type = "radio" name = "ec_input_action" value = "refused" id = "ec_input_action_refused"
+             onclick = "ec_mark_action('ec_input_action_refused');"
+            />
+            {'ec_up_code_lbl_refused'|@translate}
+          </label>
+        {/if}
       </td>
     </tr>
@@ -214,4 +284,5 @@
 <script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script>
 <script type = "text/javascript"><!--
+  ec_up_code_lbl_forced_txt              = "{'ec_up_code_lbl_forced'|@translate}";
   ec_JS_message['ec_gen_user_act_miss']  = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}";
   ec_JS_message['ec_act_cat_miss']       = "{'ec_act_cat_miss'|@translate|@escape:javascript}";
@@ -224,4 +295,5 @@
   ec_JS_message['ec_submit_code_bad']    = "{'ec_submit_code_bad'|@translate}";
   ec_default_action                      = "{$ec_default_action}";
+  ec_default_entry                       = "{$ec_default_entry}";
   ec_auto_code_digits_nb                 = "{$ec_def_auto_code_dg_nb}";
   {foreach from=$ec_lists.duplicable_codes.ids key=ec_key item=ec_val}
Index: /extensions/event_cats/include/evntcats_funcs.inc.php
===================================================================
--- /extensions/event_cats/include/evntcats_funcs.inc.php	(revision 4057)
+++ /extensions/event_cats/include/evntcats_funcs.inc.php	(revision 4058)
@@ -314,5 +314,5 @@
  * ec_duplicate_entry_OK()
  * returns true or false whether the duplication of an existing entry which #
- * is given by $_POST['ec_act1'] was OK or not.
+ * is given by $_POST['ec_entry_sel'] was OK or not.
  *
  * @param
@@ -322,4 +322,18 @@
  */
 function ec_duplicate_entry_OK() {
+  return false;
+}
+
+/*
+ * ec_modify_entry_OK()
+ * returns true or false whether the modification of an existing entry which #
+ * is given by $_POST['ec_entry_sel'] was OK or not.
+ *
+ * @param
+ *   no param
+ * @return
+ *   true if modification was OK ; false if not
+ */
+function ec_modify_entry_OK() {
   return false;
 }
Index: /extensions/event_cats/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/event_cats/language/fr_FR/plugin.lang.php	(revision 4057)
+++ /extensions/event_cats/language/fr_FR/plugin.lang.php	(revision 4058)
@@ -20,5 +20,6 @@
 $lang['ec_plugin_ap_nok']         = 'Plugin <a href = "http://fr.piwigo.org/ext/extension_view.php?eid=153" title = "Ouvrir une nouvelle fenêtre sur le plugin Additional Pages" target = "_blank">Additional Pages</a> : inactif';
 $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_new_entry_title']       = 'Nouvelle entrée du paramètre "autolog"';
+$lang['ec_modify_entry_title']    = 'Modification d\'une entrée du paramètre "autolog"';
 $lang['ec_top_title']             = 'Placer ce titre en haut de la page';
 // Table
@@ -42,4 +43,5 @@
 $lang['ec_new_entry']             = 'Code';
 $lang['ec_up_code_lbl_code_new']  = 'Nouveau code :';
+$lang['ec_sel_entry']             = 'Entrée sélectionnée :';
 $lang['ec_new_entry_button']      = 'Générer un code automatiquement';
 $lang['ec_gen_code_nb_pre']       = 'de';
@@ -49,4 +51,5 @@
 $lang['ec_up_code_lbl_code_old']  = 'Code existant :';
 $lang['ec_up_code_lbl_user']      = 'Utilisateur identifié';
+$lang['ec_up_code_lbl_user_none'] = 'Aucun (entrée périmée) :';
 $lang['ec_up_code_lbl_user_new']  = 'Nouvel utilisateur (créer un compte générique) :';
 $lang['ec_new_user_name']         = 'Nom d\'utilisateur';
@@ -54,9 +57,11 @@
 $lang['ec_up_code_lbl_gen_user']  = 'Générer un nom d\'utilisateur d\'après l\'action choisie';
 $lang['ec_up_code_lbl_user_old']  = 'Utilisateur existant :';
-$lang['ec_up_code_lbl_home']      = 'Accueil';
 $lang['ec_up_code_lbl_action']    = 'Page affichée';
+$lang['ec_up_code_lbl_forced']    = 'Forcée';
 $lang['ec_up_code_lbl_aps']       = 'Additional Page';
 $lang['ec_up_code_lbl_cats']      = 'Catégorie';
 $lang['ec_up_code_lbl_img']       = 'Image';
+$lang['ec_up_code_lbl_home']      = 'Accueil';
+$lang['ec_up_code_lbl_refused']   = 'Accès refusé';
 // JS checks
 $lang['ec_confirm_test']          = "Vraiment tester le code sélectionné ?\n\rCela terminera votre session d'administration.";
