Changeset 4157
- Timestamp:
- Oct 31, 2009, 4:59:48 AM (15 years ago)
- Location:
- extensions/event_cats
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/event_cats/admin/autolog_new.inc.php
r4115 r4157 56 56 build_ec_duplicable_codes(); 57 57 58 $ec_default_action = 'create_ask'; 58 $ec_default_action = ($page['tab'] == 'autolog_modif') ? 59 'modify_entry_ask' : 'create_ask'; 59 60 $ec_default_entry = '-1'; 60 61 $ec_def_auto_code_dg_nb = read_ec_conf('auto_code_dg_nb'); … … 90 91 /****************************************************************************/ 91 92 92 $template->assign('ec_ap_ok',$ec_ap_ok);93 $template->assign('ec_lists',$ec_lists);94 93 $template->assign('ec_hidden_when_no_code', 95 94 (count($ec_lists['duplicable_codes']) == 0) ? 'style = "display:none;"' : '' … … 98 97 (count($ec_lists['user_ids']) == 0) ? 'style = "display:none;"' : '' 99 98 ); 99 $template->assign('ec_no_assoc', ((mysql_num_rows(pwg_query(' 100 SELECT * 101 FROM `'.IMAGE_CATEGORY_TABLE.'` 102 '))) == 0)); 100 103 $template->assign('ec_is_creation', ( 101 104 $ec_default_action == 'duplicate_entry_submit' or … … 105 108 ) 106 109 ); 107 $template->assign('ec_default_action',$ec_default_action); 108 $template->assign('ec_default_entry',$ec_default_entry); 109 $template->assign('ec_def_auto_code_dg_nb',$ec_def_auto_code_dg_nb); 110 $template->assign('ec_ap_ok', $ec_ap_ok); 111 $template->assign('ec_lists', $ec_lists); 112 $template->assign('ec_default_entry', $ec_default_entry); 113 $template->assign('ec_default_action', $ec_default_action); 114 $template->assign('ec_def_auto_code_dg_nb', $ec_def_auto_code_dg_nb); 110 115 111 116 ?> -
extensions/event_cats/admin/evntcats_admin.php
r4115 r4157 94 94 if (isset($_POST['ec_act1'])) { 95 95 if ( 96 $_POST['ec_act1'] == 'disable' and 97 count($ec_lists['add_pages']) == 0 98 ) { 99 $_POST['ec_act1'] = 'modify_entry_submit'; 100 $_POST['ec_input_action'] = 'refused'; 101 } 102 if ( 96 103 $_POST['ec_act1'] == 'duplicate_entry_ask' or 97 $_POST['ec_act1'] == 'create_ask' or 104 $_POST['ec_act1'] == 'create_ask' 105 ) 106 $page['tab'] = 'autolog_new'; 107 elseif ( 98 108 $_POST['ec_act1'] == 'disable' or 99 109 $_POST['ec_act1'] == 'modify_entry_ask' 100 110 ) 101 $page['tab'] = 'autolog_ new';111 $page['tab'] = 'autolog_modif'; 102 112 elseif ($_POST['ec_act1'] == 'create') 103 113 $page['tab'] = (ec_create_entry_OK()) ? 'autolog_entries' : 'autolog_new'; … … 106 116 (ec_duplicate_entry_OK()) ? 'autolog_entries' : 'autolog_new'; 107 117 elseif ($_POST['ec_act1'] == 'modify_entry_submit') $page['tab'] = 108 (ec_modify_entry_OK()) ? 'autolog_entries' : 'autolog_ new';118 (ec_modify_entry_OK()) ? 'autolog_entries' : 'autolog_modif'; 109 119 else { 110 120 $page['tab'] = 'autolog_entries'; 111 121 if ($_POST['ec_act1'] == 'delete') ec_delete_entry(); 122 elseif ($_POST['ec_act1'] == 'toggle_forced') ec_toggle_forced_entry(); 112 123 } 113 124 } … … 115 126 else { 116 127 if (isset($_GET['tab'])) switch ($_GET['tab']) { 128 case 'autolog_modif': 117 129 case 'autolog_new': 118 130 case 'duplication': 119 131 case 'config': 120 $page['tab'] = $_GET['tab']; 132 $page['tab'] = $_GET['tab']; 133 break; 121 134 } 122 135 } 123 136 124 137 $tabsheet = new tabsheet(); 125 if ($ec_exist_entries) $tabsheet->add('autolog_entries', 126 l10n('ec_tab_autoid_entries'), 127 $my_base_url.'&tab=autolog_entries'); 128 $tabsheet->add('autolog_new', l10n(($ec_exist_entries) ? 129 'ec_tab_autoid_new2' : 'ec_tab_autoid_new1'), 138 if ($ec_exist_entries) { 139 $tabsheet->add('autolog_entries', 140 l10n('ec_tab_autoid_entries'), 141 $my_base_url.'&tab=autolog_entries'); 142 $tabsheet->add('autolog_modif', 143 l10n('ec_tab_autoid_modif'), 144 $my_base_url.'&tab=autolog_modif'); 145 } 146 $tabsheet->add('autolog_new', 147 l10n('ec_tab_autoid_new'), 130 148 $my_base_url.'&tab=autolog_new'); 131 149 $tabsheet->add('duplication', … … 139 157 array('U_HELP' => get_root_url().'popuphelp.php?page=event_cats')); 140 158 141 $template->assign('EVNTCATS_URLS', array 159 $template->assign('EVNTCATS_URLS', array( 142 160 'ROOT' => EVNTCATS_PATH, 143 161 )); … … 145 163 /****************************************************************************/ 146 164 147 include(EVNTCATS_PATH.'admin/'.$page['tab'].'.inc.php'); 165 $ec_file = ($page['tab'] == 'autolog_modif') ? 'autolog_new' : $page['tab']; 166 167 include(EVNTCATS_PATH.'admin/'.$ec_file.'.inc.php'); 148 168 149 169 $tabsheet->select($page['tab']); … … 171 191 )); 172 192 173 $template->set_filenames(array('evntcats_admin_content' => dirname(__FILE__).'/template/'.$page['tab'].'.tpl')); 193 $template->set_filenames(array( 194 'evntcats_admin_content' => dirname(__FILE__).'/template/'.$ec_file.'.tpl' 195 )); 174 196 $template->assign_var_from_handle('ADMIN_CONTENT','evntcats_admin_content'); 175 197 ?> -
extensions/event_cats/admin/template/autolog_new.js
r4116 r4157 4 4 var ec_is_creation = true; 5 5 var ec_chk_nover_cat = true; 6 var ec_chk_over_grp = true; 6 7 var ec_flag1 = false; 7 8 var ec_flag2 = false; 8 9 var ec_dont_check = false; 10 var ec_selected_old_group = false; 9 11 var ec_err = ''; 10 12 var ec_selected_img = ''; … … 12 14 var ec_new_user_text = ''; 13 15 var ec_new_psd_text = ''; 16 var ec_new_grp_text = ''; 14 17 var ec_old_new_psd_text = ''; 15 18 var ec_test_reg = ''; … … 20 23 var ec_selected_old_entry = '-1'; 21 24 var ec_selected_old_code = '-1'; 22 var ec_selected_old_code2 = '-1';25 // var ec_selected_old_code2 = '-1'; 23 26 var ec_selected_old_user = '-1'; 24 var ec_selected_old_user2 = '-1';27 // var ec_selected_old_user2 = '-1'; 25 28 var ec_selected_AP = '-1'; 26 29 var ec_selected_cat = '-1'; … … 30 33 var ec_JS_message = new Array(); 31 34 var ec_duplic_codes = new Array(); 35 var ec_lists_temp = new Array(); 32 36 var ec_lists = new Array(); 33 ec_lists['code'] = new Array();34 37 ec_lists['user_id'] = new Array(); 35 38 ec_lists['action'] = new Array(); … … 51 54 } 52 55 56 function ec_check_exist_innerHTML(ec_id, ec_val) { 57 var e = document.getElementById(ec_id); 58 for (var i = 0; i < e.length; i++) { 59 if (e.options[i].innerHTML == ec_val) return true; 60 } 61 return false; 62 } 63 53 64 function ec_mark_entry(ec_id) { 54 65 var i = 0; 55 66 if (ec_id == '-1') de('ec_in_up_entry_list_id').selectedIndex = '-1'; 56 67 else { 68 de('ec_in_up_entry_list_id').value = ec_id; 57 69 de('ec_act2_id').value = ec_id; 58 70 if ( … … 116 128 ) { 117 129 var t1 = ''; 118 /* if (ec_id == 'ec_sel_code_old' && ec_selected_old_code == '-1') { 119 ec_selected_code = 'ec_sel_code_new'; 120 ec_selected_old_code = ec_selected_old_code2; 121 } 122 else */ ec_selected_code = ec_id; 130 ec_selected_code = ec_id; 123 131 de(ec_selected_code).checked = 'checked'; 124 132 switch (ec_selected_code) { … … 127 135 de('ec_in_up_code_list_id').selectedIndex = '-1'; 128 136 de('ec_in_up_code_id').value = ec_new_code_text; 137 de('ec_in_up_grp_txt_id').value = ec_new_grp_text; 138 de('ec_in_up_newgroup_id').checked = 139 (ec_selected_old_group) ? 'checked' : ''; 129 140 de('ec_act2_id').value = '-1'; 130 141 break; 131 142 case 'ec_sel_code_old': 132 de('ec_act1_id').value = 'duplicate_entry_submit'; 133 de('ec_act2_id').value = ec_selected_old_code; 134 de('ec_in_up_code_list_id').value = ec_selected_old_code; 135 de('ec_in_up_code_id').value = ''; 136 t1 = 'disabled'; 137 ec_selected_user = 'ec_sel_user_old'; 138 ec_selected_old_user = 143 de('ec_act1_id').value = 'duplicate_entry_submit'; 144 de('ec_act2_id').value = ec_selected_old_code; 145 de('ec_in_up_code_list_id').value = ec_selected_old_code; 146 de('ec_in_up_grp_txt_id').value = ''; 147 de('ec_in_up_newgroup_id').checked = ''; 148 de('ec_in_up_code_id').value = ''; 149 t1 = 'disabled'; 150 ec_selected_user = 'ec_sel_user_old'; 151 ec_selected_old_user = 139 152 ec_lists['user_id'][ec_selected_old_code]; 140 153 ec_flag1 = true; … … 147 160 de('ec_in_up_usr_txt_id').disabled = t1; 148 161 de('ec_in_up_psd_txt_id').disabled = t1; 162 de('ec_in_up_newgroup_id').disabled = t1; 163 de('ec_in_up_grp_txt_id').disabled = t1; 149 164 de('ec_sel_user_old').disabled = t1; 150 165 de('ec_in_up_usr_list_id').disabled = t1; … … 172 187 de('ec_sel_user_old').disabled == true) 173 188 ) { 174 /* if (ec_id == 'ec_sel_user_old' && ec_selected_old_user == '-1') { 175 ec_selected_user = 176 (ec_is_creation) ? 'ec_sel_user_new' : 'ec_sel_user_none'; 177 ec_selected_old_user = ec_selected_old_user2; 178 } 179 else */ ec_selected_user = ec_id; 189 ec_selected_user = ec_id; 180 190 de(ec_selected_user).checked = 'checked'; 181 191 switch (ec_selected_user) { … … 184 194 (ec_ap_ok && (ec_selected_action != 'ec_input_action_refused')) ? 185 195 'ec_input_action_add_p' : 'ec_input_action_refused'; 186 de('ec_in_up_usr_txt_id').value = ''; 187 de('ec_in_up_psd_txt_id').value = ''; 196 de('ec_in_up_usr_txt_id').value = ''; 197 de('ec_in_up_psd_txt_id').value = ''; 198 de('ec_in_up_grp_txt_id').value = ''; 199 de('ec_in_up_newgroup_id').checked = ''; 188 200 de('ec_in_up_usr_list_id').selectedIndex = '-1'; 189 201 break; … … 191 203 if (ec_selected_action == 'ec_input_action_refused') 192 204 ec_selected_action = 'ec_input_action_home'; 193 de('ec_in_up_usr_txt_id').value = ec_new_user_text; 194 de('ec_in_up_psd_txt_id').value = ec_new_psd_text; 205 de('ec_in_up_usr_txt_id').value = ec_new_user_text; 206 de('ec_in_up_psd_txt_id').value = ec_new_psd_text; 207 de('ec_in_up_grp_txt_id').value = 208 (ec_selected_old_group) ? ec_new_grp_text : ''; 209 de('ec_in_up_newgroup_id').checked = 210 (ec_selected_old_group) ? 'checked' : ''; 195 211 de('ec_in_up_usr_list_id').selectedIndex = '-1'; 196 212 break; … … 198 214 if (ec_selected_action == 'ec_input_action_refused') 199 215 ec_selected_action = 'ec_input_action_home'; 200 de('ec_in_up_usr_txt_id').value = ''; 201 de('ec_in_up_psd_txt_id').value = ''; 202 de('ec_in_up_usr_list_id').value = 203 ec_selected_old_user; 216 de('ec_in_up_usr_txt_id').value = ''; 217 de('ec_in_up_psd_txt_id').value = ''; 218 de('ec_in_up_grp_txt_id').value = ''; 219 de('ec_in_up_newgroup_id').checked = ''; 220 de('ec_in_up_usr_list_id').value = ec_selected_old_user; 204 221 break; 205 222 } … … 364 381 ec_new_code_text = t; 365 382 } 366 ec_mark_code('ec_sel_code_new');383 if (ec_check_code_text(ec_new_code_text)) ec_mark_code('ec_sel_code_new'); 367 384 } 368 385 … … 394 411 ec_new_psd_text = t; 395 412 ec_old_new_psd_text = ec_new_psd_text; 396 } 397 switch (ec_selected_action) { 398 case 'ec_input_action_add_p': // Additional Page 399 ec_new_user_text = ec_reg_ap.exec( 400 d.ec_new_code.ec_in_up_aps.options[ 401 d.ec_new_code.ec_in_up_aps.selectedIndex 402 ].label 403 ); 404 break; 405 case 'ec_input_action_cat': // Category 406 case 'ec_input_action_img': // Image 407 ec_cat_sel = d.ec_new_code.ec_in_up_cat.options[ 408 d.ec_new_code.ec_in_up_cat.selectedIndex 409 ].label; 410 ec_new_user_text = (ec_reg_cat2.test(ec_cat_sel)) ? 411 ec_reg_cat1.exec(ec_cat_sel)[1] : ec_cat_sel; 412 if (ec_selected_action == 'ec_input_action_img') { 413 ec_new_user_text += '_' + d.ec_new_code.ec_in_up_imgs_id.value; 414 } 415 break; 416 case 'ec_input_action_home': // Home 417 t = ec_gen_txt('3'); 418 if (t == '') { 419 alert("Failed :\n" + ec_err); 420 ec_new_psd_text = 'Failed...'; 421 return false; 413 switch (ec_selected_action) { 414 case 'ec_input_action_add_p': // Additional Page 415 ec_new_user_text = ec_reg_ap.exec( 416 d.ec_new_code.ec_in_up_aps.options[ 417 d.ec_new_code.ec_in_up_aps.selectedIndex 418 ].label 419 ); 420 break; 421 case 'ec_input_action_cat': // Category 422 case 'ec_input_action_img': // Image 423 ec_cat_sel = d.ec_new_code.ec_in_up_cat.options[ 424 d.ec_new_code.ec_in_up_cat.selectedIndex 425 ].label; 426 ec_new_user_text = (ec_reg_cat2.test(ec_cat_sel)) ? 427 ec_reg_cat1.exec(ec_cat_sel)[1] : ec_cat_sel; 428 ec_new_user_text = ec_new_user_text.replace(/\s/, '_'); 429 if (ec_selected_action == 'ec_input_action_img') { 430 ec_new_user_text += '_' + d.ec_new_code.ec_in_up_imgs_id.value; 422 431 } 423 ec_new_user_text = ec_JS_message['ec_up_code_lbl_home'] + '_' + t; 424 break; 425 } 426 ec_flag1 = true; 427 ec_mark_user('ec_sel_user_new'); 428 ec_flag1 = false; 429 return true; 432 break; 433 case 'ec_input_action_home': // Home 434 t = ec_gen_txt('3'); 435 if (t == '') { 436 alert("Failed :\n" + ec_err); 437 ec_new_psd_text = 'Failed...'; 438 return false; 439 } 440 ec_new_user_text = ec_JS_message['ec_up_code_lbl_home'] + '_' + t; 441 break; 442 } 443 if (ec_selected_old_group) ec_new_grp_text = 'EC_' + ec_new_user_text; 444 ec_flag1 = true; 445 ec_mark_user('ec_sel_user_new'); 446 ec_flag1 = false; 447 return ec_check_user_text(); 448 } 430 449 } 431 450 } 432 451 433 452 function ec_gen_full_auto() { 453 ec_selected_old_group = true; 434 454 if (ec_gen_user()) ec_gen_code(); 435 455 } … … 449 469 } 450 470 471 function ec_check_user_text() { 472 if (ec_check_exist_innerHTML('ec_in_up_usr_list_id', ec_new_user_text)) { 473 alert(ec_JS_message['ec_user_already_exists']); 474 ec_new_user_text = ''; 475 ec_mark_user('ec_sel_user_new'); 476 return false; 477 } 478 } 479 451 480 function ec_check_pwd_text() { 452 de('ec_in_up_pwd_warn').innerHTML =(481 if ( 453 482 de('ec_in_up_psd_txt_id').value == ec_old_new_psd_text 454 483 && ec_old_new_psd_text != '' 455 484 && ec_selected_user == 'ec_sel_user_new' 456 ) ? ec_JS_message['ec_new_pwd_gen'] : ''; 457 } 458 459 function ec_check_code_text() { 460 var t = de('ec_in_up_code_id').value; 461 var treg = /^[a-zA-Z0-9_-]{4,32}$/ 462 if (t == '' || treg.test(t) || t == NULL) { 485 ) { 486 de('ec_in_up_pwd_warn1').innerHTML = ec_JS_message['ec_new_pwd_gen1']; 487 de('ec_in_up_pwd_warn2').innerHTML = ec_JS_message['ec_new_pwd_gen2']; 488 } 489 else { 490 de('ec_in_up_pwd_warn1').innerHTML = ''; 491 de('ec_in_up_pwd_warn2').innerHTML = ''; 492 } 493 } 494 495 function ec_check_grp_text() { 496 if (ec_chk_over_grp) { 497 de('ec_in_up_newgroup_id').checked = 498 (de('ec_in_up_newgroup_id').checked == '') ? 'checked' : ''; 499 ec_chk_over_grp = false; 500 } 501 ec_selected_old_group = (de('ec_in_up_newgroup_id').checked != ''); 502 } 503 504 function ec_check_code_text(t) { 505 var treg = /^[a-zA-Z0-9_-]{4,32}$/; 506 if (ec_check_exist_innerHTML('ec_in_up_code_list_id', t)) { 507 alert(ec_JS_message['ec_code_already_exists']); 508 ec_new_code_text = ''; 509 de('ec_in_up_code_id').value = ''; 510 return false; 511 } 512 else if (t == '' || treg.test(t) || t == NULL) { 463 513 ec_new_code_text = t; 514 return true; 464 515 } 465 516 else { … … 467 518 ec_new_code_text = ''; 468 519 de('ec_in_up_code_id').value = ''; 520 return false; 469 521 } 470 522 } … … 496 548 !t1 && (( 497 549 de('ec_input_action_add_p').checked != '' && 498 d.ec_new_code.ec_in_up_aps.selectedIndex < 1550 d.ec_new_code.ec_in_up_aps.selectedIndex == '-1' 499 551 ) || ( 500 552 de('ec_input_action_add_p').checked == '' && … … 506 558 return false; 507 559 } 508 if (de('ec_in_up_entry_list_id').selectedIndex == 0) {560 if (de('ec_in_up_entry_list_id').selectedIndex == '-1') { 509 561 alert(ec_JS_message['ec_act_entry_miss']); 510 562 return false; … … 527 579 } 528 580 if ( 529 d.ec_new_code.ec_in_up_aps.selectedIndex < 1&&530 d.ec_new_code.ec_in_up_cat.selectedIndex < 1&& (581 d.ec_new_code.ec_in_up_aps.selectedIndex == '-1' && 582 d.ec_new_code.ec_in_up_cat.selectedIndex == '-1' && ( 531 583 de('ec_in_up_imgs_id').value == '' || ( 532 584 de('ec_in_up_imgs_id').value != '' && ( 533 585 isNaN(de('ec_in_up_imgs_id').value) || 534 d.ec_new_code.ec_in_up_cat.selectedIndex < 1586 d.ec_new_code.ec_in_up_cat.selectedIndex == '-1' 535 587 ) 536 588 ) … … 549 601 550 602 function ec_change_user_list(ec_id) { 551 ec_selected_old_user2 = ec_selected_old_user;603 // ec_selected_old_user2 = ec_selected_old_user; 552 604 ec_selected_old_user = ec_id; 553 605 ec_mark_user('ec_sel_user_old'); … … 555 607 556 608 function ec_change_code_list(ec_id) { 557 ec_selected_old_code2 = ec_selected_old_code;609 // ec_selected_old_code2 = ec_selected_old_code; 558 610 ec_selected_old_code = ec_id; 559 611 ec_mark_code('ec_sel_code_old'); … … 571 623 } 572 624 625 function ec_build_ec_lists() { 626 var t = new Array(); 627 for (var i = 0; i < ec_lists_temp.length; i++) { 628 t = ec_lists_temp[i].split(';'); 629 ec_lists['user_id'][t[0]] = t[1]; 630 ec_lists['action'][t[0]] = t[2]; 631 ec_lists['arg1'][t[0]] = t[3]; 632 ec_lists['arg2'][t[0]] = t[4]; 633 ec_lists['forced'][t[0]] = t[5]; 634 } 635 } 636 573 637 function ec_init() { 574 ec_err = ''; 575 ec_selected_action = ''; 576 ec_selected_img = ''; 577 ec_new_code_text = ''; 578 ec_new_user_text = ''; 579 ec_new_psd_text = ''; 580 ec_old_new_psd_text = ''; 581 ec_test_reg = ''; 582 ec_selected_old_user = '-1'; 583 ec_selected_old_code = '-1'; 584 ec_selected_old_code2 = '-1'; 585 ec_selected_AP = '-1'; 586 ec_selected_cat = '-1'; 587 ec_selected_old_user2 = '-1'; 588 ec_selected_user = '-1'; 589 ec_selected_code = '-1'; 638 ec_selected_old_group = false; 639 ec_new_grp_text = ''; 640 ec_err = ''; 641 ec_selected_action = ''; 642 ec_selected_img = ''; 643 ec_new_code_text = ''; 644 ec_new_user_text = ''; 645 ec_new_psd_text = ''; 646 ec_old_new_psd_text = ''; 647 ec_test_reg = ''; 648 ec_selected_old_user = '-1'; 649 ec_selected_old_code = '-1'; 650 // ec_selected_old_code2 = '-1'; 651 ec_selected_AP = '-1'; 652 ec_selected_cat = '-1'; 653 // ec_selected_old_user2 = '-1'; 654 ec_selected_user = '-1'; 655 ec_selected_code = '-1'; 590 656 de('ec_style_forced_id').innerHTML = ec_up_code_lbl_forced_txt; 591 657 de('ec_act1_id').value = ec_default_action; 658 de('ec_act2_id').value = ''; 592 659 de('ec_in_up_usr_txt_id').value = ''; 593 660 de('ec_in_up_psd_txt_id').value = ''; 594 de('ec_in_up_pwd_warn').innerHTML = ''; 661 de('ec_in_up_grp_txt_id').value = ''; 662 de('ec_in_up_newgroup_id').checked = ''; 663 de('ec_in_up_pwd_warn1').innerHTML = ''; 664 de('ec_in_up_pwd_warn2').innerHTML = ''; 595 665 de('ec_in_up_aps_id').selectedIndex = '-1'; 596 666 de('ec_in_up_cats_id').selectedIndex = '-1'; … … 625 695 de('ec_in_up_usr_txt_id').disabled = ''; 626 696 de('ec_in_up_psd_txt_id').disabled = ''; 697 de('ec_in_up_newgroup_id').disabled = ''; 698 de('ec_in_up_grp_txt_id').disabled = ''; 627 699 de('ec_sel_user_old').disabled = ''; 628 700 de('ec_in_up_usr_list_id').disabled = ''; … … 642 714 de('ec_in_up_usr_txt_id').disabled = 'disabled'; 643 715 de('ec_in_up_psd_txt_id').disabled = 'disabled'; 716 de('ec_in_up_newgroup_id').disabled = 'disabled'; 717 de('ec_in_up_grp_txt_id').disabled = 'disabled'; 644 718 de('ec_sel_user_old').disabled = 'disabled'; 645 719 de('ec_in_up_usr_list_id').disabled = 'disabled'; … … 670 744 de('ec_in_up_usr_txt_id').disabled = ''; 671 745 de('ec_in_up_psd_txt_id').disabled = ''; 672 de('ec_in_up_psd_txt_id').disabled = ''; 746 de('ec_in_up_newgroup_id').disabled = ''; 747 de('ec_in_up_grp_txt_id').disabled = ''; 673 748 de('ec_in_up_usr_list_id').disabled = ''; 674 749 de('ec_in_up_forced_id').disabled = ''; … … 690 765 de('ec_in_up_psd_txt_id').disabled = 'disabled'; 691 766 de('ec_in_up_psd_txt_id').disabled = 'disabled'; 767 de('ec_in_up_newgroup_id').disabled = 'disabled'; 768 de('ec_in_up_grp_txt_id').disabled = 'disabled'; 692 769 de('ec_in_up_usr_list_id').disabled = 'disabled'; 693 770 de('ec_in_up_forced_id').disabled = 'disabled'; … … 699 776 de('ec_in_up_usr_list_id').selectedIndex = '-1'; 700 777 de('ec_in_up_entry_list_id').value = ec_default_entry; 778 de('ec_act2_id').value = ec_default_entry; 701 779 } 702 780 ec_default_action = 'modify_entry_ask'; -
extensions/event_cats/admin/template/autolog_new.tpl
r4116 r4157 23 23 <input type = "hidden" id = "ec_act2_id" name = "ec_entry_sel" /> 24 24 25 {* <!-- Page title. Can be "New entry" or " New entry / Entry modification" whether some entries already exist or not--> *}25 {* <!-- Page title. Can be "New entry" or "Entry modification" --> *} 26 26 <div style = "text-align:center;"> 27 <span style = "font-weight:bold; font-size:120%;"> 28 {if $ec_hidden_when_no_code != ''} 29 <a href = "#ec_top" name = "ec_top" title = "{'ec_top_title'|@translate}"> 30 {/if} 31 <label for = "ec_page_type_create" {if $ec_hidden_when_no_code == ''} onclick = "ec_mark_type('create_ask');" {/if}> 32 {if $ec_hidden_when_no_code == ''} 33 <input type = "radio" id = "ec_page_type_create" {* onclick = "ec_mark_type('create_ask');" *} {if $ec_is_creation} checked = "checked" {/if} /> 34 {/if} 35 <span {if $ec_is_creation and $ec_hidden_when_no_code == ''} style = "text-decoration:underline;" {/if}>{'ec_new_entry_title'|@translate}</span> 27 <a style = "font-weight:bold; font-size:120%;" href = "#ec_top" name = "ec_top" title = "{'ec_top_title'|@translate}"> 28 <label> 29 {if $ec_is_creation} 30 {'ec_new_entry_title'|@translate} 31 {else} 32 {'ec_modify_entry_title'|@translate} 33 {/if} 36 34 </label> 37 {if $ec_hidden_when_no_code == ''} 38 <a href = "#ec_top" name = "ec_top" title = "{'ec_top_title'|@translate}"> 39 <label style = "font-weight:bold; font-size:120%;"> // </label> 40 {/if} 41 </a> 42 <label for = "ec_page_type_modify" onclick = "ec_mark_type('modify_entry_ask');" {$ec_hidden_when_no_code}> 43 <input type = "radio" id = "ec_page_type_modify" {* onclick = "ec_mark_type('modify_entry_ask');" *} {if !$ec_is_creation} checked = "checked" {/if} /> 44 <span {if !$ec_is_creation} style = "text-decoration:underline;" {/if}>{'ec_modify_entry_title'|@translate}</span> 45 </label> 46 </span> 35 </a> 47 36 {if $ec_is_creation} 48 37 <br><br> … … 97 86 <ul><li> 98 87 <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40" 99 id = "ec_in_up_code_id" onblur = "ec_check_code_text( );"88 id = "ec_in_up_code_id" onblur = "ec_check_code_text(this.value);" 100 89 /> 101 90 </li></ul> … … 160 149 <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'ec_new_user_name'|@translate}<br> 161 150 <input type = "text" name = "ec_in_up_usr_txt" id = "ec_in_up_usr_txt_id" maxlength = "32" 162 size = "20" onblur = "ec_new_user_text = this.value; "151 size = "20" onblur = "ec_new_user_text = this.value; ec_check_user_text();" 163 152 /> 164 153 </label> … … 168 157 /> 169 158 </label> 170 <label class = "ec_block"> <br> 171 <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn"> </span> 172 </label> 173 159 <label class = "ec_block" onclick = "ec_check_grp_text(); return ec_mark_user('ec_sel_user_new');" for = "ec_in_up_grp_txt_id"> 160 <input type = "checkbox" name = "ec_in_up_newgroup" id = "ec_in_up_newgroup_id" 161 onchange = "ec_selected_old_group = (this.checked != '');" 162 /> 163 <span onMouseover = "ec_chk_over_grp = true;" onMouseout = "ec_chk_over_grp = false;"> 164 {'ec_new_user_group'|@translate} 165 </span><br> 166 <input type = "text" name = "ec_in_up_grp_txt" id = "ec_in_up_grp_txt_id" maxlength = "32" 167 size = "20" onblur = "ec_new_grp_text = this.value; if (this.value != '') ec_selected_old_group = true;" 168 /> 169 </label> 170 <label class = "ec_block"><span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn1"> </span><br> 171 <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn2"> </span> 172 </label> 174 173 </li></ul><br> 175 174 </li> … … 212 211 </label> 213 212 214 {* <!-- Category --> *} 215 <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "return ec_mark_action('ec_input_action_cat');"> 213 {* <!-- Category, provided at least one category is available --> *} 214 <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "return ec_mark_action('ec_input_action_cat');" 215 {if count($ec_lists.categories) == 0} style = "display:none;" {/if} 216 > 216 217 <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat" for = "ec_in_up_cats_id" 217 218 onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;" … … 223 224 </label> 224 225 225 {* <!-- Image --> *} 226 <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "return ec_mark_action('ec_input_action_img');"> 226 {* <!-- Image, provided at least one category is available and at least one image is associated to one category --> *} 227 <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "return ec_mark_action('ec_input_action_img');" 228 {if $ec_no_assoc or count($ec_lists.categories) == 0} style = "display:none;" {/if} 229 > 227 230 <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img" for = "ec_in_up_imgs_id" /> 228 231 {'ec_up_code_lbl_img'|@translate}<br> … … 263 266 ec_JS_message['ec_act_cat_miss'] = "{'ec_act_cat_miss'|@translate|@escape:javascript}"; 264 267 ec_JS_message['ec_act_img_miss'] = "{'ec_act_img_miss'|@translate|@escape:javascript}"; 265 ec_JS_message['ec_new_pwd_gen'] = "{'ec_new_pwd_gen'|@translate|@escape:javascript}"; 268 ec_JS_message['ec_new_pwd_gen1'] = "{'ec_new_pwd_gen1'|@translate|@escape:javascript}"; 269 ec_JS_message['ec_new_pwd_gen2'] = "{'ec_new_pwd_gen2'|@translate|@escape:javascript}"; 266 270 ec_JS_message['ec_act_entry_miss'] = "{'ec_act_entry_miss'|@translate|@escape:javascript}"; 267 271 ec_JS_message['ec_confirm_del_other'] = "{'ec_confirm_del_other'|@translate|@escape:javascript}"; 272 ec_JS_message['ec_user_already_exists'] = "{'ec_user_already_exists'|@translate|@escape:javascript}"; 273 ec_JS_message['ec_code_already_exists'] = "{'ec_code_already_exists'|@translate|@escape:javascript}"; 268 274 ec_JS_message['ec_up_code_lbl_home'] = "{'ec_up_code_lbl_home'|@translate}"; 269 275 ec_JS_message['ec_submit_code_miss'] = "{'ec_submit_code_miss'|@translate}"; … … 279 285 {/foreach} 280 286 {/if} 281 {foreach from=$ec_lists.ec_table item=ec_val} 282 ec_lists['user_id']['{$ec_val.id}'] = "{$ec_val.user_id}"; 283 ec_lists['action']['{$ec_val.id}'] = "{$ec_val.action}"; 284 ec_lists['arg1']['{$ec_val.id}'] = "{$ec_val.arg1}"; 285 ec_lists['arg2']['{$ec_val.id}'] = "{$ec_val.arg2}"; 286 ec_lists['forced']['{$ec_val.id}'] = "{$ec_val.forced}"; 287 {foreach from=$ec_lists.ec_table item=ec_val name=listloop} 288 ec_lists_temp[{$smarty.foreach.listloop.index}] = "{$ec_val.id};{$ec_val.user_id};{$ec_val.action};{$ec_val.arg1};{$ec_val.arg2};{$ec_val.forced}"; 287 289 {/foreach} 290 ec_build_ec_lists(); 288 291 ec_init(); 289 292 //--></script> -
extensions/event_cats/admin/template/config.tpl
r4048 r4157 13 13 ec_JS_message['ec_gen_user_act_miss'] = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}"; 14 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}";15 ec_JS_message['ec_new_pwd_gen1'] = "{'ec_new_pwd_gen1'|@translate|@escape:javascript}"; 16 16 ec_JS_message['ec_up_code_lbl_home'] = "{'ec_up_code_lbl_home'|@translate}"; 17 17 ec_init(); -
extensions/event_cats/admin/template/duplication.tpl
r4048 r4157 13 13 ec_JS_message['ec_gen_user_act_miss'] = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}"; 14 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}";15 ec_JS_message['ec_new_pwd_gen1'] = "{'ec_new_pwd_gen1'|@translate|@escape:javascript}"; 16 16 ec_JS_message['ec_up_code_lbl_home'] = "{'ec_up_code_lbl_home'|@translate}"; 17 17 ec_init(); -
extensions/event_cats/include/evntcats_funcs.inc.php
r4115 r4157 27 27 // *************************************************************************** 28 28 29 global $conf, $ec_conf; 29 // +-----------------------------------------------------------------------+ 30 // | Header | 31 // +-----------------------------------------------------------------------+ 32 33 global $conf; 30 34 31 35 include_once(EVNTCATS_PATH.'include/ec_conf.inc.php'); 36 37 // +-----------------------------------------------------------------------+ 38 // | Utilities functions | 39 // +-----------------------------------------------------------------------+ 40 41 /* 42 * is_in($haystack, $needle) 43 * returns true or false whether $needle is a string found in string $haystack 44 * 45 * @param 46 * $haystack : the string in which to search 47 * $needle : the string looked for 48 * @return 49 * true if $needle is found in $haystack ; false if not 50 */ 51 function is_in($haystack, $needle) { 52 return (strpos($haystack, $needle) !== false); 53 } 54 55 /* 56 * ec_image_exists($cat, $img) 57 * returns true or false whether the image is associated with the category. 58 * 59 * @param 60 * $cat : the category 61 * $img : the image 62 * @return 63 * treu or false whether the image is associated with the category. 64 */ 65 function ec_image_exists($cat, $img) { 66 return (mysql_fetch_row(pwg_query(' 67 SELECT * 68 FROM `'.IMAGE_CATEGORY_TABLE.'` 69 WHERE `category_id` = '.$cat.' 70 AND `image_id` = '.$img 71 )) !== false); 72 } 73 74 /* 75 * str_from_var($var) 76 * returns a string easing array var informations displaying in Piwigo : 77 * _ the string return value starts with"<p align="left">" ; 78 * _ all "TAB" characters (chr(10)) are replaced by "<br>" ; 79 * _ all spaces are replaced by " ". 80 * 81 * @param 82 * $var : variable to display 83 * @return 84 * string easy to display in Piwigo 85 */ 86 function str_from_var($var) { 87 return '<p align="left">'.str_replace(chr(10),'<br>',str_replace(' ',' ', print_r /* var_dump */ ($var,true))).'</p>'; 88 } 32 89 33 90 /* … … 100 157 101 158 /* 159 * ec_end() 160 * Process repetitive task when error in database modifying fucntions. 161 * 162 * @param 163 * $pst : $_POST argument 164 * $msg : message 165 * @return 166 * false as this function is used when there is a problem 167 */ 168 function ec_end($pst, $msg) { 169 global $page; 170 $page['errors'][] = 171 l10n($msg). 172 '$_POST[\''.$pst.'\'] = '. 173 $_POST[$pst] 174 ; 175 return false; 176 } 177 178 // +-----------------------------------------------------------------------+ 179 // | Tables building functions | 180 // +-----------------------------------------------------------------------+ 181 182 /* 102 183 * build_ec_table() 103 184 * builds a table showing the content of the <pwg>_event_cats database table, … … 239 320 240 321 /* 322 * build_ec_lists() 323 * builds the main array variable contaning all informations for the plugin 324 * 325 * @param 326 * no parameter passed, the main material on which works the function, is 327 * the global array variable $ec_lists. 328 * @return 329 * (no return value) 330 */ 331 function build_ec_lists() { 332 333 global $ec_ap_ok, $template, $ec_lists; 334 335 $ec_lists = array(); 336 337 // Construction of $ec_lists['add_pages'] array var 338 $ec_lists['add_pages'] = array(); 339 if ($ec_ap_ok) { 340 $res = pwg_query('SELECT id,title FROM '.ADD_PAGES_TABLE); 341 while ($r = mysql_fetch_assoc($res)) { 342 $c = (is_in($r['title'], '/user_id=')) ? '/user_id=' : '/group_id='; 343 $a = explode($c ,$r['title']); 344 $ec_lists['add_pages'][$r['id']] = $a[0]; 345 } 346 } 347 348 // Construction of $ec_lists['categories'] array var 349 $c = array(); 350 display_select_cat_wrapper(' 351 SELECT id,name,uppercats,global_rank 352 FROM '.CATEGORIES_TABLE, 353 $c, 'category_options', true); 354 $ec_lists['categories'] = $template->smarty->_tpl_vars['category_options']; 355 356 // Construction of $ec_lists['user_ids'] array var 357 $ec_lists['user_ids'] = array(); 358 $q = pwg_query('SELECT id,username FROM '.USERS_TABLE. ' WHERE id > 2'); 359 while ($r = mysql_fetch_assoc($q)) { 360 $ec_lists['user_ids'][$r['id']] = $r['username']; 361 } 362 363 // Construction of $ec_lists['ec_table'] array var 364 build_ec_table(); 365 } 366 367 /* 241 368 * build_ec_duplicable_codes() 242 369 * … … 270 397 } 271 398 272 /* 273 * build_ec_lists() 274 * builds the main array variable contaning all informations for the plugin 275 * 276 * @param 277 * no parameter passed, the main material on which works the function, is 278 * the global array variable $ec_lists. 279 * @return 280 * (no return value) 281 */ 282 function build_ec_lists() { 283 284 global $ec_ap_ok, $template, $ec_lists; 285 286 $ec_lists = array(); 287 288 // Construction of $ec_lists['add_pages'] array var 289 $ec_lists['add_pages'] = array(); 290 if ($ec_ap_ok) { 291 $res = pwg_query('SELECT id,title FROM '.ADD_PAGES_TABLE); 292 while ($r = mysql_fetch_assoc($res)) { 293 $c = (is_in($r['title'], '/user_id=')) ? '/user_id=' : '/group_id='; 294 $a = explode($c ,$r['title']); 295 $ec_lists['add_pages'][$r['id']] = $a[0]; 296 } 297 } 298 299 // Construction of $ec_lists['categories'] array var 300 $c = array(); 301 display_select_cat_wrapper(' 302 SELECT id,name,uppercats,global_rank 303 FROM '.CATEGORIES_TABLE, 304 $c, 'category_options', true); 305 $ec_lists['categories'] = $template->smarty->_tpl_vars['category_options']; 306 307 // Construction of $ec_lists['user_ids'] array var 308 $ec_lists['user_ids'] = array(); 309 $q = pwg_query('SELECT id,username FROM '.USERS_TABLE. ' WHERE id > 2'); 310 while ($r = mysql_fetch_assoc($q)) { 311 $ec_lists['user_ids'][$r['id']] = $r['username']; 312 } 313 314 // Construction of $ec_lists['ec_table'] array var 315 build_ec_table(); 316 } 317 318 /* 319 * is_in($haystack, $needle) 320 * returns true or false whether $needle is a string found in string $haystack 321 * 322 * @param 323 * $haystack : the string in which to search 324 * $needle : the string looked for 325 * @return 326 * true if $needle is found in $haystack ; false if not 327 */ 328 function is_in($haystack, $needle) { 329 return (strpos($haystack, $needle) !== false); 330 } 399 // +-----------------------------------------------------------------------+ 400 // | Database modifying functions | 401 // +-----------------------------------------------------------------------+ 331 402 332 403 /* … … 341 412 */ 342 413 function ec_create_entry_OK() { 343 global $page; 414 global $page, $ec_lists; 415 416 /* foreach ($ec_lists['ec_table'] as $ec_entry) { 417 if ($_POST['ec_in_up_code'] == $ec_entry['code']) 418 return ec_end('ec_in_up_code', 'ec_bad_argument2'); 419 } 420 if ($_POST['ec_sel_user'] == 'new') { 421 if (in_array( 422 $_POST['ec_in_up_usr_txt'], 423 $ec_lists['user_ids'] 424 )) return ec_end('ec_in_up_usr_txt', 'ec_bad_argument3'); 425 else { // New user account creation 426 $page['errors'] = register_user( 427 $_POST['ec_in_up_usr_txt'], $_POST['ec_in_up_psd_txt'], '', false 428 ); 429 } 430 } 431 */ 432 344 433 $page['errors'][] = 'Y\'a p\'têt\' ben eu une erreur...'; 345 return false;346 434 } 347 435 … … 365 453 switch ($_POST['ec_input_action']) { 366 454 case 'add_p': 367 if (array_key_exists($_POST['ec_in_up_aps'], 455 if (array_key_exists($_POST['ec_in_up_aps'],$ec_lists['add_pages'])) { 368 456 $arg2 = $_POST['ec_in_up_aps']; } 369 else { 370 $page['errors'][] = 371 l10n('ec_bad_argument1'). 372 '$_POST[\'ec_in_up_aps\'] = '. 373 $_POST['ec_in_up_aps'] 374 ; 375 return false; 376 } 457 else return ec_end('ec_in_up_aps', 'ec_bad_argument1'); 377 458 case 'home': 378 459 break; … … 385 466 ec_image_exists($_POST['ec_in_up_cat'], $_POST['ec_in_up_img']) 386 467 ) $arg2 = $_POST['ec_in_up_img']; 387 else { 388 $page['errors'][] = 389 l10n('ec_bad_argument1'). 390 '$_POST[\'ec_in_up_img\'] = '. 391 $_POST['ec_in_up_img'] 392 ; 393 return false; 394 } 468 else return ec_end('ec_in_up_img', 'ec_bad_argument1'); 395 469 } 396 470 $arg1 = $_POST['ec_in_up_cat']; 397 471 } 398 else { 399 $page['errors'][] = 400 l10n('ec_bad_argument1'). 401 '$_POST[\'ec_in_up_cat\'] = '. 402 $_POST['ec_in_up_cat'] 403 ; 404 return false; 405 } 472 else return ec_end('ec_in_up_cat', 'ec_bad_argument1'); 406 473 break; 407 default: 408 $page['errors'][] = 409 l10n('ec_bad_argument1'). 410 '$_POST[\'ec_input_action\'] = '. 411 $_POST['ec_input_action'] 412 ; 413 return false; 474 default: return ec_end('ec_input_action', 'ec_bad_argument1'); 414 475 } 415 476 if (pwg_query(" … … 443 504 } 444 505 } 445 else { 446 $page['errors'][] = 447 l10n('ec_bad_argument1'). 448 '$_POST[\'ec_entry_sel\'] = '. 449 $_POST['ec_entry_sel'] 450 ; 451 return false; 452 } 506 else return ec_end('ec_entry_sel', 'ec_bad_argument1'); 453 507 $page['errors'][] = '?!'; 454 508 return false; … … 469 523 $page['errors'][] = 'Y\'a pas eu une erreur ?...'; 470 524 return false; 525 } 526 527 /* 528 * ec_toggle_forced_entry() 529 * Toggles the 'forced' property of an entry, provided it complies to the 530 * rules. 531 * 532 * @param 533 * no param 534 * @return 535 * no return value 536 */ 537 function ec_toggle_forced_entry() { 538 global $page; 539 $page['errors'][] = 'ec_toggle_forced_entry'; 471 540 } 472 541 … … 503 572 } 504 573 } 505 else { 506 $page['errors'][] = 507 l10n('ec_bad_argument1'). 508 '$_POST[\'ec_entry_sel\'] = '. 509 $_POST['ec_entry_sel'] 510 ; 511 } 512 } 513 514 /* 515 * ec_image_exists($cat, $img) 516 * returns true or false whether the image is associated with the category. 517 * 518 * @param 519 * $cat : the category 520 * $img : the image 521 * @return 522 * treu or false whether the image is associated with the category. 523 */ 524 function ec_image_exists($cat, $img) { 525 return (mysql_fetch_row(pwg_query(' 526 SELECT * 527 FROM `'.IMAGE_CATEGORY_TABLE.'` 528 WHERE `category_id` = '.$cat.' 529 AND `image_id` = '.$img 530 )) !== false); 531 } 532 533 /* 534 * str_from_var($var) 535 * returns a string easing array var informations displaying in Piwigo : 536 * _ the string return value starts with"<p align="left">" ; 537 * _ all "TAB" characters (chr(10)) are replaced by "<br>" ; 538 * _ all spaces are replaced by " ". 539 * 540 * @param 541 * $var : variable to display 542 * @return 543 * string easy to display in Piwigo 544 */ 545 function str_from_var($var) { 546 return '<p align="left">'.str_replace(chr(10),'<br>',str_replace(' ',' ', print_r /* var_dump */ ($var,true))).'</p>'; 574 else ec_end('ec_entry_sel', 'ec_bad_argument1'); 547 575 } 548 576 -
extensions/event_cats/language/fr_FR/plugin.lang.php
r4115 r4157 10 10 // Upper banner 11 11 $lang['ec_tab_autoid_entries'] = 'Entrées autolog'; 12 $lang['ec_tab_autoid_ new1'] = 'Création autolog';13 $lang['ec_tab_autoid_new 2'] = 'Création/modification autolog';12 $lang['ec_tab_autoid_modif'] = 'Modification autolog'; 13 $lang['ec_tab_autoid_new'] = 'Création autolog'; 14 14 $lang['ec_tab_config'] = 'Configuration générale'; 15 15 $lang['ec_tab_duplication'] = 'Duplication'; … … 46 46 // New entry 47 47 $lang['ec_create_modify_code'] = 'Nouvelle entrée'; 48 $lang['ec_new_full_auto'] = 'Tout automatique : nouveau code et nouvel utilisateurd\'après page à afficher ci-dessous';48 $lang['ec_new_full_auto'] = 'Tout automatique : nouveau code, nouvel utilisateur et nouveau groupe d\'après page à afficher ci-dessous'; 49 49 $lang['ec_new_entry'] = 'Code'; 50 50 $lang['ec_up_code_lbl_code_new'] = 'Nouveau code :'; … … 61 61 $lang['ec_new_user_name'] = 'Nom d\'utilisateur'; 62 62 $lang['ec_new_user_pswd'] = 'Mot de passe'; 63 $lang['ec_new_user_group'] = 'Nouveau groupe'; 63 64 $lang['ec_up_code_lbl_gen_user'] = 'Générer un nom d\'utilisateur d\'après l\'action choisie'; 64 65 $lang['ec_up_code_lbl_user_old'] = 'Utilisateur existant :'; … … 78 79 $lang['ec_act_cat_miss'] = 'Catégorie ?'; 79 80 $lang['ec_act_img_miss'] = 'L\'identifiant d\'une image doit être un nombre.'; 80 $lang['ec_new_pwd_gen'] = 'Pensez à NOTER le mot de passe !'; 81 $lang['ec_new_pwd_gen1'] = 'Pensez à NOTER'; 82 $lang['ec_new_pwd_gen2'] = 'le mot de passe !'; 81 83 $lang['ec_submit_code_miss'] = 'Vous devez fournir un code.'; 82 84 $lang['ec_submit_code_bad'] = 'Un code doit comprendre entre 4 et 32 caractères inclus dans [a-zA-Z0-9_-].'; … … 85 87 $lang['ec_act_entry_miss'] = 'Sélectionnez d\'abord une entrée à modifier.'; 86 88 $lang['ec_clk_entry_miss'] = 'Sélectionnez d\'abord une entrée.'; 89 $lang['ec_code_already_exists'] = 'Ce code existe déjà.'; 90 $lang['ec_user_already_exists'] = 'Ce nom d\'utilisateur existe déjà.'; 87 91 88 92 // In PHP files … … 106 110 $lang['ec_entry_dis_nok_end3'] = ' (arg1 = NULL)'; 107 111 $lang['ec_bad_argument1'] = 'Mauvais argument : '; 112 $lang['ec_bad_argument2'] = 'Code déjà existant : '; 113 $lang['ec_bad_argument3'] = 'Utilisateur déjà existant : '; 108 114 // Infos 109 115 $lang['ec_entry_del_ok_pre'] = 'Entrée '; -
extensions/event_cats/main.inc.php
r4092 r4157 140 140 if (array_key_exists($ec_cat, $ec_lists['categories'])) { 141 141 if (isset($ec_img)) { 142 if (mysql_fetch_row(pwg_query(' 143 SELECT * 144 FROM `'.IMAGE_CATEGORY_TABLE.'` 145 WHERE `category_id` = '.$ec_cat.' 146 AND `image_id` = '.$ec_img 147 ))) { 142 if (ec_image_exists($ec_cat, $ec_img)) { 148 143 redirect(PHPWG_ROOT_PATH.'picture.php?/'.$ec_img.'/category/'.$ec_cat); 149 144 }
Note: See TracChangeset
for help on using the changeset viewer.