ldap_form_add_users_group.php 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php //$id: $
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Form to add users through LDAP (deprecated?)
  5. * @package chamilo.admin
  6. * Copyright (c) 2007 Mustapha Alouani (supervised by Michel Moreau-Belliard)
  7. */
  8. /**
  9. * This form is included by ldap_import_students.php and ldap_import_students_to_session.php
  10. */
  11. $nbre=0;
  12. echo '<form name="form" method="post" action="'.api_get_self().'?annee='.Security::remove_XSS($annee).'">';
  13. if($statut==1)
  14. {
  15. echo get_lang('EmailNotifySubscription').': <input type="checkbox" name="mailling" value="1" checked="checked"><i>'.get_lang('DontUnchek').'</i>';
  16. }
  17. else
  18. {
  19. echo '<input type="hidden" name="mailling" value="1">';
  20. }
  21. if(!empty($course))
  22. {
  23. echo '<input type="hidden" name="course" value="'.Security::remove_XSS($course).'">';
  24. }
  25. elseif(!empty($id_session))
  26. {
  27. echo '<input type="hidden" name="id_session" value="'.Security::remove_XSS($id_session).'">';
  28. }
  29. $is_western_name_order = api_is_western_name_order();
  30. echo '<input type="hidden" name="confirmed" value="yes">';
  31. echo '<table border="0" cellspacing="0" width="100%">';
  32. echo '<tr align="center" id="header3">' .
  33. '<td width="15%"><input type="button" value="'.get_lang('AllSlashNone').'" onClick="checkAll();"></td>' .
  34. '<td width="40%"><b>'.get_lang('Email').'</b></td>' .
  35. ($is_western_name_order
  36. ? '<td width="15%"><b>'.get_lang('FirstName').'</b></td>' .
  37. '<td width="15%"><b>'.get_lang('Name').'</b></td>'
  38. : '<td width="15%"><b>'.get_lang('Name').'</b></td>' .
  39. '<td width="15%"><b>'.get_lang('FirstName').'</b></td>') .
  40. '<td width="15%"><b>'.get_lang('Login').'</b></td>' .
  41. '</tr>'."\n";
  42. while (list ($key, $val) = each($nom_form)) {
  43. $nbre=$nbre+1;
  44. if($nbre & 1) $ndiv=2; else $ndiv=3;
  45. echo '<tr align="center" id="header'.$ndiv.'">';
  46. echo '<td><input type="checkbox" name="checkboxes[]" value="'.$key.'" checked="checked"></td>';
  47. echo '<td>'.$email_form[$key].'<input type="hidden" name="email_form['.$key.']" size="40" value="'.$email_form[$key].'"></td>';
  48. if ($is_western_name_order)
  49. {
  50. echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
  51. echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
  52. }
  53. else
  54. {
  55. echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
  56. echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
  57. }
  58. echo '<td>'.$username_form[$key].'<input type="hidden" name="username_form['.$key.']" size="10" value="'.$username_form[$key].'">';
  59. echo '<input type="hidden" name="tutor_form['.$key.']" value="0">';
  60. echo '<input type="hidden" name="admin_form['.$key.']" value="1">';
  61. echo '<input type="hidden" name="password_form['.$key.']" value="'.$password_form[$key].'">';
  62. echo '<input type="hidden" name="statut['.$key.']" value="'.$statut.'">';
  63. echo '</td>';
  64. echo '</tr>';
  65. }
  66. echo '</table>';
  67. echo '<br />';
  68. echo '<br />';
  69. echo '<input type="submit" name="submit" value="'.get_lang('Submit').'">';
  70. echo '</form>';
  71. ?>