dokeos-exercise
[ class tree: dokeos-exercise ] [ index: dokeos-exercise ] [ all elements ]

Source for file hotspot_lang_conversion.php

Documentation is available at hotspot_lang_conversion.php

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

Documentation generated on Thu, 12 Jun 2008 13:39:38 -0500 by phpDocumentor 1.4.1