Changeset 8956


Ignore:
Timestamp:
Jan 28, 2011, 8:56:39 AM (9 years ago)
Author:
LucMorizur
Message:

Fix bug:2135

Location:
extensions/event_cats
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • extensions/event_cats/CHANGELOG.txt

    r6425 r8956  
     12011-01-28 1.2.4
     2                  Fix bug 2135
     3
    142010-01-04 1.2.3
    25                  Re-fix bug 1432
  • extensions/event_cats/admin/autolog_entries.inc.php

    r7832 r8956  
    3636// +-----------------------------------------------------------------------+
    3737
    38 // Keeps file coded in UTF-8 without BOM: é
     38// Keeps file coded in UTF-8 without BOM : é
    3939
    4040if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     
    104104          elseif ($a == 3) { // Image
    105105            $url_end.= ($url_end == '') ? '' : '&img='.$arg2;
    106             $t = pwg_db_fetch_row(pwg_query("
     106            $t = mysql_fetch_row(pwg_query("
    107107             SELECT `name`, `file`
    108108             FROM `".IMAGES_TABLE."`
     
    201201  // construction of $code_URL
    202202  $code_URL =
    203    ROOT_URL.
     203   EC_ROOT_URL.
    204204   'index.php?autolog='.
    205205   $ec_entry['code'].
  • extensions/event_cats/admin/autolog_new.inc.php

    r7864 r8956  
    3636// +-----------------------------------------------------------------------+
    3737
    38 // Keeps file coded in UTF-8 without BOM: é
     38// Keeps file coded in UTF-8 without BOM : é
    3939
    4040if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     
    9696));
    9797
    98 $month_list = $lang['month'];
    99 $month_list[0]='------------';
    100 ksort($month_list);
    101 
    10298if ($ec_is_creation) {
    10399  $template->assign('ec_help_banner1', l10n('ec_help_banner1_new_c'));
     
    109105}
    110106
    111 $template->assign(array(
    112   'ec_hidden_when_no_code' => (count($ec_lists['duplicable_codes']) == 0) ?
    113    'style = "display:none;"' : '',
    114   'ec_hidden_when_no_user' => (count($ec_lists['user_ids']) == 0) ?
    115    'style = "display:none;"' : '',
    116   'ec_no_assoc'            => ((pwg_db_num_rows(pwg_query("
    117     SELECT *
    118     FROM `".IMAGE_CATEGORY_TABLE."`
    119   "))) == 0),
    120   'month_list'             => $month_list,
    121   'ec_days'                => $lang['day'],
    122   'ec_current_day'         => intval(date('j')),
    123   'ec_current_month'       => intval(date('n')),
    124   'ec_current_year'        => intval(date('Y')),
    125   'ec_current_time'        => date('H').":".date('i'), /*
    126   'ec_server_timestamp'    => date('H:i'), */
    127   'ec_ap_ok'               => defined('ADD_PAGES_TABLE'),
    128   'ec_lists'               => $ec_lists,
    129   'ec_default_entry'       => $ec_default_entry,
    130   'ec_default_action'      => $ec_default_action,
    131   'ec_def_auto_code_dg_nb' => $ec_def_auto_code_dg_nb,
    132   'ec_auto_code_dg_nb'     =>
    133    $ec_conf_possible_values['auto_code_dg_nb'],
    134 ));
     107$template->assign('ec_hidden_when_no_code',
     108  (count($ec_lists['duplicable_codes']) == 0) ? 'style = "display:none;"' : ''
     109);
     110$template->assign('ec_hidden_when_no_user',
     111  (count($ec_lists['user_ids']) == 0) ? 'style = "display:none;"' : ''
     112);
     113$template->assign('ec_no_assoc', ((mysql_num_rows(pwg_query("
     114  SELECT *
     115  FROM `".IMAGE_CATEGORY_TABLE."`
     116"))) == 0));
     117$template->assign('ec_ap_ok',               defined('ADD_PAGES_TABLE'));
     118$template->assign('ec_lists',               $ec_lists);
     119$template->assign('ec_default_entry',       $ec_default_entry);
     120$template->assign('ec_default_action',      $ec_default_action);
     121$template->assign('ec_def_auto_code_dg_nb', $ec_def_auto_code_dg_nb);
     122$template->assign('ec_auto_code_dg_nb',
     123 $ec_conf_possible_values['auto_code_dg_nb']);
    135124
    136125?>
  • extensions/event_cats/admin/config.inc.php

    r7832 r8956  
    3636// +-----------------------------------------------------------------------+
    3737
    38 // Keeps file coded in UTF-8 without BOM: é
     38// Keeps file coded in UTF-8 without BOM : é
    3939
    4040if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    4141
    42 global $ec_conf_possible_values, $ec_conf;
     42global $ec_conf_default, $ec_conf;
    4343
    4444// +-----------------------------------------------------------------------+
     
    5454  sprintf(
    5555    l10n('Register replacement'),
    56     '<br>',
     56    '&nbsp;&nbsp;<br />', // nicer line feed
    5757    $lang['Register'],
    5858    $lang['Duplicate']
     
    6464  sprintf(
    6565    l10n('Display connection'),
    66     '<br>',
     66    '&nbsp;&nbsp;<br />', // nicer line feed
    6767    (version_compare(PHPWG_VERSION, '2.1.0', '<')) ?
    6868     $lang['Connection'] : $lang['Login']
     
    7979// Sends configuration values to the template, described per key
    8080$ec_conf2 = array(); $i = 0;
    81 foreach ($ec_conf_possible_values as $k => $v)
    82  { $ec_conf2[$k] = $ec_conf[$i]; $i++; }
     81foreach ($ec_conf_default as $k => $v) { $ec_conf2[$k] = $ec_conf[$i]; $i++; }
    8382$template->assign('ec_conf', $ec_conf2);
    8483$template->assign('ec_help_banner1', l10n('ec_help_banner1_config'));
  • extensions/event_cats/admin/duplication.inc.php

    r7832 r8956  
    3636// +-----------------------------------------------------------------------+
    3737
    38 // Keeps file coded in UTF-8 without BOM: é
     38// Keeps file coded in UTF-8 without BOM : é
    3939
    4040if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     
    5858  sprintf(
    5959    l10n('Register replacement'),
    60     '<br>',
     60    '&nbsp;&nbsp;<br />', // nicer line feed
    6161    $lang['Register'],
    6262    $lang['Duplicate']
  • extensions/event_cats/admin/evntcats_admin.php

    r8061 r8956  
    3636// +-----------------------------------------------------------------------+
    3737
    38 // Keeps file coded in UTF-8 without BOM: é
     38// Keeps file coded in UTF-8 without BOM : é
    3939
    4040if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     
    213213    SET `arg2` = $c
    214214    WHERE `arg1` = 3
    215       AND `code` IS NULL
    216215    LIMIT 1 ;
    217216  " : "
     
    238237    SET `arg2` = $c
    239238    WHERE `arg1` = 3
    240       AND `code` IS NULL
    241239    LIMIT 1 ;
    242240  " : "
     
    381379/*
    382380print '<pre>';
    383 //print_r('ROOT_URL : '.ROOT_URL.'<br>EVNTCATS_PATH : '.EVNTCATS_PATH);
    384 print('ROOT_URL + ... : '.preg_match('/(\d+\.\d+)\.(\d+)/', PHPWG_VERSION, $matches));
    385 print('<br>');
     381//print_r('EC_ROOT_URL : '.EC_ROOT_URL.'<br>EVNTCATS_PATH : '.EVNTCATS_PATH);
     382print('EC_ROOT_URL + ... : '.preg_match('/(\d+\.\d+)\.(\d+)/', PHPWG_VERSION, $matches));
     383print('<br />');
    386384print_r($matches);
    387385print '</pre>';
    388386*/
    389387
    390 $template->assign(array(
    391  'HeaderIncTPL'        =>
    392   realpath('plugins/event_cats/admin/template/header.inc.tpl'),
    393  'SmartFieldsetIncTPL' =>
    394   realpath('plugins/event_cats/admin/template/smart_fieldsets.inc.tpl'),
    395  'FooterIncTPL'        =>
    396   realpath('plugins/event_cats/admin/template/footer.inc.tpl'),
    397 ));
     388$template->assign(
     389 'HeaderIncTPL', realpath('plugins/event_cats/admin/template/header.inc.tpl')
     390);
     391
     392$template->assign(
     393 'FooterIncTPL', realpath('plugins/event_cats/admin/template/footer.inc.tpl')
     394);
    398395
    399396$template->assign(
     
    408405
    409406$template->assign('EVNTCATS_PATH', EVNTCATS_PATH);
    410 $template->assign('RACINE_URL', ROOT_URL);
     407$template->assign('RACINE_URL', EC_ROOT_URL);
    411408$template->assign('U_HELP', get_root_url().'popuphelp.php?page=help');
    412409
    413 if (isset($conf['ec_debug1']) and $conf['ec_debug1'])
    414  $template->assign('ec_debug1', array(
     410if (isset($conf['ec_debug1'])) $template->assign('ec_debug1', array(
    415411  'POST'      => str_from_var($_POST),
    416412  'ec_debug'  => (isset($ec_debug)) ? str_from_var($ec_debug) : '(unset)',
  • extensions/event_cats/admin/evntcats_theme.css

    r7832 r8956  
    1 /* Keeps file coded in UTF-8 without BOM: é */
     1/* Keeps file coded in UTF-8 without BOM : é */
    22
    33#ec_js_warn {
  • extensions/event_cats/admin/template/autolog_entries.js

    r7832 r8956  
    11/* Event Cats Javascript functions LucMorizur June 2009 - ... */
    22
    3 // Keeps file coded in UTF-8 without BOM: é
     3// Keeps file coded in UTF-8 without BOM : é
    44
    55var ec_checked_line = -1;
  • extensions/event_cats/admin/template/autolog_entries.tpl

    r7832 r8956  
    11{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
    22
    3 {* <!-- Keeps file coded in UTF-8 without BOM: é --> *}
     3{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
    44
    55{include file=$HeaderIncTPL}
     
    1818      {'Hide'|@translate}
    1919    </label>
    20     &nbsp;&nbsp;
     20    &nbsp;&#151;&nbsp;
    2121  </span>
    2222  {if $ec_ap_ok}
     
    3333</div><span id = "ec_help_ban"></span>
    3434
    35 <br>
     35<br />
    3636
    3737{* <!-- Form to view codes --> *}
    3838<form class = "filter" method = "post" name = "ec_view_codes" action = "">
    39   <p>
    40     <input type = "hidden" id = "ec_act1_id" name = "ec_act1">
    41     <input type = "radio" name = "ec_entry_sel" value = "-1" id = "selection--1" style = "display:none;">
    42   </p>
     39  <input type = "hidden" id = "ec_act1_id" name = "ec_act1" />
     40  <input type = "radio" name = "ec_entry_sel" value = "-1" id = "selection--1" style = "display:none;"/>
    4341 
    4442  <div style = "text-align:center; font-weight:bold; font-size:120%;">
     
    4846      <!--[if !IE]> <--> </label> <!--> <![endif]-->
    4947      <!-- What we're able to do for our "prefered" browser |-( ...!  -->
    50     </a><br><br>
    51   </div>
     48    </a><br />
     49  </div><br />
    5250 
    5351  {* <!-- Table to show codes present in MySQL table --> *}
     
    6967          <input type = "radio" name = "ec_entry_sel" value = "{$code_line.id}" id = "selection-{$code_line.id}"
    7068           onclick = "ec_mark_line({$code_line.id});"
    71          >
     69          />
    7270          <label for = "selection-{$code_line.id}">{$code_line.id}</label>
    7371          <a id = "ec_url_id_{$code_line.id}" style = "display:none;" href = "{$code_line.code_URL}"></a>
     
    7876          >
    7977            {$code_line.Code}
    80             {if !$comment_tooltip and $code_line.Comment != ''}<br>{$code_line.Comment}{/if}
     78            {if !$comment_tooltip and $code_line.Comment != ''}<br />{$code_line.Comment}{/if}
    8179          </label>
    8280        </td>
     
    8886            <a href = "javascript:void(0);" onclick = "ec_check_ds({$code_line.id});">
    8987              <img src = "{$EVNTCATS_URLS.ROOT}icon/disable.png" class = "button"
    90                alt = "{'Outdate entry ttip'|@translate}" title = "{'Outdate entry ttip'|@translate}">
     88               alt = "{'Outdate entry ttip'|@translate}" title = "{'Outdate entry ttip'|@translate}" />
    9189            </a>
    9290            {if $code_line.Forced == 'true'}
     
    9492                <img class = "button" src = "{$EVNTCATS_URLS.ROOT}icon/forced.png"
    9593                 alt = "{'Unforce display ttip'|@translate}" title = "{'Unforce display ttip'|@translate}"
    96                >
     94                />
    9795              </a>
    9896            {else}
     
    103101              <a href = "javascript:void(0);" title = "{'Duplicate entry ttip'|@translate}" onclick = "ec_duplicate_entry({$code_line.id});">
    104102                <img src = "{$EVNTCATS_URLS.ROOT}icon/duplicate.png" class = "button" style = "border:none"
    105                  alt = "{'Duplicate entry ttip'|@translate}" title = "{'Duplicate entry ttip'|@translate}">
     103                 alt = "{'Duplicate entry ttip'|@translate}" title = "{'Duplicate entry ttip'|@translate}" />
    106104              </a>
    107105            {/if}
     
    122120        <label title = "{'Copy URL ttip'|@translate}">
    123121          {'URL'|@translate}
    124           <input type = "text" id = "ec_show_URL" size = "100" title = "{'Copy URL ttip'|@translate}" readonly = "readonly">
    125         </label><br>
    126         <br>
    127         <a href = "javascript:void(0);" title = "{'Test URL ttip'|@translate}"
    128          id = "ec_table_URL" onclick = "return ec_check_tst();" class = "ec_lower_tools" >
    129           <img src = "{$EVNTCATS_URLS.ROOT}icon/url2.png" class = "button" alt = "{'Test URL ttip'|@translate}">
     122          <input type = "text" id = "ec_show_URL" size = "100%" title = "{'Copy URL ttip'|@translate}" readonly = "readonly" />
     123        </label><br />
     124        <br />
     125        <a
     126         href = "javascript:void(0);" title = "{'Test URL ttip'|@translate}" alt = "{'Test URL ttip'|@translate}"
     127         id = "ec_table_URL" onclick = "return ec_check_tst();" class = "ec_lower_tools"
     128        />
     129          <img src = "{$EVNTCATS_URLS.ROOT}icon/url2.png" class = "button"/>
    130130          {'Test'|@translate}
    131131        </a>
    132132        &nbsp;&nbsp;
    133         <a href = "javascript:void(0);" onclick = "ec_check_dl();" id = "ec_del_link_id"
    134          class = "ec_lower_tools" title = "{'Delete entry ttip'|@translate}" >
    135           <img src = "{$EVNTCATS_URLS.ROOT}icon/delete.png" class = "button" alt = "{'Delete entry ttip'|@translate}">
     133        <a href = "javascript:void(0);" onclick = "ec_check_dl();" id = "ec_del_link_id" class = "ec_lower_tools"
     134         alt = "{'Delete entry ttip'|@translate}" title = "{'Delete entry ttip'|@translate}"
     135        >
     136          <img src = "{$EVNTCATS_URLS.ROOT}icon/delete.png" class = "button"/>
    136137          {'Delete'|@translate}
    137138        </a>
    138139        &nbsp;&nbsp;
    139         <a href = "javascript:void(0);" onclick = "ec_check_m();" id = "ec_mod_link_id"
    140          class = "ec_lower_tools" title = "{'Modify entry ttip'|@translate}" >
    141           <img src = "{$EVNTCATS_URLS.ROOT}icon/modify.png" class = "button" alt = "{'Modify entry ttip'|@translate}">
     140        <a href = "javascript:void(0);" onclick = "ec_check_m();" id = "ec_mod_link_id" class = "ec_lower_tools"
     141         alt = "{'Modify entry ttip'|@translate}" title = "{'Modify entry ttip'|@translate}"
     142        >
     143          <img src = "{$EVNTCATS_URLS.ROOT}icon/modify.png" class = "button"/>
    142144          {'Modify'|@translate}
    143145        </a>
    144146      </td>
    145147    </tr>
    146   </table>
     148  </table><br />
    147149</form>
    148150
  • extensions/event_cats/admin/template/autolog_new.js

    r8018 r8956  
    11/* Event Cats Javascript functions LucMorizur June 2009 - ... */
    22
    3 // Keeps file coded in UTF-8 without BOM: é
     3// Keeps file coded in UTF-8 without BOM : é
    44
    55// All variables declarations
     
    77// of .tpl file, thus some values below are modified during the HTML page
    88// "reading and displaying"
    9 
    109var ec_avoid_infinite_loop      = true;
    1110var ec_is_creation              = true;
    1211var ec_chk_nover_cat            = true;
    1312var ec_chk_over_grp             = true;
    14 var ec_ap_ok                    = false;
    1513var ec_flag1                    = false;
    1614var ec_flag2                    = false;
    1715var ec_dont_check               = false;
    1816var ec_selected_old_group       = false;
    19 var ec_validity_on              = false;
    20 var ec_validity_day_length      = 0;
    2117var ec_err                      = '';
    2218var ec_selected_img             = '';
     
    4137var ec_selected_code            = '-1';
    4238var ec_selected_action          = '-1';
    43 var maintenant                  = new Date();
    44 var validity_date               = new Date();
    4539var ec_JS_message               = new Array();
    4640var ec_duplic_codes             = new Array();
    4741var ec_lists_temp               = new Array();
    48 var ec_validity_days            = new Array();
    4942var ec_lists                    = new Array();
    5043    ec_lists['code']            = new Array();
     
    6154}
    6255
    63 function ec_add_0(s) {
    64   var s2 = String(s);
    65   return (s2.length == 1) ? "0" + s2 : s2;
    66 }
    67 
    6856function ec_check_exist_value(ec_id, ec_val) {
    6957  var e = document.getElementById(ec_id);
     
    8068  }
    8169  return false;
    82 }
    83 
    84 function ec_update_comment(ec_id) {
    85   if (ec_id == '')
    86    de('first_fieldset_comment_id').innerHTML = '';
    87   else
    88    de('first_fieldset_comment_id').innerHTML = ' <em>(' + ec_id + ')</em>';
    8970}
    9071
     
    150131
    151132function ec_mark_code(ec_id) {
    152   var t2 = d.ec_new_code.ec_in_up_code_list_id;
    153133  if (ec_id == '-1') {
    154134    de('ec_sel_code_old').checked = 'checked';
     
    173153           (ec_selected_old_group) ? 'checked' : '';
    174154          de('ec_act2_id').value                    = '-1';
    175           de('first_cache_id').innerHTML            = ec_new_code_text;
    176           ec_update_comment(ec_new_comment_text);
    177155        break;
    178156        case 'ec_sel_code_old':
     
    189167          ec_selected_old_user               =
    190168           ec_lists['user_id'][ec_selected_old_code];
    191           de('first_cache_id').innerHTML     =
    192            ec_lists['code'][t2.options[t2.selectedIndex].value];
    193           ec_update_comment(
    194             ec_lists['comment'][t2.options[t2.selectedIndex].value]
    195           );
    196169          ec_flag1 = true;
    197170          ec_mark_user('ec_sel_user_old');
     
    213186
    214187function ec_mark_user(ec_id) {
    215   var t = d.ec_new_code.ec_in_up_usr_list_id;
    216188  if (ec_id == '-1') {
    217189    de('ec_sel_user_old').checked = 'checked';
     
    245217          de('ec_in_up_newgroup_id').checked       = '';
    246218          de('ec_in_up_usr_list_id').selectedIndex = '-1';
    247           de('second_cache_id').innerHTML          = '';
    248219        break;
    249220        case 'ec_sel_user_new': // New user
     
    258229           (ec_selected_old_group) ? 'checked' : '';
    259230          de('ec_in_up_usr_list_id').selectedIndex = '-1';
    260           de('second_cache_id').innerHTML          = ec_new_user_text;
    261231        break;
    262232        case 'ec_sel_user_old': // "Old" user
    263233          if (ec_selected_action == 'ec_input_action_refused')
    264234           ec_selected_action = 'ec_input_action_home';
    265           de('ec_in_up_usr_txt_id').value          = '';
    266           de('ec_in_up_psd_txt_id').value          = '';
    267           de('ec_confirm_psd_txt_id').value        = '';
    268           de('ec_in_up_grp_txt_id').value          = '';
    269           de('ec_in_up_newgroup_id').checked       = '';
    270           de('ec_in_up_usr_list_id').value         = ec_selected_old_user;
    271           de('second_cache_id').innerHTML          =
    272            t.options[t.selectedIndex].label;
     235          de('ec_in_up_usr_txt_id').value    = '';
     236          de('ec_in_up_psd_txt_id').value    = '';
     237          de('ec_confirm_psd_txt_id').value  = '';
     238          de('ec_in_up_grp_txt_id').value    = '';
     239          de('ec_in_up_newgroup_id').checked = '';
     240          de('ec_in_up_usr_list_id').value   = ec_selected_old_user;
    273241        break;
    274242      }
     
    388356
    389357function ec_rnd(ec_min, ec_max) {
    390   return Math.floor(ec_min + (ec_max - ec_min + 1) * Math.random());
     358  return Math.floor(ec_min + (ec_max - ec_min + 1) * Math.random() );
    391359}
    392360
     
    719687}
    720688
    721 function ec_get_validity() {
    722   validity_date.setMilliseconds(0);
    723   validity_date.setSeconds(0);
    724   validity_date.setMinutes(de('ec_validity_time_id').value.match(/\d+$/));
    725   validity_date.setHours(de('ec_validity_time_id').value.match(/^\d+/));
    726   validity_date.setDate(de('ec_validity_day_id').selectedIndex);
    727   validity_date.setMonth(de('ec_validity_month_id').selectedIndex - 1);
    728   validity_date.setFullYear(de('ec_validity_year_id').value);
    729 }
    730 
    731 function ec_set_validity() {
    732   validity_date.setMilliseconds(0);
    733   validity_date.setSeconds(0);
    734   de('ec_validity_year_id').value          = validity_date.getFullYear();
    735   de('ec_validity_month_id').selectedIndex = validity_date.getMonth() + 1;
    736   de('ec_validity_day_id').selectedIndex   = validity_date.getDate();
    737   de('ec_validity_time_id').value          =
    738    ec_add_0(validity_date.getHours()) +
    739    ':' +
    740    ec_add_0(validity_date.getMinutes());
    741   de('ec_validity_sel_day').value          =
    742    ec_validity_days[validity_date.getDay()];
    743 }
    744 
    745 function ec_validity_check_min() {
    746   var tp = new Date();
    747   tp.setMilliseconds(0);
    748   tp.setSeconds(0);
    749   maintenant.setTime(tp.getTime());
    750   tp.setTime(maintenant.getTime() + 120000); // PHP will not allow that
    751   // [date & time] is less than [one minute more than current [date & time]].
    752   // Thus considering processing time, JavaScript should not allow a date
    753   // less than [two minutes more than current [date & time]] (due to the fact
    754   // that base unit for this value is one minute).
    755   de("ec_min_year_id").value          = tp.getFullYear();
    756   de("ec_min_month_id").selectedIndex = tp.getMonth() + 1;
    757   de("ec_min_day_id").selectedIndex   = tp.getDate();
    758   ec_get_validity();
    759   if (Number(validity_date.getTime()) < Number(tp.getTime()))
    760    validity_date.setTime(tp.getTime());
    761   ec_set_validity();
    762 }
    763 
    764 function ec_mark_now() {
    765   maintenant = new Date();
    766   maintenant.setMilliseconds(0);
    767   maintenant.setSeconds(0);
    768   validity_date.setTime(maintenant.getTime() + 120000); // See two minutes
    769    // explanation in function ec_validity_check_min
    770   ec_set_validity();
    771 }
    772 
    773 function ec_validity_set_min() {
    774   ec_validity_check_min();
    775   // Run again this whole function after 1 mn
    776   window.setTimeout("ec_validity_set_min()", 60000);
    777 }
    778 
    779 function ec_add_time(v2, k) {
    780   var m = 0; var ts = 0;
    781   var v = (isNaN(v2)) ? 0 : Number(v2);
    782   if (v < 0) v = 0;
    783   ec_get_validity();
    784   ts = Number(validity_date.getTime());
    785   switch (k) {
    786     case 0: // minute(s)
    787       validity_date.setTime(ts + (v *    60000));
    788     break;
    789     case 1: // hour(s)
    790       validity_date.setTime(ts + (v *  3600000));
    791     break;
    792     case 2: // day(s)
    793       validity_date.setTime(ts + (v * 86400000));
    794     break;
    795     case 3: // month(s)
    796       m = Number(de('ec_validity_month_id').selectedIndex + v);
    797       validity_date.setFullYear(
    798         Number(de('ec_validity_year_id').value) + Math.floor(m / 12)
    799       );
    800       validity_date.setMonth(m % 12); // % : modulo
    801     break;
    802     case 4: // year(s)
    803       validity_date.setFullYear(Number(de('ec_validity_year_id').value) + v);
    804     break;
    805   }
    806   ec_set_validity();
    807   ec_validity_check_min();
    808 }
    809 
    810 function ec_valid_set_time_to(v) {
    811   var tp = new Date();
    812   var ts = 0;
    813   tp.setMilliseconds(0);
    814   tp.setSeconds(0);
    815   maintenant.setTime(tp.getTime());
    816   tp.setTime(maintenant.getTime() + 120000); // See two minutes
    817    // explanation in function ec_validity_check_min
    818   ec_get_validity();
    819   validity_date.setHours(v);
    820   validity_date.setMinutes(0);
    821   ts = Number(validity_date.getTime());
    822   if (ts < Number(tp.getTime()))
    823    validity_date.setTime(ts + 86400000); // Add 1 day
    824   ec_set_validity();
    825   ec_validity_check_min();
    826 }
    827 
    828 function ec_check_validity_on() {
    829   jQuery('.ec_valid_ctl').attr('disabled', !ec_validity_on);
    830   jQuery('img.ui-datepicker-trigger').css(
    831     'display', (ec_validity_on) ? 'inline' : 'none'
    832   );
    833   jQuery('#ec_tmp_img').css(
    834     'display', (ec_validity_on) ? 'none' : 'inline'
    835   );
    836 }
    837 
    838 function ec_toggle_fieldset(f1, f2) {
    839   var t = jQuery(f1).css('display');
    840   jQuery(f1).css('display', jQuery(f2).css('display'));
    841   jQuery(f2).css('display', t);
    842 }
    843 
    844689function ec_init() {
    845690  ec_selected_old_group                           = false;
     
    860705  ec_selected_user                                = '-1';
    861706  ec_selected_code                                = '-1';
    862   de('ec_valid_offset_id').value                  =
    863    maintenant.getTimezoneOffset();
    864707  de('ec_style_forced_id').innerHTML              = ec_up_code_lbl_forced_txt;
    865708  de('ec_act1_id').value                          = ec_default_action;
     
    878721  de('ec_input_action_home').checked              = 'checked';
    879722  de('ec_input_action_home').checked              = '';
    880   for (var i = 0; i <= 6; i++)
    881    ec_validity_day_length =
    882     (ec_validity_days[i].length > ec_validity_day_length) ?
    883      ec_validity_days[i].length : ec_validity_day_length;
    884   ec_validity_day_length++;
    885   de('ec_validity_sel_day').size                  = ec_validity_day_length;
    886   ec_mark_now();
    887   ec_validity_set_min();
    888   pwg_initialization_datepicker("#ec_min_day_id", "#ec_min_month_id",
    889    "#ec_min_year_id", "#ec_min_date_id", null, null, null);
    890   pwg_initialization_datepicker("#ec_validity_day_id",
    891    "#ec_validity_month_id", "#ec_validity_year_id", "#ec_linked_date_id",
    892    null, "#ec_min_date_id", null);
    893   maintenant = new Date();
    894   maintenant.setMilliseconds(0);
    895   maintenant.setSeconds(0);
    896   validity_date.setTime(maintenant.getTime());
    897723 
    898724  if (ec_is_creation) { // Entry creation
     
    1015841  }
    1016842  ec_mark_help('');
    1017   sf_init('first_fieldset_id', 'first_cache_id');
    1018   sf_init('second_fieldset_id', 'second_cache_id');
    1019   jQuery(document).ready(function(){
    1020     jQuery('#first_cache_id').after(document.createElement('span'));
    1021     jQuery('#first_cache_id').next().attr('id', 'first_fieldset_comment_id');
    1022     jQuery('#ec_tmp_img').attr(
    1023       'src', jQuery('img.ui-datepicker-trigger:first').attr('src')
    1024     );
    1025     ec_check_validity_on();
    1026     jQuery('.ui-datepicker').click(function(){
    1027       ec_validity_check_min();
    1028     });
    1029     jQuery('.ec_datepicker').change(function(){
    1030       ec_validity_check_min();
    1031     });
    1032     jQuery('#ec_validity_sel_day').css(
    1033       'backgroundColor', jQuery('#content').css('backgroundColor')
    1034     );
    1035     jQuery('#ec_validity_sel_day').css(
    1036       'color', jQuery('#content').css('color')
    1037     );
    1038     jQuery('.ec_valid_ctl').attr('disabled', 'disabled');
    1039     jQuery('#ec_valid_date_on_id').change(function(){
    1040       ec_validity_on = jQuery(this).attr('checked');
    1041       ec_check_validity_on();
    1042     });
    1043   });
    1044843  return false;
    1045844}
  • extensions/event_cats/admin/template/autolog_new.tpl

    r8018 r8956  
    11{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
    22
    3 {* <!-- Keeps file coded in UTF-8 without BOM: é --> *}
    4 
    5 {include file = $HeaderIncTPL}
    6 {include file = 'include/datepicker.inc.tpl'}
    7 {include file = $SmartFieldsetIncTPL}
    8 
    9 {* <!-- Specific CSS --> *}
    10 {html_head}
    11   {literal}
    12     <link rel = "stylesheet" type = "text/css" href = "{$RACINE_URL}themes/default/js/ui/theme/ui.datepicker.css">
    13     <style type = "text/css">
    14       #ui-datepicker-div {
    15         display:none;
    16       }
    17     </style>
    18   {/literal}
    19 {/html_head}
    20 
    21 {* <!-- JS functions --> *}
    22 <script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script>
     3{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
     4
     5{include file=$HeaderIncTPL}
    236
    247{* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *}
     
    3518      {'Hide'|@translate}
    3619    </label>
    37     &nbsp;&nbsp;
     20    &nbsp;&#151;&nbsp;
    3821  </span>
    3922  {if $ec_ap_ok}
    4023    {'Additional Pages active'|@translate}
    4124    <script type = "text/javascript">
    42       ec_ap_ok = {if count($ec_lists.add_pages) == 0}false{else}true{/if};
     25      var ec_ap_ok = {if count($ec_lists.add_pages) == 0}false{else}true{/if};
    4326    </script>
    4427  {else}
    4528    {'Additional Pages inactive'|@translate}
    4629    <script type = "text/javascript">
    47       ec_ap_ok = false;
     30      var ec_ap_ok = false;
    4831    </script>
    4932  {/if}
    5033</div><span id = "ec_help_ban"></span>
    5134<script type = "text/javascript"><!--
    52   de('ec_help_banner2').style.display = "none";
     35  document.getElementById('ec_help_banner2').style.display = "none";
    5336//--></script>
    5437
    5538{* <!-- Parameters list --> *}
    5639<form class = "filter" method = "post" name = "ec_new_code" action = "" onsubmit = "return ec_check_submit();">
    57   <p style = "display:none;">
    58     <input type = "hidden" id = "ec_act1_id" name = "ec_act1">
    59     <input type = "hidden" id = "ec_act2_id" name = "ec_entry_sel">
    60   </p>
     40  <input type = "hidden" id = "ec_act1_id" name = "ec_act1" />
     41  <input type = "hidden" id = "ec_act2_id" name = "ec_entry_sel" />
    6142 
    6243  {* <!-- Page title. Can be "New entry" or "Entry modification" --> *}
     
    7354    </a>
    7455    {if $ec_is_creation}
    75       <br><br>
    76       <input class = "submit" type = "button" value = "{'Full auto'|@translate}"
     56      <br /><br />
     57      <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{'Full auto'|@translate}"
    7758       id = "ec_submit_gen_full_auto_id" onclick = "ec_gen_full_auto();" style = "margin-top:0;"/>
    7859    {/if}
    7960  </div>
    8061 
    81   {* <!-- [ [ [New] / [existing] code] / [Existing entry] ] selection --> *}
    82   <fieldset id = "first_fieldset_id">
     62  {* <!-- [ [New / existing code] / [Existing entry] ] selection --> *}
     63  <fieldset>
    8364    <legend style = "font-weight:bold;">
    8465      {if $ec_is_creation}
     
    8869      {/if}
    8970    </legend>
    90     <ul>
    9171   
    9272      {if $ec_is_creation}
     
    9474          {* <!-- New code (to create) --> *}
    9575          <label for = "ec_in_up_code_id" onclick = "ec_mark_code('ec_sel_code_new');" {$ec_hidden_when_no_code} >
    96             <input type = "radio" name = "ec_sel_code" value = "new" id = "ec_sel_code_new"/>
     76            <input type = "radio" name = "ec_sel_code" for = "ec_in_up_code_id" value = "new" id = "ec_sel_code_new"/>
    9777            {'New code'|@translate}
    9878          </label>
    9979          <span {$ec_hidden_when_no_code} >&nbsp;</span>
    10080          <label for = "ec_in_up_code_id" style = "margin:0;">
    101             <input class = "submit" type = "button" value = "{'Auto code button'|@translate}"
     81            <input class = "submit" type = "button" name = "ec_submit_gen_code" value = "{'Auto code button'|@translate}"
    10282             id = "ec_submit_gen_code_id" onclick = "ec_gen_code();" style = "margin:0;"
    103            >
     83            />
    10484          </label>
    10585          {'Auto code mid'|@translate}
    10686          <select name = "ec_in_up_auto_code_length" id = "ec_in_up_auto_code_length_id" onchange = "ec_auto_code_digits_nb = this.value;">
    107             {foreach from = $ec_auto_code_dg_nb item = ec_item name = listloop}
     87            {foreach from=$ec_auto_code_dg_nb item=ec_item name=listloop}
    10888              <option value = "{$ec_item}">
    10989                {$ec_item}
     
    11797            {/foreach}
    11898          </select>
    119           {'Auto code end'|@translate}<br>
    120         </li>
    121        
    122         <li style = "padding-left: 30px;">
    123           <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40"
    124            id = "ec_in_up_code_id" onblur = "ec_check_code_text(this.value);"
    125          >
    126           &nbsp;—&nbsp;
    127           <label for = "ec_in_up_comment_id" style = "margin:0;" title = "{'Optional'|@translate}">
    128             <span style = "font-weight:bold; font-style:italic;">{'Comment'|@translate}</span>
    129             <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id"
    130               onchange = "ec_new_comment_text = this.value; ec_update_comment(this.value);"
    131            >
    132           </label>
     99          {'Auto code end'|@translate}<br />
     100          <li style = "padding-left: 30px;">
     101            <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40"
     102             id = "ec_in_up_code_id" onblur = "ec_check_code_text(this.value);"
     103            />
     104            &nbsp;&#151;&nbsp;
     105            <label for = "ec_in_up_comment_id" style = "margin:0;" title = "{'Optional'|@translate}">
     106              <span style = "font-weight:bold; font-style:italic;">{'Comment'|@translate}</span>
     107              <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id"
     108                onchange = "ec_new_comment_text = this.value;"
     109              />
     110            </label>
     111          </li>
    133112        </li>
    134113       
     
    136115          {* <!-- Known code --> *}
    137116          <label for = "ec_in_up_code_list_id" onclick = "ec_mark_code('ec_sel_code_old');" {$ec_hidden_when_no_code}>
    138             <input type = "radio" name = "ec_sel_code" {$ec_hidden_when_no_code} value = "old" id = "ec_sel_code_old">
     117            <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" />
    139118            {'Existing code'|@translate}
    140119          </label>
    141120          <select name = "ec_in_up_code_list" id = "ec_in_up_code_list_id" onchange = "ec_change_code_list(this.value);" {$ec_hidden_when_no_code} >
    142             {foreach from = $ec_lists.duplicable_codes.codes key = ec_key item = ec_val}
     121            {foreach from=$ec_lists.duplicable_codes.codes key=ec_key item=ec_val}
    143122              <option value = "{$ec_val.id}">
    144123                {$ec_key}
    145124                {if $ec_val.comment != ''}
    146                   &nbsp;&nbsp;{$ec_val.comment}
     125                  &nbsp;&#151;&nbsp;{$ec_val.comment}
    147126                {/if}
    148127              </option>
     
    157136          {* <!-- Entry choice --> *}
    158137          <select name = "ec_in_up_entry_list" id = "ec_in_up_entry_list_id" onchange = "ec_mark_entry(this.value);">
    159             {foreach from = $ec_lists.ec_table item = ec_val}
     138            {foreach from=$ec_lists.ec_table item=ec_val}
    160139              <option value = "{$ec_val.id}">
    161140                {$ec_val.id} : {$ec_val.code}
    162141                {if $ec_val.comment != ''}
    163                   &nbsp;&nbsp;{$ec_val.comment}
     142                  &nbsp;&#151;&nbsp;{$ec_val.comment}
    164143                {/if}
    165144              </option>
    166145            {/foreach}
    167146          </select>
    168           &nbsp;&nbsp;
     147          &nbsp;&#151;&nbsp;
    169148            <label for = "ec_in_up_comment_id" style = "margin:0;" title = "{'Optional'|@translate}">
    170149              <span style = "font-weight:bold;  font-style:italic;">{'Comment'|@translate}</span>
    171150              <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id"
    172                onchange = "ec_new_comment_text = this.value;">
     151                onchange = "ec_new_comment_text = this.value;"
     152              />
    173153            </label>
    174154        </li>
     
    176156      {/if}
    177157   
    178     </ul>
    179158  </fieldset>
    180159 
    181160  {* <!-- User to identify --> *}
    182   <fieldset id = "second_fieldset_id">
     161  <fieldset>
    183162    <legend style = "font-weight:bold;">
    184163      {'Identified user'|@translate}
    185164      <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn">&nbsp;</span><br />
    186165    </legend>
    187       <ul>
    188      
    189         {if !$ec_is_creation}
    190           <li>
    191             {* <!-- None --> *}
    192             <label onclick = "return ec_mark_user('ec_sel_user_none');">
    193               <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none">
    194               {'No user'|@translate}
    195             </label><br>
    196           </li>
    197         {/if}
    198        
     166   
     167      {if !$ec_is_creation}
    199168        <li>
    200           {* <!-- New user (to create) --> *}
    201           <label for = "ec_in_up_usr_txt_id" onclick = "return ec_mark_user('ec_sel_user_new');" {$ec_hidden_when_no_user} >
    202             <input type = "radio" name = "ec_sel_user" value = "new" id = "ec_sel_user_new" {$ec_hidden_when_no_user}>
    203             {'New generic user'|@translate}
    204           </label>
    205           <span {$ec_hidden_when_no_user} >&nbsp;</span>
    206           <label for = "ec_in_up_usr_txt_id" style = "margin:0;">
    207             <input class = "submit" type = "button" value = "{'Generate username'|@translate}"
    208              id = "ec_submit_gen_user_id" onclick = "ec_gen_user();"
    209            >
    210           </label>
     169          {* <!-- None --> *}
     170          <label onclick = "return ec_mark_user('ec_sel_user_none');">
     171            <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none" />
     172            {'No user'|@translate}
     173          </label><br />
    211174        </li>
     175      {/if}
     176     
     177      <li>
     178        {* <!-- New user (to create) --> *}
     179        <label for = "ec_in_up_usr_txt_id" onclick = "return ec_mark_user('ec_sel_user_new');" {$ec_hidden_when_no_user} >
     180          <input type = "radio" name = "ec_sel_user" for = "ec_in_up_usr_txt_id" value = "new" id = "ec_sel_user_new" {$ec_hidden_when_no_user} />
     181          {'New generic user'|@translate}
     182        </label>
     183        <span {$ec_hidden_when_no_user} >&nbsp;</span>
     184        <label for = "ec_in_up_usr_txt_id" style = "margin:0;">
     185          <input class = "submit" type = "button" name = "ec_submit_gen_user" value = "{'Generate username'|@translate}"
     186           id = "ec_submit_gen_user_id" onclick = "ec_gen_user();"
     187          />
     188        </label>
    212189        <li style = "padding-left: 30px;">
    213           <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New username'|@translate}<br>
     190          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New username'|@translate}<br />
    214191            <input type = "text" name = "login" id = "ec_in_up_usr_txt_id" maxlength = "50"
    215192             size = "20" onblur = "ec_new_user_text = this.value; ec_check_user_text();"
    216            >
    217           </label>
    218           <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New password'|@translate}<br>
     193            />
     194          </label>
     195          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New password'|@translate}<br />
    219196            <input type = "text" name = "password" id = "ec_in_up_psd_txt_id" maxlength = "32"
    220197             size = "20" onblur = "ec_new_psd_text = this.value; ec_check_pwd_text();"
    221            >
    222           </label>
    223           <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'Confirm password'|@translate}<br>
     198            />
     199          </label>
     200          <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'Confirm password'|@translate}<br />
    224201            <input type = "password" id = "ec_confirm_psd_txt_id" maxlength = "32" size = "20"/>
    225202          </label>
     
    227204            <input type = "checkbox" name = "ec_in_up_newgroup" id = "ec_in_up_newgroup_id"
    228205             onchange = "ec_selected_old_group = (this.checked != '');"
    229            >
     206            />
    230207            <span onMouseover = "ec_chk_over_grp = true;" onMouseout = "ec_chk_over_grp = false;">
    231208              {'New group'|@translate}
    232             </span><br>
     209            </span><br />
    233210            <input type = "text" name = "groupname" id = "ec_in_up_grp_txt_id" maxlength = "32"
    234211             size = "20" onblur = "ec_new_grp_text = this.value; if (this.value != '') ec_selected_old_group = true;"
    235            >
    236           </label><br>
    237         </li>
    238        
    239         <li>
    240           {* <!-- Known user --> *}
    241           <label for = "ec_in_up_usr_list_id" onclick = "return ec_mark_user('ec_sel_user_old');" {$ec_hidden_when_no_user} >
    242             <input type = "radio" name = "ec_sel_user" {$ec_hidden_when_no_user} value = "old" id = "ec_sel_user_old">
    243             {'Existing user'|@translate}
    244           </label>
    245           <select name = "ec_in_up_usr_list" id = "ec_in_up_usr_list_id" onchange = "ec_change_user_list(this.value);" {$ec_hidden_when_no_user} >
    246             {foreach from = $ec_lists.user_ids key = ec_key item = ec_val}
    247               <option label = "{$ec_val}" value = "{$ec_key}" >{$ec_val}</option>
    248             {/foreach}
    249           </select><br>
    250         </li>
    251    
    252       </ul>
     212            />
     213          </label>
     214        </li><br />
     215      </li>
     216     
     217      <li>
     218        {* <!-- Known user --> *}
     219        <label for = "ec_in_up_usr_list_id" onclick = "return ec_mark_user('ec_sel_user_old');" {$ec_hidden_when_no_user} >
     220          <input type = "radio" name = "ec_sel_user" for = "ec_in_up_usr_list_id" {$ec_hidden_when_no_user} value = "old" id = "ec_sel_user_old" />
     221          {'Existing user'|@translate}
     222        </label>
     223        <select name = "ec_in_up_usr_list" id = "ec_in_up_usr_list_id" onchange = "ec_change_user_list(this.value);" {$ec_hidden_when_no_user} >
     224          {foreach from=$ec_lists.user_ids key=ec_key item=ec_val}
     225            <option label = "{$ec_val}" value = "{$ec_key}" >{$ec_val}</option>
     226          {/foreach}
     227        </select><br />
     228      </li>
     229   
    253230  </fieldset>
    254231 
     
    256233  <fieldset>
    257234    <legend style = "font-weight:bold;">{'Displayed page'|@translate}</legend>
    258     <ul>
    259    
    260       <li>
    261         <label class = "ec_block" for = "ec_in_up_forced_id" style = "margin-top:5px;" onclick = "ec_mark_forced();">
    262           <input type = "checkbox" name = "ec_in_up_forced" id = "ec_in_up_forced_id">
    263           <span id = "ec_style_forced_id">&nbsp;</span>
     235   
     236    <li>
     237      <label class = "ec_block" for = "ec_in_up_forced_id" style = "margin-top:5px;" onclick = "ec_mark_forced();">
     238        <input type = "checkbox" name = "ec_in_up_forced" id = "ec_in_up_forced_id">
     239        <span id = "ec_style_forced_id">&nbsp;</span>
     240      </label>
     241    </li>
     242   
     243    <li>
     244      {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
     245      <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "return ec_mark_action('ec_input_action_add_p');"
     246       {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {/if}
     247      >
     248        <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p" for = "ec_in_up_aps_id" />
     249        {'Additional Page'|@translate}<br />
     250        <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" >
     251          {html_options options=$ec_lists.add_pages}
     252        </select>
     253      </label>
     254     
     255      {* <!-- Category, provided at least one category is available --> *}
     256      <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "return ec_mark_action('ec_input_action_cat');"
     257       {if count($ec_lists.categories) == 0} style = "display:none;" {/if}
     258      >
     259        <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat" for = "ec_in_up_cats_id"
     260          onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;"
     261        />
     262        <span onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;">{'Category'|@translate}</span><br />
     263        <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id" onchange = "ec_selected_cat = this.value;">
     264          {html_options options=$ec_lists.categories}
     265        </select>
     266      </label>
     267     
     268      {* <!-- Image, provided at least one category is available and at least one image is associated to one category --> *}
     269      <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "return ec_mark_action('ec_input_action_img');"
     270       {if $ec_no_assoc or count($ec_lists.categories) == 0} style = "display:none;" {/if}
     271      >
     272        <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img" for = "ec_in_up_imgs_id" />
     273        {'Image id'|@translate}<br />
     274        <input type = "text" name = "ec_in_up_img" id = "ec_in_up_imgs_id" maxlength = "6"
     275         size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "return ec_mark_action('ec_input_action_img');"
     276        /><br />
     277        <span id = "ec_in_up_imgs_warn">&nbsp;</span><br />
     278      </label>
     279     
     280      {* <!-- Index page --> *}
     281      <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_home');">
     282        <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home" />
     283        {'Home'|@translate}
     284      </label>
     285     
     286      {* <!-- Access denied page (only when modifying an entry) --> *}
     287      {if !$ec_is_creation}
     288        <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_refused');">
     289          <input type = "radio" name = "ec_input_action" value = "refused" id = "ec_input_action_refused" />
     290          {'Access denied'|@translate}
    264291        </label>
    265       </li>
    266      
    267       <li>
    268         {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
    269         <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "return ec_mark_action('ec_input_action_add_p');"
    270          {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {/if}
    271         >
    272           <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p">
    273           {'Additional Page'|@translate}<br>
    274           <select class = "categoryList" name = "ec_in_up_aps" size = "30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" >
    275             {html_options options = $ec_lists.add_pages}
    276           </select>
    277         </label>
    278        
    279         {* <!-- Category, provided at least one category is available --> *}
    280         <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "return ec_mark_action('ec_input_action_cat');"
    281          {if count($ec_lists.categories) == 0} style = "display:none;" {/if}
    282         >
    283           <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat"
    284             onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;"
    285          >
    286           <span onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;">{'Category'|@translate}</span><br>
    287           <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id" onchange = "ec_selected_cat = this.value;">
    288             {html_options options = $ec_lists.categories}
    289           </select>
    290         </label>
    291        
    292         {* <!-- Image, provided at least one category is available and at least one image is associated to one category --> *}
    293         <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "return ec_mark_action('ec_input_action_img');"
    294          {if $ec_no_assoc or count($ec_lists.categories) == 0} style = "display:none;" {/if}
    295         >
    296           <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img">
    297           {'Image id'|@translate}<br>
    298           <input type = "text" name = "ec_in_up_img" id = "ec_in_up_imgs_id" maxlength = "6"
    299            size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "return ec_mark_action('ec_input_action_img');"
    300          ><br>
    301           <span id = "ec_in_up_imgs_warn">&nbsp;</span><br>
    302         </label>
    303        
    304         {* <!-- Index page --> *}
    305         <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_home');">
    306           <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home">
    307           {'Home'|@translate}
    308         </label>
    309        
    310         {* <!-- Access denied page (only when modifying an entry) --> *}
    311         {if !$ec_is_creation}
    312           <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_refused');">
    313             <input type = "radio" name = "ec_input_action" value = "refused" id = "ec_input_action_refused">
    314             {'Access denied'|@translate}
    315           </label>
    316         {/if}
    317       </li>
    318    
    319     </ul>
     292      {/if}
     293    </li>
     294   
    320295  </fieldset>
    321296 
    322   {* <!-- Validity date --> *}
    323  
    324   {*
    325     <!--
    326       Next steps:
    327         _ check if initialize validity date with JS is doable;   DONE
    328         _ check if ' onchange = "ec_update_ts();" ' can be used; DONE
    329         _ implement JS:
    330           _ tick checkboxes when necessary;
    331           _ throw proper information when submitting form.
    332         _ implement PHP ;
    333         _ commit, and drink a pint!
    334       {''|@translate}
    335     -->
    336   *}
    337  
    338   <fieldset>
    339     <legend style = "font-weight:bold;">{'Validity date'|@translate}</legend>
    340     <table style = "margin-left: 0px; text-align:left;">
    341       <tr>
    342        
    343         <td style="vertical-align:top; margin-top:0;">
    344           <p style = "text-align:left; padding-bottom: 1em; padding-top: 0; margin-top: 0pt; font-weight: bold;">
    345             <label for = "ec_valid_date_on_id">
    346               <input type = "checkbox" name = "ec_valid_date_on" id = "ec_valid_date_on_id">
    347               {'Activate'|@translate}
    348             </label>
    349           </p>
    350           <p style = "text-align:left;">
    351             <input type = "text" id = "ec_validity_sel_day" style = "text-align:right; border:none; cursor:default;" disabled = "disabled">&nbsp;
    352             <select id = "ec_validity_day_id" name = "ec_validity_day" class = "ec_valid_ctl ec_datepicker">
    353               <option value = "0">--</option>
    354               {section name=day start=1 loop=32}
    355                 <option value = "{$smarty.section.day.index}">
    356                   {$smarty.section.day.index}
    357                 </option>
    358               {/section}
    359             </select>
    360             <select id = "ec_validity_month_id" name = "ec_validity_month" class = "ec_valid_ctl ec_datepicker">
    361               {html_options options=$month_list}
    362             </select>
    363             <input id = "ec_validity_year_id" name = "ec_validity_year" type = "text" size = "4"
    364              maxlength = "4" style = "text-align:right; " class = "ec_valid_ctl ec_datepicker">
    365             <input id = "ec_validity_time_id" name = "ec_validity_time" type = "text" class = "ec_valid_ctl ec_datepicker"
    366              size = "5" maxlength = "5" title = "{'Hours field tooltip'|@translate}" style = "text-align:right; ">
    367             <input id = "ec_linked_date_id" name = "ec_linked_date_id" type = "hidden" size = "10" disabled = "disabled">
    368             <img id = "ec_tmp_img" class = "ui-datepicker-trigger" alt = "" title = ""
    369              src = "{$EVNTCATS_URLS.ROOT}icon/tmp.png" style = "display:none; cursor:default;">
    370           </p>
    371           <p style = "text-align:left;">
    372             <input id = "ec_date_today_btn_id" type = "button" value = "{'Now + 2 mn'|@translate}"
    373              class = "ec_valid_ctl submit" title = "{'Now button tooltip'|@translate}" onclick = "ec_mark_now();">&nbsp;—&nbsp;
    374             <input id = "ec_set_time_to_btn_id" type = "button" value = "{'Set time to'|@translate}"
    375              class = "ec_valid_ctl submit" onclick = "ec_valid_set_time_to(document.getElementById('ec_set_time_to_id').selectedIndex);">&nbsp;
    376             <select id = "ec_set_time_to_id" name = "ec_set_time_to" onchange = "ec_valid_set_time_to(this.selectedIndex);" class = "ec_valid_ctl">
    377               {section name=time start=0 loop=24}
    378                 <option label = "{if strlen($smarty.section.time.index) lt 2}0{/if}{$smarty.section.time.index}:00" value = "{$smarty.section.time.index}">
    379                   {if strlen($smarty.section.time.index) lt 2}0{/if}{$smarty.section.time.index}:00
    380                 </option>
    381               {/section}
    382             </select>
    383           </p>
    384           <p style = "text-align:left;">
    385             <input id = "ec_date_add_btn_id" type = "button" value = "{'Add'|@translate}" title = "{'Add button tooltip'|@translate}" class = "ec_valid_ctl submit"
    386              onclick = "ec_add_time(document.getElementById('ec_date_add_val_id').value, document.getElementById('ec_date_add_kind_id').selectedIndex);">&nbsp;
    387             <input id = "ec_date_add_val_id" type = "text" size = "5" maxlength = "5" value = "" style = "text-align:right;" class = "ec_valid_ctl">&nbsp;
    388             <select id = "ec_date_add_kind_id" name = "ec_date_add_kind" class = "ec_valid_ctl">
    389               <option label = "{'Minutes'|@translate}" value = "minutes">{'Minutes'|@translate}</option>
    390               <option label = "{'Hours'|@translate}"   value = "hours"  >{'Hours'|@translate}</option>
    391               <option label = "{'Days'|@translate}"    value = "days"   >{'Days'|@translate}</option>
    392               <option label = "{'Months'|@translate}"  value = "months" >{'Months'|@translate}</option>
    393               <option label = "{'Years'|@translate}"   value = "years"  >{'Years'|@translate}</option>
    394             </select>
    395           </p>
    396           <br>
    397           <table>
    398             <tr>
    399               <td style = "text-align:right; vertical-align:top; font-weight:bold;">
    400                 <label for = "ec_notify_id" title = "{'Notify label tooltip'|@translate}">
    401                   <input type = "checkbox" name = "ec_notify" id = "ec_notify_id" disabled = "disabled">
    402                   {'Do notify'|@translate}
    403                 </label>
    404               </td>
    405               <td style = "text-align:left;">
    406                 <ul style = "list-style-type:none; list-style-position:inside; padding-left:0.5em;">
    407                   <li style = "margin-bottom:0;">
    408                     <label for = "ec_notify_user_id">
    409                       <input type = "checkbox" name = "ec_notify_user" id = "ec_notify_user_id" class = "ec_valid_ctl">
    410                       {'The user'|@translate}
    411                     </label>
    412                   </li>
    413                   <li style = "margin-bottom:0;">
    414                     <label for = "ec_notify_webm_id">
    415                       <input type = "checkbox" name = "ec_notify_webm" id = "ec_notify_webm_id" class = "ec_valid_ctl">
    416                       {'The webmaster'|@translate}
    417                     </label>
    418                   </li>
    419                   <li style = "margin-bottom:0;">
    420                     <label for = "ec_notify_admins_id">
    421                       <input type = "checkbox" name = "ec_notify_admins" id = "ec_notify_admins_id" class = "ec_valid_ctl">
    422                       {'All administrators'|@translate}
    423                     </label>
    424                   </li>
    425                 </ul>
    426               </td>
    427             </tr>
    428           </table>
    429           <p style = "display:none;">
    430             <!-- jQuery datepicker: see (french) http://fr.piwigo.org/forum/viewtopic.php?id=19042 -->
    431             <select id = "ec_min_day_id" name = "ec_min_day">
    432               <option value = "0">--</option>
    433               {section name=day start=1 loop=32}
    434                 <option value = "{$smarty.section.day.index}">
    435                   {$smarty.section.day.index}
    436                 </option>
    437               {/section}
    438             </select>
    439             <select id = "ec_min_month_id" name = "ec_min_month">
    440               {html_options options=$month_list}
    441             </select>
    442             <input id = "ec_min_year_id" name = "ec_min_year" type = "text" size = "4" maxlength = "4">
    443             <input id = "ec_min_date_id" name = "ec_min_date_id" type = "hidden" disabled = "disabled">
    444             <input id = "ec_valid_offset_id" name = "ec_valid_offset" type = "text">
    445           </p>
    446           {* <!-- For tests purpose; must be removed --> *}
    447           <p style = "text-align:left;">
    448             <span id = "ec_span_tst_id"></span>
    449           </p>
    450           {* <!-- /For tests purpose; must be removed --> *}
    451         </td>
    452        
    453         <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> {* <!-- sorry :-\ --> *}
    454        
    455         <td style="vertical-align:top; margin-top:0;">
    456           <table>
    457             <tr>
    458               <td style = "text-align:right; vertical-align:top; font-weight:bold;">
    459                 {'Page once code outdated'|@translate}
    460               </td>
    461               <td style = "text-align:left;">
    462                 <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;">
    463                   <li style = "margin-bottom:0;">
    464                     <label for = "ec_date_unknown_0_id">
    465                       <input type = "radio" name = "ec_date_unknown" value = "0" id = "ec_date_unknown_0_id" class = "ec_valid_ctl">
    466                       {'Home'|@translate}
    467                     </label>
    468                   </li>
    469                   <li style = "margin-bottom:0;">
    470                     <label for = "ec_date_unknown_1_id">
    471                       <input type = "radio" name = "ec_date_unknown" value = "1" id = "ec_date_unknown_1_id" class = "ec_valid_ctl">
    472                       {'Access denied'|@translate}
    473                     </label>
    474                   </li>
    475                   {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
    476                   <li {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {else} style = "margin-bottom:0;" {/if} >
    477                     <label for = "ec_date_in_up_aps_id">
    478                       <input type = "radio" name = "ec_date_unknown" value = "2" id = "ec_date_unknown_2_id" class = "ec_valid_ctl">
    479                       {'Additional Page'|@translate}<br>
    480                       <select class = "ec_valid_ctl categoryList" name = "ec_date_in_up_aps" size = "30" id = "ec_date_in_up_aps_id" >
    481                         {html_options options = $ec_lists.add_pages}
    482                       </select>
    483                     </label>
    484                   </li>
    485                 </ul>
    486               </td>
    487             </tr>
    488           </table>
    489         </td>
    490        
    491       </tr>
    492     </table>
    493    
    494   </fieldset>
    495  
    496  
    497   <p style = "margin-top:0;">
    498     <input class = "submit" type = "submit" value = "{'Submit'|@translate}" style = "margin-top:1em;">
    499     <input class = "submit" type = "submit" value = "{'Reset'|@translate}" onclick = "return ec_init();" style = "margin-top:1em;">
     297  <p>
     298    <input class = "submit" type = "submit" value = "{'Submit'|@translate}"/>
     299    <input class = "submit" type = "submit" value = "{'Reset'|@translate}" onclick = "return ec_init();"/>
    500300  </p>
    501301</form>
    502302
    503303{* <!-- JavaScript functions --> *}
     304<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script>
    504305<script type = "text/javascript"><!--
    505306  ec_is_creation                          = {if $ec_is_creation}true{else}false{/if};
    506   ec_validity_on                          = {if $ec_validity_on}true{else}false{/if};
    507307  ec_up_code_lbl_forced_txt               = "{'Forced'|@translate}";
    508308  ec_JS_message['ec_gen_user_act_miss']   = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}";
     
    525325  ec_default_entry                        = "{$ec_default_entry}";
    526326  ec_auto_code_digits_nb                  = "{$ec_def_auto_code_dg_nb}";
    527   sf_plus_bullet_path                     = "{$EVNTCATS_URLS.ROOT}icon/plus.png";
    528   sf_minus_bullet_path                    = "{$EVNTCATS_URLS.ROOT}icon/minus.png";
    529327  {if $ec_is_creation}
    530     {foreach from = $ec_lists.duplicable_codes.ids key = ec_key item = ec_val}
     328    {foreach from=$ec_lists.duplicable_codes.ids key=ec_key item=ec_val}
    531329      ec_duplic_codes[{$ec_key}] = {$ec_val};
    532330    {/foreach}
    533331  {/if}
    534   {foreach from = $ec_lists.ec_table item = ec_val name = listloop}
     332  {foreach from=$ec_lists.ec_table item=ec_val name=listloop}
    535333    ec_lists_temp[{$smarty.foreach.listloop.index}] =
    536334     "{$ec_val.id};{$ec_val.code};{$ec_val.user_id};{$ec_val.action};{$ec_val.arg1};{$ec_val.arg2};{$ec_val.forced};{$ec_val.comment}";
    537335  {/foreach}
    538   {foreach from = $ec_days item = ec_day name = listloop}
    539     ec_validity_days[{$smarty.foreach.listloop.index}] = "{$ec_day}";
    540   {/foreach}
    541336  ec_build_ec_lists();
    542337  ec_init();
    543   //-->
    544 </script>
    545 
    546 {include file = $FooterIncTPL}
     338//--></script>
     339
     340{include file=$FooterIncTPL}
  • extensions/event_cats/admin/template/config.js

    r7832 r8956  
    11/* Event Cats Javascript functions LucMorizur June 2009 - ... */
    22
    3 // Keeps file coded in UTF-8 without BOM: é
     3// Keeps file coded in UTF-8 without BOM : é
    44
    55// All variables declarations
  • extensions/event_cats/admin/template/config.tpl

    r7832 r8956  
    11{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
    22
    3 {* <!-- Keeps file coded in UTF-8 without BOM: é --> *}
     3{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
    44
    55{include file=$HeaderIncTPL}
     
    1818      {'Hide'|@translate}
    1919    </label>
    20     &nbsp;&nbsp;
     20    &nbsp;&#151;&nbsp;
    2121  </span>
    2222  {if $ec_ap_ok}
     
    4343      <tr>
    4444        <td style = "text-align:right; font-weight:bold;">
    45           {'Duplication allowance'|@translate}
    46         </td>
    47         <td>
    48           <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;">
    49             <li style = "margin-bottom:0;">
    50               <label for = "ec_dup_conf_none_id">
    51                 <input
    52                   type = "radio" name = "ec_dup_conf" value = "0" id = "ec_dup_conf_none_id"
    53                   {if $ec_conf.dup_allow == '0'} checked = "checked" {/if}
    54                >
    55                 {'No account'|@translate}
    56               </label>
    57             </li>
    58             <li style = "margin-bottom:0;">
    59               <label for = "ec_dup_conf_group_id">
    60                 <input
    61                   type = "radio" name = "ec_dup_conf" value = "2" id = "ec_dup_conf_group_id"
    62                   {if $ec_conf.dup_allow == '2'} checked = "checked" {/if}
    63                >
    64                 {'Selection per group'|@translate}
    65               </label>
    66             </li>
    67             <li style = "margin-bottom:0;">
    68               <label for = "ec_dup_conf_all_id">
    69                 <input
    70                   type = "radio" name = "ec_dup_conf" value = "1" id = "ec_dup_conf_all_id"
    71                   {if $ec_conf.dup_allow == '1'} checked = "checked" {/if}
    72                >
    73                 {'All accounts'|@translate}
    74               </label>
    75             </li>
    76           </ul>
     45          {'Duplication allowance'|@translate}&nbsp;&nbsp;
     46        </td>
     47        <td>
     48          <label for = "ec_dup_conf_none_id">
     49            <input
     50              type = "radio" name = "ec_dup_conf" value = "0" id = "ec_dup_conf_none_id"
     51              {if $ec_conf.dup_allow == '0'} checked = "checked" {/if}
     52            />
     53            {'No account'|@translate}
     54          </label><br />
     55          <label for = "ec_dup_conf_group_id">
     56            <input
     57              type = "radio" name = "ec_dup_conf" value = "2" id = "ec_dup_conf_group_id"
     58              {if $ec_conf.dup_allow == '2'} checked = "checked" {/if}
     59            />
     60            {'Selection per group'|@translate}
     61          </label><br />
     62          <label for = "ec_dup_conf_all_id">
     63            <input
     64              type = "radio" name = "ec_dup_conf" value = "1" id = "ec_dup_conf_all_id"
     65              {if $ec_conf.dup_allow == '1'} checked = "checked" {/if}
     66            />
     67            {'All accounts'|@translate}
     68          </label>
    7769        </td>
    7870        <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> {* <!-- sorry :-\ --> *}
    79         <td style = "text-align:right; font-weight:bold;"> <!-- id = "Replace "Register" link ?" -->
     71        <td style = "text-align:right; font-weight:bold;">
    8072          {* <!-- Replace "Register" link ? --> *}
    81           {$ec_dup_link_conf}
    82         </td>
    83         <td>
    84           <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;">
    85             <li style = "margin-bottom:0;">
    86               <label for = "ec_dup_disp_normal_id">
    87                 <input
    88                   type = "radio" name = "ec_dup_disp" value = "0" id = "ec_dup_disp_normal_id"
    89                   {if $ec_conf.duplic_display == '0'} checked = "checked" {/if}
    90                >
    91                 {'No account'|@translate}
    92               </label>
    93             </li>
    94             <li style = "margin-bottom:0;">
    95               <label for = "ec_dup_disp_but_gen_id">
    96                 <input
    97                   type = "radio" name = "ec_dup_disp" value = "2" id = "ec_dup_disp_but_gen_id"
    98                   {if $ec_conf.duplic_display == '2'} checked = "checked" {/if}
    99                >
    100                 {'All but generics'|@translate}
    101               </label>
    102             </li>
    103             <li style = "margin-bottom:0;">
    104               <label for = "ec_dup_disp_dup_id">
    105                 <input
    106                   type = "radio" name = "ec_dup_disp" value = "1" id = "ec_dup_disp_dup_id"
    107                   {if $ec_conf.duplic_display == '1'} checked = "checked" {/if}
    108                >
    109                 {'All accounts'|@translate}
    110               </label>
    111             </li>
    112           </ul>
     73          {$ec_dup_link_conf}&nbsp;&nbsp;
     74        </td>
     75        <td>
     76          <label for = "ec_dup_disp_normal_id">
     77            <input
     78              type = "radio" name = "ec_dup_disp" value = "0" id = "ec_dup_disp_normal_id"
     79              {if $ec_conf.duplic_display == '0'} checked = "checked" {/if}
     80            />
     81            {'No account'|@translate}
     82          </label><br />
     83          <label for = "ec_dup_disp_but_gen_id">
     84            <input
     85              type = "radio" name = "ec_dup_disp" value = "2" id = "ec_dup_disp_but_gen_id"
     86              {if $ec_conf.duplic_display == '2'} checked = "checked" {/if}
     87            />
     88            {'All but generics'|@translate}
     89          </label><br />
     90          <label for = "ec_dup_disp_dup_id">
     91            <input
     92              type = "radio" name = "ec_dup_disp" value = "1" id = "ec_dup_disp_dup_id"
     93              {if $ec_conf.duplic_display == '1'} checked = "checked" {/if}
     94            />
     95            {'All accounts'|@translate}
     96          </label><br />
    11397        </td>
    11498      </tr>
     
    121105      <tr>
    122106        <td style = "text-align:right; vertical-align:top; font-weight:bold;">
    123           {'Page for unknown code'|@translate}
    124         </td>
    125         <td>
    126           <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;">
    127             <li style = "margin-bottom:0;">
    128               <label for = "ec_unknown_0_id" onclick = "ec_mark_action('ec_unknown_0_id');">
    129                 <input type = "radio" name = "ec_unknown" value = "0" id = "ec_unknown_0_id">
    130                 {'Home'|@translate}
    131               </label>
    132             </li>
    133             <li style = "margin-bottom:0;">
    134               <label for = "ec_unknown_1_id" onclick = "ec_mark_action('ec_unknown_1_id');">
    135                 <input type = "radio" name = "ec_unknown" value = "1" id = "ec_unknown_1_id">
    136                 {'Access denied'|@translate}
    137               </label>
    138             </li>
    139             <li {if !$ec_ap_ok or count($add_pages) == 0} style = "display:none;" {else} style = "margin-bottom:0;" {/if}>
    140               {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
    141               <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "ec_mark_action('ec_unknown_2_id');">
    142                 <input type = "radio" name = "ec_unknown" value = "2" id = "ec_unknown_2_id">
    143                 {'Additional Page'|@translate}<br>
    144                 <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" >
    145                   {html_options options=$add_pages}
    146                 </select>
    147               </label>
    148             </li>
    149           </ul>
     107          {'Page for unknown code'|@translate}&nbsp;&nbsp;
     108        </td>
     109        <td>
     110          <label for = "ec_unknown_0_id" onclick = "ec_mark_action('ec_unknown_0_id');">
     111            <input type = "radio" name = "ec_unknown" value = "0" id = "ec_unknown_0_id" />
     112            {'Home'|@translate}
     113          </label><br />
     114          <label for = "ec_unknown_1_id" onclick = "ec_mark_action('ec_unknown_1_id');">
     115            <input type = "radio" name = "ec_unknown" value = "1" id = "ec_unknown_1_id" />
     116            {'Access denied'|@translate}
     117          </label><br />
     118          {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
     119          <label class = "ec_block" for = "ec_in_up_aps_id" {if !$ec_ap_ok or count($add_pages) == 0} style = "display:none;" {/if}
     120           onclick = "ec_mark_action('ec_unknown_2_id');"
     121          >
     122            <input type = "radio" name = "ec_unknown" value = "2" id = "ec_unknown_2_id" for = "ec_in_up_aps_id" />
     123            {'Additional Page'|@translate}<br />
     124            <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" >
     125              {html_options options=$add_pages}
     126            </select>
     127          </label>
    150128        </td>
    151129      </tr>
     
    158136      <tr>
    159137        <td style = "text-align:right; font-weight:bold;">
    160           {'Comments display'|@translate}
    161         </td>
    162         <td>
    163           <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;">
    164             <li style = "margin-bottom:0;">
    165               <label for = "ec_comments_0_id">
    166                 <input type = "radio" name = "ec_comments" value = "0" id = "ec_comments_0_id"
    167                   {if $ec_conf.comment_display == '0'} checked = "checked" {/if}
    168                >
    169                 {'As tooltip'|@translate}
    170               </label>
    171             </li>
    172             <li style = "margin-bottom:0;">
    173               <label for = "ec_comments_1_id">
    174                 <input type = "radio" name = "ec_comments" value = "1" id = "ec_comments_1_id"
    175                   {if $ec_conf.comment_display == '1'} checked = "checked" {/if}
    176                >
    177                 {'In a row'|@translate}
    178               </label>
    179             </li>
    180           </ul>
     138          {'Comments display'|@translate}&nbsp;&nbsp;
     139        </td>
     140        <td>
     141          <label for = "ec_comments_0_id">
     142            <input type = "radio" name = "ec_comments" value = "0" id = "ec_comments_0_id"
     143              {if $ec_conf.comment_display == '0'} checked = "checked" {/if}
     144            />
     145            {'As tooltip'|@translate}
     146          </label><br />
     147          <label for = "ec_comments_1_id">
     148            <input type = "radio" name = "ec_comments" value = "1" id = "ec_comments_1_id"
     149              {if $ec_conf.comment_display == '1'} checked = "checked" {/if}
     150            />
     151            {'In a row'|@translate}
     152          </label>
    181153        </td>
    182154        <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> {* <!-- sorry :-\ --> *}
    183155        <td style = "text-align:right; font-weight:bold;">
    184           {'Help banner'|@translate}
    185         </td>
    186         <td>
    187           <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;">
    188             <li style = "margin-bottom:0;">
    189               <label for = "ec_2help_banner_1_id">
    190                 <input type = "radio" name = "ec_help_banner_onoff2" value = "1" id = "ec_2help_banner_1_id"
    191                   onclick = "ec_mark_help('ec_help_banner_1');"
    192                >
    193                 {'Banner on'|@translate}
    194               </label>
    195             </li>
    196             <li style = "margin-bottom:0;">
    197               <label for = "ec_2help_banner_0_id">
    198                 <input type = "radio" name = "ec_help_banner_onoff2" value = "0" id = "ec_2help_banner_0_id"
    199                   onclick = "ec_mark_help('ec_help_banner_0');"
    200                >
    201                 {'Banner off'|@translate}
    202               </label>
    203             </li>
    204           </ul>
    205         </td>
     156          {'Help banner'|@translate}&nbsp;&nbsp;
     157        </td>
     158        <td>
     159          <label for = "ec_2help_banner_1_id">
     160            <input type = "radio" name = "ec_help_banner_onoff2" value = "1" id = "ec_2help_banner_1_id"
     161              onclick = "ec_mark_help('ec_help_banner_1');"
     162            />
     163            {'Banner on'|@translate}
     164          </label><br />
     165          <label for = "ec_2help_banner_0_id">
     166            <input type = "radio" name = "ec_help_banner_onoff2" value = "0" id = "ec_2help_banner_0_id"
     167              onclick = "ec_mark_help('ec_help_banner_0');"
     168            />
     169            {'Banner off'|@translate}
     170          </label>
    206171        <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> {* <!-- sorry :-\ --> *}
    207172        <td style = "text-align:right; font-weight:bold;">
    208           {$ec_display_connect_conf}
    209         </td>
    210         <td>
    211           <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;">
    212             <li style = "margin-bottom:0;">
    213               <label for = "ec_connection_1_id">
    214                 <input type = "radio" name = "ec_connection" value = "1" id = "ec_connection_1_id"
    215                   {if $ec_conf.display_connection == '1'} checked = "checked" {/if}
    216                >
    217                 {'Yes'|@translate}
    218               </label>
    219             </li>
    220             <li style = "margin-bottom:0;">
    221               <label for = "ec_connection_0_id">
    222                 <input type = "radio" name = "ec_connection" value = "0" id = "ec_connection_0_id"
    223                   {if $ec_conf.display_connection == '0'} checked = "checked" {/if}
    224                >
    225                 {'No'|@translate}
    226               </label>
    227             </li>
    228           </ul>
     173          {$ec_display_connect_conf}&nbsp;&nbsp;
     174        </td>
     175        <td>
     176          <label for = "ec_connection_1_id">
     177            <input type = "radio" name = "ec_connection" value = "1" id = "ec_connection_1_id"
     178              {if $ec_conf.display_connection == '1'} checked = "checked" {/if}
     179            />
     180            {'Yes'|@translate}
     181          </label><br />
     182          <label for = "ec_connection_0_id">
     183            <input type = "radio" name = "ec_connection" value = "0" id = "ec_connection_0_id"
     184              {if $ec_conf.display_connection == '0'} checked = "checked" {/if}
     185            />
     186            {'No'|@translate}
     187          </label>
    229188        </td>
    230189    </table>
     
    232191 
    233192  <div style = "text-align:center;">
    234     <input class = "submit" type = "submit" name = "ec_conf_submit" value = "{'Submit'|@translate}">
     193    <input class = "submit" type = "submit" name = "ec_conf_submit" value = "{'Submit'|@translate}" />
    235194  </div>
    236195 
  • extensions/event_cats/admin/template/duplication.tpl

    r7832 r8956  
    11{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
    22
    3 {* <!-- Keeps file coded in UTF-8 without BOM: é --> *}
     3{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
    44
    55{include file=$HeaderIncTPL}
     
    2222//--></script>
    2323
    24 <!-- Acknowledgement
    25   A lot of below code has simply been copied-pasted from file cat_perm.tpl . 
    26   Many thanks to people who wrote it !                                       
    27 -->
     24<!-- Aknowledgement ----------------------------------------------------------
     25| A lot of below code has simply been copied-pasted from file cat_perm.tpl . |
     26| Many thanks to people who wrote it !                                       |
     27----------------------------------------------------------------------------->
    2828
    2929{* <!-- Duplication configuration parameters --> *}
    30 <form action = "" method = "post" class = "titrePage" {* name = "ec_duplic_conf"  *} >
     30<form action = "" method = "post" class = "titrePage" name = "ec_duplic_conf">
    3131  <fieldset>
    3232    <legend>{'Configuration'|@translate}</legend>
     
    3434      <tr>
    3535        <td style = "text-align:right; font-weight:bold;">
    36           {'Duplication allowance'|@translate}
     36          {'Duplication allowance'|@translate}&nbsp;&nbsp;
    3737        </td>
    3838        <td>
    39           <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;">
    40             <li style = "margin-bottom:0;">
    41               <label for = "ec_dup_conf_none_id">
    42                 <input
    43                   type = "radio" name = "ec_dup_conf" value = "0" id = "ec_dup_conf_none_id"
    44                   {if $ec_conf.dup_allow == '0'} checked = "checked" {/if}
    45                >
    46                 {'No account'|@translate}
    47               </label>
    48             </li>
    49             <li style = "margin-bottom:0;">
    50               <label for = "ec_dup_conf_group_id">
    51                 <input
    52                   type = "radio" name = "ec_dup_conf" value = "2" id = "ec_dup_conf_group_id"
    53                   {if $ec_conf.dup_allow == '2'} checked = "checked" {/if}
    54                >
    55                 {'Selection per group'|@translate}
    56               </label>
    57             </li>
    58             <li style = "margin-bottom:0;">
    59               <label for = "ec_dup_conf_all_id">
    60                 <input
    61                   type = "radio" name = "ec_dup_conf" value = "1" id = "ec_dup_conf_all_id"
    62                   {if $ec_conf.dup_allow == '1'} checked = "checked" {/if}
    63                >
    64                 {'All accounts'|@translate}
    65               </label>
    66             </li>
    67           </ul>
     39          <label for = "ec_dup_conf_none_id">
     40            <input
     41              type = "radio" name = "ec_dup_conf" value = "0" id = "ec_dup_conf_none_id"
     42              {if $ec_conf.dup_allow == '0'} checked = "checked" {/if}
     43            />
     44            {'No account'|@translate}
     45          </label><br />
     46          <label for = "ec_dup_conf_group_id">
     47            <input
     48              type = "radio" name = "ec_dup_conf" value = "2" id = "ec_dup_conf_group_id"
     49              {if $ec_conf.dup_allow == '2'} checked = "checked" {/if}
     50            />
     51            {'Selection per group'|@translate}
     52          </label><br />
     53          <label for = "ec_dup_conf_all_id">
     54            <input
     55              type = "radio" name = "ec_dup_conf" value = "1" id = "ec_dup_conf_all_id"
     56              {if $ec_conf.dup_allow == '1'} checked = "checked" {/if}
     57            />
     58            {'All accounts'|@translate}
     59          </label>
    6860        </td>
    6961        <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> {* <!-- sorry :-\ --> *}
    7062        <td style = "text-align:right; font-weight:bold;">
    71           {$ec_dup_link_conf}
     63          {$ec_dup_link_conf}&nbsp;&nbsp;
    7264        </td>
    7365        <td>
    74           <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;">
    75             <li style = "margin-bottom:0;">
    76               <label for = "ec_dup_disp_normal_id">
    77                 <input
    78                   type = "radio" name = "ec_dup_disp" value = "0" id = "ec_dup_disp_normal_id"
    79                   {if $ec_conf.duplic_display == '0'} checked = "checked" {/if}
    80                >
    81                 {'No account'|@translate}
    82               </label>
    83             </li>
    84             <li style = "margin-bottom:0;">
    85               <label for = "ec_dup_disp_but_gen_id">
    86                 <input
    87                   type = "radio" name = "ec_dup_disp" value = "2" id = "ec_dup_disp_but_gen_id"
    88                   {if $ec_conf.duplic_display == '2'} checked = "checked" {/if}
    89                >
    90                 {'All but generics'|@translate}
    91               </label>
    92             </li>
    93             <li style = "margin-bottom:0;">
    94               <label for = "ec_dup_disp_dup_id">
    95                 <input
    96                   type = "radio" name = "ec_dup_disp" value = "1" id = "ec_dup_disp_dup_id"
    97                   {if $ec_conf.duplic_display == '1'} checked = "checked" {/if}
    98                >
    99                 {'All accounts'|@translate}
    100               </label>
    101             </li>
    102           </ul>
     66          <label for = "ec_dup_disp_normal_id">
     67            <input
     68              type = "radio" name = "ec_dup_disp" value = "0" id = "ec_dup_disp_normal_id"
     69              {if $ec_conf.duplic_display == '0'} checked = "checked" {/if}
     70            />
     71            {'No account'|@translate}
     72          </label><br />
     73          <label for = "ec_dup_disp_but_gen_id">
     74            <input
     75              type = "radio" name = "ec_dup_disp" value = "2" id = "ec_dup_disp_but_gen_id"
     76              {if $ec_conf.duplic_display == '2'} checked = "checked" {/if}
     77            />
     78            {'All but generics'|@translate}
     79          </label><br />
     80          <label for = "ec_dup_disp_dup_id">
     81            <input
     82              type = "radio" name = "ec_dup_disp" value = "1" id = "ec_dup_disp_dup_id"
     83              {if $ec_conf.duplic_display == '1'} checked = "checked" {/if}
     84            />
     85            {'All accounts'|@translate}
     86          </label><br />
    10387        </td>
    10488      </tr>
    105     </table><br>
    106     <input class = "submit" type = "submit" name = "ec_duplic_conf_submit" value = "{'Save dup. config btn'|@translate}">
     89    </table>
     90    <input class = "submit" type = "submit" name = "ec_duplic_conf_submit" value = "{'Save dup. config btn'|@translate}" />
    10791  </fieldset>
    10892</form>
    10993
    11094{* <!-- Duplication settings by groups / types / user ids --> *}
    111 <form action = "" method = "post" {* name = "ec_duplic_set" *} id="categoryPermissions">
     95<form action = "" method = "post" name = "ec_duplic_set" id="categoryPermissions">
    11296 
    11397  <h4>{'Groups'|@translate}</h4>
     
    117101    <ul>
    118102      {foreach from=$groups_granted_ids item=id}
    119       <li><label><input type = "checkbox" name = "deny_groups[]" value = "{$id}"> {$all_groups[$id]}</label></li>
     103      <li><label><input type = "checkbox" name = "deny_groups[]" value = "{$id}" /> {$all_groups[$id]}</label></li>
    120104      {/foreach}
    121     </ul><br>
    122     <input class = "submit" type = "submit" name = "deny_groups_submit" value = "{'Deny to groups btn'|@translate}">
     105    </ul>
     106    <input class = "submit" type = "submit" name = "deny_groups_submit" value = "{'Deny to groups btn'|@translate}" />
    123107  </fieldset>
    124108 
     
    129113      <li><label><input type = "checkbox" name = "grant_groups[]" value = "{$id}"> {$all_groups[$id]}</label></li>
    130114      {/foreach}
    131     </ul><br>
    132     <input class = "submit" type = "submit" name = "grant_groups_submit" value = "{'Grant to groups btn'|@translate}">
     115    </ul>
     116    <input class = "submit" type = "submit" name = "grant_groups_submit" value = "{'Grant to groups btn'|@translate}" />
    133117  </fieldset>
    134118 
     
    139123    <ul>
    140124      {if $ec_gen_granted}
    141         <li><label><input type = "checkbox" name = "deny_generic"> {'user_status_generic'|@translate}</label><br></li>
     125      <li><label><input type = "checkbox" name = "deny_generic" /> {'user_status_generic'|@translate}</label></li>
     126      <br />
    142127      {/if}
    143128      {foreach from=$types_granted_ids item=id}
    144         <li><label><input type = "checkbox" name = "deny_types[]" value = "{$id}"> {$all_types[$id]}</label></li>
     129        <li><label><input type = "checkbox" name = "deny_types[]" value = "{$id}" /> {$all_types[$id]}</label></li>
    145130      {/foreach}
    146     </ul><br>
    147     <input class = "submit" type = "submit" name = "deny_types_submit" value = "{'Deny to types btn'|@translate}">
     131    </ul>
     132    <input class = "submit" type = "submit" name = "deny_types_submit" value = "{'Deny to types btn'|@translate}" />
    148133  </fieldset>
    149134 
     
    152137    <ul>
    153138      {if !$ec_gen_granted}
    154       <li><label><input type = "checkbox" name = "grant_generic"> {'user_status_generic'|@translate}</label></li>
    155       <br>
     139      <li><label><input type = "checkbox" name = "grant_generic" /> {'user_status_generic'|@translate}</label></li>
     140      <br />
    156141      {/if}
    157142      {foreach from=$types_denied_ids item=id}
    158         <li><label><input type = "checkbox" name = "grant_types[]" value = "{$id}"> {$all_types[$id]}</label></li>
     143        <li><label><input type = "checkbox" name = "grant_types[]" value = "{$id}" /> {$all_types[$id]}</label></li>
    159144      {/foreach}
    160     </ul><br>
    161     <input class = "submit" type = "submit" name = "grant_types_submit" value = "{'Grant to types btn'|@translate}">
     145    </ul>
     146    <input class = "submit" type = "submit" name = "grant_types_submit" value = "{'Grant to types btn'|@translate}" />
    162147  </fieldset>
    163148 
     
    168153    <ul>
    169154      {foreach from=$users_granted_direct_ids item=id}
    170       <li><label><input type = "checkbox" name = "deny_users[]" value = "{$id}"> {$all_users[$id]}</label></li>
     155      <li><label><input type = "checkbox" name = "deny_users[]" value = "{$id}" /> {$all_users[$id]}</label></li>
    171156      {/foreach}
    172     </ul><br>
    173     <input class = "submit" type = "submit" name = "deny_users_submit" value = "{'Deny to users btn'|@translate}">
     157    </ul>
     158    <input class = "submit" type = "submit" name = "deny_users_submit" value = "{'Deny to users btn'|@translate}" />
    174159  </fieldset>
    175160 
     
    191176      <li><label><input type = "checkbox" name = "grant_users[]" value = "{$id}"> {$all_users[$id]}</label></li>
    192177      {/foreach}
    193     </ul><br>
    194     <input class = "submit" type = "submit" name = "grant_users_submit" value = "{'Grant to users btn'|@translate}">
     178    </ul>
     179    <input class = "submit" type = "submit" name = "grant_users_submit" value = "{'Grant to users btn'|@translate}" />
    195180  </fieldset>
    196181 
  • extensions/event_cats/admin/template/footer.inc.tpl

    r7864 r8956  
    11{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
    22
    3 {* <!-- Keeps file coded in UTF-8 without BOM: é --> *}
     3{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
    44
    55{* <!-- Common Event Cats admin pages footer --> *}
     
    77{* <!-- For help banner --> *}
    88{if isset($ec_help_banner_in_foot)}
    9   <br>
    109  <script type = "text/javascript"><!--
    1110    ec_help_banner_in_foot = true;
    1211  //--></script>
    13   <div id = "ec_help_banner0" style = "border-top: 1px solid #666666; border-bottom: 1px solid #666666;">
     12  <div id = "ec_help_banner0">
     13    <hr width = 100% size = 1 />
    1414    <div id = "ec_help_banner1" style = "text-align:left; display:block;"></div>
     15    <hr width = 100% size = 1 />
    1516  </div>
    1617{else}
  • extensions/event_cats/admin/template/header.inc.tpl

    r7864 r8956  
    11{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
    22
    3 {* <!-- Keeps file coded in UTF-8 without BOM: é --> *}
     3{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
    44
    55{* <!-- Common Event Cats admin pages "header" --> *}
     
    1212{* <!-- JavaScript warning message --> *}
    1313<div id = "ec_js_warn">
    14   {'JS needed'|@translate}<br><br>
     14  {'JS needed'|@translate}<br /><br />
    1515</div>
    1616<script type = "text/javascript"><!-- // Removes JavaScript warning message
     
    2323    {'Acknowledgement'|@translate}
    2424  </div>
    25   <br>
     25  <br />
    2626{/if}
    2727
    2828{* <!-- Help banner --> *}
    2929{if !isset($ec_help_banner_in_foot)}
    30   <div id = "ec_help_banner0">
    31     <div style = "text-align:right; font-style:italic; border-top: 1px solid #666666;">
     30  <span id = "ec_help_banner0">
     31    <hr width = 100% size = 1 />
     32    <div style = "text-align:right; font-style:italic;">
    3233      {'Help banner'|@translate}&nbsp;
    3334      <label for = "ec_help_banner_1" onclick = "ec_mark_help('ec_help_banner_1');">
     
    4142      </label>
    4243    </div>
    43     <span id = "ec_help_banner1" style = "text-align:left; display:block; border-bottom: 1px solid #666666; padding-bottom:0.5em;"></span>
    44   </div>
     44    <span id = "ec_help_banner1" style = "text-align:left; display:block;"></span>
     45    <hr width = 100% size = 1 />
     46  </span>
    4547{/if}
    4648
  • extensions/event_cats/admin/template/header.js

    r7832 r8956  
    11/* Event Cats Javascript functions LucMorizur June 2009 - ... */
    22
    3 // Keeps file coded in UTF-8 without BOM: é
     3// Keeps file coded in UTF-8 without BOM : é
    44
    55// All variables declarations
     
    3535    if (!ec_help_banner_in_foot) {
    3636      document.getElementById('ec_help_banner_0').checked = 'checked';
    37       document.getElementById('ec_help_ban').innerHTML = '<br>';
     37      document.getElementById('ec_help_ban').innerHTML = '<br />';
    3838      document.getElementById('ec_help_banner2').style.display = '';
    3939    }
  • extensions/event_cats/include/ec_conf.inc.php

    r7832 r8956  
    2323// +-----------------------------------------------------------------------+
    2424
    25 // Keeps file coded in UTF-8 without BOM: é
     25// Keeps file coded in UTF-8 without BOM : é
    2626
    2727if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    2828
    29 global $ec_conf, $page, $ec_conf_index, $ec_conf_possible_values, $ec_debug;
    30 
    31 // ---------------------------------------------------------------------------
    32 //                            $ec_conf initalization
    33 // ---------------------------------------------------------------------------
    34 
    35 // ----- Introduction
    36 // Not sure I'm very proud of this quite complex configuration initialization
    37 // part :-/ ...
    38 // The reason of the complexity is the inital intention of building a
    39 // configuration management allowing to use in the rest of the script only
    40 // two functions: change_ec_conf() and read_ec_conf() .
    41 // change_ec_conf() updates the DB systematically. The initialization part
    42 // has the only function of determining what is the value of $ec_conf, which
    43 // is the root configuration parameters provider.
    44 // -----
     29global $ec_conf, $page, $ec_conf_index, $ec_conf_default,
     30       $ec_conf_possible_values;
     31
     32// $ec_conf initalization
    4533
    4634// $ec_conf has numeric indexes (instead of string keys like 'activated',
    4735// 'howto'...) because of its first reading, done with the "explode" function.
    48 // It would be very easy to build a string keys indexed array, thanks to
     36// It would be  very easy to build a string keys indexed array, thanks to
    4937// following instructions :
    5038/*
    51 $t = pwg_db_fetch_row(pwg_query("
     39$t = mysql_fetch_row(pwg_query("
    5240  SELECT `value`
    5341  FROM `".CONFIG_TABLE."`
     
    6351
    6452//----------------------------------------------------------------------------
    65 
    66 // Give possible $ec_conf values. In case values cannot be predicted, just
    67 // provide an empty array : array() .
     53// The following lines allow to change the number of configuration items, the
     54// default values they can have, and also their possible other values, very
     55// quickly.
     56
     57// Gives configuration items names and default values. Only strings.
     58$ec_conf_default = array( // PLUGIN CONFIGURATION ($ec_conf) :
     59                          // ---------------------------------
     60  'activated'             // plugin activated, 0 or 1
     61    => '0',               //
     62                          //
     63  'howto'                 // whether the small aknowledgement message has
     64    => '0',               // already been displayed, 0 or 1
     65                          //
     66  'dup_allow'             // duplication allowance :
     67    => '2',               //   0 : no account ;
     68                          //   1 : all accounts ;
     69                          //   2 : specified by group and user ids ;
     70                          //
     71  'duplic_display'        // duplication link display in the menubar :
     72    => '2',               //   0 : "Register" for everybody ;
     73                          //   1 : "Duplicate" for everybody ;
     74                          //   2 : "Register" only for generic accounts,
     75                          //       "Duplicate" for all other accounts ;
     76                          //
     77  'auto_code_dg_nb'       // number of digits when creating a new code
     78    => '10',              // automatically, several values
     79                          //
     80  'unknown_code'          // what to do in case an unknown code is used with
     81    => '1',               // "autolog" parameter :
     82                          //   0 : nothing (display home page, index.php (not
     83                          //       logged in of course)) ;
     84                          //   1 : display "access denied" page ;
     85                          //   2 : display an Additional Page precised below.
     86                          //
     87  'unknown_code_ap_id'    // the id of the Additional Page which must be used
     88    => '0',               // in case of usage of an unknow code, several vals.
     89                          //
     90  'comment_display'       // the way the comment is displayed in "entries"
     91    => '1',               // tab : 0, as tooltip ; 1, on a line under code
     92                          //
     93  'in_help_display'       // whether the help banner is displayed.
     94    => '1',               // 0: not displayed ; 1 : displayed (surprising !)
     95                          //
     96  'display_connection'    // whether the "Connection" link must be displayed
     97    => '0',               // for generic users, 0 or 1.
     98);
     99
     100// Gives possible values. In case values cannot be predicted, just provide an
     101// empty array : array() .
    68102$ec_conf_possible_values = array(
    69   'activated'           => array('0', '1'),                           //  0
    70     // plugin activated
    71   'howto'               => array('0', '1'),                           //  1
    72     // whether the small aknowledgement message has already been displayed
    73   'dup_allow'           => array('0', '1', '2'),                      //  2
    74     // duplication allowance :
    75     //   0 : no account;
    76     //   1 : all accounts;
    77     //   2 : specified by group, type, and user ids (default).
    78     // If Event Cats is in "simple mode", get the value of
    79     // $conf['ec_dup_allow'] if it is set; and an allowance to duplicate only
    80     // generic accounts will be defined if the value is 2.
    81   'duplic_display'      => array('0', '1', '2'),                      //  3
    82     // duplication link display in the menubar :
    83     //   0 : "Register" for everybody;
    84     //   1 : "Duplicate" for everybody;
    85     //   2 : "Register" only for generic accounts,
    86     //       "Duplicate" for all other accounts (default);
    87     // If Event Cats is in "simple mode", takes the value of
    88     // $conf['ec_duplic_display'] if it's set.
    89   'auto_code_dg_nb'     => array( '4',  '5',  '8', '10', '12', '15',
    90                                  '16', '20', '24', '25', '30', '32'), //  4
    91     // number of digits when creating a new code automatically, several values
    92     // (default: 10)
    93     // If Event Cats is in "simple mode", get the value of
    94     // $conf['ec_auto_code_dg_nb'] if set.
    95   'unknown_code'        => array('0', '1', '2'),                      //  5
    96     // what to do in case an unknown code is used with "autolog" parameter :
    97     //   0 : nothing (display home page, index.php (not logged in of course));
    98     //   1 : display "access denied" page (default);
    99     //   2 : display an A. P. precised below.
    100   'unknown_code_ap_id'  => array(),                                   //  6
    101     // the id of the Additional Page which must be used in case of usage of an
    102     // unknow code; several vals (default: 0).
    103   'comment_display'     => array('0', '1'),                           //  7
    104     // the way the comment is displayed in "entries" tab:
    105     // 0, as tooltip; 1 (default), on a line under code
    106     // If Event Cats is in "simple mode", get the value of
    107     // $conf['ec_comment_display'] if set.
    108   'in_help_display'     => array('0', '1'),                           //  8
    109     // whether the help banner is displayed (default: 1).
    110   'display_connection'  => array('0', '1'),                           //  9
    111     // whether the "Connection" link must be displayed for generic users
    112     // (default: 1)
    113     // If Event Cats is in "simple mode", takes the value of
    114     // $conf['ec_display_connection'] if set.
    115   'simple_mode_on'      => array('0', '1'),                           // 10
    116     // whether the presentation of the plugin is in "simple mode" or not.
    117     // (default: 1)
    118     // The default value can be modified to 0 (normal view) if Event Cats was
    119     // already installed previously.
    120   'display_full_button' => array('0', '1'),                           // 11
    121     // whether the "Show full features" button must be displayed (default: 1).
    122     // The default value can be modified to 0 (don't display) if
    123     // $conf['ec_display_full_button'] is set, and false.
     103  'activated'          => array('0', '1'),
     104  'howto'              => array('0', '1'),
     105  'dup_allow'          => array('0', '1', '2'),
     106  'duplic_display'     => array('0', '1', '2'),
     107  'auto_code_dg_nb'    => array( '4',  '5',  '8', '10', '12', '15',
     108                                '16', '20', '24', '25', '30', '32'),
     109  'unknown_code'       => array('0', '1', '2'),
     110  'unknown_code_ap_id' => array(),
     111  'comment_display'    => array('0', '1'),
     112  'in_help_display'    => array('0', '1'),
     113  'display_connection' => array('0', '1'),
    124114);
    125115
    126 // $ec_conf_index is an array of the indexes of $ec_conf. Thus does it allow
    127 // to check if X exists when asking for $ec_conf[X].
    128 $ec_conf_index = array_flip(array_keys($ec_conf_possible_values));
    129 
    130 // Get current value of $ec_conf, if the entry in the DB exists.
    131 $t = array(); $u = '0'; $v = false; $w = false; $ec_conf = array(); $s = '0';
    132 if ($w = ( // $w becomes true if the query succeeds <=> if EC was already in
    133   // $t gets event_cats config value (array to be "exploded")
    134   ($t = pwg_db_fetch_row(pwg_query("
     116// Once these lines have been updated, you don't need to change anything
     117// else. Everything is managed by the code ; the only effect being that
     118// existing configuration values in the DB are reset to their default
     119// values -- normally not a harmful effect.
     120//----------------------------------------------------------------------------
     121
     122$ec_conf_index = array_flip(array_keys($ec_conf_default));
     123
     124$t = array(); $u = '0'; $v = false;
     125if ($v = (
     126  ($t = mysql_fetch_row(pwg_query("
    135127    SELECT `value`
    136128    FROM `".CONFIG_TABLE."`
     
    139131) {
    140132  $v = (count($ec_conf = explode(',', $t[0])) == count($ec_conf_index));
    141   $u = $ec_conf[$ec_conf_index['activated']];
    142   $s = ($v) ? $ec_conf[$ec_conf_index['howto']] : '0'; // the aknowledgement
    143   // message is displayed again if the configuration changes
    144 }
    145 if ($v and !$w) die('$v true with $w false in ec_conf.inc.php');
    146 // $w is false if the entry in the table doesn't exist;
    147 // $v is false if the entry in the table doesn't exist; or exists, but its
    148 // number of parameters is different than the number of default parameters.
    149 // $u is '0' if the plugin is not activated, '1' if it is.
    150 // $s allows to display the aknowledgement message when config changes.
    151 // If $v or $w are false, all $ec_conf values are set to default values. But
    152 // default values must first take values specified in $conf, if they are set.
    153 
    154 // Determine whether simple mode is ON or OFF: simple mode must be on if Event
    155 // Cats is just installed, or if it was ON previously, or if
    156 // $conf['ec_display_full_button'] is set and is false.
    157 $simple_mode_on = (
    158   (!$v and !$w) or (
    159     isset($ec_conf[$ec_conf_index['simple_mode_on']]) and
    160     $ec_conf[$ec_conf_index['simple_mode_on']] == '1'
    161   ) or (
    162     isset($conf['ec_display_full_button']) and
    163     $conf['ec_display_full_button'] == false
    164   )
    165 );
    166 
    167 // Change $ec_conf values if needed
    168 if (!$v or $simple_mode_on) {
    169  
    170   // Perform repetitve work
    171   function test_conf($tbl, $k, $k2 = NULL) {
    172   global $ec_conf_possible_values;
    173     if (!isset($k2)) $k2 = $k;
    174     return (isset($tbl[$k]) and
    175      in_array($tbl[$k], $ec_conf_possible_values[$k2]));
    176   }
    177  
    178   // Avoid that $conf (very big) is passed as argument to function test_conf
    179   $conf_temp = array();
    180   foreach ($ec_conf_possible_values as $key => $val)
    181    if (isset($conf['ec_'.$key])) $conf_temp[$key] = $conf['ec_'.$key];
    182  
    183   if (!$v) {
    184     // Determine default values of $ec_conf
    185     $ec_conf = array(
    186       $ec_conf_index['activated'] => $u,
    187       $ec_conf_index['howto'] => $s,
    188       $ec_conf_index['dup_allow'] =>
    189         ($simple_mode_on and test_conf($conf_temp, 'dup_allow')) ?
    190           $conf_temp['dup_allow']
    191           : (test_conf($ec_conf, $ec_conf_index['dup_allow'], 'dup_allow')) ?
    192             $ec_conf[$ec_conf_index['dup_allow']]
    193             : '2',
    194       $ec_conf_index['duplic_display'] =>
    195         ($simple_mode_on and test_conf($conf_temp, 'duplic_display')) ?
    196           $conf_temp['duplic_display']
    197           : (test_conf($ec_conf, $ec_conf_index['duplic_display'],
    198              'duplic_display')) ?
    199             $ec_conf[$ec_conf_index['duplic_display']]
    200             : '2',
    201       $ec_conf_index['auto_code_dg_nb'] =>
    202         ($simple_mode_on and test_conf($conf_temp, 'auto_code_dg_nb')) ?
    203           $conf_temp['auto_code_dg_nb']
    204           : (test_conf($ec_conf, $ec_conf_index['auto_code_dg_nb'],
    205              'auto_code_dg_nb')) ?
    206             $ec_conf[$ec_conf_index['auto_code_dg_nb']]
    207             : '10',
    208       $ec_conf_index['unknown_code'] =>
    209         (test_conf($ec_conf, $ec_conf_index['unknown_code'],
    210          'unknown_code')) ?
    211           $ec_conf[$ec_conf_index['unknown_code']]
    212           : '1',
    213       $ec_conf_index['unknown_code_ap_id'] =>
    214         (isset($ec_conf[$ec_conf_index['unknown_code_ap_id']])) ?
    215           $ec_conf[$ec_conf_index['unknown_code_ap_id']]
    216           : '0',
    217       $ec_conf_index['comment_display'] =>
    218         ($simple_mode_on and test_conf($conf_temp, 'comment_display')) ?
    219           $conf_temp['comment_display']
    220           : (test_conf($ec_conf, $ec_conf_index['comment_display'],
    221              'comment_display')) ?
    222             $ec_conf[$ec_conf_index['comment_display']]
    223             : '1',
    224       $ec_conf_index['in_help_display'] =>
    225         (test_conf($ec_conf, $ec_conf_index['in_help_display'],
    226          'in_help_display')) ?
    227             $ec_conf[$ec_conf_index['in_help_display']]
    228             : '1',
    229       $ec_conf_index['display_connection'] =>
    230         ($simple_mode_on and test_conf($conf_temp, 'display_connection')) ?
    231           $conf_temp['display_connection']
    232           : (test_conf($ec_conf, $ec_conf_index['display_connection'],
    233              'display_connection')) ?
    234             $ec_conf[$ec_conf_index['display_connection']]
    235             : '1',
    236       $ec_conf_index['simple_mode_on'] =>
    237         ($simple_mode_on) ? '1' : '0',
    238       $ec_conf_index['display_full_button'] =>
    239         ($simple_mode_on and test_conf($conf_temp, 'display_full_button')) ?
    240           $conf_temp['display_full_button']
    241           : (test_conf($ec_conf, $ec_conf_index['display_full_button'],
    242              'display_full_button')) ?
    243             $ec_conf[$ec_conf_index['display_full_button']]
    244             : '1',
    245     );
    246     change_ec_conf('activated', $u); // write in the DB
    247   }
    248   else { // $simple_mode_on is true ; check $conf values for Event Cats
    249     foreach ($ec_conf_possible_values as $key => $val)
    250      if (test_conf($conf_temp, $key))
    251       change_ec_conf($key, $conf_temp[$key]);
    252   }
    253   unset($conf_temp);
     133  $u = $ec_conf[0];
     134}
     135// $v is false
     136//   _ if the entry in the table doesn't exist ;
     137//   _ if the entry in the table exists, but its number of parameters is
     138//     different than the number of default parameters.
     139// $u is '0' if the plugin has not yet been activated, '1' if it has been.
     140if (!$v) {
     141  $ec_conf = array_values($ec_conf_default);
     142  change_ec_conf('activated', $u); // writes in the DB
    254143}
    255144// now :
    256145//   _ the number of parameters is the same in the DB as the number of
    257 //     possible parameters;
    258 //   _ the parameters have the default values if needed;
    259 //   _ the plugin shows it is active if it is the case;
    260 //   _ correct values will be returned when using procedure read_ec_conf($c).
    261 
    262 unset($s, $t, $u, $v, $w, $simple_mode_on);
    263 // And NOW can change_ec_conf and read_ec_conf be used properly...
    264 
    265 // ---------------------------------------------------------------------------
    266 //                  End of $ec_conf initalization
    267 // ---------------------------------------------------------------------------
     146//     default parameters ;
     147//   _ the parameters have the default values if needed ;
     148//   _ the plugin shows it is active if it is the case.
     149unset($t, $u, $v);
    268150
    269151/*
     
    273155 *
    274156 * @param
    275  *   $c : conf value to update;
     157 *   $c : conf value to update ;
    276158 *   $v : value to give to $ec_conf[$c].
    277159 * @return
     
    280162function change_ec_conf($c, $v) {
    281163  global $ec_conf, $page, $ec_conf_index, $ec_conf_possible_values;
    282 
    283164  if (array_key_exists($c, $ec_conf_index)) {
    284165    if (
     
    309190 *
    310191 * @param
    311  *   $c : conf value to update;
     192 *   $c : conf value to update ;
    312193 * @return
    313194 *   $ec_conf value
  • extensions/event_cats/include/evntcats_admin_funcs.inc.php

    r7832 r8956  
    2323// +-----------------------------------------------------------------------+
    2424
    25 // Keeps file coded in UTF-8 without BOM: é
     25// Keeps file coded in UTF-8 without BOM : é
    2626
    2727// ***************************************************************************
     
    7777function ec_end2($n) {
    7878  global $page;
    79   my_error(sprintf(l10n('ec_DB_problem'), $n), false);
     79  $page['errors'][] =
     80   sprintf(l10n('ec_DB_problem'), $n).
     81   'MySQL error '.mysql_errno().', "'.mysql_error().'"';
    8082  return false;
    8183}
     
    135137    $t2 = 0; $t3 = false; $t4 = false;
    136138    while ( // The check is executed once at minimum
    137       !($t3 = pwg_db_fetch_row(pwg_query("
     139      !($t3 = mysql_fetch_row(pwg_query("
    138140        SELECT `id`
    139141        FROM `".GROUPS_TABLE."`
     
    149151     $page['infos'][] =
    150152      sprintf(l10n('ec_group_create_OK'), $_POST['groupname']);
    151     if (!$t3) my_error(sprintf(l10n('ec_group_create_pb'),
    152                                $_POST['groupname']).' (1) ', false);
     153    if (!$t3)
     154     $page['errors'][] =
     155      sprintf(l10n('ec_group_create_pb'), $_POST['groupname']).' (1) : '.
     156      'MySQL error '.mysql_errno().', "'.mysql_error().'"';
    153157    if (
    154158      pwg_query("
     
    156160        VALUES ('".$ec_user_id."', '".$t3[0]."');
    157161      ") === false
    158     ) my_error(sprintf(l10n('ec_group_create_pb'),
    159                        $_POST['groupname']).' (2) ', false);
     162    ) $page['errors'][] =
     163      sprintf(l10n('ec_group_create_pb'), $_POST['groupname']).' (2) : '.
     164      'MySQL error '.mysql_errno().', "'.mysql_error().'"';
    160165    else $page['infos'][] = sprintf(
    161166      l10n('ec_group_create_OK2'),
     
    171176      array_key_exists($_POST['ec_in_up_cat'], $ec_lists['categories'])
    172177    ) {
    173       if (pwg_db_num_rows(pwg_query("
     178      if (mysql_num_rows(pwg_query("
    174179        SELECT `id`
    175180        FROM `".CATEGORIES_TABLE."`
     
    197202           $_POST['groupname'],$ec_lists['categories'][$_POST['ec_in_up_cat']]
    198203         );
    199         else my_error(sprintf(
     204        else
     205         $page['errors'][] = sprintf(
    200206          l10n('ec_assoc_pb'),
    201           $_POST['groupname'], $ec_lists['categories'][$_POST['ec_in_up_cat']]
    202         ), false);
     207          $_POST['groupname'],$ec_lists['categories'][$_POST['ec_in_up_cat']]
     208         ).' : MySQL error '.mysql_errno().', "'.mysql_error().'"';
    203209      }
    204210    }
     
    231237            SET `title` = '".implode('/user_id=', $t_user)."'
    232238            WHERE `id` = ".$_POST['ec_in_up_aps'].";
    233         ") === false) my_error(sprintf(
     239        ") === false)
     240         $page['errors'][] = sprintf(
    234241          l10n('ec_assoc_pb'),
    235           $_POST['groupname'], $ec_lists['add_pages'][$_POST['ec_in_up_aps']]
    236         ), false);
     242          $_POST['groupname'],$ec_lists['add_pages'][$_POST['ec_in_up_aps']]
     243         ).' : MySQL error '.mysql_errno().', "'.mysql_error().'"';
    237244        else $page['infos'][] = sprintf(
    238245         l10n('ec_group_create_OK2'),
     
    267274          AND `user_id` = '$ec_user_id';
    268275      ");
    269       while ($row = pwg_db_fetch_assoc($result))
     276      while ($row = mysql_fetch_array($result))
    270277       $granteds[$row['cat_id']][] = $row['user_id'];
    271278      $inserts = array();
     
    283290           $_POST['login'], $ec_lists['categories'][$_POST['ec_in_up_cat']]
    284291         );
    285         else my_error(sprintf(
     292        else
     293         $page['errors'][] = sprintf(
    286294          l10n('ec_assoc_pb'),
    287295          $_POST['login'], $ec_lists['categories'][$_POST['ec_in_up_cat']]
    288         ), false);
     296         ).' : MySQL error '.mysql_errno().', "'.mysql_error().'"';
    289297      }
    290298    }
     
    395403      if (
    396404        !isset($_POST['ec_in_up_code']) or
    397         !preg_match('/^[a-zA-Z0-9_-]{4,32}$/', $_POST['ec_in_up_code'])
     405        !ereg('^[a-zA-Z0-9_-]{4,32}$', $_POST['ec_in_up_code'])
    398406      ) return ec_end1('ec_in_up_code', 'Improper code : ');
    399407      else $ec_code = $_POST['ec_in_up_code'];
     
    545553  $arg2p = ($arg2 == 'NULL') ? 'IS NULL' : ' = '.$arg2;
    546554  $ec_user_idp = ($ec_user_id == 'NULL') ? 'IS NULL' : ' = '.$ec_user_id;
    547   if (($t1 = pwg_db_fetch_row(pwg_query("
     555  if (($t1 = mysql_fetch_row(pwg_query("
    548556    SELECT `id`
    549557    FROM `".EVNTCATS_TABLE."`
     
    563571  if ($del_other) {
    564572    if ((
    565       $t1 = pwg_db_fetch_row(pwg_query("
     573      $t1 = mysql_fetch_row(pwg_query("
    566574        SELECT `code`
    567575        FROM `".EVNTCATS_TABLE."`
     
    573581      FROM `".EVNTCATS_TABLE."`
    574582      WHERE `code` = '".$t1[0]."'
    575        AND `action` IS NOT NULL
    576583       AND `id` <> ".$_POST['ec_entry_sel']
    577584    );
    578     while ($t2 = pwg_db_fetch_row($r)) if (!ec_delete_entry_OK($t2[0]))
     585    while ($t2 = mysql_fetch_row($r)) if (!ec_delete_entry_OK($t2[0]))
    579586     return false;
    580587  }
     
    599606      ") === false
    600607    ) {
    601       my_error(l10n('ec_entry_create_pb'), false);
     608      $page['errors'][] =
     609       l10n('ec_entry_create_pb').' : '.
     610       'MySQL error '.mysql_errno().', "'.mysql_error().'"'
     611      ;
    602612      $ret = false;
    603613    }
    604614    else {
    605       $t5 = pwg_db_insert_id(EVNTCATS_TABLE);
    606615      build_ec_lists(); // Don't remember exactly why, but must be done here
    607616      $forced = ($forced == 'false') ? '' : l10n('ec_cnfrm_forced');
    608617      $page['infos'][] =
    609        sprintf(l10n('ec_entry_create_OK'), $t5).
     618       sprintf(l10n('ec_entry_create_OK'), mysql_insert_id()).
    610619       $ec_code.' => '.
    611620       $ec_lists['user_ids'][$ec_user_id].$forced
     
    628637      ") === false
    629638    ) {
    630       my_error(l10n('ec_entry_create_pb'), false);
     639      $page['errors'][] =
     640       l10n('ec_entry_create_pb').' : '.
     641       'MySQL error '.mysql_errno().', "'.mysql_error().'"'
     642      ;
    631643      $ret = false;
    632644    }
     
    650662function ec_delete_entry_OK($ec_id) {
    651663  global $page;
    652   if (count($t = pwg_db_fetch_row(pwg_query("
     664  if (count($t = mysql_fetch_row(pwg_query("
    653665    SELECT `code`
    654666    FROM `".EVNTCATS_TABLE."`
     
    662674    WHERE `id` = ".$ec_id
    663675  ) === false) {
    664     my_error(sprintf(l10n('ec_entry_del_nok'), $ec_id), false);
     676    $page['errors'][] =
     677     sprintf(l10n('ec_entry_del_nok'),
     678     $ec_id).
     679     'MySQL error '.mysql_errno().', "'.mysql_error().'"';
    665680    return false;
    666681  }
  • extensions/event_cats/include/evntcats_main_funcs.inc.php

    r7663 r8956  
    7777 */
    7878function ec_image_exists($cat, $img) {
    79   return (pwg_db_fetch_row(pwg_query("
     79  return (mysql_fetch_row(pwg_query("
    8080    SELECT *
    8181    FROM `".IMAGE_CATEGORY_TABLE."`
     
    8888 * str_from_var($var)
    8989 * returns a string easing array var informations displaying in Piwigo :
    90  *   _ the string return value starts with"<p style = "text-align:left;">" ;
     90 *   _ the string return value starts with"<p align="left">" ;
    9191 *   _ all "TAB" characters (chr(10)) are replaced by "<br>" ;
    9292 *   _ all spaces are replaced by "&nbsp;".
     
    9999function str_from_var($var) {
    100100  return
    101    '<p style = "text-align:left;">'.
     101   '<p align="left">'.
    102102   str_replace(
    103103    chr(10),'<br>',
     
    190190  if (defined('ADD_PAGES_TABLE')) {
    191191    $res = pwg_query("SELECT `id`, `title` FROM `".ADD_PAGES_TABLE."`;");
    192     while ($r = pwg_db_fetch_assoc($res)) {
     192    while ($r = mysql_fetch_array($res)) {
    193193      $a = (is_in($r['title'], '/user_id=')) ?
    194194       explode('/user_id=' , $r['title']) : array($r['title']);
     
    261261    SELECT *
    262262    FROM `".EVNTCATS_TABLE."`
    263     WHERE `code`   IS NOT NULL
    264       AND `action` IS NOT NULL
     263    WHERE `code` IS NOT NULL
    265264    ORDER BY `id`
    266265  ");
    267   while ($r = pwg_db_fetch_assoc($q))
     266  while ($r = mysql_fetch_assoc($q))
    268267   $ec_lists['ec_table'][intval($r['id'])] = $r;
    269268 
     
    332331 *   the global array variable $ec_lists.
    333332 * @return
    334  *   true or false whether duplication based on user type exists
    335  *   (user types are guest (0), contact (1), friend (2), family (4), and
    336  *   admin should be 8, but is not used, as admins can't duplicate; 8 is used
    337  *   for generic users, and is managed slightly differently as it is not
    338  *   actually a "user type")
     333 *   (no return value)
    339334 */
    340335function build_dup_groups() {
     
    383378  // certain group (in groups, level (friends, family, contacts),
    384379  // or user status (generic))
    385   $types_entry_exists = (($t = pwg_db_fetch_row(pwg_query("
     380  $types_entry_exists = (($t = mysql_fetch_row(pwg_query("
    386381    SELECT `arg2`
    387382    FROM `".EVNTCATS_TABLE."`
     
    483478          AND `user_id` > 2;
    484479      ");
    485       while ($row = pwg_db_fetch_assoc($result)) {
     480      while ($row = mysql_fetch_array($result)) {
    486481        if (!isset($user_granted_from_type[$row['level']])) {
    487482          $user_granted_from_type[$row['level']] = array();
     
    522517        AND `user_id` > 2;
    523518    ");
    524     while ($row = pwg_db_fetch_assoc($result)) {
     519    while ($row = mysql_fetch_array($result)) {
    525520      if (!isset($granted_groups[$row['group_id']])) {
    526521        $granted_groups[$row['group_id']] = array();
  • extensions/event_cats/language/en_UK/duplic.lang.php

    r7832 r8956  
    77*/
    88
    9 // Keeps file coded in UTF-8 without BOM: é
     9// Keeps file coded in UTF-8 without BOM : é
    1010
    1111$lang['Duplicate']                                 = 'Duplicate';
  • extensions/event_cats/language/en_UK/plugin.lang.php

    r7847 r8956  
    77*/
    88
    9 // Keeps file coded in UTF-8 without BOM: é
     9// Keeps file coded in UTF-8 without BOM : é
    1010
    1111// Convenient
     
    1919// "Header"
    2020$lang['Admin page title']          = 'Event Categories';
    21 $lang['Acknowledgement']           = 'the purpose of this extension is to allow automatic logging of an account ("autolog"), and duplication of the account with which the visitor is currently logged in ("duplication").<br><br>Many thanks to the Forum, plg, ddtddt, flipflip, VDigital, Gotcha for the tests, P@t for the main code&nbsp;:-)&nbsp;!';
    22 $lang['JS needed']                 = 'JavaScript MUST be activated for this page to work properly!';
     21$lang['Acknowledgement']           = 'the purpose of this extension is to allow automatic logging of an account ("autolog"), and duplication of the account with which the visitor is currently logged in ("duplication").<br /><br />Many thanks to the Forum, plg, ddtddt, flipflip, VDigital, Gotcha for the tests, P@t for the main code :-) !';
     22$lang['JS needed']                 = 'Javascript MUST be activated for this page to work properly !';
    2323$lang['Show']                      = 'show';
    2424$lang['Hide']                      = 'hide';
    2525
    2626// Autolog page
    27 $lang['Additional Pages active']   = 'Additional Pages plugin: activated';
    28 $lang['Additional Pages inactive'] = $t_ap2.' plugin (display a text page): not activated';
     27$lang['Additional Pages active']   = 'Additional Pages plugin : activated';
     28$lang['Additional Pages inactive'] = $t_ap2.' plugin (display a text page) : not activated';
    2929$lang['Autolog entries']           = '"Autolog" entries';
    3030$lang['Place title on top ttip']   = 'Display this title in the head of the page';
     
    3737$lang['Tools']                     = 'Tools';
    3838$lang['Selected entry']            = 'Selected entry';
    39 $lang['URL']                       = 'URL: ';
     39$lang['URL']                       = 'URL : ';
    4040$lang['Test']                      = 'Test';
    4141$lang['Delete']                    = 'Delete';
     
    5555$lang['New entry']                 = 'New entry';
    5656$lang['Full auto']                 = 'Full auto (select first a page to display)';
    57 $lang['New code']                  = 'New code:';
     57$lang['New code']                  = 'New code :';
    5858$lang['Auto code button']          = 'Generate a code';
    5959$lang['Auto code mid']             = 'having';
     
    6363$lang['Comment']                   = 'Comment';
    6464$lang['Optional']                  = 'Personal memo displayed only in administration pages';
    65 $lang['Existing code']             = 'Existing code:';
     65$lang['Existing code']             = 'Existing code :';
    6666$lang['Identified user']           = 'Identified user';
    6767$lang['No user']                   = 'None (outdated entry)';
     
    6969$lang['New username']              = 'Username';
    7070$lang['New password']              = 'Password';
    71 $lang['Confirm password']          = 'Confirm pwd:';
     71$lang['Confirm password']          = 'Confirm pwd :';
    7272$lang['New group']                 = 'New group';
    7373$lang['Generate username']         = 'Generate a username (select first a page to display)';
    74 $lang['Existing user']             = 'Existing user:';
     74$lang['Existing user']             = 'Existing user :';
    7575$lang['Displayed page']            = 'Displayed page';
    7676$lang['Forced']                    = 'Forced';
     
    8080$lang['Home']                      = 'Home';
    8181$lang['Access denied']             = 'Access denied';
    82 $lang['Validity date']             = 'Validity date';
    83 $lang['Activate']                  = 'Activate';
    84 $lang['Now + 2 mn']                = 'Now + 2 mn';
    85 $lang['Now button tooltip']        = 'Validity period can\'t be less than 1 mn. Considering processing time, 2 mn are required here.';
    86 $lang['Set time to']               = 'Set time to';
    87 $lang['Hours field tooltip']       = 'Format: hh:mm or h:m';
    88 $lang['Add']                       = 'Add';
    89 $lang['Add button tooltip']        = 'Add following period to above selected date';
    90 $lang['Minutes']                   = 'minute(s)';
    91 $lang['Hours']                     = 'hour(s)';
    92 $lang['Days']                      = 'day(s)';
    93 $lang['Months']                    = 'month(s)';
    94 $lang['Years']                     = 'year(s)';
    95 $lang['Do notify']                 = 'When the code has<br>expired, notify';
    96 $lang['Notify label tooltip']      = 'This checkbox is ticked when one of the next checkboxes is';
    97 $lang['The user']                  = 'the user';
    98 $lang['The webmaster']             = 'the webmaster';
    99 $lang['All administrators']        = 'all administrators';
    100 $lang['Page once code outdated']   = 'Page to assign to the code,<br>once it has expired';
    10182
    10283// Duplication page
     
    10788$lang['Selection per group']       = 'Selection by group';
    10889$lang['All accounts']              = 'All accounts';
    109 $lang['Register replacement']      = 'Register link:%1$s for all accounts that can be duplicated,%1$s replace "%2$s" with "%3$s"';
    110                                  // %1$s: line feed; %2$s: "register"; %3$s: "duplicate"
     90$lang['Register replacement']      = 'Register link :%1$s for all accounts that can be duplicated,%1$s replace "%2$s" with "%3$s"';
     91                                 // %1$s : nice line feed ; %2$s : "register" ; %3$s : "duplicate"
    11192$lang['All but generics']          = 'All accounts but generic ones';
    11293$lang['Duplication allowed']       = 'Duplication allowed';
     
    133114$lang['Banner off']                = 'Desactivated';
    134115$lang['Display connection']        = 'Display "%2$s" link%1$s to generic users';
    135                                  // %1$s: line feed; %2$s: "Connection"
     116                                 // %1$s : nice line feed ; %2$s : "Connection"
    136117
    137118// JS messages
    138 $lang['ec_confirm_test']           = "Really test the selected code?\n\rThis will terminate your administration session.";
    139 $lang['ec_confirm_delete']         = "Do you really want to delete the selected entry?";
    140 $lang['ec_confirm_disable']        = "Do you really want to make the selected entry outdated?\n\rThis will delete all other entries using the same code, if any.";
    141 $lang['ec_confirm_force']          = "Do you really want to force the displayed page for the selected entry?\n\rThis will delete all other entries using the same code, if any.";
     119$lang['ec_confirm_test']           = "Really test the selected code ?\n\rThis will terminate your administration session.";
     120$lang['ec_confirm_delete']         = "Do you really want to delete the selected entry ?";
     121$lang['ec_confirm_disable']        = "Do you really want to make the selected entry outdated ?\n\rThis will delete all other entries using the same code, if any.";
     122$lang['ec_confirm_force']          = "Do you really want to force the displayed page for the selected entry ?\n\rThis will delete all other entries using the same code, if any.";
    142123$lang['ec_confirm_del_other']      = "This will delete all other entries using the same code, if any.\n\rOK?";
    143124$lang['ec_confirm_change_user']    = "Username modification will delete\n\rall other entries using the same code, if any. OK?";
     
    184165$lang['ec_image_miss']             = 'image doesn\'t exist (probably deleted)';
    185166$lang['ec_add_page_miss']          = 'Additional Pages page doesn\'t exist (probably deleted)';
    186 $lang['ec_entry_del_nok']          = 'Problem when deleting entry %s: ';
     167$lang['ec_entry_del_nok']          = 'Problem when deleting entry %s : ';
    187168$lang['ec_user_create_pb']         = 'New user creation impossible';
    188169$lang['ec_user_generic_pb']        = 'Problem when making user "%s" generic';
     
    193174$lang['ec_entry_dont_exist']       = 'Entry %s doesn\'t exist';
    194175$lang['ec_assoc_pb']               = 'Impossible to link "%1$s" to "%2$s"';
    195 $lang['ec_DB_problem']             = 'Database access problem (position %s): ';
     176$lang['ec_DB_problem']             = 'Database access problem (position %s) : ';
    196177
    197178// Entries table
     
    203184$lang['ec_nok']                    = 'NO';
    204185$lang['ec_nok_ap_pb']              = 'NO';
    205 $lang['ec_nok_userid_miss']        = 'NO: user unknown';
    206 $lang['ec_nok_action_pb']          = 'NO: "action" corrupted';
    207 $lang['ec_nok_userid_pb']          = 'NO: "user_id" corrupted';
     186$lang['ec_nok_userid_miss']        = 'NO : user unknown';
     187$lang['ec_nok_action_pb']          = 'NO : "action" corrupted';
     188$lang['ec_nok_userid_pb']          = 'NO : "user_id" corrupted';
    208189// Username can't be displayed
    209190$lang['ec_dspl_nok_actn']          = '"action" unusable';
     
    211192$lang['ec_dspl_nok_usr']           = 'User n°%s doesn\'t exist';
    212193//   displayed pages
    213 $lang['ec_dspl_ok_cat']            = 'Category n°%1$s: %2$s';
    214                                  // %1$s: category id, %2$s: name
    215 $lang['ec_dspl_ok_img2']           = 'image n°%1$s: %2$s (%3$s)';
    216                                  // %1$s: image id, %2$s: name, %3$s: filename
    217 $lang['ec_dspl_ok_ap']             = 'Additional Page n°%1$s: %2$s';
    218                                  // %1$s: add. p. id, %2$s: name
     194$lang['ec_dspl_ok_cat']            = 'Category n°%1$s : %2$s';
     195                                 // %1$s : category id, %2$s : name
     196$lang['ec_dspl_ok_img2']           = 'image n°%1$s : %2$s (%3$s)';
     197                                 // %1$s : image id, %2$s : name, %3$s : filename
     198$lang['ec_dspl_ok_ap']             = 'Additional Page n°%1$s : %2$s';
     199                                 // %1$s : add. p. id, %2$s : name
    219200$lang['ec_dspl_nok_ap']            = ' (Additional Page n°%s doesn\'t exist)';
    220201$lang['ec_dspl_nok_cat']           = ' (catégorie n°%s doesn\'t exist)';
    221202$lang['ec_dspl_nok_img2']          = ' (image n°%1$s doesn\'t exist in category n°%2$s)';
    222                                  // %1$s: image id, %2$s: category id
     203                                 // %1$s : image id, %2$s : category id
    223204
    224205// Help banner
     
    233214
    234215// Modify entry tab, general case
    235 $lang['ec_help_banner1_new_m']     = 'Select a <span class = "help_bi">code</span> to change the corresponding <span class = "help_bi">identified user</span> and&nbsp;/&nbsp;or the <span class = "help_bi">page to be displayed</span>. If you <span class = "help_b">force</span> the page to be displayed, or change the identified user, other entries using the same code will be deleted. Choosing <span class = "help_b">None</span> as identified user, or <span class = "help_b">Access denied</span> as page to display, will render the entry "outdated": no identification, but you can display a personalized page to give an explanation. To <span class = "help_b">generate a username</span>, select first the <span class = "help_bi">page to display</span>, as the username based on the name of the page to display.';
     216$lang['ec_help_banner1_new_m']     = 'Select a <span class = "help_bi">code</span> to change the corresponding <span class = "help_bi">identified user</span> and&nbsp;/&nbsp;or the <span class = "help_bi">page to be displayed</span>. If you <span class = "help_b">force</span> the page to be displayed, or change the identified user, other entries using the same code will be deleted. Choosing <span class = "help_b">None</span> as identified user, or <span class = "help_b">Access denied</span> as page to display, will render the entry "outdated" : no identification, but you can display a personalized page to give an explanation. To <span class = "help_b">generate a username</span>, select first the <span class = "help_bi">page to display</span>, as the username based on the name of the page to display.';
    236217
    237218// Modify entry tab, disable case
     
    242223
    243224// Configuration tab
    244 $lang['ec_help_banner1_config']    = '<span class = "help_i">Duplicate an account</span> when a user is already identified, creates another account having exactly the same permissions: no need to wait for an administrator\'s validation.&nbsp;— Select the page you want to be displayed in case of an unknown code usage (for instance, a code you have deleted).&nbsp;— In the "Autolog entries" tab, the comments can be displayed as tooltips, or on a new line under the code.&nbsp;— As you\'re currently reading it, the help banner is currently active&nbsp;;-)&nbsp;!&nbsp;— Display the "Connection" link to generic users, allows users already registered on your gallery to log in easily.';
     225$lang['ec_help_banner1_config']    = '<span class = "help_i">Duplicate an account</span> when a user is already identified, creates another account having exactly the same permissions: no need to wait for an administrator\'s validation.&nbsp;&#151; Select the page you want to be displayed in case of an unknown code usage (for instance, a code you have deleted).&nbsp;&#151; In the "Autolog entries" tab, the comments can be displayed as tooltips, or on a new line under the code.&nbsp;&#151; As you\'re currently reading it, the help banner is currently active ;-) !&nbsp;&#151; Display the "Connection" link to generic users, allows users already registered on your gallery to log in easily.';
    245226
    246227
  • extensions/event_cats/language/fr_FR/duplic.lang.php

    r7832 r8956  
    77*/
    88
    9 // Keeps file coded in UTF-8 without BOM: é
     9// Keeps file coded in UTF-8 without BOM : é
    1010
    1111$lang['Duplicate']                                 = 'Dupliquer';
  • extensions/event_cats/language/fr_FR/plugin.lang.php

    r7847 r8956  
    77*/
    88
    9 // Keeps file coded in UTF-8 without BOM: é
     9// Keeps file coded in UTF-8 without BOM : é
    1010
    1111// Convenient
     
    1919// "Header"
    2020$lang['Admin page title']          = 'Event Categories';
    21 $lang['Acknowledgement']           = 'Event Categories, pour catégories événementielles&nbsp;:<br>cette extension permet d\'identifier automatiquement un compte ("autolog"), et de dupliquer le compte sous lequel un visiteur est identifié ("duplication").<br><br>Merci au Forum, plg, ddtddt, flipflip, VDigital, Gotcha pour les tests, P@t pour le code principal&nbsp;:-)&nbsp;!';
    22 $lang['JS needed']                 = 'JavaScript DOIT être activé sur votre navigateur pour un fonctionnement correct de cette page&nbsp;!';
     21$lang['Acknowledgement']           = 'Event Categories, pour catégories événementielles :<br />cette extension permet d\'identifier automatiquement un compte ("autolog"), et de dupliquer le compte sous lequel un visiteur est identifié ("duplication").<br /><br />Merci au Forum, plg, ddtddt, flipflip, VDigital, Gotcha pour les tests, P@t pour le code principal :-) !';
     22$lang['JS needed']                 = 'Javascript DOIT être activé sur votre navigateur pour un fonctionnement correct de cette page !';
    2323$lang['Show']                      = 'montrer';
    2424$lang['Hide']                      = 'cacher';
    2525
    2626// Autolog page
    27 $lang['Additional Pages active']   = 'Plugin Additional Pages&nbsp;: actif';
    28 $lang['Additional Pages inactive'] = 'Plugin '.$t_ap2.' (afficher une page de texte)&nbsp;: inactif';
     27$lang['Additional Pages active']   = 'Plugin Additional Pages : actif';
     28$lang['Additional Pages inactive'] = 'Plugin '.$t_ap2.' (afficher une page de texte) : inactif';
    2929$lang['Autolog entries']           = 'Entrées du paramètre "autolog"';
    3030$lang['Place title on top ttip']   = 'Placer ce titre en haut de la page';
     
    3333$lang['Code']                      = 'Code';
    3434$lang['Username']                  = 'Utilisateur';
    35 $lang['Identification']            = 'Identification&nbsp;?';
     35$lang['Identification']            = 'Identification ?';
    3636$lang['Displayed page']            = 'Page affichée';
    3737$lang['Tools']                     = 'Outils';
    3838$lang['Selected entry']            = 'Entrée sélectionnée';
    39 $lang['URL']                       = 'URL&nbsp;: ';
     39$lang['URL']                       = 'URL : ';
    4040$lang['Test']                      = 'Tester';
    4141$lang['Delete']                    = 'Supprimer';
     
    5555$lang['New entry']                 = 'Nouvelle entrée';
    5656$lang['Full auto']                 = 'Tout automatique (sélectionnez d\'abord une page à afficher)';
    57 $lang['New code']                  = 'Nouveau code&nbsp;:';
     57$lang['New code']                  = 'Nouveau code :';
    5858$lang['Auto code button']          = 'Générer un code';
    5959$lang['Auto code mid']             = 'de';
     
    6363$lang['Comment']                   = 'Commentaire';
    6464$lang['Optional']                  = 'Note personnelle visible uniquement dans l\'administration';
    65 $lang['Existing code']             = 'Code existant&nbsp;:';
     65$lang['Existing code']             = 'Code existant :';
    6666$lang['Identified user']           = 'Utilisateur identifié';
    6767$lang['No user']                   = 'Aucun (entrée périmée)';
    68 $lang['New generic user']          = 'Nouvel utilisateur (créer un compte générique)&nbsp;:';
     68$lang['New generic user']          = 'Nouvel utilisateur (créer un compte générique) :';
    6969$lang['New username']              = 'Nom d\'utilisateur';
    7070$lang['New password']              = 'Mot de passe';
    71 $lang['Confirm password']          = 'Confirmez&nbsp;:';
     71$lang['Confirm password']          = 'Confirmez :';
    7272$lang['New group']                 = 'Nouveau groupe';
    7373$lang['Generate username']         = 'Générer un nom d\'utilisateur (sélectionnez d\'abord une page à afficher)';
    74 $lang['Existing user']             = 'Utilisateur existant&nbsp;:';
     74$lang['Existing user']             = 'Utilisateur existant :';
    7575$lang['Displayed page']            = 'Page affichée';
    7676$lang['Forced']                    = 'Forcée';
     
    8080$lang['Home']                      = 'Accueil';
    8181$lang['Access denied']             = 'Accès refusé';
    82 $lang['Validity date']             = 'Date de validité';
    83 $lang['Activate']                  = 'Activer';
    84 $lang['Now + 2 mn']                = 'Maintenant + 2 mn';
    85 $lang['Now button tooltip']        = 'La période de validité ne peut être inférieure à 1 mn. Compte tenu des temps de traitement, 2 mn sont nécessaires ici.';
    86 $lang['Set time to']               = 'Régler l\'heure à';
    87 $lang['Hours field tooltip']       = 'Format : hh:mm ou h:m';
    88 $lang['Add']                       = 'Ajouter';
    89 $lang['Add button tooltip']        = 'Ajouter la période de temps choisie à la date ci-dessus';
    90 $lang['Minutes']                   = 'minute(s)';
    91 $lang['Hours']                     = 'heure(s)';
    92 $lang['Days']                      = 'jour(s)';
    93 $lang['Months']                    = 'mois';
    94 $lang['Years']                     = 'année(s)';
    95 $lang['Do notify']                 = 'Lorsque le code<br>a expiré, notifier';
    96 $lang['Notify label tooltip']      = 'Cette case est cochée lorsqu\'une des cases ci-contre l\'est';
    97 $lang['The user']                  = 'l\'utilisateur';
    98 $lang['The webmaster']             = 'le webmestre';
    99 $lang['All administrators']        = 'tous les administrateurs';
    100 $lang['Page once code outdated']   = 'Page à affecter au code,<br>une fois qu\'il a expiré';
    10182
    10283// Duplication page
     
    10788$lang['Selection per group']       = 'Sélection par groupes';
    10889$lang['All accounts']              = 'Tous les comptes';
    109 $lang['Register replacement']      = 'Affichage du lien d\'enregistrement&nbsp;:%1$s pour les comptes pouvant être dupliqués,%1$s remplacer "%2$s" par "%3$s"';
    110                                  // %1$s : line feed ; %2$s : "register" ; %3$s : "duplicate"
     90$lang['Register replacement']      = 'Affichage du lien d\'enregistrement :%1$s pour les comptes pouvant être dupliqués,%1$s remplacer "%2$s" par "%3$s"';
     91                                 // %1$s : nice line feed ; %2$s : "register" ; %3$s : "duplicate"
    11192$lang['All but generics']          = 'Tous les comptes sauf les génériques';
    11293$lang['Duplication allowed']       = 'Duplication autorisée';
     
    133114$lang['Banner off']                = 'Désactivé';
    134115$lang['Display connection']        = 'Afficher le lien "%2$s"%1$s pour les utilisateurs génériques';
    135                                  // %1$s : line feed ; %2$s : "Connection"
     116                                 // %1$s : nice line feed ; %2$s : "Connection"
    136117
    137118// JS messages
     
    184165$lang['ec_image_miss']             = 'image inexistante (probablement supprimée)';
    185166$lang['ec_add_page_miss']          = 'page Additional Pages inexistante (probablement supprimée)';
    186 $lang['ec_entry_del_nok']          = 'Problème avec suppression entrée %s&nbsp;: ';
     167$lang['ec_entry_del_nok']          = 'Problème avec suppression entrée %s : ';
    187168$lang['ec_user_create_pb']         = 'Création nouvel utilisateur impossible';
    188169$lang['ec_user_generic_pb']        = 'Problème passage générique utilisateur "%s"';
     
    193174$lang['ec_entry_dont_exist']       = 'Entrée %s inexistante';
    194175$lang['ec_assoc_pb']               = 'Association "%1$s" à "%2$s" impossible';
    195 $lang['ec_DB_problem']             = 'Problème d\'accès à la base (position %s)&nbsp;: ';
     176$lang['ec_DB_problem']             = 'Problème d\'accès à la base (position %s) : ';
    196177
    197178// Entries table
     
    203184$lang['ec_nok']                    = 'NON';
    204185$lang['ec_nok_ap_pb']              = 'NON';
    205 $lang['ec_nok_userid_miss']        = 'NON&nbsp;: utilisateur inconnu';
    206 $lang['ec_nok_action_pb']          = 'NON&nbsp;: "action" corrompu';
    207 $lang['ec_nok_userid_pb']          = 'NON&nbsp;: "user_id" corrompu';
     186$lang['ec_nok_userid_miss']        = 'NON : utilisateur inconnu';
     187$lang['ec_nok_action_pb']          = 'NON : "action" corrompu';
     188$lang['ec_nok_userid_pb']          = 'NON : "user_id" corrompu';
    208189// Username can't be displayed
    209190$lang['ec_dspl_nok_actn']          = '"action" inutilisable';
     
    211192$lang['ec_dspl_nok_usr']           = 'Utilisateur n°%s n\'existe pas';
    212193//   displayed pages
    213 $lang['ec_dspl_ok_cat']            = 'Catégorie n°%1$s&nbsp;: %2$s';
     194$lang['ec_dspl_ok_cat']            = 'Catégorie n°%1$s : %2$s';
    214195                                 // %1$s : category id, %2$s : name
    215 $lang['ec_dspl_ok_img2']           = 'image n°%1$s&nbsp;: %2$s (%3$s)';
     196$lang['ec_dspl_ok_img2']           = 'image n°%1$s : %2$s (%3$s)';
    216197                                 // %1$s : image id, %2$s : name, %3$s : filename
    217 $lang['ec_dspl_ok_ap']             = 'Additional Page n°%1$s&nbsp;: %2$s';
     198$lang['ec_dspl_ok_ap']             = 'Additional Page n°%1$s : %2$s';
    218199                                 // %1$s : add. p. id, %2$s : name
    219200$lang['ec_dspl_nok_ap']            = ' (Additional Page n°%s n\'existe pas)';
     
    224205// Help banner
    225206// Entries tab
    226 $lang['ec_help_banner1_entries']   = '<ul><li style = "list-style-image:url(plugins/event_cats/icon/disable.png);"><span class = "help_b">Rendre l\'entrée périmée</span>&nbsp;: pour désactiver un code, mais en affichant un message personnalisé&nbsp;;</li><li style = "list-style-image:url(plugins/event_cats/icon/nforced.png);"><span class = "help_b">Forcer</span>&nbsp;: pour empêcher les utilisateurs d\'essayer d\'atteindre d\'autres pages en modifiant l\'URL&nbsp;;<li style = "list-style-image:url(plugins/event_cats/icon/forced.png);"><span class = "help_b">Ne plus forcer</span>&nbsp;: pour pouvoir proposer plusieurs pages à afficher en utilisant le même code&nbsp;;</li><li style = "list-style-image:url(plugins/event_cats/icon/duplicate.png);"><span class = "help_b">Recopier</span>&nbsp;: pour créer une autre entrée qui utilise le même code, mais redirige vers une autre page&nbsp;;</li><li style = "list-style-image:url(plugins/event_cats/icon/url2.png);"><span class = "help_b">Tester</span>&nbsp;: pour voir si ça fonctionne&nbsp;;-)&nbsp;;</li><li style = "list-style-image:url(plugins/event_cats/icon/delete.png);"><span class = "help_b">Supprimer</span>&nbsp;: supprimer l\'entrée&nbsp;;</li><li style = "list-style-image:url(plugins/event_cats/icon/modify.png);"><span class = "help_b">Modifier</span>&nbsp;: modifier l\'entrée.</ul>';
     207$lang['ec_help_banner1_entries']   = '<ul><li style = "list-style-image:url(plugins/event_cats/icon/disable.png);"><span class = "help_b">Rendre l\'entrée périmée</span>&nbsp;: pour désactiver un code, mais en affichant un message personnalisé&nbsp;;</li><li style = "list-style-image:url(plugins/event_cats/icon/nforced.png);"><span class = "help_b">Forcer</span>&nbsp;: pour empêcher les utilisateurs d\'essayer d\'atteindre d\'autres pages en modifiant l\'URL&nbsp;;<li style = "list-style-image:url(plugins/event_cats/icon/forced.png);"><span class = "help_b">Ne plus forcer</span>&nbsp;: pour pouvoir proposer plusieurs pages à afficher en utilisant le même code&nbsp;;</li><li style = "list-style-image:url(plugins/event_cats/icon/duplicate.png);"><span class = "help_b">Recopier</span>&nbsp;: pour créer une autre entrée qui utilise le même code, mais redirige vers une autre page&nbsp;;</li><li style = "list-style-image:url(plugins/event_cats/icon/url2.png);"><span class = "help_b">Tester</span>&nbsp;: pour voir si ça fonctionne ;-)&nbsp;;</li><li style = "list-style-image:url(plugins/event_cats/icon/delete.png);"><span class = "help_b">Supprimer</span>&nbsp;: supprimer l\'entrée&nbsp;;</li><li style = "list-style-image:url(plugins/event_cats/icon/modify.png);"><span class = "help_b">Modifier</span>&nbsp;: modifier l\'entrée.</ul>';
    227208
    228209// New entry tab, general case
     
    233214
    234215// Modify entry tab, general case
    235 $lang['ec_help_banner1_new_m']     = 'Sélectionnez un <span class = "help_bi">code</span> pour en changer l\'<span class = "help_bi">utilisateur à identifier</span> et&nbsp;/&nbsp;ou la <span class = "help_bi">page à afficher</span>. Si vous <span class = "help_b">forcez</span> l\'affichage ou si vous changez d\'utilisateur, toutes les autres entrées utilisant le même code seront supprimées. Choisir <span class = "help_b">aucun utilisateur</span>, ou <span class = "help_b">accès refusé</span> comme page à afficher, rend l\'entrée sélectionnée "périmée"&nbsp;: pas d\'utilisateur identifié, mais possibilité d\'afficher une page personnalisée pour donner une explication. Pour <span class = "help_b">générer un nom d\'utilisateur</span>, sélectionnez d\'abord la <span class = "help_bi">page à afficher</span> car le nom d\'utilisateur est construit sur la base du nom de cette page.';
     216$lang['ec_help_banner1_new_m']     = 'Sélectionnez un <span class = "help_bi">code</span> pour en changer l\'<span class = "help_bi">utilisateur à identifier</span> et&nbsp;/&nbsp;ou la <span class = "help_bi">page à afficher</span>. Si vous <span class = "help_b">forcez</span> l\'affichage ou si vous changez d\'utilisateur, toutes les autres entrées utilisant le même code seront supprimées. Choisir <span class = "help_b">aucun utilisateur</span>, ou <span class = "help_b">accès refusé</span> comme page à afficher, rend l\'entrée sélectionnée "périmée" : pas d\'utilisateur identifié, mais possibilité d\'afficher une page personnalisée pour donner une explication. Pour <span class = "help_b">générer un nom d\'utilisateur</span>, sélectionnez d\'abord la <span class = "help_bi">page à afficher</span> car le nom d\'utilisateur est construit sur la base du nom de cette page.';
    236217
    237218// Modify entry tab, disable case
     
    239220
    240221// Duplicate tab
    241 $lang['ec_help_banner1_duplic']    = '<span class = "help_i">Dupliquer un compte</span> alors qu\'un utilisateur est déjà identifié, crée un autre compte avec exactement les mêmes accès, immédiatement&nbsp;: pas besoin d\'attendre la validation d\'un administrateur. Sélectionnez les <span class = "help_bi">groupes</span>, <span class = "help_bi">types</span>, et&nbsp;/&nbsp;ou directement les <span class = "help_bi">utilisateurs</span> qui pourront dupliquer leur compte. Affichez "<span class = "help_b">S\'enregistrer</span>" pour les comptes génériques afin que la duplication leur soit transparente (voir <a href="popuphelp.php?page=help" onclick="popuphelp(this.href); return false;" title="Aide"><img src="admin/template/goto/theme/clear/icon/help.png" class="button" alt="(?)">&nbsp;la page d\'aide</a> pour plus de détails).';
     222$lang['ec_help_banner1_duplic']    = '<span class = "help_i">Dupliquer un compte</span> alors qu\'un utilisateur est déjà identifié, crée un autre compte avec exactement les mêmes accès, immédiatement : pas besoin d\'attendre la validation d\'un administrateur. Sélectionnez les <span class = "help_bi">groupes</span>, <span class = "help_bi">types</span>, et&nbsp;/&nbsp;ou directement les <span class = "help_bi">utilisateurs</span> qui pourront dupliquer leur compte. Affichez "<span class = "help_b">S\'enregistrer</span>" pour les comptes génériques afin que la duplication leur soit transparente (voir <a href="popuphelp.php?page=help" onclick="popuphelp(this.href); return false;" title="Aide"><img src="admin/template/goto/theme/clear/icon/help.png" class="button" alt="(?)">&nbsp;la page d\'aide</a> pour plus de détails).';
    242223
    243224// Configuration tab
    244 $lang['ec_help_banner1_config']    = '<span class = "help_i">Dupliquer un compte</span> alors qu\'on est déjà identifié, crée un autre compte avec exactement les mêmes accès, immédiatement&nbsp;: pas besoin d\'attendre la validation d\'un administrateur.&nbsp;— Sélectionnez la page que vous voulez afficher lors de l\'utilisation d\'un code "autolog" inexistant (par exemple, que vous aurez supprimé).&nbsp;— Dans l\'onglet "entrées", les commentaires peuvent être affichés en info-bulle ou en-dessous du code.&nbsp;— Puisque vous êtes en train de le lire, le bandeau d\'aide est actuellement actif&nbsp;;-)&nbsp;!&nbsp;— Afficher le lien "Connection" pour les utilisateurs génériques permet aux visiteurs déjà enregistrés sur votre galerie de s\'identifier facilement.';
     225$lang['ec_help_banner1_config']    = '<span class = "help_i">Dupliquer un compte</span> alors qu\'on est déjà identifié, crée un autre compte avec exactement les mêmes accès, immédiatement : pas besoin d\'attendre la validation d\'un administrateur.&nbsp;&#151; Sélectionnez la page que vous voulez afficher lors de l\'utilisation d\'un code "autolog" inexistant (par exemple, que vous aurez supprimé).&nbsp;&#151; Dans l\'onglet "entrées", les commentaires peuvent être affichés en info-bulle ou en-dessous du code.&nbsp;&#151; Puisque vous êtes en train de le lire, le bandeau d\'aide est actuellement actif ;-) !&nbsp;&#151; Afficher le lien "Connection" pour les utilisateurs génériques permet aux visiteurs déjà enregistrés sur votre galerie de s\'identifier facilement.';
    245226
    246227
  • extensions/event_cats/main.inc.php

    r7165 r8956  
    33/*
    44Plugin Name: Event Cats
    5 Version: 2.0.dev
     5Version: 1.2.3
    66Description: A single URL can be enough to be identified, and a user can duplicate his account to create a new one getting immediately the same properties. / On peut être identifié grâce à un simple URL, et on peut dupliquer son compte pour créer un nouveau compte ayant immédiatement les mêmes propriétés.
    77Plugin URI: http://piwigo.org/ext/extension_view.php?eid=326
     
    3232// +-----------------------------------------------------------------------+
    3333
    34 // Keeps file coded in UTF-8 without BOM: é
     34// Keeps file coded in UTF-8 without BOM : é
    3535
    3636if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     
    4343
    4444define( // -------------------------------------------------------------------
    45   'EVNTCATS_INFO_VERSION', // VERSION HISTORY:
    46    '2.0.dev' // Currently developping ;-)
     45  'EVNTCATS_INFO_VERSION', // VERSION HISTORY :
     46   '1.2.4' // Fix bug 2135: Constant ROOT_URL already defined; replaced by
     47//         // EC_ROOT_URL
    4748// '1.2.3' // Re-fix bug 1432 :-/ ...
    4849// '2.1.0' // When done, will simplfy and allow EC management from categories
     
    5152// '1.2.1' // Improve EN translation thanks to Tosca
    5253// '1.2.0' // Add feature 1335, Possibility to display the 'Connection'
    53 //         // link in identification block menu for generic users;
     54//         // link in identification block menu for generic users ;
    5455//         // finish (yes !) english translation
    5556// '1.1.5' // Fix bugs 1324 and 1325
    5657// '1.1.4' // Improve help banner
    57 // '1.1.3' // Better help banner management; finalize banner texts
    58 // '1.1.2' // Better help banner example: some examples
    59 // '1.1.1' // Better help banner example; but still no text in it
    60 // '1.1.0' // First bugs (1305 and 1306) corrected;
     58// '1.1.3' // Better help banner management ; finalize banner texts
     59// '1.1.2' // Better help banner example : some examples
     60// '1.1.1' // Better help banner example ; but still no text in it
     61// '1.1.0' // First bugs (1305 and 1306) corrected ;
    6162           // add newly created user/group association with cat/AP (was
    62            // forgotten); begin help banner
     63           // forgotten) ; begin help banner
    6364// '1.0.0' // Conception version
    6465); // ------------------------------------------------------------------------
     
    7273);
    7374define(
    74   'ROOT_URL',
     75  'EC_ROOT_URL',
    7576   get_absolute_root_url()
    7677);
     
    8182// Sets the administration panel of the plugin
    8283  function plugin_admin_menu($menu) {
    83                                                                                 // to be removed in final version :
    84                                                                                 global $template;
    85                                                                                 $template->delete_compiled_templates();
    8684    array_push($menu,
    8785      array(
     
    107105  return (
    108106   $help_content = (is_admin() and $page == 'help') ?
    109     load_language($page.'.html',EVNTCATS_PATH,array('return' => true)) : false
     107    load_language($page.'.html', EVNTCATS_PATH, array('return' => true)) : false
    110108  ) ? $popup_help_content.$help_content : $popup_help_content;
    111109}
     
    116114 *
    117115 * auto_log_user()
    118  * the function uses the value of the argument "autolog" of the posted URL,
    119  * as a code to know which username has to be logged in.
     116 * the function uses the value of the argument "autolog" of the posted URL, as a code
     117 * to know which username has to be logged in.
    120118 *
    121119 * @param no parameter
     
    132130  $ec_img = NULL;
    133131 
    134   if (isset($_GET['autolog']) and (read_ec_conf('activated') == '1')) {
     132  if (isset($_GET['autolog']) and (read_ec_conf('activated') == 1)) {
    135133    if (!is_a_guest()) {
    136134      $url = '';
     
    170168            if (isset($ec_img)) {
    171169              if (ec_image_exists($ec_cat, $ec_img)) {
    172        redirect(PHPWG_ROOT_PATH.'picture.php?/'.$ec_img.'/category/'.$ec_cat);
     170                redirect(PHPWG_ROOT_PATH.'picture.php?/'.$ec_img.'/category/'.$ec_cat);
    173171              }
    174172            }
     
    234232  global $user;
    235233
    236   if (read_ec_conf('activated') == '1') {
    237     if (
    238       !is_a_guest() and !is_admin() and (
    239         read_ec_conf('dup_allow') == '1' or (
    240           read_ec_conf('dup_allow') == '2' and (
    241             dup_allowed($user['id']) or (
    242               read_ec_conf('simple_mode_on') == '1' and
    243               is_generic()
    244             )
    245           )
    246         )
    247       )
    248     ) {
    249       // User access
    250       $result = pwg_query("
    251         SELECT `cat_id`
    252         FROM `".USER_ACCESS_TABLE."`
    253         WHERE `user_id` = ".$user['id'].";
    254       ");
    255       $insert = array();
    256       while ($row = pwg_db_fetch_assoc($result))
    257        $insert[] = "(".$new_user['id'].",".$row['cat_id'].")";
    258       if (!empty($insert)) pwg_query("
    259         INSERT INTO `".USER_ACCESS_TABLE."`
    260         VALUES ".implode(',', $insert).";
    261       ");
    262 
    263       // User groups
    264       $result = pwg_query("
    265         SELECT `group_id`
    266         FROM `".USER_GROUP_TABLE."`
    267         WHERE `user_id` = ".$user['id'].";
    268       ");
    269       $insert = array();
    270       while ($row = pwg_db_fetch_assoc($result))
    271        $insert[] = "(".$new_user['id'].",".$row['group_id'].")";
    272       if (!empty($insert)) pwg_query("
    273         INSERT INTO `".USER_GROUP_TABLE."`
    274         VALUES ".implode(',', $insert).";
    275       ");
    276 
    277       // User infos
    278       $result = pwg_query("
    279         SELECT `level`
    280         FROM `".USER_INFOS_TABLE."`
    281         WHERE `user_id` = ".$user['id'].";
    282       ");
    283       $insert = array();
    284       while ($row = pwg_db_fetch_assoc($result))
    285        $insert[] = "(".$new_user['id'].",".$row['level'].")";
    286       if (!empty($insert)) pwg_query("
    287         UPDATE `".USER_INFOS_TABLE."`
    288         SET `level` = ".$user['level']."
    289         WHERE `user_id` = ".$new_user['id'].";
    290       ");
    291     }
     234  if (!is_a_guest() and !is_admin()) if (
     235    read_ec_conf('dup_allow') == '1' or (
     236      read_ec_conf('dup_allow') == '2' and
     237      dup_allowed($user['id'])
     238    )
     239  ) {
     240    // User access
     241    $result = pwg_query("
     242      SELECT `cat_id`
     243      FROM `".USER_ACCESS_TABLE."`
     244      WHERE `user_id` = ".$user['id'].";
     245    ");
     246    $insert = array();
     247    while ($row = mysql_fetch_assoc($result))
     248     $insert[] = "(".$new_user['id'].",".$row['cat_id'].")";
     249    if (!empty($insert)) pwg_query("
     250      INSERT INTO `".USER_ACCESS_TABLE."`
     251      VALUES ".implode(',', $insert).";
     252    ");
     253
     254    // User groups
     255    $result = pwg_query("
     256      SELECT `group_id`
     257      FROM `".USER_GROUP_TABLE."`
     258      WHERE `user_id` = ".$user['id'].";
     259    ");
     260    $insert = array();
     261    while ($row = mysql_fetch_assoc($result))
     262     $insert[] = "(".$new_user['id'].",".$row['group_id'].")";
     263    if (!empty($insert)) pwg_query("
     264      INSERT INTO `".USER_GROUP_TABLE."`
     265      VALUES ".implode(',', $insert).";
     266    ");
     267
     268    // User infos
     269    $result = pwg_query("
     270      SELECT `level`
     271      FROM `".USER_INFOS_TABLE."`
     272      WHERE `user_id` = ".$user['id'].";
     273    ");
     274    $insert = array();
     275    while ($row = mysql_fetch_assoc($result))
     276     $insert[] = "(".$new_user['id'].",".$row['level'].")";
     277    if (!empty($insert)) pwg_query("
     278      UPDATE `".USER_INFOS_TABLE."`
     279      SET `level` = ".$user['level']."
     280      WHERE `user_id` = ".$new_user['id'].";
     281    ");
    292282  }
    293283}
     
    325315  global $lang, $template, $user;
    326316 
    327   if (read_ec_conf('activated') == '1') {
    328     if (version_compare(PHPWG_VERSION, '2.1.0', '<')) {
    329       // Makes the "quick connect" fieldset able to redirect to current page
    330       // after user identification, just as does the "connection" link.
    331       $template->assign(array('U_REDIRECT' => $_SERVER['REQUEST_URI']));
    332       $template->set_prefilter('menubar', 'ec_duplicate_prefilter');
    333     }
    334    
    335     // Add duplication link, if needed
     317  if (version_compare(PHPWG_VERSION, '2.1.0', '<')) {
     318    // Makes the "quick connect" fieldset able to redirect to current page
     319    // after user identification, just as does the "connection" link.
     320    $template->assign(array('U_REDIRECT' => $_SERVER['REQUEST_URI']));
     321    $template->set_prefilter('menubar', 'ec_duplicate_prefilter');
     322  }
     323 
     324  // Adds duplication link, if needed
     325  if (!is_admin() and !is_a_guest()) if (
     326    read_ec_conf('dup_allow') == '1' or (
     327      read_ec_conf('dup_allow') == '2' and
     328      dup_allowed($user['id'])
     329    )
     330  ) {
     331    $template->assign('U_REGISTER', get_root_url().'register.php');
    336332    if (
    337       !is_admin() and !is_a_guest() and (
    338         read_ec_conf('dup_allow') == '1' or (
    339           read_ec_conf('dup_allow') == '2' and (
    340             dup_allowed($user['id']) or (
    341               read_ec_conf('simple_mode_on') == '1' and
    342               is_generic()
    343             )
    344           )
    345         )
     333      read_ec_conf('duplic_display') == '1' or (
     334        read_ec_conf('duplic_display') == '2' and
     335        !is_generic()
    346336      )
    347337    ) {
    348       $template->assign('U_REGISTER', get_root_url().'register.php');
    349       if (
    350         read_ec_conf('duplic_display') == '1' or (
    351           read_ec_conf('duplic_display') == '2' and
    352           !is_generic()
    353         )
    354       ) {
    355         $lang['Register'] = $lang['Duplicate'];
    356         $lang['Create a new account'] =
    357          $lang['Create a new account with same properties'];
    358       }
    359     }
    360    
    361     // Adds connection link, if needed
    362     if (read_ec_conf('display_connection') == '1' and is_generic()) {
    363       // Adds connection link
    364       $template->assign(
    365         'U_LOGIN',
    366         get_root_url().'identification.php?redirect='.$_SERVER['REQUEST_URI']
    367       );
    368     }
     338      $lang['Register'] = $lang['Duplicate'];
     339      $lang['Create a new account'] =
     340       $lang['Create a new account with same properties'];
     341    }
     342  }
     343 
     344  // Adds connection link, if needed
     345  if (read_ec_conf('display_connection') == '1' and is_generic()) {
     346    // Adds connection link
     347    $template->assign(
     348      'U_LOGIN',
     349      get_root_url().'identification.php?redirect='.$_SERVER['REQUEST_URI']
     350    );
    369351  }
    370352}
  • extensions/event_cats/maintain.inc.php

    r7098 r8956  
    2323// +-----------------------------------------------------------------------+
    2424
    25 // Keeps file coded in UTF-8 without BOM: é
     25// Keeps file coded in UTF-8 without BOM : é
    2626
    2727// ***********************************************************************
    28 // ** maintain.inc.php: Installation page for Piwigo plugin Event Cats **
     28// ** maintain.inc.php : Installation page for Piwigo plugin Event Cats **
    2929// ***********************************************************************
    3030
     
    4242  global $prefixeTable;
    4343
    44         pwg_query("
    45    DELETE IGNORE FROM `".CONFIG_TABLE."` WHERE `param` = 'event_cats' LIMIT 1;
    46   ");
     44        pwg_query("DELETE FROM `".CONFIG_TABLE."` WHERE `param` = 'event_cats' LIMIT 1;");
    4745        return pwg_query('DROP TABLE IF EXISTS `'.$prefixeTable.'event_cats`;');
    4846}
     
    7472
    7573/*
    76 Explanations on table structure:
     74Explanations on table structure :
    7775
    78 code   : the code used as "autolog" argument. If thie code provided by the
    79          visitor does not exist in the table, the administrator can choose
    80          whether the visitor is redirected to the home page (nothing
    81          happens) or to the "access denied" page;
    82 user_id: the account concerned in following values;
    83 action : the action to perform:
    84    ec_nok: code disabled: account not logged in, visitor (guest) redirected
    85            to an explaining Additional Page (arg2 field). If Additional Page
    86            plugin is not activated, redirection to the "access denied" page;
    87    ec_ok : code OK, account logged in. Redirection depends on arg1 and arg2
    88            values. There are four cases:
    89      arg1 and arg2 are both NULL: home page;
    90      arg1 not NULL and arg2 NULL: category;
    91      arg1 NULL and arg2 not NULL: Additional Page;
    92      arg1 and arg2 both not NULL: Image page.
    93            If arg1 is a valid category id, and arg2 is not a valid image id,
    94            redirection to category. In all other cases where the arg1 or arg2
    95            is not valid, redirection to home page.
    96 arg1   : (described above);
    97 arg2   : (described above);
    98 forced : allows the administrator to impose that, for certain codes, the
    99          settings specified in the database ("action", "arg1", "arg2") are
    100          applied, whatever can be the arguments given in the URL;
    101 comment: a reminder for the webmaster.
     76code    : the code used as "autolog" argument. If thie code provided by the
     77          visitor does not exist in the table, the administrator can choose
     78          whether the visitor is redirected to the home page (nothing
     79          happens) or to the "access denied" page ;
     80user_id : the account concerned in following values ;
     81action  : the action to perform :
     82   ec_nok : code disabled : account not logged in, visitor (guest) redirected
     83            to an explaining Additional Page (arg2 field). If Additional Page
     84            plugin is not activated, redirection to the "access denied" page ;
     85   ec_ok  : code OK, account logged in. Redirection depends on arg1 and arg2
     86            values. There are four cases :
     87     arg1 and arg2 are both NULL : home page ;
     88     arg1 not NULL and arg2 NULL : category ;
     89     arg1 NULL and arg2 not NULL : Additional Page ;
     90     arg1 and arg2 both not NULL : Image page.
     91            If arg1 is a valid category id, and arg2 is not a valid image id,
     92            redirection to category. In all other cases where the arg1 or arg2
     93            is not valid, redirection to home page.
     94arg1    : (described above) ;
     95arg2    : (described above) ;
     96forced  : allows the administrator to impose that, for certain codes, the
     97          settings specified in the database ("action", "arg1", "arg2") are
     98          applied, whatever can be the arguments given in the URL.
    10299           
    103 * As a precision:
     100* As a precision :
    104101    in the PHP code, the "action" can also have the following values, so to
    105     display accurate messages in the admin page:
    106   ec_nok_action_pb  : the same "code" is used in more than one entries in the
    107                       DB (which is allowed) and is not always associated to
    108                       the same action ('ec_ok' in one or more entries, and
    109                       'ec_nok' in one or more other entries). This is
    110                       confusing and makes impossible to log in using this
    111                       code;
    112   ec_nok_userid_pb  : the same "code" is used in more than one entries in the
    113                       DB (which is allowed) and is not always associated to
    114                       the same user id. This is confusing and makes
    115                       impossible to log in using this code;
    116   ec_nok_userid_miss: the user id associated to this code does not exist in
    117                       the user ids table;
    118   ec_nok_ap_pb      : not valid Additional Page id -> access denied;
    119   ec_ok_ap_pb       : not valid Additional Page id -> home page;
    120   ec_ok_cat_pb      : not valid category id -> home page;
    121   ec_ok_img_pb      : not valid image id -> category page;
     102    display accurate messages in the admin page :
     103  ec_nok_action_pb   : the same "code" is used in more than one entries in the
     104                       DB (which is allowed) and is not always associated to
     105                       the same action ('ec_ok' in one or more entries, and
     106                       'ec_nok' in one or more other entries). This is
     107                       confusing and makes impossible to log in using this
     108                       code ;
     109  ec_nok_userid_pb   : the same "code" is used in more than one entries in the
     110                       DB (which is allowed) and is not always associated to
     111                       the same user id. This is confusing and makes
     112                       impossible to log in using this code ;
     113  ec_nok_userid_miss : the user id associated to this code does not exist in
     114                       the user ids table ;
     115  ec_nok_ap_pb       : not valid Additional Page id -> access denied ;
     116  ec_ok_ap_pb        : not valid Additional Page id -> home page ;
     117  ec_ok_cat_pb       : not valid category id -> home page ;
     118  ec_ok_img_pb       : not valid image id -> category page ;
    122119
    123120_ the two main fields are "user_id" and "code", as the main purpose of the
     
    127124_ though, even if "action", "user_id" and "code" are important, all of them
    128125  can be omitted (thus can be NULL), and both "user_id" and "code" can be
    129   repeated (thus are not UNIQUE). This because:
     126  repeated (thus are not UNIQUE). This because :
    130127  _ the same code can automatically log in ("autolog") the same account
    131128    following several ways, depending on "cat", "img", and "ap" arguments of
    132     the URL; and thus different ways can be stored in the DB;
     129    the URL ; and thus different ways can be stored in the DB ;
    133130  _ a "disabled" code (the user tries to "autolog", but (s)he's not allowed
    134     to) does not need a corresponding "user_id", thus "user_id" can be NULL;
     131    to) does not need a corresponding "user_id", thus "user_id" can be NULL ;
    135132  _ "user_id" field is used to store groups ids when "code" is NULL, to
    136     identify groups authorized to duplication;
     133    identify groups authorized to duplication ;
    137134_ "code" does not have the MySQL UNIQUE attribute, but it has to be unique
    138135  when the "forced" Event Cats parameter is true, which is the case when this
Note: See TracChangeset for help on using the changeset viewer.