hotspot.inc.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. include_once('../inc/global.inc.php');
  23. $hotspot_lang_file = api_get_path(SYS_LANG_PATH);
  24. $search = array('../','\\0');
  25. if(file_exists($hotspot_lang_file . $language_interface . '/hotspot.inc.php'))
  26. $hotspot_lang_file .= $language_interface . '/hotspot.inc.php';
  27. else
  28. $hotspot_lang_file .= 'english/hotspot.inc.php';
  29. $file = file($hotspot_lang_file);
  30. $temp = array();
  31. foreach($file as $value)
  32. {
  33. $explode = explode('=', $value , 2);
  34. if(count($explode) > 1)
  35. {
  36. $explode[0] = trim($explode[0]);
  37. $explode[0] = '&' . substr($explode[0], 1, strlen($explode[0]));
  38. $explode[1] = trim($explode[1]);
  39. $explode[1] = substr($explode[1], 0, strlen($explode[1]) - 1);
  40. $explode[1] = ereg_replace('"', '', $explode[1]);
  41. $temp[] = $explode[0] . '=' . $explode[1];
  42. }
  43. }
  44. foreach($temp as $value)
  45. {
  46. echo $value . ' ';
  47. }
  48. ?>