Source for file lang.php

Documentation is available at lang.php

  1. <?
  2. /**
  3. * lang.php
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. * @package generator
  14. * @author Stephan Raabe
  15. */
  16.  
  17. if ($lang != "")
  18. {
  19. $lang_input = $page_lang;
  20. }
  21. else
  22. {
  23. $lang_input = $lang_default;
  24. }
  25. $lang_admin = $lang_input;
  26. if ((isset($_SESSION["account_lang"])) && ($_SESSION["account_lang"] != ""))
  27. {
  28. $lang_admin = $_SESSION["account_lang"];
  29. }
  30. $lang_list = "";
  31. $link = connectDB();
  32. $query = "SELECT lang_short from ".$db_praefix."language order by lang_short";
  33. $result = mysql_query($query);
  34. closeDB($link);
  35. while ($row = mysql_fetch_array($result))
  36. {
  37. $lang_list .= $row["lang_short"].",";
  38. }
  39. if (strlen($lang_list) > 0)
  40. {
  41. $lang_list = substr($lang_list,0,strlen($lang_list)-1);
  42. }
  43. if (isset($_GET["admin"]))
  44. {
  45. include("system/language_packs/lang_".$lang_admin.".php");
  46. }
  47. else
  48. {
  49. include("system/language_packs/lang_".$lang_input.".php");
  50. }
  51. ?>

Documentation generated on Tue, 16 Aug 2005 17:28:48 +0200 by phpDocumentor 1.3.0RC3