ldap_users_synchro.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * @package chamilo.admin
  5. */
  6. /**
  7. * Code.
  8. */
  9. exit(); //not yet functional, needs to be revised
  10. $cidReset = true;
  11. require '../inc/global.inc.php';
  12. $libpath = api_get_path(LIBRARY_PATH);
  13. require "../auth/ldap/authldap.php";
  14. $annee_base = date('Y');
  15. // setting the section (for the tabs)
  16. $this_section = SECTION_PLATFORM_ADMIN;
  17. api_protect_admin_script();
  18. // setting breadcrumbs
  19. $interbreadcrumb[] = ['url' => 'index.php', "name" => get_lang('PlatformAdmin')];
  20. $interbreadcrumb[] = ['url' => api_get_self(), "name" => get_lang('SessionsList')];
  21. // Database Table Definitions
  22. $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
  23. $tbl_session_rel_class = Database::get_main_table(TABLE_MAIN_SESSION_CLASS);
  24. $tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
  25. $tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
  26. $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
  27. $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
  28. $tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);
  29. $tbl_class = Database::get_main_table(TABLE_MAIN_CLASS);
  30. $tbl_class_user = Database::get_main_table(TABLE_MAIN_CLASS_USER);
  31. $tbl_session_rel_etape = "session_rel_etape";
  32. $id_session = intval($_GET['id_session']);
  33. $formSent = 0;
  34. $errorMsg = $firstLetterUser = $firstLetterSession = '';
  35. $UserList = $SessionList = [];
  36. $users = $sessions = [];
  37. $page = intval($_GET['page']);
  38. $action = $_REQUEST['action'];
  39. $tool_name = get_lang('Synchro LDAP : Import Etudiants/Etapes dans session');
  40. Display::display_header($tool_name);
  41. //api_display_tool_title($tool_name);
  42. ?>
  43. <form method="get" action="<?php echo api_get_self(); ?>" onsubmit="javascript:if(!confirm('<?php echo get_lang('ConfirmYourChoice'); ?>')) return false;">
  44. <select name="action">
  45. <option value="synchro"><?php echo get_lang('Synchro LDAP : Import Etudiants/Etapes dans toutes les sessions'); ?></option>
  46. </select>
  47. <input type="submit" value="<?php echo get_lang('Ok'); ?>">
  48. </form>
  49. <?php
  50. if (isset($action) && ($action == "synchro")) {
  51. $included = true;
  52. require 'ldap_synchro.php';
  53. echo Display::return_message($message, 'normal', false);
  54. }
  55. Display::display_footer();
  56. ?>