ldap_users_synchro.php 2.5 KB

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