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. * @author Stephan Raabe
  14. */
  15.  
  16. if ($lang != "")
  17. {
  18. $lang_input = $page_lang;
  19. }
  20. else
  21. {
  22. $lang_input = $lang_default;
  23. }
  24. $lang_admin = $lang_input;
  25. if ((isset($_SESSION["account_lang"])) && ($_SESSION["account_lang"] != ""))
  26. {
  27. $lang_admin = $_SESSION["account_lang"];
  28. }
  29. $lang_list = "";
  30. $link = connectDB();
  31. $query = "SELECT lang_short from ".$db_praefix."language order by lang_short";
  32. $result = mysql_query($query);
  33. closeDB($link);
  34. while ($row = mysql_fetch_array($result))
  35. {
  36. $lang_list .= $row["lang_short"].",";
  37. }
  38. if (strlen($lang_list) > 0)
  39. {
  40. $lang_list = substr($lang_list,0,strlen($lang_list)-1);
  41. }
  42. if (isset($_GET["admin"]))
  43. {
  44. include("system/language_packs/lang_".$lang_admin.".php");
  45. }
  46. else
  47. {
  48. include("system/language_packs/lang_".$lang_input.".php");
  49. }
  50. ?>

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