ldap_form_add_users_group.php 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php //$id: $
  2. /*
  3. ==============================================================================
  4. Dokeos - elearning and course management software
  5. Copyright (c) 2008 Dokeos SPRL
  6. Copyright (c) 2007 Mustapha Alouani (supervised by Michel Moreau-Belliard)
  7. For a full list of contributors, see "credits.txt".
  8. The full license can be read in "license.txt".
  9. This program is free software; you can redistribute it and/or
  10. modify it under the terms of the GNU General Public License
  11. as published by the Free Software Foundation; either version 2
  12. of the License, or (at your option) any later version.
  13. See the GNU General Public License for more details.
  14. Contact: Dokeos, rue du Corbeau, 108, B-1030 Brussels, Belgium, info@dokeos.com
  15. ==============================================================================
  16. */
  17. /**
  18. * This form is included by ldap_import_students.php and ldap_import_students_to_session.php
  19. */
  20. $nbre=0;
  21. echo '<form name="form" method="post" action="'.api_get_self().'?annee='.Security::remove_XSS($annee).'">';
  22. if($statut==1)
  23. {
  24. echo get_lang('EmailNotifySubscription').': <input type="checkbox" name="mailling" value="1" checked="checked"><i>'.get_lang('DontUnchek').'</i>';
  25. }
  26. else
  27. {
  28. echo '<input type="hidden" name="mailling" value="1">';
  29. }
  30. if(!empty($course))
  31. {
  32. echo '<input type="hidden" name="course" value="'.Security::remove_XSS($course).'">';
  33. }
  34. elseif(!empty($id_session))
  35. {
  36. echo '<input type="hidden" name="id_session" value="'.Security::remove_XSS($id_session).'">';
  37. }
  38. $is_western_name_order = api_is_western_name_order();
  39. echo '<input type="hidden" name="confirmed" value="yes">';
  40. echo '<table border="0" cellspacing="0" width="100%">';
  41. echo '<tr align="center" id="header3">' .
  42. '<td width="15%"><input type="button" value="'.get_lang('AllSlashNone').'" onClick="checkAll();"></td>' .
  43. '<td width="40%"><b>'.get_lang('Email').'</b></td>' .
  44. ($is_western_name_order
  45. ? '<td width="15%"><b>'.get_lang('FirstName').'</b></td>' .
  46. '<td width="15%"><b>'.get_lang('Name').'</b></td>'
  47. : '<td width="15%"><b>'.get_lang('Name').'</b></td>' .
  48. '<td width="15%"><b>'.get_lang('FirstName').'</b></td>') .
  49. '<td width="15%"><b>'.get_lang('Login').'</b></td>' .
  50. '</tr>'."\n";
  51. while (list ($key, $val) = each($nom_form)) {
  52. $nbre=$nbre+1;
  53. if($nbre & 1) $ndiv=2; else $ndiv=3;
  54. echo '<tr align="center" id="header'.$ndiv.'">';
  55. echo '<td><input type="checkbox" name="checkboxes[]" value="'.$key.'" checked="checked"></td>';
  56. echo '<td>'.$email_form[$key].'<input type="hidden" name="email_form['.$key.']" size="40" value="'.$email_form[$key].'"></td>';
  57. if ($is_western_name_order)
  58. {
  59. echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
  60. echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
  61. }
  62. else
  63. {
  64. echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
  65. echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
  66. }
  67. echo '<td>'.$username_form[$key].'<input type="hidden" name="username_form['.$key.']" size="10" value="'.$username_form[$key].'">';
  68. echo '<input type="hidden" name="tutor_form['.$key.']" value="0">';
  69. echo '<input type="hidden" name="admin_form['.$key.']" value="1">';
  70. echo '<input type="hidden" name="password_form['.$key.']" value="'.$password_form[$key].'">';
  71. echo '<input type="hidden" name="statut['.$key.']" value="'.$statut.'">';
  72. echo '</td>';
  73. echo '</tr>';
  74. }
  75. echo '</table>';
  76. echo '<br />';
  77. echo '<br />';
  78. echo '<input type="submit" name="submit" value="'.get_lang('Submit').'">';
  79. echo '</form>';
  80. ?>