hotspot.inc.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php //$id:$
  2. /* For licensing terms, see /dokeos_license.txt */
  3. //error_log(__FILE__);
  4. /**
  5. * Hotspot languae conversion
  6. * @package dokeos.exercise
  7. * @author
  8. * @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
  9. */
  10. session_cache_limiter("none");
  11. include_once('../inc/global.inc.php');
  12. $hotspot_lang_file = api_get_path(SYS_LANG_PATH);
  13. $search = array('../','\\0');
  14. if(file_exists($hotspot_lang_file . $language_interface . '/hotspot.inc.php'))
  15. $hotspot_lang_file .= $language_interface . '/hotspot.inc.php';
  16. else
  17. $hotspot_lang_file .= 'english/hotspot.inc.php';
  18. $file = file($hotspot_lang_file);
  19. $temp = array();
  20. foreach($file as $value)
  21. {
  22. $explode = explode('=', $value , 2);
  23. if(count($explode) > 1)
  24. {
  25. $explode[0] = trim($explode[0]);
  26. $explode[0] = '&' . substr($explode[0], 1, strlen($explode[0]));
  27. $explode[1] = trim($explode[1]);
  28. $explode[1] = substr($explode[1], 0, strlen($explode[1]) - 1);
  29. $explode[1] = ereg_replace('"', '', $explode[1]);
  30. $temp[] = $explode[0] . '=' . $explode[1];
  31. }
  32. }
  33. foreach($temp as $value)
  34. {
  35. echo $value . ' ';
  36. }
  37. ?>