@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $add_type = 'unique'; |
39 | 39 | |
40 | 40 | if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') { |
41 | - $add_type = Security::remove_XSS($_REQUEST['add_type']); |
|
41 | + $add_type = Security::remove_XSS($_REQUEST['add_type']); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | $page = isset($_GET['page']) ? Security::remove_XSS($_GET['page']) : null; |
@@ -426,8 +426,8 @@ discard block |
||
426 | 426 | |
427 | 427 | if ($use_extra_fields) { |
428 | 428 | $final_result = array(); |
429 | - if (count($extra_field_result)>1) { |
|
430 | - for($i=0;$i<count($extra_field_result)-1;$i++) { |
|
429 | + if (count($extra_field_result)>1) { |
|
430 | + for($i=0;$i<count($extra_field_result)-1;$i++) { |
|
431 | 431 | if (is_array($extra_field_result[$i+1])) { |
432 | 432 | $final_result = array_intersect($extra_field_result[$i],$extra_field_result[$i+1]); |
433 | 433 | } |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | 'official_code' => $user['official_code'] |
504 | 504 | ) ; |
505 | 505 | unset($users[$uid]); |
506 | - } |
|
506 | + } |
|
507 | 507 | } |
508 | 508 | unset($users); //clean to free memory |
509 | 509 | |
@@ -547,12 +547,12 @@ discard block |
||
547 | 547 | } |
548 | 548 | |
549 | 549 | if ($add_type == 'multiple') { |
550 | - $link_add_type_unique = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.$addProcess.'&add_type=unique">'. |
|
550 | + $link_add_type_unique = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.$addProcess.'&add_type=unique">'. |
|
551 | 551 | Display::return_icon('single.gif').get_lang('SessionAddTypeUnique').'</a>'; |
552 | - $link_add_type_multiple = Display::url(Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple'), ''); |
|
552 | + $link_add_type_multiple = Display::url(Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple'), ''); |
|
553 | 553 | } else { |
554 | - $link_add_type_unique = Display::url(Display::return_icon('single.gif').get_lang('SessionAddTypeUnique'), ''); |
|
555 | - $link_add_type_multiple = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.$addProcess.'&add_type=multiple">'.Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>'; |
|
554 | + $link_add_type_unique = Display::url(Display::return_icon('single.gif').get_lang('SessionAddTypeUnique'), ''); |
|
555 | + $link_add_type_multiple = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.$addProcess.'&add_type=multiple">'.Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>'; |
|
556 | 556 | } |
557 | 557 | $link_add_group = Display::url( |
558 | 558 | Display::return_icon('multiple.gif',get_lang('RegistrationByUsersGroups')).get_lang('RegistrationByUsersGroups'), |
@@ -580,17 +580,17 @@ discard block |
||
580 | 580 | <?php echo '<legend>'.$tool_name.' ('.$session_info['name'].') </legend>'; ?> |
581 | 581 | <?php |
582 | 582 | if ($add_type=='multiple') { |
583 | - if (is_array($extra_field_list)) { |
|
584 | - if (is_array($new_field_list) && count($new_field_list)>0 ) { |
|
585 | - echo '<h3>'.get_lang('FilterUsers').'</h3>'; |
|
586 | - foreach ($new_field_list as $new_field) { |
|
587 | - echo $new_field['name']; |
|
588 | - $varname = 'field_'.$new_field['variable']; |
|
583 | + if (is_array($extra_field_list)) { |
|
584 | + if (is_array($new_field_list) && count($new_field_list)>0 ) { |
|
585 | + echo '<h3>'.get_lang('FilterUsers').'</h3>'; |
|
586 | + foreach ($new_field_list as $new_field) { |
|
587 | + echo $new_field['name']; |
|
588 | + $varname = 'field_'.$new_field['variable']; |
|
589 | 589 | $fieldtype = $new_field['type']; |
590 | - echo ' <select name="'.$varname.'">'; |
|
591 | - echo '<option value="0">--'.get_lang('Select').'--</option>'; |
|
592 | - foreach ($new_field['data'] as $option) { |
|
593 | - $checked=''; |
|
590 | + echo ' <select name="'.$varname.'">'; |
|
591 | + echo '<option value="0">--'.get_lang('Select').'--</option>'; |
|
592 | + foreach ($new_field['data'] as $option) { |
|
593 | + $checked=''; |
|
594 | 594 | if ($fieldtype == ExtraField::FIELD_TYPE_TAG) { |
595 | 595 | if (isset($_POST[$varname])) { |
596 | 596 | if ($_POST[$varname] == $option['tag']) { |
@@ -611,11 +611,11 @@ discard block |
||
611 | 611 | $extraHidden = $fieldtype == ExtraField::FIELD_TYPE_TAG ? '<input type="hidden" name="field_id" value="'.$option['field_id'].'" />' : ''; |
612 | 612 | echo $extraHidden; |
613 | 613 | echo ' '; |
614 | - } |
|
615 | - echo '<input type="button" value="'.get_lang('Filter').'" onclick="validate_filter()" />'; |
|
616 | - echo '<br /><br />'; |
|
617 | - } |
|
618 | - } |
|
614 | + } |
|
615 | + echo '<input type="button" value="'.get_lang('Filter').'" onclick="validate_filter()" />'; |
|
616 | + echo '<br /><br />'; |
|
617 | + } |
|
618 | + } |
|
619 | 619 | } |
620 | 620 | ?> |
621 | 621 | <input type="hidden" name="form_sent" value="1" /> |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | |
624 | 624 | <?php |
625 | 625 | if (!empty($errorMsg)) { |
626 | - Display::display_normal_message($errorMsg); //main API |
|
626 | + Display::display_normal_message($errorMsg); //main API |
|
627 | 627 | } |
628 | 628 | ?> |
629 | 629 | <div id="multiple-add-session" class="row"> |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | <label><?php echo get_lang('UserListInPlatform') ?> </label> |
633 | 633 | <?php |
634 | 634 | if (!($add_type=='multiple')) { |
635 | - ?> |
|
635 | + ?> |
|
636 | 636 | <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" class="form-control" /> |
637 | 637 | <div id="ajax_list_users_single" class="select-list-ajax"></div> |
638 | 638 | <?php |
@@ -641,21 +641,21 @@ discard block |
||
641 | 641 | <div id="ajax_list_users_multiple"> |
642 | 642 | <select id="origin_users" name="nosessionUsersList[]" multiple="multiple" size="15" class="form-control"> |
643 | 643 | <?php |
644 | - foreach ($nosessionUsersList as $uid => $enreg) { |
|
645 | - ?> |
|
644 | + foreach ($nosessionUsersList as $uid => $enreg) { |
|
645 | + ?> |
|
646 | 646 | <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) echo 'selected="selected"'; ?>> |
647 | 647 | <?php |
648 | - $personName = api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].') '.$enreg['official_code']; |
|
649 | - if ($showOfficialCode) { |
|
650 | - $officialCode = !empty($enreg['official_code']) ? $enreg['official_code'].' - ' : '? - '; |
|
651 | - $personName = $officialCode.api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].')'; |
|
652 | - } |
|
653 | - echo $personName; |
|
654 | - ?> |
|
648 | + $personName = api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].') '.$enreg['official_code']; |
|
649 | + if ($showOfficialCode) { |
|
650 | + $officialCode = !empty($enreg['official_code']) ? $enreg['official_code'].' - ' : '? - '; |
|
651 | + $personName = $officialCode.api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].')'; |
|
652 | + } |
|
653 | + echo $personName; |
|
654 | + ?> |
|
655 | 655 | </option> |
656 | 656 | <?php |
657 | - } |
|
658 | - ?> |
|
657 | + } |
|
658 | + ?> |
|
659 | 659 | </select> |
660 | 660 | </div> |
661 | 661 | <input type="checkbox" onchange="checked_in_no_session(this.checked);" name="user_with_any_session" id="user_with_any_session_id"> |
@@ -663,7 +663,7 @@ discard block |
||
663 | 663 | <?php |
664 | 664 | } |
665 | 665 | unset($nosessionUsersList); |
666 | - ?> |
|
666 | + ?> |
|
667 | 667 | </div> |
668 | 668 | </div> |
669 | 669 | |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | <?php |
708 | 708 | } |
709 | 709 | if (!empty($addProcess)) { |
710 | - echo '<button class="btn btn-success" type="button" value="" onclick="valide()" >'.get_lang('FinishSessionCreation').'</button>'; |
|
710 | + echo '<button class="btn btn-success" type="button" value="" onclick="valide()" >'.get_lang('FinishSessionCreation').'</button>'; |
|
711 | 711 | } else { |
712 | 712 | echo '<button class="btn btn-success" type="button" value="" onclick="valide()" >'.get_lang('SubscribeUsersToSession').'</button>'; |
713 | 713 | } |