ldap_users_synchro.php 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php //$id: $
  2. exit(); //not yet functional, needs to be revised
  3. /*
  4. ==============================================================================
  5. Dokeos - elearning and course management software
  6. Copyright (c) 2008 Dokeos SPRL
  7. Copyright (c) 2007 Mustapha Alouani (supervised by Michel Moreau-Belliard)
  8. For a full list of contributors, see "credits.txt".
  9. The full license can be read in "license.txt".
  10. This program is free software; you can redistribute it and/or
  11. modify it under the terms of the GNU General Public License
  12. as published by the Free Software Foundation; either version 2
  13. of the License, or (at your option) any later version.
  14. See the GNU General Public License for more details.
  15. Contact: Dokeos, rue du Corbeau, 108, B-1030 Brussels, Belgium, info@dokeos.com
  16. ==============================================================================
  17. */
  18. /**
  19. ==============================================================================
  20. * @package dokeos.admin
  21. ==============================================================================
  22. */
  23. // name of the language file that needs to be included
  24. $language_file='admin';
  25. $cidReset=true;
  26. require('../inc/global.inc.php');
  27. $libpath = api_get_path(LIBRARY_PATH);
  28. require_once($libpath.'formvalidator/FormValidator.class.php');
  29. require_once($libpath.'usermanager.lib.php');
  30. require("../auth/ldap/authldap.php");
  31. $annee_base=date('Y');
  32. // setting the section (for the tabs)
  33. $this_section = SECTION_PLATFORM_ADMIN;
  34. api_protect_admin_script();
  35. // setting breadcrumbs
  36. $interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin'));
  37. $interbreadcrumb[]=array('url' => api_get_self(),"name" => get_lang('SessionsList'));
  38. // Database Table Definitions
  39. $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
  40. $tbl_session_rel_class = Database::get_main_table(TABLE_MAIN_SESSION_CLASS);
  41. $tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
  42. $tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
  43. $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
  44. $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
  45. $tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);
  46. $tbl_class = Database::get_main_table(TABLE_MAIN_CLASS);
  47. $tbl_class_user = Database::get_main_table(TABLE_MAIN_CLASS_USER);
  48. $tbl_session_rel_etape = "session_rel_etape";
  49. $id_session=intval($_GET['id_session']);
  50. $formSent=0;
  51. $errorMsg=$firstLetterUser=$firstLetterSession='';
  52. $UserList=$SessionList=array();
  53. $users=$sessions=array();
  54. $noPHP_SELF=true;
  55. $page=intval($_GET['page']);
  56. $action=$_REQUEST['action'];
  57. $tool_name = get_lang('Synchro LDAP : Import Etudiants/Etapes dans session');
  58. Display::display_header($tool_name);
  59. //api_display_tool_title($tool_name);
  60. ?>
  61. <form method="get" action="<?php echo api_get_self(); ?>" onsubmit="javascript:if(!confirm('<?php echo get_lang('ConfirmYourChoice'); ?>')) return false;">
  62. <select name="action">
  63. <option value="synchro"><?php echo get_lang('Synchro LDAP : Import Etudiants/Etapes dans toutes les sessions'); ?></option>
  64. </select>
  65. <input type="submit" value="<?php echo get_lang('Ok'); ?>">
  66. </form>
  67. <?php
  68. if (isset($action) && ($action=="synchro")) {
  69. $included=true;
  70. require('ldap_synchro.php');
  71. Display :: display_normal_message($message,false);
  72. }
  73. Display::display_footer();
  74. ?>