hotspot.inc.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /*
  3. DOKEOS - elearning and course management software
  4. For a full list of contributors, see documentation/credits.html
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. See "documentation/licence.html" more details.
  10. Contact:
  11. Dokeos
  12. Rue des Palais 44 Paleizenstraat
  13. B-1030 Brussels - Belgium
  14. Tel. +32 (2) 211 34 56
  15. */
  16. /**
  17. * Hotspot languae conversion
  18. * @package dokeos.exercise
  19. * @author
  20. * @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
  21. */
  22. session_cache_limiter("none");
  23. include_once('../inc/global.inc.php');
  24. $hotspot_lang_file = api_get_path(SYS_LANG_PATH);
  25. $search = array('../','\\0');
  26. if(file_exists($hotspot_lang_file . $language_interface . '/hotspot.inc.php'))
  27. $hotspot_lang_file .= $language_interface . '/hotspot.inc.php';
  28. else
  29. $hotspot_lang_file .= 'english/hotspot.inc.php';
  30. $file = file($hotspot_lang_file);
  31. $temp = array();
  32. foreach($file as $value)
  33. {
  34. $explode = explode('=', $value , 2);
  35. if(count($explode) > 1)
  36. {
  37. $explode[0] = trim($explode[0]);
  38. $explode[0] = '&' . substr($explode[0], 1, strlen($explode[0]));
  39. $explode[1] = trim($explode[1]);
  40. $explode[1] = substr($explode[1], 0, strlen($explode[1]) - 1);
  41. $explode[1] = ereg_replace('"', '', $explode[1]);
  42. $temp[] = $explode[0] . '=' . $explode[1];
  43. }
  44. }
  45. foreach($temp as $value)
  46. {
  47. echo $value . ' ';
  48. }
  49. ?>