Changeset 4002


Ignore:
Timestamp:
10/09/09 10:36:31 (10 years ago)
Author:
LucMorizur
Message:

[Event Cats] ≈ finish existing/new entries separation

Location:
extensions/event_cats
Files:
2 added
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • extensions/event_cats/admin/autolog_entries.inc.php

    r3999 r4002  
    5555 
    5656$code_list = array(); 
    57 build_ec_lists(); // in evntcats_funcs.php 
    58  
    59 if (isset($_GET['delete'])) { 
    60   if (array_key_exists($_GET['delete'],$ec_lists['ec_table'])) { 
    61     $t = $ec_lists['ec_table'][$_GET['delete']]['code']; 
    62     $q = pwg_query(' 
    63      DELETE FROM '.EVNTCATS_TABLE.'  
    64      WHERE id = '.$_GET['delete'] 
    65     ); 
    66     if ($q = 1) { 
    67       $page['infos']['infos'] = l10n('ec_entry_del_ok_pre').$t. 
    68        l10n('ec_entry_del_ok_end'); 
    69     } 
    70     else { 
    71       $page['errors'][] = l10n('ec_entry_del_nok_pre').$t. 
    72        l10n('ec_entry_del_nok_end'); 
    73     } 
    74     build_ec_table(); 
    75   } 
    76 } 
    77  
    78 if (isset($_GET['disable'])) { 
    79   if (array_key_exists($_GET['disable'],$ec_lists['ec_table'])) { 
    80     $t = $ec_lists['ec_table'][$_GET['disable']]['code']; 
    81     $q = pwg_query(' 
    82      UPDATE '.EVNTCATS_TABLE.'  
    83      SET action = \'ec_outdated\'  
    84      WHERE id = '.$_GET['disable'] 
    85     ); 
    86     if ($q = 1) { 
    87       $page['infos']['infos'] = l10n('ec_entry_dis_ok_pre1').$t. 
    88        l10n('ec_entry_dis_ok_end1'); 
    89       if (isset($_GET['add_p'])) { 
    90         if (array_key_exists($_GET['add_p'],$ec_lists['add_pages'])) { 
    91           $q = pwg_query(' 
    92            UPDATE '.EVNTCATS_TABLE.'  
    93            SET arg1 = '.$_GET['add_p'].'  
    94            WHERE id = '.$_GET['disable'] 
    95           ); 
    96           if ($q = 1) { 
    97             $page['infos']['infos'].= 
    98              l10n('ec_entry_dis_ok_pre2'). 
    99              $_GET['add_p']. 
    100              l10n('ec_entry_dis_ok_mid2'). 
    101              $ec_lists['add_pages'][$_GET['add_p']]. 
    102              l10n('ec_entry_dis_ok_end2'); 
    103           } 
    104           else { 
    105             $page['errors'][] = 
    106              l10n('ec_entry_dis_nok_pre2'). 
    107              $t. 
    108              l10n('ec_entry_dis_nok_mid2'). 
    109              $_GET['add_p']. 
    110              l10n('ec_entry_dis_nok_end2'); 
    111           } 
    112         } 
    113       } 
    114       else { 
    115         $q = pwg_query(' 
    116          UPDATE '.EVNTCATS_TABLE.'  
    117          SET arg1 = NULL  
    118          WHERE id = '.$_GET['disable'] 
    119         ); 
    120         if ($q != 1) { 
    121           $page['errors'][] = 
    122            l10n('ec_entry_dis_nok_pre3'). 
    123            $t. 
    124            l10n('ec_entry_dis_nok_end3'); 
    125         } 
    126       } 
    127     } 
    128     else { 
    129       $page['errors'][] = l10n('ec_entry_dis_nok_pre1').$t. 
    130        l10n('ec_entry_dis_nok_end1'); 
    131     } 
    132     build_ec_table(); 
    133   } 
    134 } 
    135  
    136 if (isset($_GET[''])) { 
    137 } 
    138  
    139 if (isset($_GET[''])) { 
    140 } 
    141  
    142 if (isset($_GET[''])) { 
    143 } 
    144  
    145 if (isset($_GET[''])) { 
    146 } 
     57build_ec_lists(); // in evntcats_funcs.inc.php 
    14758 
    14859/**************************************************************** 
  • extensions/event_cats/admin/autolog_new.inc.php

    r3999 r4002  
    1 {* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *} 
     1<?php 
     2// +-----------------------------------------------------------------------+ 
     3// | Plugin Name : Event Cats                                              | 
     4// | Plugin Version : 1.0                                                  | 
     5// | File Version : 1.0                                                    | 
     6// | Plugin Version author : LucMorizur                                    | 
     7// | Plugin description : (plugin for Piwigo, http://piwigo.org )          | 
     8// | This plugin allows an account to be automatically logged in ; and to  | 
     9// | let users duplicate the account they are logged with, to get benefits | 
     10// | of the groups of the previous account, immediately on their new acc.  | 
     11// | Ce plugin permet d'identifier automatiquement un compte ; et permet à | 
     12// | un utilisateur de dupliquer un compte, pour que le nouveau compte     | 
     13// | bénéficie immédiatement de l'affectation aux groupes de l'ancien cpte | 
     14// +-----------------------------------------------------------------------+ 
    215 
    3 {* <!-- Page title --> *} 
    4 <div class = "titrePage" style="margin-top: -20px;"> 
    5   <h2>{'ec_admin_page_title'|@translate} {$EVNTCATS_VERSION}</h2> 
    6 </div> 
     16// +-----------------------------------------------------------------------+ 
     17// | Piwigo - a PHP based picture gallery                                  | 
     18// +-----------------------------------------------------------------------+ 
     19// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org | 
     20// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net | 
     21// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick | 
     22// +-----------------------------------------------------------------------+ 
     23// | This program is free software; you can redistribute it and/or modify  | 
     24// | it under the terms of the GNU General Public License as published by  | 
     25// | the Free Software Foundation                                          | 
     26// |                                                                       | 
     27// | This program is distributed in the hope that it will be useful, but   | 
     28// | WITHOUT ANY WARRANTY; without even the implied warranty of            | 
     29// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      | 
     30// | General Public License for more details.                              | 
     31// |                                                                       | 
     32// | You should have received a copy of the GNU General Public License     | 
     33// | along with this program; if not, write to the Free Software           | 
     34// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | 
     35// | USA.                                                                  | 
     36// +-----------------------------------------------------------------------+ 
    737 
    8 {* <!-- JavaScript warning message --> *} 
    9 <div id = "ec_js_warn"> 
    10   {'ec_javascript_needed'|@translate}<br><br> 
    11 </div> 
    12 <script type = "text/javascript"><!-- // Removes JavaScript warning message 
    13   document.getElementById('ec_js_warn').innerHTML = ''; //--> 
    14 </script> 
     38if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
    1539 
    16 {* <!-- EC Presentation --> *} 
    17 {if $ec_howto} 
    18   <div> 
    19     {'ec_admin_page_howto'|@translate} 
    20   </div> 
    21 {/if} 
     40global $template, $conf, $lang, $test1, $prefixeTable, $ec_err, $page, 
     41 $ec_lists,   // array of following arrays : 
     42              //   $ec_lists['ec_table'] : 
     43              //     Event Cats table, in function of each entry id 
     44              //   $ec_lists['ec_codes'] : // Used ? 
     45              //     array of useful data, in function of entries codes 
     46              //   $ec_lists['add_pages'] : 
     47              //     array of Add. Pages names in function of their id 
     48              //   $ec_lists['categories'] : 
     49              //     array of category names in function of their id 
     50              //   $ec_lists['user_ids'] : 
     51              //     array of usernames in function of their id 
     52 $ec_ap_ok;   // whether Additional Pages is installed and activated 
    2253 
    23 <p> 
    24   <hr width = 75% size = 3 /> 
    25 </p> 
     54/****************************************************************************/ 
    2655 
    27 {* <!-- Whether plugin Additionnal Pages is active or not --> *} 
    28 <div style = "text-align:right; font-style:italic;"> 
    29   {if $ec_ap_ok} 
    30     {'ec_plugin_ap_ok'|@translate} 
    31     <script type = "text/javascript"><!-- 
    32       var ec_ap_ok = true; //--> 
    33     </script> 
    34   {else} 
    35     {'ec_plugin_ap_nok'|@translate} 
    36     <script type = "text/javascript"><!-- 
    37       var ec_ap_ok = false; //--> 
    38     </script> 
    39   {/if} 
    40 </div> 
     56$code_list = array(); 
     57build_ec_lists(); // in evntcats_funcs.php 
    4158 
    42 {* <!-- First section : form to view and modify codes, or create a new one --> *} 
    43 <form class = "filter" method = "post" name = "ec_up_code" action = ""> 
    44   <input type = "hidden" id = "ec_act1_id" name = "ec_act1" /> 
    45    
    46   <div style = "text-align:center; font-weight:bold; font-size:120%;">{'ec_entry_table_title'|@translate}</div><br> 
    47    
    48   {* <!-- Table to show codes present in MySQL table --> *} 
    49   <table class = "table2" width = "97%" {* id = "" *}> 
    50     <thead> 
    51       <tr class = "throw"> 
    52         <td>{'ec_col_name_entry'|@translate}</td> 
    53         <td>{'ec_col_name_code'|@translate}</td> 
    54         <td>{'ec_col_name_user'|@translate}</td> 
    55         <td>{'ec_col_name_bhvr'|@translate}</td> 
    56         <td>{'ec_col_name_dspl'|@translate}</td> 
    57         <td>{'ec_col_name_actn'|@translate}</td> 
    58       </tr> 
    59     </thead> 
    60      
    61     {foreach from=$code_list item=code_line name=code_loop} 
    62       <tr class = "{if $smarty.foreach.code_loop.index is odd}row1{else}row2{/if}"> 
    63         <td> 
    64           <input type = "radio" name = "ec_entry_sel" value = "{$code_line.id}" id = "selection-{$code_line.id}" 
    65            onclick = "ec_mark_line({$code_line.id});" 
    66           /> 
    67           <label for = "selection-{$code_line.id}">{$code_line.id}</label> 
    68         </td> 
    69         <td><label for = "selection-{$code_line.id}" id = "ec_table_code_{$code_line.id}">{$code_line.Code}</label></td> 
    70         <td><label for = "selection-{$code_line.id}" id = "ec_table_usr_{$code_line.id}">{$code_line.Username}</label></td> 
    71         <td><label for = "selection-{$code_line.id}">{$code_line.Action|@translate}</label></td> 
    72         <td><label for = "selection-{$code_line.id}">{$code_line.Arg1}</label></td> 
    73         <td> 
    74           <a 
    75            href = "{$code_line.code_URL}" title = "{'ec_test_tooltip'|@translate}" 
    76            id = "ec_table_URL_{$code_line.id}" onclick = "return ec_check_tst({$code_line.id});" 
    77           /> 
    78             <img src = "{$EVNTCATS_URLS.ROOT}icon/url2.png" class = "button" style = "border:none" 
    79              alt = "{'ec_test_tooltip'|@translate}" title = "{'ec_test_tooltip'|@translate}" /> 
    80           </a> 
    81           <a href = "javascript:void();" onclick = "ec_check_d({$code_line.id}, 'delete');"> 
    82             <img src = "{$EVNTCATS_URLS.ROOT}icon/delete.png" class = "button" 
    83              alt = "{'ec_url_delete'|@translate}" title = "{'ec_url_delete'|@translate}" /> 
    84           </a> 
    85           {if $code_line.log_OK} 
    86             <a href = "javascript:void();" onclick = "ec_check_d({$code_line.id}, 'disable');"> 
    87               <img src = "{$EVNTCATS_URLS.ROOT}icon/disable.png" class = "button" 
    88                alt = "{'ec_url_disable'|@translate}" title = "{'ec_url_disable'|@translate}" /> 
    89             </a> 
    90             {if $code_line.Forced == 'true'} 
    91               <a href = "javascript:void()" title = "{'ec_url_forced'|@translate}" onclick = "ec_toggle_forced({$code_line.id}, false);"> 
    92                 <img class = "button" src = "{$EVNTCATS_URLS.ROOT}icon/forced.png" 
    93                  {if $code_line.f_pb} style = "border:solid medium red;" {/if} 
    94                  alt = "{'ec_url_forced'|@translate}" title = "{'ec_url_forced'|@translate}" 
    95                 /> 
    96               </a> 
    97             {else} 
    98               <a href = "javascript:void()" title = "{'ec_url_nforced'|@translate}" onclick = "ec_toggle_forced({$code_line.id}, true);"> 
    99                 <img class = "button" src = "{$EVNTCATS_URLS.ROOT}icon/nforced.png" 
    100                  alt = "{'ec_url_nforced'|@translate}" title = "{'ec_url_nforced'|@translate}"/> 
    101               </a> 
    102               {if !$code_line.f_pb} 
    103                 <a href = "javascript:void()" title = "{'ec_url_duplicate'|@translate}" onclick = "ec_duplicate_entry({$code_line.id});"> 
    104                   <img src = "{$EVNTCATS_URLS.ROOT}icon/duplicate.png" class = "button" style = "border:none" 
    105                    alt = "{'ec_url_duplicate'|@translate}" title = "{'ec_url_duplicate'|@translate}" /> 
    106                 </a> 
    107               {/if} 
    108             {/if} 
    109           {/if} 
    110         </td> 
    111       </tr> 
    112     {/foreach} 
    113   </table> 
    114    
    115   {* <!-- This is not really a table, looks like a unique cell at the end of previous table, 
    116   to show URL for currently selected line in above table --> *} 
    117   <table class = "table2" width = "97%"> 
    118     <tr class = "row2"> 
    119       <td style = "text-align:center; padding-top:5px; padding-bottom:5px;"> 
    120         <label title = "{'ec_url_tooltip'|@translate}"> 
    121           {'ec_show_URL'|@translate} 
    122           <input type = "text" id = "ec_show_URL" size = "100%" title = "{'ec_url_tooltip'|@translate}" readonly = "readonly" /> 
    123         </label> 
    124       </td> 
    125     </tr> 
    126   </table><br> 
    127    
    128   {* <!-- Parameters list --> *} 
    129   <table style="border-spacing:30px" width = "97%"> 
    130      
    131     {* <!-- New entry --> *} 
    132     <tr> 
    133       <td> 
    134         <label for = "selection--1" onclick = "ec_mark_line(-1);"> 
    135           <input type = "radio" name = "ec_entry_sel" value = "-1" id = "selection--1" onclick = "ec_mark_line(-1);" /> 
    136           <span style = "font-weight:bold; font-style:italic; font-size:120%; text-decoration:underline;">{'ec_create_modify_code'|@translate}</span> 
    137         </label> 
    138       </td> 
    139       <td> 
    140         <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{'ec_new_full_auto'|@translate}" 
    141          id = "ec_submit_gen_full_auto_id" onclick = "ec_gen_full_auto();" style = "margin-top:0;" 
    142         /><br> 
    143       </td> 
    144     </tr> 
    145      
    146     {* <!-- Code selection --> *} 
    147     <tr> 
    148       <td><strong><span onclick = "Test();">{'ec_new_entry'|@translate}</span></strong></td> 
    149       <td> 
    150         <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40" 
    151          id = "ec_in_up_code_id" onclick = "ec_mark_line(-1);" onblur = "ec_new_code_text = this.value;" 
    152         /> 
    153         &nbsp; 
    154         <label for = "ec_in_up_code_id" style = "margin:0;"> 
    155           <input class = "submit" type = "button" name = "ec_submit_gen_code" value = "{'ec_new_entry_button'|@translate}" 
    156            id = "ec_submit_gen_code_id" onclick = "ec_gen_code();" style = "margin:0;" 
    157           /> 
    158         </label> 
    159         {'ec_gen_code_nb_pre'|@translate} 
    160         <select name = "ec_in_up_auto_code_length" id = "ec_in_up_auto_code_length_id" onchange = "ec_auto_code_digits_nb = this.value;"> 
    161           <option value = "4">4</option> 
    162           <option value = "5">5</option> 
    163           <option value = "8">8</option> 
    164           <option value = "10" selected = "selected">10</option> 
    165           <option value = "12">12</option> 
    166           <option value = "15">15</option> 
    167           <option value = "16">16</option> 
    168           <option value = "20">20</option> 
    169           <option value = "24">24</option> 
    170           <option value = "25">25</option> 
    171           <option value = "30">30</option> 
    172           <option value = "32">32{'ec_gen_code_nb_max'|@translate}</option> 
    173         </select> 
    174         {'ec_gen_code_nb_end'|@translate} 
    175       </td> 
    176     </tr> 
    177      
    178     {* <!-- User to identify --> *} 
    179     <tr> 
    180       <td style = "vertical-align:top;"><strong>{'ec_up_code_lbl_user'|@translate}</strong></td> 
    181       <td> 
    182       <li> 
    183         {* <!-- None --> *} 
    184         <label onclick = "ec_mark_user('ec_sel_user_none');"> 
    185           <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none" 
    186            onclick = "ec_mark_user('ec_sel_user_none');" 
    187           /> 
    188           {'ec_up_code_lbl_user_none'|@translate} 
    189         </label><br> 
    190       </li> 
    191          
    192       <li> 
    193         {* <!-- New user (to create) --> *} 
    194         <label for = "ec_in_up_usr_txt_id" onclick = "ec_mark_user('ec_sel_user_new');"> 
    195           <input type = "radio" name = "ec_sel_user" for = "ec_in_up_usr_txt_id" value = "new" 
    196            id = "ec_sel_user_new" onclick = "ec_mark_user('ec_sel_user_new');" 
    197           /> 
    198           {'ec_up_code_lbl_user_new'|@translate} 
    199         </label> 
    200         &nbsp; 
    201         <input class = "submit" type = "button" name = "ec_submit_gen_user" value = "{'ec_up_code_lbl_gen_user'|@translate}" 
    202          id = "ec_submit_gen_user_id" onclick = "ec_gen_user();" 
    203         /><br> 
    204         <ul><li> 
    205           <label class = "ec_block">{'ec_new_user_name'|@translate}<br> 
    206             <input type = "text" name = "ec_in_up_usr_txt" id = "ec_in_up_usr_txt_id" maxlength = "32" 
    207              size = "20" onclick = "ec_mark_user('ec_sel_user_new');" onblur = "ec_new_user_text = this.value;" 
    208             /> 
    209           </label> 
    210           <label class = "ec_block">{'ec_new_user_pswd'|@translate}<br> 
    211             <input type = "text" name = "ec_in_up_psd_txt" id = "ec_in_up_psd_txt_id" maxlength = "32" 
    212              size = "20" onclick = "ec_mark_user('ec_sel_user_new');" onblur = "ec_new_psd_text = this.value; ec_check_pwd_text();" 
    213             /> 
    214           </label> 
    215           <label class = "ec_block">&nbsp;<br> 
    216             <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn">&nbsp;</span> 
    217           </label> 
    218            
    219         </li></ul><br> 
    220       </li> 
    221        
    222       <li> 
    223         {* <!-- Known user --> *} 
    224         <label for = "ec_in_up_usr_list_id" onclick = "ec_mark_user('ec_sel_user_old');"> 
    225           <input type = "radio" name = "ec_sel_user" for = "ec_in_up_usr_list_id" 
    226            value = "old" id = "ec_sel_user_old" onclick = "ec_mark_user('ec_sel_user_old');" 
    227           /> 
    228           {'ec_up_code_lbl_user_old'|@translate} 
    229         </label> 
    230         <select name = "ec_in_up_usr_list" id = "ec_in_up_usr_list_id" onclick = "ec_mark_user('ec_sel_user_old');" 
    231          onchange = "ec_selected_old_user = this.value;" 
    232         > 
    233           <option label = "------------" value = "-1" id = "ec_old_user_-1">------------</option> 
    234           {foreach from=$ec_lists.user_ids key=ec_key item=ec_val name=opt_loop} 
    235             <option label = "{$ec_val}" value = "{$ec_key}" id = "ec_old_user_{$ec_key}">{$ec_val}</option> 
    236           {/foreach} 
    237         </select><br> 
    238       </li> 
    239       </td> 
    240     </tr> 
    241      
    242     {* <!-- Page to display --> *} 
    243     <tr> 
    244       <td style = "vertical-align:top;"><strong>{'ec_up_code_lbl_action'|@translate}</strong></td> 
    245       <td> 
    246          
    247         {* <!-- Additionnal Page, provided the plugin is activated --> *} 
    248         <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "ec_mark_action('ec_input_action_add_p');" 
    249          {if !$ec_ap_ok}style = "display:none;"{/if} 
    250         > 
    251           <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p" for = "ec_in_up_aps_id" 
    252            onclick = "ec_mark_action('ec_input_action_add_p');" 
    253           /> 
    254           {'ec_up_code_lbl_aps'|@translate}<br> 
    255           <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" 
    256            onclick = "ec_mark_action('ec_input_action_add_p');" onchange = "ec_selected_AP = this.value;" 
    257           > 
    258             <option label = "------------" value = "-1" style = "display:none;">------------</option> 
    259             {html_options options=$ec_lists.add_pages} 
    260           </select> 
    261         </label> 
    262          
    263         {* <!-- Category --> *} 
    264         <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "ec_mark_action('ec_input_action_cat');"> 
    265           <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat" for = "ec_in_up_cats_id" 
    266            onclick = "ec_mark_action('ec_input_action_cat');" 
    267           /> 
    268           {'ec_up_code_lbl_cats'|@translate}<br> 
    269           <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id" 
    270            onclick = "ec_mark_action('ec_input_action_cat');" onchange = "ec_selected_cat = this.value;" 
    271           > 
    272             <option label = "------------" value = "-1" style = "display:none;">------------</option> 
    273             {html_options options=$ec_lists.categories} 
    274           </select> 
    275         </label> 
    276          
    277         {* <!-- Image --> *} 
    278         <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "ec_mark_action('ec_input_action_img');"> 
    279           <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img" for = "ec_in_up_imgs_id" 
    280            onclick = "ec_mark_action('ec_input_action_img');" 
    281           /> 
    282           {'ec_up_code_lbl_img'|@translate}<br> 
    283           <input type = "text" name = "ec_in_up_imgs" id = "ec_in_up_imgs_id" maxlength = "6" 
    284            size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "ec_mark_action('ec_input_action_img');" 
    285           /><br> 
    286           <span id = "ec_in_up_imgs_warn">&nbsp;</span> 
    287         </label> 
    288          
    289         {* <!-- Index page --> *} 
    290         <label class = "ec_block" onclick = "ec_mark_action('ec_input_action_home');"> 
    291           <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home" 
    292            onclick = "ec_mark_action('ec_input_action_home');" 
    293           /> 
    294           {'ec_up_code_lbl_home'|@translate} 
    295         </label> 
    296       </td> 
    297     </tr> 
    298   </table> 
    299   <p> 
    300     <input class = "submit" type = "submit" name = "ec_submit" value = "{'Submit'|@translate}"/> 
    301     <input class = "submit" type = "reset" name = "ec_reset" value = "{'Reset'|@translate}" onclick = "ec_init();"/> 
    302   </p> 
    303 </form> 
     59/***************************************************************************** 
     60* $_GET and $_POST analysis.                                                 * 
     61*****************************************************************************/ 
    30462 
    305 {* <!-- JavaScript functions --> *} 
    306 <script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/evntcats_admin.js"></script> 
    307 <script type = "text/javascript"> 
    308   <!-- 
    309    
    310   // ec_test(); 
    311    
    312   ec_JS_message['ec_confirm_disable']   = "{'ec_confirm_disable'|@translate|@escape:javascript}"; 
    313   ec_JS_message['ec_confirm_delete']    = "{'ec_confirm_delete'|@translate|@escape:javascript}"; 
    314   ec_JS_message['ec_confirm_test']      = "{'ec_confirm_test'|@translate|@escape:javascript}"; 
    315   ec_JS_message['ec_gen_user_act_miss'] = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}"; 
    316   ec_JS_message['ec_act_cat_miss']      = "{'ec_act_cat_miss'|@translate|@escape:javascript}"; 
    317   ec_JS_message['ec_new_pwd_gen']       = "{'ec_new_pwd_gen'|@translate|@escape:javascript}"; 
    318   ec_JS_message['ec_confirm_force']       = "{'ec_confirm_force'|@translate|@escape:javascript}"; 
    319   ec_JS_message['ec_up_code_lbl_home']  = "{'ec_up_code_lbl_home'|@translate}"; 
    320    
    321   ec_init(); 
    322    
    323   {literal} 
    324    
    325   function Test() {                                                /* 
    326     document.getElementById('ec_sel_user_none').checked = ''; 
    327     document.getElementById('ec_sel_user_new').checked = ''; 
    328     document.getElementById('ec_sel_user_old').checked = '';       */ 
    329   } 
    330    
    331   //-->{/literal} 
    332 </script> 
     63/****************************************************************************/ 
    33364 
    334 {* <!-- {$test0tpl} --> *} 
    335 <p>$_GET :</p> 
    336 {$GET} 
    337 <p>$_POST :</p> 
    338 {$POST} 
    339 <p>Autres :</p> 
    340 {$test1tpl} 
    341 {$test2tpl} 
    342 {$test3tpl} 
     65$template->assign('ec_ap_ok',$ec_ap_ok); 
     66$template->assign('code_list',$code_list); 
    34367 
    344 {* <!-- 
    345 --> *} 
    346  
     68?> 
  • extensions/event_cats/admin/evntcats_admin.php

    r3999 r4002  
    7171// |                            Tabsheet 
    7272// +-----------------------------------------------------------------------+ 
    73 $page['tab'] = (!mysql_fetch_row(pwg_query(' 
     73$page['tab'] = (!($ec_exist_entries = (mysql_fetch_row(pwg_query(' 
    7474  SELECT * FROM `'.EVNTCATS_TABLE.'` 
    7575  WHERE `code` IS NOT NULL 
    76 '))) ? 'autolog_new' : 'autolog_entries'; 
     76'))))) ? 'autolog_new' : 'autolog_entries'; 
    7777if (isset($_POST['ec_act1']) and 
    7878 ($_POST['ec_act1'] == 'autolog_new' or $_POST['ec_act1'] == 'duplicate_entry')) 
     
    8686 
    8787$tabsheet = new tabsheet(); 
    88 $tabsheet->add('autolog_entries', 
     88if ($ec_exist_entries) $tabsheet->add('autolog_entries', 
    8989               l10n('ec_tab_autoid_entries'), 
    9090               $my_base_url.'&amp;tab=autolog_entries'); 
     
    129129$template->assign('test1tpl',str_from_var($ec_lists)); 
    130130$template->assign('test2tpl',str_from_var($page['errors'])); 
    131 $template->assign('test3tpl',str_from_var($code_list)); 
     131if (isset($code_list)) $template->assign('test3tpl',str_from_var($code_list)); 
    132132 
    133 $template->set_filenames(array('evntcats_admin_content' => dirname(__FILE__).'template/'.$page['tab'].'.tpl')); 
     133$template->set_filenames(array('evntcats_admin_content' => dirname(__FILE__).'/template/'.$page['tab'].'.tpl')); 
    134134$template->assign_var_from_handle('ADMIN_CONTENT','evntcats_admin_content'); 
    135135?> 
  • extensions/event_cats/admin/template/autolog_entries.tpl

    r3999 r4002  
    4040</div> 
    4141 
    42 {* <!-- First section : form to view and modify codes, or create a new one --> *} 
    43 <form class = "filter" method = "post" name = "ec_up_code" action = ""> 
     42{* <!-- Form to view codes --> *} 
     43<form class = "filter" method = "post" name = "ec_view_codes" action = ""> 
    4444  <input type = "hidden" id = "ec_act1_id" name = "ec_act1" /> 
     45  <input type = "radio" name = "ec_entry_sel" value = "-1" id = "selection--1" style = "display:none;"/> 
    4546   
    4647  <div style = "text-align:center; font-weight:bold; font-size:120%;">{'ec_entry_table_title'|@translate}</div><br> 
     
    128129 
    129130{* <!-- JavaScript functions --> *} 
    130 <script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/evntcats_admin.js"></script> 
    131 <script type = "text/javascript"> 
    132   <!-- 
    133    
    134   // ec_test(); 
    135    
     131<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_entries.js"></script> 
     132<script type = "text/javascript"><!-- 
    136133  ec_JS_message['ec_confirm_disable']   = "{'ec_confirm_disable'|@translate|@escape:javascript}"; 
    137134  ec_JS_message['ec_confirm_delete']    = "{'ec_confirm_delete'|@translate|@escape:javascript}"; 
    138135  ec_JS_message['ec_confirm_test']      = "{'ec_confirm_test'|@translate|@escape:javascript}"; 
    139   ec_JS_message['ec_gen_user_act_miss'] = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}"; 
    140   ec_JS_message['ec_act_cat_miss']      = "{'ec_act_cat_miss'|@translate|@escape:javascript}"; 
    141   ec_JS_message['ec_new_pwd_gen']       = "{'ec_new_pwd_gen'|@translate|@escape:javascript}"; 
    142   ec_JS_message['ec_confirm_force']       = "{'ec_confirm_force'|@translate|@escape:javascript}"; 
    143   ec_JS_message['ec_up_code_lbl_home']  = "{'ec_up_code_lbl_home'|@translate}"; 
    144    
     136  ec_JS_message['ec_confirm_force']     = "{'ec_confirm_force'|@translate|@escape:javascript}"; 
    145137  ec_init(); 
    146    
    147   {literal} 
    148    
    149   function Test() {                                                /* 
    150     document.getElementById('ec_sel_user_none').checked = ''; 
    151     document.getElementById('ec_sel_user_new').checked = ''; 
    152     document.getElementById('ec_sel_user_old').checked = '';       */ 
    153   } 
    154    
    155   //-->{/literal} 
    156 </script> 
     138//--></script> 
    157139 
    158140{* <!-- {$test0tpl} --> *} 
  • extensions/event_cats/admin/template/autolog_new.tpl

    r3999 r4002  
    4141 
    4242{* <!-- Parameters list --> *} 
    43 <form class = "filter" method = "post" name = "ec_up_code" action = ""> 
     43<form class = "filter" method = "post" name = "ec_new_code" action = ""> 
     44  <input type = "hidden" id = "ec_act1_id" name = "ec_act1" /> 
     45   
     46  <div style = "text-align:center;"> 
     47    <span style = "font-weight:bold; font-size:120%;">{'ec_new_entry_table_title'|@translate}</span><br> 
     48    <br> 
     49    <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{'ec_new_full_auto'|@translate}" 
     50     id = "ec_submit_gen_full_auto_id" onclick = "ec_gen_full_auto();" style = "margin-top:0;"/> 
     51  </div> 
    4452   
    4553  <table style="border-spacing:30px" width = "97%"> 
    4654     
    4755    {* <!-- New entry --> *} 
    48     <tr> 
    49       <td> 
    50         <label for = "selection--1" onclick = "ec_mark_line(-1);"> 
    51           <input type = "radio" name = "ec_entry_sel" value = "-1" id = "selection--1" onclick = "ec_mark_line(-1);" /> 
     56    {* <!-- 
     57    <tr> 
     58      <td> 
     59        <label for = "selection--1"> 
     60          <input type = "radio" name = "ec_entry_sel" value = "-1" id = "selection--1" /> 
    5261          <span style = "font-weight:bold; font-style:italic; font-size:120%; text-decoration:underline;">{'ec_create_modify_code'|@translate}</span> 
    5362        </label> 
    5463      </td> 
    5564      <td> 
    56         <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{'ec_new_full_auto'|@translate}" 
    57          id = "ec_submit_gen_full_auto_id" onclick = "ec_gen_full_auto();" style = "margin-top:0;" 
    58         /><br> 
    59       </td> 
    60     </tr> 
     65      </td> 
     66    </tr> 
     67    --> *} 
    6168     
    6269    {* <!-- Code selection --> *} 
    6370    <tr> 
    64       <td><strong><span onclick = "Test();">{'ec_new_entry'|@translate}</span></strong></td> 
     71      <td><strong>{'ec_new_entry'|@translate}</strong></td> 
    6572      <td> 
    6673        <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40" 
    67          id = "ec_in_up_code_id" onclick = "ec_mark_line(-1);" onblur = "ec_new_code_text = this.value;" 
     74         id = "ec_in_up_code_id" onblur = "ec_new_code_text = this.value;" 
    6875        /> 
    6976        &nbsp; 
     
    220227 
    221228{* <!-- JavaScript functions --> *} 
    222 <script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/evntcats_admin.js"></script> 
    223 <script type = "text/javascript"> 
    224   <!-- 
    225    
    226   // ec_test(); 
    227    
    228   ec_JS_message['ec_confirm_disable']   = "{'ec_confirm_disable'|@translate|@escape:javascript}"; 
    229   ec_JS_message['ec_confirm_delete']    = "{'ec_confirm_delete'|@translate|@escape:javascript}"; 
    230   ec_JS_message['ec_confirm_test']      = "{'ec_confirm_test'|@translate|@escape:javascript}"; 
     229<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script> 
     230<script type = "text/javascript"><!-- 
    231231  ec_JS_message['ec_gen_user_act_miss'] = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}"; 
    232232  ec_JS_message['ec_act_cat_miss']      = "{'ec_act_cat_miss'|@translate|@escape:javascript}"; 
    233233  ec_JS_message['ec_new_pwd_gen']       = "{'ec_new_pwd_gen'|@translate|@escape:javascript}"; 
    234   ec_JS_message['ec_confirm_force']       = "{'ec_confirm_force'|@translate|@escape:javascript}"; 
    235234  ec_JS_message['ec_up_code_lbl_home']  = "{'ec_up_code_lbl_home'|@translate}"; 
    236    
    237235  ec_init(); 
    238    
    239   {literal} 
    240    
    241   function Test() {                                                /* 
    242     document.getElementById('ec_sel_user_none').checked = ''; 
    243     document.getElementById('ec_sel_user_new').checked = ''; 
    244     document.getElementById('ec_sel_user_old').checked = '';       */ 
    245   } 
    246    
    247   //-->{/literal} 
    248 </script> 
     236//--></script> 
    249237 
    250238{* <!-- {$test0tpl} --> *} 
  • extensions/event_cats/admin/template/config.tpl

    r3999 r4002  
     1{* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *} 
     2 
     3{* <!-- Page title --> *} 
     4<div class = "titrePage" style="margin-top: -20px;"> 
     5  <h2>{'ec_admin_page_title'|@translate} {$EVNTCATS_VERSION}</h2> 
     6</div> 
     7 
     8{* <!-- JavaScript warning message --> *} 
     9<div id = "ec_js_warn"> 
     10  {'ec_javascript_needed'|@translate}<br><br> 
     11</div> 
     12<script type = "text/javascript"><!-- // Removes JavaScript warning message 
     13  document.getElementById('ec_js_warn').innerHTML = ''; //--> 
     14</script> 
     15 
     16{* <!-- EC Presentation --> *} 
     17{if $ec_howto} 
     18  <div> 
     19    {'ec_admin_page_howto'|@translate} 
     20  </div> 
     21{/if} 
     22 
     23<p> 
     24  <hr width = 75% size = 3 /> 
     25</p> 
     26 
     27{* <!-- Available soon... --> *} 
     28 
     29<p>Bientôt disponible :-] !</p> 
     30 
     31{* <!-- JavaScript functions --> *} 
     32{* <!-- 
     33<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script> 
     34<script type = "text/javascript"><!-- 
     35  ec_JS_message['ec_gen_user_act_miss'] = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}"; 
     36  ec_JS_message['ec_act_cat_miss']      = "{'ec_act_cat_miss'|@translate|@escape:javascript}"; 
     37  ec_JS_message['ec_new_pwd_gen']       = "{'ec_new_pwd_gen'|@translate|@escape:javascript}"; 
     38  ec_JS_message['ec_up_code_lbl_home']  = "{'ec_up_code_lbl_home'|@translate}"; 
     39  ec_init(); 
     40//--></script> 
     41--> *} 
     42 
     43{* <!-- {$test0tpl} --> *} 
     44<p>$_GET :</p> 
     45{$GET} 
     46<p>$_POST :</p> 
     47{$POST} 
     48<p>Autres :</p> 
     49{$test1tpl} 
     50{$test2tpl} 
     51{$test3tpl} 
     52 
     53{* <!-- 
     54--> *} 
  • extensions/event_cats/admin/template/duplication.tpl

    r3999 r4002  
     1{* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *} 
     2 
     3{* <!-- Page title --> *} 
     4<div class = "titrePage" style="margin-top: -20px;"> 
     5  <h2>{'ec_admin_page_title'|@translate} {$EVNTCATS_VERSION}</h2> 
     6</div> 
     7 
     8{* <!-- JavaScript warning message --> *} 
     9<div id = "ec_js_warn"> 
     10  {'ec_javascript_needed'|@translate}<br><br> 
     11</div> 
     12<script type = "text/javascript"><!-- // Removes JavaScript warning message 
     13  document.getElementById('ec_js_warn').innerHTML = ''; //--> 
     14</script> 
     15 
     16{* <!-- EC Presentation --> *} 
     17{if $ec_howto} 
     18  <div> 
     19    {'ec_admin_page_howto'|@translate} 
     20  </div> 
     21{/if} 
     22 
     23<p> 
     24  <hr width = 75% size = 3 /> 
     25</p> 
     26 
     27{* <!-- Available soon... --> *} 
     28 
     29<p>Bientôt disponible :-] !</p> 
     30 
     31{* <!-- JavaScript functions --> *} 
     32{* <!-- 
     33<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script> 
     34<script type = "text/javascript"><!-- 
     35  ec_JS_message['ec_gen_user_act_miss'] = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}"; 
     36  ec_JS_message['ec_act_cat_miss']      = "{'ec_act_cat_miss'|@translate|@escape:javascript}"; 
     37  ec_JS_message['ec_new_pwd_gen']       = "{'ec_new_pwd_gen'|@translate|@escape:javascript}"; 
     38  ec_JS_message['ec_up_code_lbl_home']  = "{'ec_up_code_lbl_home'|@translate}"; 
     39  ec_init(); 
     40//--></script> 
     41--> *} 
     42 
     43{* <!-- {$test0tpl} --> *} 
     44<p>$_GET :</p> 
     45{$GET} 
     46<p>$_POST :</p> 
     47{$POST} 
     48<p>Autres :</p> 
     49{$test1tpl} 
     50{$test2tpl} 
     51{$test3tpl} 
     52 
     53{* <!-- 
     54--> *} 
     55 
  • extensions/event_cats/language/fr_FR/plugin.lang.php

    r3999 r4002  
    2020$lang['ec_plugin_ap_nok']         = 'Plugin <a href = "http://fr.piwigo.org/ext/extension_view.php?eid=153" title = "Ouvrir une nouvelle fenêtre sur le plugin Additional Pages" target = "_blank">Additional Pages</a> : inactif'; 
    2121$lang['ec_entry_table_title']     = 'Entrées du paramètre "autolog"'; 
     22$lang['ec_new_entry_table_title'] = 'Nouvelle entrée du paramètre "autolog"'; 
    2223// Table 
    2324$lang['ec_col_name_entry']        = 'Entrée'; 
Note: See TracChangeset for help on using the changeset viewer.