ldap_users_synchro.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin'));
  20. $interbreadcrumb[]=array('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=array();
  36. $users=$sessions=array();
  37. $noPHP_SELF=true;
  38. $page=intval($_GET['page']);
  39. $action=$_REQUEST['action'];
  40. $tool_name = get_lang('Synchro LDAP : Import Etudiants/Etapes dans session');
  41. Display::display_header($tool_name);
  42. //api_display_tool_title($tool_name);
  43. ?>
  44. <form method="get" action="<?php echo api_get_self(); ?>" onsubmit="javascript:if(!confirm('<?php echo get_lang('ConfirmYourChoice'); ?>')) return false;">
  45. <select name="action">
  46. <option value="synchro"><?php echo get_lang('Synchro LDAP : Import Etudiants/Etapes dans toutes les sessions'); ?></option>
  47. </select>
  48. <input type="submit" value="<?php echo get_lang('Ok'); ?>">
  49. </form>
  50. <?php
  51. if (isset($action) && ($action=="synchro")) {
  52. $included=true;
  53. require('ldap_synchro.php');
  54. Display :: display_normal_message($message,false);
  55. }
  56. Display::display_footer();
  57. ?>