ldap_users_synchro.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * @package chamilo.admin
  5. * @deprecated ?
  6. */
  7. /**
  8. * Code
  9. */
  10. exit(); //not yet functional, needs to be revised
  11. // name of the language file that needs to be included
  12. $language_file='admin';
  13. $cidReset=true;
  14. require('../inc/global.inc.php');
  15. $libpath = api_get_path(LIBRARY_PATH);
  16. require_once($libpath.'formvalidator/FormValidator.class.php');
  17. require_once($libpath.'usermanager.lib.php');
  18. require("../auth/ldap/authldap.php");
  19. $annee_base=date('Y');
  20. // setting the section (for the tabs)
  21. $this_section = SECTION_PLATFORM_ADMIN;
  22. api_protect_admin_script();
  23. // setting breadcrumbs
  24. $interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin'));
  25. $interbreadcrumb[]=array('url' => api_get_self(),"name" => get_lang('SessionsList'));
  26. // Database Table Definitions
  27. $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
  28. $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
  29. $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
  30. $tbl_session_rel_etape = "session_rel_etape";
  31. $id_session=intval($_GET['id_session']);
  32. $formSent=0;
  33. $errorMsg=$firstLetterUser=$firstLetterSession='';
  34. $UserList=$SessionList=array();
  35. $users=$sessions=array();
  36. $noPHP_SELF=true;
  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. Display :: display_normal_message($message,false);
  54. }
  55. Display::display_footer();
  56. ?>