Index: /extensions/event_cats/admin/evntcats_admin.js
===================================================================
--- /extensions/event_cats/admin/evntcats_admin.js	(revision 3984)
+++ /extensions/event_cats/admin/evntcats_admin.js	(revision 3985)
@@ -10,5 +10,7 @@
 var ec_selected_action = '';
 var ec_selected_img = '';
-var ec_auto_code_digits_nb = '8';
+var ec_auto_code_digits_default =
+ document.getElementById('ec_in_up_auto_code_length_id').value;
+var ec_auto_code_digits_nb = ec_auto_code_digits_default;
 var ec_new_code_text = '';
 var ec_new_user_text = '';
@@ -265,12 +267,14 @@
 }
 
-function ec_check_dis(ec_id) {
+function ec_check_d(ec_id, ec_act) {
   ec_mark_line(ec_id);
-  return confirm(ec_JS_message['ec_confirm_disable']);
-}
-
-function ec_check_del(ec_id) {
-  ec_mark_line(ec_id);
-  return confirm(ec_JS_message['ec_confirm_delete']);
+  if (confirm(ec_JS_message['ec_confirm_' + ec_act])) {
+    document.getElementById('ec_act1_id').value = ec_act;
+    document.forms['ec_up_code'].submit();
+    /* return true;
+  }
+  else {
+    return false; */
+  }
 }
 
@@ -285,4 +289,19 @@
 
 function ec_init() {
+  ec_err = '';
+  ec_checked_line = 0;
+  ec_selected_user = 'ec_sel_user_old';
+  ec_selected_old_user = '-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 = '';
+  document.getElementById('ec_in_up_pwd_warn').innerHTML = '';
   ec_mark_line(0);
 }
Index: /extensions/event_cats/admin/evntcats_admin.php
===================================================================
--- /extensions/event_cats/admin/evntcats_admin.php	(revision 3984)
+++ /extensions/event_cats/admin/evntcats_admin.php	(revision 3985)
@@ -209,5 +209,5 @@
   $arg2     = $ec_entry['arg2'];
   $arg2_int = intval($arg2);
-  $log_OK   = (strpos($ec_entry['action'], 'ec_ok') !== false);
+  $log_OK   = is_in($ec_entry['action'], 'ec_ok');
   
   // No specific need for "code" displaying
@@ -222,6 +222,8 @@
   switch ($ec_entry['action']) {
     
-    case 'ec_ok_forced_pb' :
-      $page['errors'][$ec_entry['code']] = l10n('ec_forced_pb');
+    case 'ec_ok_f_pb' :
+    case 'ec_ok_f_pb_img_pb' :
+      $page['errors'][$ec_entry['code']] =
+       $ec_entry['code'].' : '.l10n('ec_forced_pb');
     case 'ec_ok' :
     case 'ec_ok_img_pb' :
@@ -243,7 +245,8 @@
            l10n('ec_dspl_ok_cat_end')
           ;
-          if ($ec_entry['action'] == 'ec_ok_img_pb') {
+          if (is_in($ec_entry['action'], '_img_pb')) {
             $url_end.= '&img='.$arg2;
-            $page['errors'][] = l10n('ec_image_miss');
+            $page['errors'][] = 
+             $ec_entry['code'].' : '.l10n('ec_image_miss');
             $dspl.=
              '<br>'.$span_err_pre.
@@ -307,8 +310,12 @@
     break;
     
+    case 'ec_ok_f_pb_ap_pb' :
+      $page['errors'][$ec_entry['code']] =
+       $ec_entry['code'].' : '.l10n('ec_forced_pb');
     case 'ec_nok_ap_pb' : // No need to check here if Additional Pages is
     case 'ec_ok_ap_pb' :  // active : we can arrive here only when it is.
-      $page['errors'][] = l10n('ec_add_page_miss');
-      if ($ec_entry['action'] == 'ec_ok_ap_pb') {
+      $page['errors'][] = 
+       $ec_entry['code'].' : '.l10n('ec_add_page_miss');
+      if (is_in($ec_entry['action'], 'ec_ok')) {
         $url_end = '&ap='.$arg2;
         $dspl = l10n('ec_dspl_ok_home');
@@ -326,7 +333,11 @@
     break;
     
+    case 'ec_ok_f_pb_cat_pb' :
+      $page['errors'][$ec_entry['code']] =
+       $ec_entry['code'].' : '.l10n('ec_forced_pb');
     case 'ec_ok_cat_pb' :
       $url_end = '&cat='.$arg1;
-      $page['errors'][] = l10n('ec_category_miss');
+      $page['errors'][] = 
+       $ec_entry['code'].' : '.l10n('ec_category_miss');
       $dspl =
        l10n('ec_dspl_nok_home').
@@ -340,5 +351,6 @@
     
     case 'ec_nok_action_pb' :
-      $page['errors'][$ec_entry['code']] = l10n('ec_action_pb');
+      $page['errors'][$ec_entry['code']] = 
+       $ec_entry['code'].' : '.l10n('ec_action_pb');
       $username =
        $span_err_pre.
@@ -350,5 +362,6 @@
     
     case 'ec_nok_userid_pb' :
-      $page['errors'][$ec_entry['code']] = l10n('ec_username_pb');
+      $page['errors'][$ec_entry['code']] = 
+       $ec_entry['code'].' : '.l10n('ec_username_pb');
       $username =
        $span_err_pre.
@@ -360,5 +373,6 @@
     
     case 'ec_nok_userid_miss' :
-      $page['errors'][$ec_entry['code']] = l10n('ec_username_miss');
+      $page['errors'][$ec_entry['code']] = 
+       $ec_entry['code'].' : '.l10n('ec_username_miss');
       $username =
        $span_err_pre.
@@ -382,11 +396,14 @@
   $code_list[$i] = array(
    'id'       => $i,
-   'Code'     => $ec_entry['code'],
+   'Code'     => (isset($page['errors'][$ec_entry['code']])) ?
+    $span_err_pre.$ec_entry['code'].$span_err_end : $ec_entry['code'],
    'Username' => $username,
-   'Action'   => $ec_entry['action'],
+   'Action'   => (is_in($ec_entry['action'], 'ec_nok_')) ?
+    $span_err_pre.$ec_entry['action'].$span_err_end : $ec_entry['action'],
    'Arg1'     => $dspl,
    'Forced'   => $ec_entry['forced'],
    'code_URL' => $code_URL,
    'log_OK'   => $log_OK,
+   'f_pb'     => is_in($ec_entry['action'], '_f_pb'),
   );
 }
@@ -407,28 +424,10 @@
 $template->assign('RACINE_URL',ROOT_URL);
 
-// $template->assign('test0tpl',str_from_var($ec_lists['ec_codes']));
+$template->assign('GET',str_from_var($_GET));
+$template->assign('POST',str_from_var($_POST));
 $template->assign('test1tpl',str_from_var($ec_lists));
 $template->assign('test2tpl',str_from_var($page['errors']));
 $template->assign('test3tpl',str_from_var($code_list));
 
-/* C'est quoi, ça ?...
-if ( isset($_POST['submit']) )
-  {
-    if (isset($_POST['account']) and isset($_POST['code']))
-      {
-        $conf['auto_log'][$_POST['code']] = $_POST['account'];
-      }
-    else
-      {
-        $page['errors']='arg_missing';
-      }
-
-    if (isset($_POST['duplication']))
-      {
-        $conf['allow_user_registration'] = ($_POST['duplication'] == '1');
-      }
-  }
-*/
-
 $template->set_filenames(array('evntcats_admin_content' => dirname(__FILE__).'/evntcats_admin.tpl'));
 $template->assign_var_from_handle('ADMIN_CONTENT','evntcats_admin_content');
Index: /extensions/event_cats/admin/evntcats_admin.tpl
===================================================================
--- /extensions/event_cats/admin/evntcats_admin.tpl	(revision 3984)
+++ /extensions/event_cats/admin/evntcats_admin.tpl	(revision 3985)
@@ -1,26 +1,3 @@
 {* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *}
-
-{* <!-- Tabs for admin page surfing --> *} {*
-<ul class = "tabsheet">
-  <li class = "selected_tab">
-    <a href = "??...">
-      <span>{'ec_tab_autoid'|@translate}</span>
-    </a>
-  </li>
-  <li class = "normal_tab">
-    <a href = "??...">
-      <span>{'ec_tab_config'|@translate}</span>
-    </a>
-  </li>
-</ul> *}
-
-{* <!-- Help button --> *} {*
-<ul class = "HelpActions">
-  <li>
-    <a href = "aide" onclick = "popuphelp(this.href); return false;" title = "{'ec_help'|@translate}" style = "margin-top: -28px;" >
-      <img src = "{$ROOT_URL}{$themeconf.admin_icon_dir}/help.png" class = "button" alt = "(?)" />
-    </a>
-  </li>
-</ul> *}
 
 {* <!-- Page title --> *}
@@ -37,5 +14,5 @@
 </script>
 
-{* <!-- Upper banner : infos, errors... --> *}
+{* <!-- EC Presentation --> *}
 {if $ec_howto}
   <div>
@@ -48,20 +25,22 @@
 </p>
 
+{* <!-- Whether plugin Additionnal Pages is active or not --> *}
+<div style = "text-align:right; font-style:italic;">
+  {if $ec_ap_ok}
+    {'ec_plugin_ap_ok'|@translate}
+    <script type = "text/javascript"><!--
+      var ec_ap_ok = true; //-->
+    </script>
+  {else}
+    {'ec_plugin_ap_nok'|@translate}
+    <script type = "text/javascript"><!--
+      var ec_ap_ok = false; //-->
+    </script>
+  {/if}
+</div>
+
 {* <!-- First section : form to view and modify codes, or create a new one --> *}
 <form class = "filter" method = "post" name = "ec_up_code" action = "">
-  
-  <div style = "text-align:right; font-style:italic;">
-    {if $ec_ap_ok}
-      {'ec_plugin_ap_ok'|@translate}
-      <script type = "text/javascript"><!--
-        var ec_ap_ok = true; //-->
-      </script>
-    {else}
-      {'ec_plugin_ap_nok'|@translate}
-      <script type = "text/javascript"><!--
-        var ec_ap_ok = false; //-->
-      </script>
-    {/if}
-  </div>
+  <input type = "hidden" id = "ec_act1_id" name = "ec_act1" />
   
   <div style = "text-align:center; font-weight:bold; font-size:120%;">{'ec_entry_table_title'|@translate}</div><br>
@@ -100,13 +79,12 @@
           </a>
           &nbsp;
-          <a href = "javascript:void()" onclick = "return ec_check_del({$code_line.id});">
-     {* envoi formulaire par JS : document.forms[nom_formulaire].submit() ( http://www.toutjavascript.com/reference/reference.php?iref=178 ) *}
-            <img src = "{$EVNTCATS_URLS.ROOT}icon/delete.png" class = "button" style = "border:none"
+          <a href = "javascript:void();" 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}
             &nbsp;
-            <a href = "javascript:void()" onclick = "return ec_check_dis({$code_line.id});">
-              <img src = "{$EVNTCATS_URLS.ROOT}icon/disable.png" class = "button" style = "border:none"
+            <a href = "javascript:void();" 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>
@@ -114,18 +92,22 @@
               &nbsp;
               <a href = "javascript:void()" title = "{'ec_toggle_forced'|@translate}" onclick = "return ec_toggle_forced({$code_line.id});">
-                <img class = "button" style = "border:none" src = "{$EVNTCATS_URLS.ROOT}icon/forced.png"
-                 alt = "{'ec_url_forced'|@translate}" title = "{'ec_url_forced'|@translate}"/>
+                <img class = "button" src = "{$EVNTCATS_URLS.ROOT}icon/forced.png"
+                 {if $code_line.f_pb} style = "border:solid medium red;" {/if}
+                 alt = "{'ec_url_forced'|@translate}" title = "{'ec_url_forced'|@translate}"
+                />
               </a>
             {else}
               &nbsp;
               <a href = "javascript:void()" title = "{'ec_toggle_forced'|@translate}" onclick = "return ec_toggle_forced({$code_line.id});">
-                <img class = "button" style = "border:none" src = "{$EVNTCATS_URLS.ROOT}icon/nforced.png"
+                <img class = "button" src = "{$EVNTCATS_URLS.ROOT}icon/nforced.png"
                  alt = "{'ec_url_nforced'|@translate}" title = "{'ec_url_nforced'|@translate}"/>
               </a>
-              &nbsp;
-              <a href = "javascript:void()" title = "{'ec_duplicate_entry'|@translate}" onclick = "return 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}" />
-              </a>
+              {if !$code_line.f_pb}
+                &nbsp;
+                <a href = "javascript:void()" title = "{'ec_duplicate_entry'|@translate}" onclick = "return 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}" />
+                </a>
+              {/if}
             {/if}
           {/if}
@@ -319,4 +301,8 @@
     </tr>
   </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();"/>
+  </p>
 </form>
 
@@ -333,10 +319,10 @@
   {/foreach}
   
-  ec_JS_message['ec_confirm_disable'] = "{'ec_confirm_disable'|@translate|@escape:javascript}";
-  ec_JS_message['ec_confirm_delete'] = "{'ec_confirm_delete'|@translate|@escape:javascript}";
-  ec_JS_message['ec_confirm_test'] = "{'ec_confirm_test'|@translate|@escape:javascript}";
+  ec_JS_message['ec_confirm_disable']   = "{'ec_confirm_disable'|@translate|@escape:javascript}";
+  ec_JS_message['ec_confirm_delete']    = "{'ec_confirm_delete'|@translate|@escape:javascript}";
+  ec_JS_message['ec_confirm_test']      = "{'ec_confirm_test'|@translate|@escape:javascript}";
   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}";
-  ec_JS_message['ec_new_pwd_gen'] = "{'ec_new_pwd_gen'|@translate|@escape:javascript}";
+  ec_JS_message['ec_act_cat_miss']      = "{'ec_act_cat_miss'|@translate|@escape:javascript}";
+  ec_JS_message['ec_new_pwd_gen']       = "{'ec_new_pwd_gen'|@translate|@escape:javascript}";
   
   ec_init();
@@ -354,4 +340,9 @@
 
 {* <!-- {$test0tpl} --> *}
+<p>$_GET :</p>
+{$GET}
+<p>$_POST :</p>
+{$POST}
+<p>Autres :</p>
 {$test1tpl}
 {$test2tpl}
Index: /extensions/event_cats/include/evntcats_funcs.inc.php
===================================================================
--- /extensions/event_cats/include/evntcats_funcs.inc.php	(revision 3984)
+++ /extensions/event_cats/include/evntcats_funcs.inc.php	(revision 3985)
@@ -183,5 +183,6 @@
     foreach ($ec_lists['ec_table'] as &$ec_entry) { // & is needed here
       if (isset($to_correct[$ec_entry['code']])) {
-        $ec_entry['action'] = $new_action;
+        $ec_entry['action'] = ($check_forced) ?
+         $ec_entry['action'].$new_action : $new_action;
       }
     }
@@ -195,5 +196,5 @@
   
   // Multiple "forced" params for a single code check
-  ec_inpect('forced', 'ec_ok_forced_pb', true, true);
+  ec_inpect('forced', '_f_pb', true, true);
   
   // User id and associated page validities checks
@@ -202,5 +203,5 @@
     // Check if associated user_id exists
     if (
-     $ec_entry['action'] == 'ec_ok' and
+     is_in($ec_entry['action'], 'ec_ok') and
      !array_key_exists($ec_entry['user_id'], $ec_lists['user_ids'])
     ) {
@@ -211,5 +212,5 @@
     $a = 0;
     if (!empty($ec_entry['arg1']) and
-     (strpos($ec_entry['action'], 'ec_ok') !== false)) $a++; // Only arg2
+     is_in($ec_entry['action'], 'ec_ok')) $a++; // Only arg2
     // is significant if action is ec_nok[_xxx] .
     if (!empty($ec_entry['arg2'])) $a+= 2;
@@ -220,5 +221,5 @@
         if (
           $ec_ap_ok and (
-            $ec_entry['action'] == 'ec_ok' or
+            is_in($ec_entry['action'], 'ec_ok') or
             $ec_entry['action'] == 'ec_nok'
           ) and
@@ -231,5 +232,5 @@
       case 1: // Category
       case 3: // Image
-        if ($ec_entry['action'] == 'ec_ok') {
+        if (is_in($ec_entry['action'], 'ec_ok')) {
           if (array_key_exists($ec_entry['arg1'], $ec_lists['categories'])) {
             if ($a == 3) { // case 3: // Image
@@ -274,5 +275,5 @@
     $res = pwg_query('SELECT id,title FROM '.ADD_PAGES_TABLE);
     while ($r = mysql_fetch_assoc($res)) {
-      $c = (strpos($r['title'], '/user_id=')) ? '/user_id=' : '/group_id=';
+      $c = (is_in($r['title'], '/user_id=')) ? '/user_id=' : '/group_id=';
       $a = explode($c ,$r['title']);
       $ec_lists['add_pages'][$r['id']] = $a[0];
@@ -297,4 +298,18 @@
   // Construction of $ec_lists['ec_table'] array var
   build_ec_table();
+}
+
+/*
+ * is_in($haystack, $needle)
+ * returns true or false whether $needle is a string found in string $haystack
+ *
+ * @param
+ *   $haystack : the string in which to search
+ *   $needle   : the string looked for
+ * @return
+ *   true if $needle is found in $haystack ; false if not
+ */
+function is_in($haystack, $needle) {
+  return (strpos($haystack, $needle) !== false);
 }
 
Index: /extensions/event_cats/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/event_cats/language/fr_FR/plugin.lang.php	(revision 3984)
+++ /extensions/event_cats/language/fr_FR/plugin.lang.php	(revision 3985)
@@ -64,11 +64,11 @@
 // In PHP files
 // Errors
-$lang['ec_action_pb']             = 'Champ "action" corrompu (plusieurs valeurs pour un même code dans la base de données)';
-$lang['ec_username_pb']           = 'Champ "user_id" corrompu (plusieurs valeurs pour un même code dans la base de données)';
-$lang['ec_forced_pb']             = 'Champ "forced" corrompu (au moins une fois "true" pour un même code dans la base de données)';
-$lang['ec_username_miss']         = 'Utilisateur inexistant (probablement supprimé)';
-$lang['ec_category_miss']         = 'Catégorie inexistante (probablement supprimée)';
-$lang['ec_image_miss']            = 'Image inexistante (probablement supprimée)';
-$lang['ec_add_page_miss']         = 'Page Additional Pages inexistante (probablement supprimée)';
+$lang['ec_action_pb']             = 'champ "action" corrompu (plusieurs valeurs pour un code ayant plusieurs entrées)';
+$lang['ec_username_pb']           = 'champ "user_id" corrompu (plusieurs valeurs pour un code ayant plusieurs entrées)';
+$lang['ec_forced_pb']             = 'champ "forced" corrompu (au moins une fois "true" pour un code ayant plusieurs entrées)';
+$lang['ec_username_miss']         = 'utilisateur inexistant (probablement supprimé)';
+$lang['ec_category_miss']         = 'catégorie inexistante (probablement supprimée)';
+$lang['ec_image_miss']            = 'image inexistante (probablement supprimée)';
+$lang['ec_add_page_miss']         = 'page Additional Pages inexistante (probablement supprimée)';
 $lang['ec_entry_del_nok_pre']     = 'Problème avec suppression entrée ';
 $lang['ec_entry_del_nok_end']     = '';
@@ -92,8 +92,11 @@
 //   actions
 $lang['ec_ok']                    = 'OUI';
-$lang['ec_ok_forced_pb']          = 'OUI (page non forcée)';
+$lang['ec_ok_f_pb']               = 'OUI (page non forcée)';
 $lang['ec_ok_ap_pb']              = 'OUI (Add. Page inconnue)';
 $lang['ec_ok_cat_pb']             = 'OUI (catégorie inconnue)';
 $lang['ec_ok_img_pb']             = 'OUI (image inconnue)';
+$lang['ec_ok_f_pb_ap_pb']         = 'OUI (page non forcée et Add. Page inconnue)';
+$lang['ec_ok_f_pb_cat_pb']        = 'OUI (page non forcée et catégorie inconnue)';
+$lang['ec_ok_f_pb_img_pb']        = 'OUI (page non forcée et image inconnue)';
 $lang['ec_nok']                   = 'NON';
 $lang['ec_nok_ap_pb']             = 'NON';
Index: /extensions/event_cats/main.inc.php
===================================================================
--- /extensions/event_cats/main.inc.php	(revision 3984)
+++ /extensions/event_cats/main.inc.php	(revision 3985)
@@ -117,5 +117,5 @@
     }
     if ($code_exists) {
-      if (strpos($ec_entry['action'], 'ec_ok') !== false) {
+      if (is_in($ec_entry['action'], 'ec_ok')) {
         log_user($ec_entry['user_id'], false);
         if (isset($_GET['ap'])) $ec_ap = $_GET['ap'];
@@ -124,5 +124,5 @@
         if (
          $ec_entry['forced'] == 'true' and
-         $ec_entry['action'] != 'ec_forced_pb'
+         !is_in($ec_entry['action'], '_f_pb')
         ) {
           if (empty($ec_entry['arg1']) and !empty($ec_entry['arg2'])) {
Index: /extensions/event_cats/maintain.inc.php
===================================================================
--- /extensions/event_cats/maintain.inc.php	(revision 3984)
+++ /extensions/event_cats/maintain.inc.php	(revision 3985)
@@ -110,5 +110,5 @@
                        the user ids table ;
   ec_nok_ap_pb       : not valid Additional Page id -> access denied ;
-  ec_ok_forced_pb    : the same "code" is used in more than one entries in the
+  ec_ok_f_pb         : the same "code" is used in more than one entries in the
                        DB (which is allowed) and the "forced" argument is
                        "true" for at least one of these entries, which should
@@ -119,4 +119,7 @@
   ec_ok_cat_pb       : not valid category id -> home page ;
   ec_ok_img_pb       : not valid image id -> category page ;
+  ec_ok_f_pb_ap_pb   : ec_ok_ap_pb + "forced problem" -> home page ;
+  ec_ok_f_pb_cat_pb  : ec_ok_cat_pb + "forced problem" -> home page ;
+  ec_ok_f_pb_img_pb  : ec_ok_img_pb + "forced problem" -> category page ;
 
 _ the two main fields are "user_id" and "code", as the main purpose of the
