Changeset 4329 for extensions/event_cats/admin
- Timestamp:
- Nov 20, 2009, 10:56:32 PM (14 years ago)
- Location:
- extensions/event_cats/admin
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/event_cats/admin/autolog_entries.inc.php
r4228 r4329 38 38 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 39 39 40 global $template, $conf, $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 40 global $template, $conf, $page, $ec_lists; 53 41 54 42 /****************************************************************************/ … … 94 82 switch ($a) { 95 83 case 0: // Home 96 $dspl = l10n(' ec_dspl_ok_home');84 $dspl = l10n('Home'); 97 85 break; 98 86 case 1: // Category 99 87 case 3: // Image 100 88 $url_end = ($ec_entry['forced'] == 'true') ? '' : '&cat='.$arg1; 101 $dspl = 102 l10n('ec_dspl_ok_cat_pre'). 103 $arg1. 104 l10n('ec_dspl_ok_cat_mid'). 105 $ec_lists['categories'][$arg1_int]. 106 l10n('ec_dspl_ok_cat_end') 107 ; 89 $dspl = sprintf( 90 l10n('ec_dspl_ok_cat'), $arg1, $ec_lists['categories'][$arg1_int] 91 ); 108 92 if (is_in($ec_entry['action'], '_img_pb')) { 109 93 $url_end.= ($url_end == '') ? '' : '&img='.$arg2; … … 112 96 $dspl.= 113 97 '<br>'.$span_err_pre. 114 l10n('ec_dspl_nok_img2_pre'). 115 $arg2. 116 l10n('ec_dspl_nok_img2_mid'). 117 $arg1. 118 l10n('ec_dspl_nok_img2_end'). 98 sprintf(l10n('ec_dspl_nok_img2'), $arg2, $arg1). 119 99 $span_err_end 120 100 ; … … 122 102 elseif ($a == 3) { // Image 123 103 $url_end.= ($url_end == '') ? '' : '&img='.$arg2; 124 $t = mysql_fetch_row(pwg_query( '104 $t = mysql_fetch_row(pwg_query(" 125 105 SELECT `name`, `file` 126 FROM `'.IMAGES_TABLE.'` 127 WHERE `id` = "'.$arg2.'" 128 ')); 129 $dspl.= 130 '<br>'. 131 l10n('ec_dspl_ok_img2_pre'). 132 $arg2. 133 l10n('ec_dspl_ok_img2_mid1'). 134 $t[0]. 135 l10n('ec_dspl_ok_img2_mid2'). 136 $t[1]. 137 l10n('ec_dspl_ok_img2_end') 138 ; 106 FROM `".IMAGES_TABLE."` 107 WHERE `id` = $arg2 108 ")); 109 $dspl.= '<br>'. 110 sprintf(l10n('ec_dspl_ok_img2'), $arg2, $t[0], $t[1]); 139 111 } 140 112 break; 141 113 case 2: // Additional Page 142 114 $url_end = ($ec_entry['forced'] == 'true') ? '' : '&ap='.$arg2; 143 $dspl = ($ec_ap_ok) ? 144 l10n('ec_dspl_ok_ap_pre'). 145 $arg2. 146 l10n('ec_dspl_ok_ap_mid'). 147 $ec_lists['add_pages'][$arg2_int]. 148 l10n('ec_dspl_ok_ap_end') 149 : 150 l10n('ec_dspl_ok_home') 151 ; 115 $dspl = (EC_AP_OK) ? sprintf( 116 l10n('ec_dspl_ok_ap'), 117 $arg2, $ec_lists['add_pages'][$arg2_int] 118 ) : l10n('Home'); 152 119 break; 153 120 } … … 156 123 case 'ec_nok' : 157 124 if (empty($ec_entry['arg2'])) { 158 $dspl = l10n(' ec_dspl_nok_acc_denied');125 $dspl = l10n('Access denied'); 159 126 } 160 127 else { 161 $dspl = ($ec_ap_ok) ? 162 l10n('ec_dspl_ok_ap_pre'). 163 $arg2. 164 l10n('ec_dspl_ok_ap_mid'). 165 $ec_lists['add_pages'][$arg2_int]. 166 l10n('ec_dspl_ok_ap_end') 167 : 168 l10n('ec_dspl_nok_acc_denied') 169 ; 128 $dspl = (EC_AP_OK) ? sprintf( 129 l10n('ec_dspl_ok_ap'), 130 $arg2, $ec_lists['add_pages'][$arg2_int] 131 ) : l10n('Access denied'); 170 132 } 171 133 break; … … 177 139 if (is_in($ec_entry['action'], 'ec_ok')) { 178 140 $url_end = ($ec_entry['forced'] == 'true') ? '' : '&ap='.$arg2; 179 $dspl = l10n(' ec_dspl_ok_home');141 $dspl = l10n('Home'); 180 142 } 181 143 else { 182 $dspl = l10n(' ec_dspl_nok_acc_denied');144 $dspl = l10n('Access denied'); 183 145 } 184 146 $dspl.= 185 147 $span_err_pre. 186 l10n('ec_dspl_nok_ap_pre'). 187 $arg2. 188 l10n('ec_dspl_nok_ap_end'). 148 sprintf(l10n('ec_dspl_nok_ap'), $arg2). 189 149 $span_err_end 190 150 ; … … 196 156 $ec_entry['code'].' : '.l10n('ec_category_miss'); 197 157 $dspl = 198 l10n('ec_dspl_nok_home'). 199 $span_err_pre. 200 l10n('ec_dspl_nok_img1_pre'). 201 $arg1. 202 l10n('ec_dspl_nok_img1_end'). 158 l10n('Home'). 159 $span_err_pre. 160 sprintf(l10n('ec_dspl_nok_cat'), $arg1). 203 161 $span_err_end 204 162 ; … … 213 171 $span_err_end 214 172 ; 215 $dspl = l10n(' ec_dspl_ok_home');173 $dspl = l10n('Home'); 216 174 break; 217 175 … … 224 182 $span_err_end 225 183 ; 226 $dspl = l10n(' ec_dspl_ok_home');184 $dspl = l10n('Home'); 227 185 break; 228 186 … … 232 190 $username = 233 191 $span_err_pre. 234 l10n('ec_dspl_nok_usr_pre'). 235 $ec_entry['user_id']. 236 l10n('ec_dspl_nok_usr_end'). 237 $span_err_end 238 ; 239 $dspl = l10n('ec_dspl_ok_home'); 192 sprintf(l10n('ec_dspl_nok_usr'), $ec_entry['user_id']). 193 $span_err_end 194 ; 195 $dspl = l10n('Home'); 240 196 break; 241 197 } … … 264 220 } 265 221 266 $template->assign('ec_ap_ok',$ec_ap_ok); 267 $template->assign('code_list',$code_list); 222 $template->assign('ec_ap_ok', EC_AP_OK); 223 $template->assign('ec_ap_ok2', (count($ec_lists['add_pages']) > 0)); 224 $template->assign('code_list', $code_list); 268 225 269 226 ?> -
extensions/event_cats/admin/autolog_new.inc.php
r4173 r4329 38 38 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 39 39 40 global $template, $conf, $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 40 global $template, $conf, $page, $ec_lists, $ec_conf_possible_values; 53 41 54 42 /****************************************************************************/ … … 79 67 case 'create': 80 68 $ec_default_action = $_POST['ec_act1']; 81 $ec_default_entry = $_POST['ec_entry_sel'];69 $ec_default_entry = $_POST['ec_entry_sel']; 82 70 break; 83 71 default: 84 $page['errors'][] = 'Demande inconnue : $_POST[\'ec_act1\'] = '.$_POST['ec_act1']; 72 $page['errors'][] = 73 'Bad argument : $_POST[\'ec_act1\'] = '.$_POST['ec_act1']; 85 74 } 86 75 } 87 76 else 88 $page['errors'][] = 'Tentative d\'utilisation d\'une entrée inexistante ($_POST[\'ec_entry_sel\'] = '.$_POST['ec_entry_sel'].')'; 77 $page['errors'][] = 78 'Entry doesn\'t exist ($_POST[\'ec_entry_sel\'] = '. 79 $_POST['ec_entry_sel'].')'; 89 80 } 90 81 … … 97 88 (count($ec_lists['user_ids']) == 0) ? 'style = "display:none;"' : '' 98 89 ); 99 $template->assign('ec_no_assoc', ((mysql_num_rows(pwg_query( '90 $template->assign('ec_no_assoc', ((mysql_num_rows(pwg_query(" 100 91 SELECT * 101 FROM ` '.IMAGE_CATEGORY_TABLE.'`102 '))) == 0));92 FROM `".IMAGE_CATEGORY_TABLE."` 93 "))) == 0)); 103 94 $template->assign('ec_is_creation', ( 104 95 $ec_default_action == 'duplicate_entry_submit' or … … 108 99 ) 109 100 ); 110 $template->assign('ec_ap_ok', $ec_ap_ok);101 $template->assign('ec_ap_ok', EC_AP_OK); 111 102 $template->assign('ec_lists', $ec_lists); 112 103 $template->assign('ec_default_entry', $ec_default_entry); 113 104 $template->assign('ec_default_action', $ec_default_action); 114 105 $template->assign('ec_def_auto_code_dg_nb', $ec_def_auto_code_dg_nb); 106 $template->assign('ec_auto_code_dg_nb', 107 $ec_conf_possible_values['auto_code_dg_nb']); 115 108 116 109 ?> -
extensions/event_cats/admin/config.inc.php
r4092 r4329 1 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 // +-----------------------------------------------------------------------+ 15 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 // +-----------------------------------------------------------------------+ 37 38 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 39 40 global $ec_conf_default, $ec_conf; 41 42 // +-----------------------------------------------------------------------+ 43 // | Global configuration management | 44 // +-----------------------------------------------------------------------+ 45 46 // Gets $lang['Register'] and $lang['Duplicate'] 47 load_language('common.lang'); 48 load_language('duplic.lang', EVNTCATS_PATH); 49 50 $template->assign( 51 'ec_dup_link_conf', 52 sprintf( 53 l10n('Register replacement'), 54 ' <br />', // nicer line feed 55 $lang['Register'], 56 $lang['Duplicate'] 57 ) 58 ); 59 60 // In case some $lang have the same index, overwrites them to have the ones 61 // needed here 62 load_language('plugin.lang', EVNTCATS_PATH); 63 64 $template->assign('ec_ap_ok', EC_AP_OK); 65 $template->assign('add_pages', $ec_lists['add_pages']); 66 67 // Sends configuration values to the template, described per key 68 $ec_conf2 = array(); $i = 0; 69 foreach ($ec_conf_default as $k => $v) { $ec_conf2[$k] = $ec_conf[$i]; $i++; } 70 $template->assign('ec_conf', $ec_conf2); 2 71 3 72 ?> -
extensions/event_cats/admin/duplication.inc.php
r4276 r4329 1 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 // +-----------------------------------------------------------------------+ 2 15 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 // +-----------------------------------------------------------------------+ 3 37 38 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 39 40 global $ec_conf_default; 5 41 42 // +-----------------------------------------------------------------------+ 43 // | Duplication granted per groups/types/users management | 44 // +-----------------------------------------------------------------------+ 6 45 7 8 /* */ 9 10 11 12 13 14 15 16 46 // In evntcats_main_funcs.inc.php ; determines all granted groups/types/users 47 // Thanks to "true" parameter, assigns to the template all needed variables 17 48 build_dup_arrays(true); 18 49 50 // Gets $lang['Register'] and $lang['Duplicate'] 51 load_language('common.lang'); 52 load_language('duplic.lang', EVNTCATS_PATH); 19 53 54 $template->assign( 55 'ec_dup_link_conf', 56 sprintf( 57 l10n('Register replacement'), 58 ' <br />', // nicer line feed 59 $lang['Register'], 60 $lang['Duplicate'] 61 ) 62 ); 20 63 64 // In case some $lang have the same index, overwrites them to have the ones 65 // needed here 66 load_language('plugin.lang', EVNTCATS_PATH); 21 67 22 23 24 25 26 27 28 68 $ec_conf2 = array(); 69 $ec_conf2['dup_allow'] = read_ec_conf('dup_allow'); 70 $ec_conf2['duplic_display'] = read_ec_conf('duplic_display'); 71 $template->assign('ec_conf', $ec_conf2); 29 72 30 73 ?> -
extensions/event_cats/admin/evntcats_admin.php
r4282 r4329 38 38 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 39 39 40 global $template, $conf, $lang, $prefixeTable, $ec_conf, $page, $ec_debug, 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 40 global $template, $conf, $lang, $prefixeTable, 41 $ec_conf, $page, $ec_debug, $ec_lists; 53 42 54 43 load_language('plugin.lang', EVNTCATS_PATH); … … 88 77 build_ec_lists(); // in evntcats_main_funcs.php 89 78 90 // If no entry exist, default pageis 'autolog_new'.79 // If no entry exist, default tab is 'autolog_new'. 91 80 $page['tab'] = (!($ec_exist_entries = (mysql_num_rows(pwg_query(" 92 81 SELECT * FROM `".EVNTCATS_TABLE."` … … 94 83 ")) != 0))) ? 'autolog_new' : 'autolog_entries'; 95 84 96 $ec_exist_duplic = ((mysql_num_rows(pwg_query(" 97 SELECT * FROM `".EVNTCATS_TABLE."` 98 WHERE `code` IS NULL 99 AND `arg1` IS NOT NULL 100 AND `arg2` IS NOT NULL ; 101 ")) != 0) or 102 (read_ec_conf('duplic_gen') != 0) or 103 (read_ec_conf('duplic_type') != 0) 104 ); 105 106 // If no entry exist, but some duplication management entries exist, default tab is 'duplication'. 107 if (!$ec_exist_entries and $ec_exist_duplic) $page['tab'] = 'duplication'; 108 109 110 /* 111 112 if (isset($_POST[''])) { 113 } 114 115 116 if (isset($_POST['ec_duplic_conf_submit'])) { 117 } 118 119 if (isset($_POST['deny_groups_submit'])) { 120 } 121 122 if (isset($_POST['grant_groups_submit'])) { 123 } 124 125 if (isset($_POST['deny_types_submit'])) { 126 } 127 128 if (isset($_POST['grant_types_submit'])) { 129 } 130 131 if (isset($_POST['deny_users_submit'])) { 132 } 133 134 if (isset($_POST['grant_users_submit'])) { 135 } 136 137 138 139 140 */ 141 142 143 144 145 146 if (isset($_POST['ec_act1'])) { 85 // If no entry exist, but some duplication management entries exist, default 86 // tab is 'duplication'. 87 if (!$ec_exist_entries and read_ec_conf('dup_allow') == '2') $page['tab'] = 'duplication'; 88 89 // If a modification of duplication management has been posted, default tab 90 // is 'duplication'. 91 if ( 92 count($_POST) > 0 and 93 count(array_intersect(array( 94 'ec_duplic_conf_submit', 95 'deny_groups_submit', 96 'grant_groups_submit', 97 'deny_types_submit', 98 'grant_types_submit', 99 'deny_users_submit', 100 'grant_users_submit', 101 ), 102 array_keys($_POST))) > 0 103 ) $page['tab'] = 'duplication'; 104 105 if (isset($_POST['ec_conf_submit'])) { 106 if (isset($_POST['ec_dup_conf'])) 107 if (!change_ec_conf('dup_allow', $_POST['ec_dup_conf'])) 108 ec_end2(7); 109 if (isset($_POST['ec_dup_disp'])) 110 if (!change_ec_conf('duplic_display', $_POST['ec_dup_disp'])) 111 ec_end2(8); 112 if (isset($_POST['ec_unknown'])) 113 if (!change_ec_conf('unknown_code', $_POST['ec_unknown'])) 114 ec_end2(9); 115 if (isset($_POST['ec_in_up_aps'])) 116 if (!change_ec_conf('unknown_code_ap_id', $_POST['ec_in_up_aps'])) 117 ec_end2(10); 118 $page['tab'] = 'config'; 119 $page['infos'][] = l10n('ec_config_saved'); 120 } 121 elseif (isset($_POST['ec_duplic_conf_submit'])) { 122 if (isset($_POST['ec_dup_conf'])) { 123 if ( 124 read_ec_conf('dup_allow') == '2' and 125 $_POST['ec_dup_conf'] != '2' 126 ) $page['tab'] = 'config'; 127 if (!change_ec_conf('dup_allow', $_POST['ec_dup_conf'])) 128 ec_end2(5); 129 } 130 if (isset($_POST['ec_dup_disp'])) 131 if (!change_ec_conf('duplic_display', $_POST['ec_dup_disp'])) 132 ec_end2(6); 133 $page['infos'][] = l10n('ec_config_saved'); 134 } 135 elseif ( 136 isset($_POST['deny_groups_submit']) and 137 isset($_POST['deny_groups']) and 138 count($_POST['deny_groups']) > 0 139 ) { 140 if (pwg_query(" 141 DELETE 142 FROM `".EVNTCATS_TABLE."` 143 WHERE `arg1` = 1 144 AND `arg2` IN (".implode(',', $_POST['deny_groups'])."); 145 ") === false) ec_end2(1); 146 else $page['infos'][] = l10n('ec_config_saved'); 147 } 148 elseif ( 149 isset($_POST['grant_groups_submit']) and 150 isset($_POST['grant_groups']) and 151 count($_POST['grant_groups']) > 0 152 ) { 153 $inserts = array(); 154 foreach ($_POST['grant_groups'] as $v) $inserts[] = array( 155 'arg1' => 1, 156 'arg2' => intval($v) 157 ); 158 mass_inserts(EVNTCATS_TABLE, array('arg1', 'arg2'), $inserts); 159 $page['infos'][] = l10n('ec_config_saved'); 160 } 161 elseif ( 162 isset($_POST['deny_types_submit']) and ( 163 isset($_POST['deny_types']) and 164 count($_POST['deny_types']) > 0 or 165 isset($_POST['deny_generic']) 166 ) 167 ) { 168 $c = ($no_previous = (count($t = mysql_fetch_row(pwg_query(" 169 SELECT `arg2` 170 FROM `".EVNTCATS_TABLE."` 171 WHERE `code` IS NULL 172 AND `arg1` = 3 173 AND `arg2` IS NOT NULL 174 LIMIT 1; 175 "))) == 0)) ? 0 : intval($t[0]); 176 if (isset($_POST['deny_types'])) 177 foreach ($_POST['deny_types'] as $v) $c = $c & ~$v; 178 if (isset($_POST['deny_generic'])) $c = $c & 7; 179 $q = ($no_previous) ? " 180 INSERT INTO `".EVNTCATS_TABLE."` 181 (`arg1`, `arg2`) 182 VALUES (3, $c); 183 " : " 184 UPDATE `".EVNTCATS_TABLE."` 185 SET `arg2` = $c 186 WHERE `arg1` = 3 187 LIMIT 1 ; 188 "; 189 if (pwg_query($q) === false) ec_end2(3); 190 else $page['infos'][] = l10n('ec_config_saved'); 191 } 192 elseif ( 193 isset($_POST['grant_types_submit']) and ( 194 isset($_POST['grant_types']) and 195 count($_POST['grant_types']) > 0 or 196 isset($_POST['grant_generic']) 197 ) 198 ) { 199 $c = ($no_previous = (count($t = mysql_fetch_row(pwg_query(" 200 SELECT `arg2` 201 FROM `".EVNTCATS_TABLE."` 202 WHERE `code` IS NULL 203 AND `arg1` = 3 204 AND `arg2` IS NOT NULL 205 LIMIT 1; 206 "))) == 0)) ? 0 : intval($t[0]); 207 if (isset($_POST['grant_types'])) 208 foreach ($_POST['grant_types'] as $v) $c = $c | $v; 209 if (isset($_POST['grant_generic'])) $c = $c | 8; 210 $q = ($no_previous) ? " 211 INSERT INTO `".EVNTCATS_TABLE."` 212 (`arg1`, `arg2`) 213 VALUES (3, $c); 214 " : " 215 UPDATE `".EVNTCATS_TABLE."` 216 SET `arg2` = $c 217 WHERE `arg1` = 3 218 LIMIT 1 ; 219 "; 220 if (pwg_query($q) === false) ec_end2(4); 221 else $page['infos'][] = l10n('ec_config_saved'); 222 } 223 elseif ( 224 isset($_POST['deny_users_submit']) and 225 isset($_POST['deny_users']) and 226 count($_POST['deny_users']) > 0 227 ) { 228 if (pwg_query(" 229 DELETE 230 FROM `".EVNTCATS_TABLE."` 231 WHERE `arg1` = 2 232 AND `arg2` IN (".implode(',', $_POST['deny_users'])."); 233 ") === false) ec_end2(2); 234 else $page['infos'][] = l10n('ec_config_saved'); 235 } 236 elseif ( 237 isset($_POST['grant_users_submit']) and 238 isset($_POST['grant_users']) and 239 count($_POST['grant_users']) > 0 240 ) { 241 $inserts = array(); 242 foreach ($_POST['grant_users'] as $v) $inserts[] = array( 243 'arg1' => 2, 244 'arg2' => intval($v) 245 ); 246 mass_inserts(EVNTCATS_TABLE, array('arg1', 'arg2'), $inserts); 247 $page['infos'][] = l10n('ec_config_saved'); 248 } 249 elseif (isset($_POST['ec_act1'])) { 147 250 if ( 148 251 $_POST['ec_act1'] == 'disable' and … … 180 283 build_ec_table(); 181 284 } 182 else ec_end1('ec_entry_sel', ' ec_bad_argument1');285 else ec_end1('ec_entry_sel', 'Bad argument : '); 183 286 } 184 287 else if ($_POST['ec_act1'] == 'toggle_forced') … … 193 296 break; 194 297 case 'duplication': 195 if ( $ec_exist_duplic) $page['tab'] = $_GET['tab'];298 if (read_ec_conf('dup_allow') == '2') $page['tab'] = $_GET['tab']; 196 299 break; 197 300 case 'autolog_new': … … 211 314 ")) != 0); 212 315 213 $ec_exist_duplic = ((mysql_num_rows(pwg_query(" 214 SELECT * FROM `".EVNTCATS_TABLE."` 215 WHERE `code` IS NULL 216 AND `arg1` IS NOT NULL 217 AND `arg2` IS NOT NULL ; 218 ")) != 0) or 219 (read_ec_conf('duplic_gen') != 0) or 220 (read_ec_conf('duplic_type') != 0) 221 ); 316 if ( 317 $page['tab'] == 'duplication' and 318 read_ec_conf('dup_allow') != '2' 319 ) $page['tab'] = 'config'; 222 320 223 321 $tabsheet = new tabsheet(); … … 233 331 l10n('ec_tab_autoid_new'), 234 332 $my_base_url.'&tab=autolog_new'); 235 if ( $ec_exist_duplic) $tabsheet->add('duplication',333 if (read_ec_conf('dup_allow') == '2') $tabsheet->add('duplication', 236 334 l10n('ec_tab_duplication'), 237 335 $my_base_url.'&tab=duplication'); -
extensions/event_cats/admin/evntcats_theme.css
r4092 r4329 72 72 vertical-align:middle; 73 73 } 74 75 .content h4 { 76 text-align:center; 77 } -
extensions/event_cats/admin/template/autolog_entries.tpl
r4228 r4329 6 6 <div style = "text-align:right; font-style:italic;"> 7 7 {if $ec_ap_ok} 8 {' ec_plugin_ap_ok'|@translate}8 {'Additional Pages active'|@translate} 9 9 <script type = "text/javascript"> 10 var ec_ap_ok = true;10 var ec_ap_ok = {if $ec_ap_ok2}true{else}false{/if}; 11 11 </script> 12 12 {else} 13 {' ec_plugin_ap_nok'|@translate}13 {'Additional Pages inactive'|@translate} 14 14 <script type = "text/javascript"> 15 15 var ec_ap_ok = false; … … 24 24 25 25 <div style = "text-align:center; font-weight:bold; font-size:120%;"> 26 <a href = "#ec_top" name = "ec_top" title = "{' ec_top_title'|@translate}">26 <a href = "#ec_top" name = "ec_top" title = "{'Place title on top ttip'|@translate}"> 27 27 <!--[if !IE]> <--> <label> <!--> <![endif]--> 28 {' ec_entry_table_title'|@translate}28 {'Autolog entries'|@translate} 29 29 <!--[if !IE]> <--> </label> <!--> <![endif]--> 30 30 <!-- What we're able to do for our "prefered" browser |-( ...! --> 31 </a><br >32 </div><br >31 </a><br /> 32 </div><br /> 33 33 34 34 {* <!-- Table to show codes present in MySQL table --> *} 35 <table class = "table2" width = "97%" {* id = "" *}>35 <table class = "table2" width = "97%"> 36 36 <thead> 37 37 <tr class = "throw"> 38 <td>{' ec_col_name_entry'|@translate}</td>39 <td>{' ec_col_name_code'|@translate}</td>40 <td>{' ec_col_name_user'|@translate}</td>41 <td>{' ec_col_name_bhvr'|@translate}</td>42 <td>{' ec_col_name_dspl'|@translate}</td>43 <td>{' ec_col_name_actn'|@translate}</td>38 <td>{'Entry'|@translate}</td> 39 <td>{'Code'|@translate}</td> 40 <td>{'Username'|@translate}</td> 41 <td>{'Identification'|@translate}</td> 42 <td>{'Displayed page'|@translate}</td> 43 <td>{'Tools'|@translate}</td> 44 44 </tr> 45 45 </thead> … … 62 62 <a href = "javascript:void(0);" onclick = "ec_check_ds({$code_line.id});"> 63 63 <img src = "{$EVNTCATS_URLS.ROOT}icon/disable.png" class = "button" 64 alt = "{' ec_url_disable'|@translate}" title = "{'ec_url_disable'|@translate}" />64 alt = "{'Outdate entry ttip'|@translate}" title = "{'Outdate entry ttip'|@translate}" /> 65 65 </a> 66 66 {if $code_line.Forced == 'true'} 67 <a href = "javascript:void(0);" title = "{' ec_url_forced'|@translate}" onclick = "ec_toggle_forced({$code_line.id}, false);">67 <a href = "javascript:void(0);" title = "{'Unforce display ttip'|@translate}" onclick = "ec_toggle_forced({$code_line.id}, false);"> 68 68 <img class = "button" src = "{$EVNTCATS_URLS.ROOT}icon/forced.png" 69 alt = "{' ec_url_forced'|@translate}" title = "{'ec_url_forced'|@translate}"69 alt = "{'Unforce display ttip'|@translate}" title = "{'Unforce display ttip'|@translate}" 70 70 /> 71 71 </a> 72 72 {else} 73 <a href = "javascript:void(0);" title = "{' ec_url_nforced'|@translate}" onclick = "ec_toggle_forced({$code_line.id}, true);">73 <a href = "javascript:void(0);" title = "{'Force display ttip'|@translate}" onclick = "ec_toggle_forced({$code_line.id}, true);"> 74 74 <img class = "button" src = "{$EVNTCATS_URLS.ROOT}icon/nforced.png" 75 alt = "{' ec_url_nforced'|@translate}" title = "{'ec_url_nforced'|@translate}"/>75 alt = "{'Force display ttip'|@translate}" title = "{'Force display ttip'|@translate}"/> 76 76 </a> 77 <a href = "javascript:void(0);" title = "{' ec_url_duplicate'|@translate}" onclick = "ec_duplicate_entry({$code_line.id});">77 <a href = "javascript:void(0);" title = "{'Duplicate entry ttip'|@translate}" onclick = "ec_duplicate_entry({$code_line.id});"> 78 78 <img src = "{$EVNTCATS_URLS.ROOT}icon/duplicate.png" class = "button" style = "border:none" 79 alt = "{' ec_url_duplicate'|@translate}" title = "{'ec_url_duplicate'|@translate}" />79 alt = "{'Duplicate entry ttip'|@translate}" title = "{'Duplicate entry ttip'|@translate}" /> 80 80 </a> 81 81 {/if} … … 91 91 <tr class = "row2"> 92 92 <td style = "padding-top:5px; padding-bottom:5px; font-weight:bold;"> 93 {' ec_lower_tools_desc'|@translate}93 {'Selected entry'|@translate} 94 94 </td> 95 <td style = " {* text-align:center; *}padding-top:5px; padding-bottom:5px;">96 <label title = "{' ec_url_tooltip'|@translate}">97 {' ec_show_URL'|@translate}98 <input type = "text" id = "ec_show_URL" size = "100%" title = "{' ec_url_tooltip'|@translate}" readonly = "readonly" />99 </label><br >100 <br >95 <td style = "padding-top:5px; padding-bottom:5px;"> 96 <label title = "{'Copy URL ttip'|@translate}"> 97 {'URL'|@translate} 98 <input type = "text" id = "ec_show_URL" size = "100%" title = "{'Copy URL ttip'|@translate}" readonly = "readonly" /> 99 </label><br /> 100 <br /> 101 101 <a 102 href = "javascript:void(0);" title = "{' ec_test_tooltip'|@translate}" alt = "{'ec_test_tooltip'|@translate}"102 href = "javascript:void(0);" title = "{'Test URL ttip'|@translate}" alt = "{'Test URL ttip'|@translate}" 103 103 id = "ec_table_URL" onclick = "return ec_check_tst();" class = "ec_lower_tools" 104 104 /> 105 105 <img src = "{$EVNTCATS_URLS.ROOT}icon/url2.png" class = "button"/> 106 {' ec_test_text'|@translate}106 {'Test'|@translate} 107 107 </a> 108 108 109 109 <a href = "javascript:void(0);" onclick = "ec_check_dl();" id = "ec_del_link_id" class = "ec_lower_tools" 110 alt = "{' ec_url_delete'|@translate}" title = "{'ec_url_delete'|@translate}"110 alt = "{'Delete entry ttip'|@translate}" title = "{'Delete entry ttip'|@translate}" 111 111 > 112 112 <img src = "{$EVNTCATS_URLS.ROOT}icon/delete.png" class = "button"/> 113 {' ec_delete_text'|@translate}113 {'Delete'|@translate} 114 114 </a> 115 115 116 116 <a href = "javascript:void(0);" onclick = "ec_check_m();" id = "ec_mod_link_id" class = "ec_lower_tools" 117 alt = "{' ec_modify_tooltip'|@translate}" title = "{'ec_modify_tooltip'|@translate}"117 alt = "{'Modify entry ttip'|@translate}" title = "{'Modify entry ttip'|@translate}" 118 118 > 119 119 <img src = "{$EVNTCATS_URLS.ROOT}icon/modify.png" class = "button"/> 120 {' ec_modify_text'|@translate}120 {'Modify'|@translate} 121 121 </a> 122 122 </td> 123 123 </tr> 124 </table><br >124 </table><br /> 125 125 </form> 126 126 … … 137 137 138 138 {include file='../../../plugins/event_cats/admin/template/footer.inc.tpl'} 139 140 {* <!--141 --> *} -
extensions/event_cats/admin/template/autolog_new.js
r4263 r4329 1 1 /* Event Cats Javascript functions LucMorizur June - ... 2009 */ 2 2 3 // All variables declarations 4 // Once this entire file has been read, some JS code is executed at the end 5 // of .tpl file, thus some values below are modified during the HTML page 6 // "reading and displaying" 3 7 var ec_avoid_infinite_loop = true; 4 8 var ec_is_creation = true; … … 446 450 d.ec_new_code.ec_in_up_cat.selectedIndex 447 451 ].label; 448 /* if (cat_display) ec_new_user_text = 449 (ec_reg_cat2.test(ec_cat_sel)) ? 450 ec_reg_cat1.exec(ec_cat_sel)[1] : ec_cat_sel; 451 else */ ec_new_user_text = ec_reg_cat3.exec(ec_cat_sel)[1]; 452 ec_new_user_text = ec_reg_cat3.exec(ec_cat_sel)[1]; 452 453 ec_new_user_text = ec_new_user_text.replace(/\s/g, '_'); 453 454 ec_new_user_text = ec_new_user_text.substr(0, 50); … … 464 465 return false; 465 466 } 466 t2 = ec_JS_message[' ec_up_code_lbl_home'];467 t2 = ec_JS_message['Home']; 467 468 ec_new_user_text = t2 + '_' + t1; 468 469 break; -
extensions/event_cats/admin/template/autolog_new.tpl
r4263 r4329 6 6 <div style = "text-align:right; font-style:italic;"> 7 7 {if $ec_ap_ok} 8 {' ec_plugin_ap_ok'|@translate}9 <script type = "text/javascript"> <!--10 var ec_ap_ok = true; //-->8 {'Additional Pages active'|@translate} 9 <script type = "text/javascript"> 10 var ec_ap_ok = {if count($ec_lists.add_pages) == 0}false{else}true{/if}; 11 11 </script> 12 12 {else} 13 {' ec_plugin_ap_nok'|@translate}14 <script type = "text/javascript"> <!--15 var ec_ap_ok = false; //-->13 {'Additional Pages inactive'|@translate} 14 <script type = "text/javascript"> 15 var ec_ap_ok = false; 16 16 </script> 17 17 {/if} … … 25 25 {* <!-- Page title. Can be "New entry" or "Entry modification" --> *} 26 26 <div style = "text-align:center;"> 27 <a style = "font-weight:bold; font-size:120%;" href = "#ec_top" name = "ec_top" title = "{' ec_top_title'|@translate}">27 <a style = "font-weight:bold; font-size:120%;" href = "#ec_top" name = "ec_top" title = "{'Place title on top ttip'|@translate}"> 28 28 <!--[if !IE]> <--> <label> <!--> <![endif]--> 29 29 {if $ec_is_creation} 30 {' ec_new_entry_title'|@translate}30 {'New entry title'|@translate} 31 31 {else} 32 {' ec_modify_entry_title'|@translate}32 {'Modify entry title'|@translate} 33 33 {/if} 34 34 <!--[if !IE]> <--> </label> <!--> <![endif]--> … … 36 36 </a> 37 37 {if $ec_is_creation} 38 <br ><br>39 <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{' ec_new_full_auto'|@translate}"38 <br /><br /> 39 <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{'Full auto'|@translate}" 40 40 id = "ec_submit_gen_full_auto_id" onclick = "ec_gen_full_auto();" style = "margin-top:0;"/> 41 41 {/if} 42 </div><br >42 </div><br /> 43 43 44 44 {* <!-- Table (borders not visible) with 3 rows for parameters adjustment --> *} … … 50 50 <td style = "vertical-align:top; font-weight:bold;"> 51 51 {if $ec_is_creation} 52 {' ec_new_entry'|@translate}52 {'Code'|@translate} 53 53 {else} 54 {' ec_sel_entry'|@translate}54 {'Selected entry'|@translate} 55 55 {/if} 56 56 </td> … … 61 61 <label for = "ec_in_up_code_id" onclick = "ec_mark_code('ec_sel_code_new');" {$ec_hidden_when_no_code} > 62 62 <input type = "radio" name = "ec_sel_code" for = "ec_in_up_code_id" value = "new" id = "ec_sel_code_new"/> 63 {' ec_up_code_lbl_code_new'|@translate}63 {'New code'|@translate} 64 64 </label> 65 65 <span {$ec_hidden_when_no_code} > </span> 66 66 <label for = "ec_in_up_code_id" style = "margin:0;"> 67 <input class = "submit" type = "button" name = "ec_submit_gen_code" value = "{' ec_new_entry_button'|@translate}"67 <input class = "submit" type = "button" name = "ec_submit_gen_code" value = "{'Auto code button'|@translate}" 68 68 id = "ec_submit_gen_code_id" onclick = "ec_gen_code();" style = "margin:0;" 69 69 /> 70 70 </label> 71 {' ec_gen_code_nb_pre'|@translate}71 {'Auto code mid'|@translate} 72 72 <select name = "ec_in_up_auto_code_length" id = "ec_in_up_auto_code_length_id" onchange = "ec_auto_code_digits_nb = this.value;"> 73 <option value = "4" >4{'ec_gen_code_nb_min'|@translate}</option> 74 <option value = "5" >5</option> 75 <option value = "8" >8</option> 76 <option value = "10">10</option> 77 <option value = "12">12</option> 78 <option value = "15">15</option> 79 <option value = "16">16</option> 80 <option value = "20">20</option> 81 <option value = "24">24</option> 82 <option value = "25">25</option> 83 <option value = "30">30</option> 84 <option value = "32">32{'ec_gen_code_nb_max'|@translate}</option> 73 {foreach from=$ec_auto_code_dg_nb item=ec_item name=listloop} 74 <option value = "{$ec_item}"> 75 {$ec_item} 76 {if $smarty.foreach.listloop.index == 0} 77 {'Auto code min'|@translate} 78 {/if} 79 {if $smarty.foreach.listloop.index == count($ec_auto_code_dg_nb) - 1} 80 {'Auto code max'|@translate} 81 {/if} 82 </option> 83 {/foreach} 85 84 </select> 86 {' ec_gen_code_nb_end'|@translate}<br>85 {'Auto code end'|@translate}<br /> 87 86 <ul><li> 88 87 <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40" … … 96 95 <label for = "ec_in_up_code_list_id" onclick = "ec_mark_code('ec_sel_code_old');" {$ec_hidden_when_no_code}> 97 96 <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" /> 98 {' ec_up_code_lbl_code_old'|@translate}97 {'Existing code'|@translate} 99 98 </label> 100 99 <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} > … … 102 101 <option value = "{$ec_val.id}">{$ec_key}</option> 103 102 {/foreach} 104 </select><br >103 </select><br /> 105 104 </li> 106 105 … … 124 123 <tr> 125 124 <td style = "vertical-align:top; font-weight:bold;"> 126 {' ec_up_code_lbl_user'|@translate}<br>127 <br >128 <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn"> </span><br >125 {'Identified user'|@translate}<br /> 126 <br /> 127 <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn"> </span><br /> 129 128 </td> 130 129 <td> … … 134 133 <label onclick = "return ec_mark_user('ec_sel_user_none');"> 135 134 <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none" /> 136 {' ec_up_code_lbl_user_none'|@translate}137 </label><br >135 {'No user'|@translate} 136 </label><br /> 138 137 </li> 139 138 {/if} … … 143 142 <label for = "ec_in_up_usr_txt_id" onclick = "return ec_mark_user('ec_sel_user_new');" {$ec_hidden_when_no_user} > 144 143 <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} /> 145 {' ec_up_code_lbl_user_new'|@translate}144 {'New generic user'|@translate} 146 145 </label> 147 146 <span {$ec_hidden_when_no_user} > </span> 148 147 <label for = "ec_in_up_usr_txt_id" style = "margin:0;"> 149 <input class = "submit" type = "button" name = "ec_submit_gen_user" value = "{' ec_up_code_lbl_gen_user'|@translate}"148 <input class = "submit" type = "button" name = "ec_submit_gen_user" value = "{'Generate username'|@translate}" 150 149 id = "ec_submit_gen_user_id" onclick = "ec_gen_user();" 151 150 /> 152 </label><br >151 </label><br /> 153 152 <ul><li> 154 <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{' ec_new_user_name'|@translate}<br>153 <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New username'|@translate}<br /> 155 154 <input type = "text" name = "login" id = "ec_in_up_usr_txt_id" maxlength = "50" 156 155 size = "20" onblur = "ec_new_user_text = this.value; ec_check_user_text();" 157 156 /> 158 157 </label> 159 <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{' ec_new_user_pswd'|@translate}<br>158 <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New password'|@translate}<br /> 160 159 <input type = "text" name = "password" id = "ec_in_up_psd_txt_id" maxlength = "32" 161 160 size = "20" onblur = "ec_new_psd_text = this.value; ec_check_pwd_text();" 162 161 /> 163 162 </label> 164 <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{' ec_confirm_pswd'|@translate}<br>163 <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'Confirm password'|@translate}<br /> 165 164 <input type = "password" id = "ec_confirm_psd_txt_id" maxlength = "32" size = "20"/> 166 165 </label> … … 170 169 /> 171 170 <span onMouseover = "ec_chk_over_grp = true;" onMouseout = "ec_chk_over_grp = false;"> 172 {' ec_new_user_group'|@translate}173 </span><br >171 {'New group'|@translate} 172 </span><br /> 174 173 <input type = "text" name = "groupname" id = "ec_in_up_grp_txt_id" maxlength = "32" 175 174 size = "20" onblur = "ec_new_grp_text = this.value; if (this.value != '') ec_selected_old_group = true;" 176 175 /> 177 176 </label> 178 </li></ul><br >177 </li></ul><br /> 179 178 </li> 180 179 … … 183 182 <label for = "ec_in_up_usr_list_id" onclick = "return ec_mark_user('ec_sel_user_old');" {$ec_hidden_when_no_user} > 184 183 <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" /> 185 {' ec_up_code_lbl_user_old'|@translate}184 {'Existing user'|@translate} 186 185 </label> 187 186 <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} > … … 189 188 <option label = "{$ec_val}" value = "{$ec_key}" >{$ec_val}</option> 190 189 {/foreach} 191 </select><br >190 </select><br /> 192 191 </li> 193 192 </td> … … 197 196 <tr> 198 197 <td style = "vertical-align:top;"> 199 <span style = "font-weight:bold;">{' ec_up_code_lbl_action'|@translate}</span><br>198 <span style = "font-weight:bold;">{'Displayed page'|@translate}</span><br /> 200 199 <label class = "ec_block" for = "ec_in_up_forced_id" style = "margin-top:5px;" onclick = "ec_mark_forced();"> 201 200 <input type = "checkbox" name = "ec_in_up_forced" id = "ec_in_up_forced_id"> … … 209 208 <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_home');"> 210 209 <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home" /> 211 {' ec_up_code_lbl_home'|@translate}210 {'Home'|@translate} 212 211 </label> 213 212 … … 216 215 <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_refused');"> 217 216 <input type = "radio" name = "ec_input_action" value = "refused" id = "ec_input_action_refused" /> 218 {' ec_up_code_lbl_refused'|@translate}217 {'Access denied'|@translate} 219 218 </label> 220 219 {/if} … … 225 224 > 226 225 <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img" for = "ec_in_up_imgs_id" /> 227 {' ec_up_code_lbl_img'|@translate}<br>226 {'Image id'|@translate}<br /> 228 227 <input type = "text" name = "ec_in_up_img" id = "ec_in_up_imgs_id" maxlength = "6" 229 228 size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "return ec_mark_action('ec_input_action_img');" … … 239 238 > 240 239 <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p" for = "ec_in_up_aps_id" /> 241 {' ec_up_code_lbl_aps'|@translate}<br>240 {'Additional Page'|@translate}<br /> 242 241 <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" > 243 242 {html_options options=$ec_lists.add_pages} … … 252 251 onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;" 253 252 /> 254 <span onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;">{' ec_up_code_lbl_cats'|@translate}</span><br>253 <span onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;">{'Category'|@translate}</span><br /> 255 254 <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id" onchange = "ec_selected_cat = this.value;"> 256 255 {html_options options=$ec_lists.categories} … … 271 270 <script type = "text/javascript"><!-- 272 271 ec_is_creation = {if $ec_is_creation}true{else}false{/if}; 273 ec_up_code_lbl_forced_txt = "{' ec_up_code_lbl_forced'|@translate}";272 ec_up_code_lbl_forced_txt = "{'Forced'|@translate}"; 274 273 ec_JS_message['ec_gen_user_act_miss'] = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}"; 275 274 ec_JS_message['ec_act_cat_miss'] = "{'ec_act_cat_miss'|@translate|@escape:javascript}"; … … 283 282 ec_JS_message['ec_conf_pwd_dont_match'] = "{'ec_conf_pwd_dont_match'|@translate|@escape:javascript}"; 284 283 ec_JS_message['ec_confirm_change_user'] = "{'ec_confirm_change_user'|@translate|@escape:javascript}"; 285 ec_JS_message[' ec_up_code_lbl_home'] = "{'ec_up_code_lbl_home'|@translate}";284 ec_JS_message['Home'] = "{'Home'|@translate}"; 286 285 ec_JS_message['ec_submit_code_miss'] = "{'ec_submit_code_miss'|@translate}"; 287 286 ec_JS_message['ec_submit_user_miss'] = "{'ec_submit_user_miss'|@translate}"; … … 304 303 305 304 {include file='../../../plugins/event_cats/admin/template/footer.inc.tpl'} 306 307 {* <!--308 --> *} -
extensions/event_cats/admin/template/config.tpl
r4263 r4329 3 3 {include file='../../../plugins/event_cats/admin/template/header.inc.tpl'} 4 4 5 {* <!-- Available soon... --> *} 5 {* <!-- Whether plugin Additionnal Pages is active or not --> *} 6 <div style = "text-align:right; font-style:italic;"> 7 {if $ec_ap_ok} 8 {'Additional Pages active'|@translate} 9 <script type = "text/javascript"> 10 var ec_ap_ok = {if count($add_pages) == 0}false{else}true{/if}; 11 </script> 12 {else} 13 {'Additional Pages inactive'|@translate} 14 <script type = "text/javascript"> 15 var ec_ap_ok = false; 16 </script> 17 {/if} 18 </div> 6 19 7 <p>Bientôt disponible :-] !</p> 20 <form action = "" method = "post" class = "titrePage" name = "ec_gen_conf" onsubmit = "return ec_check_submit();"> 21 22 {* <!-- Duplication configuration parameters --> *} 23 <h4>{'Duplication'|@translate}</h4> 24 <table> 25 <tr> 26 <td style = "text-align:right; font-weight:bold;"> 27 {'Duplication allowance'|@translate} 28 </td> 29 <td> 30 <label for = "ec_dup_conf_none_id"> 31 <input 32 type = "radio" name = "ec_dup_conf" value = "0" id = "ec_dup_conf_none_id" 33 {if $ec_conf.dup_allow == '0'} checked = "checked" {/if} 34 /> 35 {'No account'|@translate} 36 </label><br /> 37 <label for = "ec_dup_conf_group_id"> 38 <input 39 type = "radio" name = "ec_dup_conf" value = "2" id = "ec_dup_conf_group_id" 40 {if $ec_conf.dup_allow == '2'} checked = "checked" {/if} 41 /> 42 {'Selection per group'|@translate} 43 </label><br /> 44 <label for = "ec_dup_conf_all_id"> 45 <input 46 type = "radio" name = "ec_dup_conf" value = "1" id = "ec_dup_conf_all_id" 47 {if $ec_conf.dup_allow == '1'} checked = "checked" {/if} 48 /> 49 {'All accounts'|@translate} 50 </label> 51 </td> 52 <td> </td><td> </td><td> </td> {* <!-- sorry :-\ --> *} 53 <td style = "text-align:right; font-weight:bold;"> 54 {* <!-- Replace "Register" link ? --> *} 55 {$ec_dup_link_conf} 56 </td> 57 <td> 58 <label for = "ec_dup_disp_normal_id"> 59 <input 60 type = "radio" name = "ec_dup_disp" value = "0" id = "ec_dup_disp_normal_id" 61 {if $ec_conf.duplic_display == '0'} checked = "checked" {/if} 62 /> 63 {'No account'|@translate} 64 </label><br /> 65 <label for = "ec_dup_disp_but_gen_id"> 66 <input 67 type = "radio" name = "ec_dup_disp" value = "2" id = "ec_dup_disp_but_gen_id" 68 {if $ec_conf.duplic_display == '2'} checked = "checked" {/if} 69 /> 70 {'All but generics'|@translate} 71 </label><br /> 72 <label for = "ec_dup_disp_dup_id"> 73 <input 74 type = "radio" name = "ec_dup_disp" value = "1" id = "ec_dup_disp_dup_id" 75 {if $ec_conf.duplic_display == '1'} checked = "checked" {/if} 76 /> 77 {'All accounts'|@translate} 78 </label><br /> 79 </td> 80 </tr> 81 <tr><td> </td><td> </td></tr> 82 </table> 83 84 {* <!-- What to do if an unknown code is used --> *} 85 <h4>{'Unknown code'|@translate}</h4> 86 <table> 87 <tr> 88 <td style = "text-align:right; vertical-align:top; font-weight:bold;"> 89 {'Page for unknown code'|@translate} 90 </td> 91 <td> 92 <label for = "ec_unknown_0_id" onclick = "ec_mark_action('ec_unknown_0_id');"> 93 <input type = "radio" name = "ec_unknown" value = "0" id = "ec_unknown_0_id" /> 94 {'Home'|@translate} 95 </label><br /> 96 <label for = "ec_unknown_1_id" onclick = "ec_mark_action('ec_unknown_1_id');"> 97 <input type = "radio" name = "ec_unknown" value = "1" id = "ec_unknown_1_id" /> 98 {'Access denied'|@translate} 99 </label><br /> 100 {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *} 101 <label class = "ec_block" for = "ec_in_up_aps_id" {if !$ec_ap_ok or count($add_pages) == 0} style = "display:none;" {/if} 102 onclick = "ec_mark_action('ec_unknown_2_id');" 103 > 104 <input type = "radio" name = "ec_unknown" value = "2" id = "ec_unknown_2_id" for = "ec_in_up_aps_id" /> 105 {'Additional Page'|@translate}<br /> 106 <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" > 107 {html_options options=$add_pages} 108 </select> 109 </label> 110 </td> 111 </tr> 112 <tr><td> </td><td> </td></tr> 113 </table> 114 115 <div style = "text-align:center;"> 116 <input class = "submit" type = "submit" name = "ec_conf_submit" value = "{'Submit'|@translate}" /> 117 </div> 118 119 </form> 120 8 121 9 122 {* <!-- JavaScript functions --> *} 10 {* <!-- 11 <script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script> 123 <script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/config.js"></script> 12 124 <script type = "text/javascript"><!-- 13 ec_JS_message ['ec_gen_user_act_miss']= "{'ec_gen_user_act_miss'|@translate|@escape:javascript}";14 ec_ JS_message['ec_act_cat_miss'] = "{'ec_act_cat_miss'|@translate|@escape:javascript}";15 ec_ JS_message['ec_new_pwd_gen'] = "{'ec_new_pwd_gen'|@translate|@escape:javascript}";16 ec_JS_message['ec_up_code_lbl_home'] = "{'ec_up_code_lbl_home'|@translate}";17 ec_init();125 ec_JS_message = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}"; 126 ec_selected_action = "{$ec_conf.unknown_code}"; 127 ec_selected_AP = "{$ec_conf.unknown_code_ap_id}"; 128 document.ec_gen_conf.ec_unknown[ec_selected_action].checked = 'checked'; 129 if (de('ec_unknown_2_id').checked != '') ec_mark_action('ec_unknown_2_id'); 18 130 //--></script> 19 --> *}20 131 21 132 {include file='../../../plugins/event_cats/admin/template/footer.inc.tpl'} 22 23 {* <!--24 --> *} -
extensions/event_cats/admin/template/duplication.tpl
r4276 r4329 2 2 3 3 {include file='../../../plugins/event_cats/admin/template/header.inc.tpl'} 4 5 {* <!-- Available soon... --> *}6 <p>Bientôt disponible :-] !</p>7 4 8 5 <!-- Aknowledgement ---------------------------------------------------------- … … 14 11 <form action = "" method = "post" class = "titrePage" name = "ec_duplic_conf"> 15 12 <fieldset> 16 <legend>{' ec_duplication_config'|@translate}</legend>13 <legend>{'Configuration'|@translate}</legend> 17 14 <table> 18 15 <tr> 19 <td >20 <span style = "font-weight:bold;">{'ec_duplication_allowance'|@translate} </span>16 <td style = "text-align:right; font-weight:bold;"> 17 {'Duplication allowance'|@translate} 21 18 </td> 22 19 <td> 23 20 <label for = "ec_dup_conf_none_id"> 24 <input type = "radio" name = "ec_dup_conf[]" value = "none" id = "ec_dup_conf_none_id" /> 25 {'ec_dup_allowance_none'|@translate} 26 </label><br> 21 <input 22 type = "radio" name = "ec_dup_conf" value = "0" id = "ec_dup_conf_none_id" 23 {if $ec_conf.dup_allow == '0'} checked = "checked" {/if} 24 /> 25 {'No account'|@translate} 26 </label><br /> 27 27 <label for = "ec_dup_conf_group_id"> 28 <input type = "radio" name = "ec_dup_conf[]" value = "group" id = "ec_dup_conf_group_id" /> 29 {'ec_dup_allowance_group'|@translate} 30 </label><br> 28 <input 29 type = "radio" name = "ec_dup_conf" value = "2" id = "ec_dup_conf_group_id" 30 {if $ec_conf.dup_allow == '2'} checked = "checked" {/if} 31 /> 32 {'Selection per group'|@translate} 33 </label><br /> 31 34 <label for = "ec_dup_conf_all_id"> 32 <input type = "radio" name = "ec_dup_conf[]" value = "all" id = "ec_dup_conf_all_id" /> 33 {'ec_dup_allowance_all'|@translate} 35 <input 36 type = "radio" name = "ec_dup_conf" value = "1" id = "ec_dup_conf_all_id" 37 {if $ec_conf.dup_allow == '1'} checked = "checked" {/if} 38 /> 39 {'All accounts'|@translate} 34 40 </label> 41 </td> 42 <td> </td><td> </td><td> </td> {* <!-- sorry :-\ --> *} 43 <td style = "text-align:right; font-weight:bold;"> 44 {$ec_dup_link_conf} 45 </td> 46 <td> 47 <label for = "ec_dup_disp_normal_id"> 48 <input 49 type = "radio" name = "ec_dup_disp" value = "0" id = "ec_dup_disp_normal_id" 50 {if $ec_conf.duplic_display == '0'} checked = "checked" {/if} 51 /> 52 {'No account'|@translate} 53 </label><br /> 54 <label for = "ec_dup_disp_but_gen_id"> 55 <input 56 type = "radio" name = "ec_dup_disp" value = "2" id = "ec_dup_disp_but_gen_id" 57 {if $ec_conf.duplic_display == '2'} checked = "checked" {/if} 58 /> 59 {'All but generics'|@translate} 60 </label><br /> 61 <label for = "ec_dup_disp_dup_id"> 62 <input 63 type = "radio" name = "ec_dup_disp" value = "1" id = "ec_dup_disp_dup_id" 64 {if $ec_conf.duplic_display == '1'} checked = "checked" {/if} 65 /> 66 {'All accounts'|@translate} 67 </label><br /> 35 68 </td> 36 69 </tr> 37 70 </table> 38 <input class = "submit" type = "submit" name = "ec_duplic_conf_submit" value = "{' ec_dup_conf_sbmt_lbl'|@translate}" />71 <input class = "submit" type = "submit" name = "ec_duplic_conf_submit" value = "{'Save dup. config btn'|@translate}" /> 39 72 </fieldset> 40 73 </form> … … 46 79 47 80 <fieldset> 48 <legend>{' ec_duplic_ok'|@translate}</legend>81 <legend>{'Duplication allowed'|@translate}</legend> 49 82 <ul> 50 83 {foreach from=$groups_granted_ids item=id} … … 52 85 {/foreach} 53 86 </ul> 54 <input class = "submit" type = "submit" name = "deny_groups_submit" value = "{' ec_dup_grp_ok_sbmt_lbl'|@translate}" />87 <input class = "submit" type = "submit" name = "deny_groups_submit" value = "{'Deny to groups btn'|@translate}" /> 55 88 </fieldset> 56 89 57 90 <fieldset> 58 <legend>{' ec_duplic_nok'|@translate}</legend>91 <legend>{'Duplication denied'|@translate}</legend> 59 92 <ul> 60 93 {foreach from=$groups_denied_ids item=id} … … 62 95 {/foreach} 63 96 </ul> 64 <input class = "submit" type = "submit" name = "grant_groups_submit" value = "{' ec_dup_grp_nok_sbmt_lbl'|@translate}" />97 <input class = "submit" type = "submit" name = "grant_groups_submit" value = "{'Grant to groups btn'|@translate}" /> 65 98 </fieldset> 66 99 67 <h4>{' ec_dup_types'|@translate}</h4>100 <h4>{'Types'|@translate}</h4> 68 101 69 102 <fieldset> 70 <legend>{' ec_duplic_ok'|@translate}</legend>103 <legend>{'Duplication allowed'|@translate}</legend> 71 104 <ul> 72 105 {if $ec_gen_granted} 73 <li><label><input type = "checkbox" name = "deny_generic" {* id = "ec_dup_types_generic_nok_id" *}/> {'user_status_generic'|@translate}</label></li>106 <li><label><input type = "checkbox" name = "deny_generic" /> {'user_status_generic'|@translate}</label></li> 74 107 <br /> 75 108 {/if} … … 78 111 {/foreach} 79 112 </ul> 80 <input class = "submit" type = "submit" name = "deny_types_submit" value = "{' ec_dup_typ_sbmt_nok_lbl'|@translate}" />113 <input class = "submit" type = "submit" name = "deny_types_submit" value = "{'Deny to types btn'|@translate}" /> 81 114 </fieldset> 82 115 83 116 <fieldset> 84 <legend>{' ec_duplic_nok'|@translate}</legend>117 <legend>{'Duplication denied'|@translate}</legend> 85 118 <ul> 86 119 {if !$ec_gen_granted} 87 <li><label><input type = "checkbox" name = "grant_generic" {* id = "ec_dup_types_generic_ok_id" *}/> {'user_status_generic'|@translate}</label></li>120 <li><label><input type = "checkbox" name = "grant_generic" /> {'user_status_generic'|@translate}</label></li> 88 121 <br /> 89 122 {/if} … … 92 125 {/foreach} 93 126 </ul> 94 <input class = "submit" type = "submit" name = "grant_types_submit" value = "{' ec_dup_typ_sbmt_ok_lbl'|@translate}" />127 <input class = "submit" type = "submit" name = "grant_types_submit" value = "{'Grant to types btn'|@translate}" /> 95 128 </fieldset> 96 129 … … 98 131 99 132 <fieldset> 100 <legend>{' ec_duplic_ok'|@translate}</legend>133 <legend>{'Duplication allowed'|@translate}</legend> 101 134 <ul> 102 135 {foreach from=$users_granted_direct_ids item=id} … … 104 137 {/foreach} 105 138 </ul> 106 <input class = "submit" type = "submit" name = "deny_users_submit" value = "{' ec_dup_usr_ok_sbmt_lbl'|@translate}" />139 <input class = "submit" type = "submit" name = "deny_users_submit" value = "{'Deny to users btn'|@translate}" /> 107 140 </fieldset> 108 141 109 142 <fieldset> 110 <legend>{' ec_duplic_ok_groups'|@translate}</legend>143 <legend>{'Dup. allowed tks to'|@translate}</legend> 111 144 {if isset($user_granted_indirects) } 112 145 <ul> … … 119 152 120 153 <fieldset> 121 <legend>{' ec_duplic_nok'|@translate}</legend>154 <legend>{'Duplication denied'|@translate}</legend> 122 155 <ul> 123 156 {foreach from=$users_denied_ids item=id} … … 125 158 {/foreach} 126 159 </ul> 127 <input class = "submit" type = "submit" name = "grant_users_submit" value = "{' ec_dup_usr_nok_sbmt_lbl'|@translate}" />160 <input class = "submit" type = "submit" name = "grant_users_submit" value = "{'Grant to users btn'|@translate}" /> 128 161 </fieldset> 129 162 130 163 </form> 131 164 132 133 134 135 {* <!-- JavaScript functions --> *}136 {* <!--137 <script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script>138 <script type = "text/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_up_code_lbl_home'] = "{'ec_up_code_lbl_home'|@translate}";143 ec_init();144 //--></script>145 --> *}146 147 165 {include file='../../../plugins/event_cats/admin/template/footer.inc.tpl'} 148 166 149 {* <!--150 --> *}151 -
extensions/event_cats/admin/template/header.inc.tpl
r4247 r4329 5 5 {* <!-- Page title --> *} 6 6 <div class = "titrePage" style = "margin-top: -20px;"> 7 <h2>{' ec_admin_page_title'|@translate} {$EVNTCATS_VERSION}</h2>7 <h2>{'Admin page title'|@translate} {$EVNTCATS_VERSION}</h2> 8 8 </div> 9 9 10 10 {* <!-- JavaScript warning message --> *} 11 11 <div id = "ec_js_warn"> 12 {' ec_javascript_needed'|@translate}<br><br>12 {'JS needed'|@translate}<br /><br /> 13 13 </div> 14 14 <script type = "text/javascript"><!-- // Removes JavaScript warning message … … 19 19 {if $ec_howto} 20 20 <div> 21 {' ec_admin_page_howto'|@translate}21 {'Acknowledgement'|@translate} 22 22 </div> 23 23 <p>
Note: See TracChangeset
for help on using the changeset viewer.