ldap_users_synchro.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. ==============================================================================
  19. * @package dokeos.admin
  20. ==============================================================================
  21. */
  22. // name of the language file that needs to be included
  23. $language_file='admin';
  24. $cidReset=true;
  25. require('../inc/global.inc.php');
  26. $libpath = api_get_path(LIBRARY_PATH);
  27. require_once($libpath.'formvalidator/FormValidator.class.php');
  28. require_once($libpath.'usermanager.lib.php');
  29. require("../auth/ldap/authldap.php");
  30. $annee_base=date('Y');
  31. // setting the section (for the tabs)
  32. $this_section = SECTION_PLATFORM_ADMIN;
  33. api_protect_admin_script();
  34. // setting breadcrumbs
  35. $interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin'));
  36. $interbreadcrumb[]=array('url' => api_get_self(),"name" => get_lang('SessionsList'));
  37. // Database Table Definitions
  38. $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
  39. $tbl_session_rel_class = Database::get_main_table(TABLE_MAIN_SESSION_CLASS);
  40. $tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
  41. $tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
  42. $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
  43. $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
  44. $tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);
  45. $tbl_class = Database::get_main_table(TABLE_MAIN_CLASS);
  46. $tbl_class_user = Database::get_main_table(TABLE_MAIN_CLASS_USER);
  47. $tbl_session_rel_etape = "session_rel_etape";
  48. $id_session=intval($_GET['id_session']);
  49. $formSent=0;
  50. $errorMsg=$firstLetterUser=$firstLetterSession='';
  51. $UserList=$SessionList=array();
  52. $users=$sessions=array();
  53. $noPHP_SELF=true;
  54. $page=intval($_GET['page']);
  55. $action=$_REQUEST['action'];
  56. $tool_name = get_lang('Synchro LDAP : Import Etudiants/Etapes dans session');
  57. Display::display_header($tool_name);
  58. //api_display_tool_title($tool_name);
  59. ?>
  60. <form method="get" action="<?php echo api_get_self(); ?>" onsubmit="javascript:if(!confirm('<?php echo get_lang('ConfirmYourChoice'); ?>')) return false;">
  61. <select name="action">
  62. <option value="synchro"><?php echo get_lang('Synchro LDAP : Import Etudiants/Etapes dans toutes les sessions'); ?></option>
  63. </select>
  64. <input type="submit" value="<?php echo get_lang('Ok'); ?>">
  65. </form>
  66. <?php
  67. if (isset($action) && ($action=="synchro")) {
  68. $included=true;
  69. require('ldap_synchro.php');
  70. Display :: display_normal_message($message,false);
  71. }
  72. Display::display_footer();
  73. ?>