You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
2.5 KiB

  1. <!doctype html>
  2. <?php
  3. /*parse the locale.yaml file and get the variables*/
  4. include "Spyc.php";
  5. $localeYaml = Spyc::YAMLLoad('locale.yaml');
  6. //print_r($localeYaml);
  7. $mainheader = $localeYaml['mainheader'][1]['en-US'];
  8. //print "ooleoooleola";
  9. //print_r($mainheader);
  10. //print "oleola";
  11. $lang=$_GET['lang'];
  12. /*
  13. $acceptlang='de-DE';
  14. // get the accept-language header
  15. foreach (getallheaders() as $name => $value) {
  16. if ($name == 'Accept-Language'){
  17. // echo "$name $value";
  18. $acceptlang = $value;
  19. }
  20. }
  21. echo "$acceptlang";
  22. print "oi $lang oi";
  23. */
  24. if ( in_array ($lang, array('en-US'))){
  25. $loc1 = "$lang".".utf8";
  26. $loc = $lang;
  27. }
  28. else
  29. $loc = "de-DE";
  30. //$loc = "en-US";
  31. print "$loc $loc1";
  32. $domain = "messages";
  33. setlocale(LC_MESSAGES, $loc);
  34. setlocale(LC_ALL, $loc);
  35. $results = putenv("LC_ALL=$loc");
  36. $results = putenv("LC_MESSAGES=$loc");
  37. $results = bindtextdomain($domain,"./locale");
  38. ?>
  39. <html >
  40. <head>
  41. <title>Kostenerstattungsforumlar</title>
  42. <meta charset="utf-8">
  43. <meta name="viewport" content="width=device-width, initial-scale=1">
  44. <!-- Kube CSS -->
  45. <link rel="stylesheet" href="css/kube.min.css">
  46. <link rel="stylesheet" href="addons/kube-addons.min.css" />
  47. <link rel="stylesheet" href="master.css" />
  48. </head>
  49. <body>
  50. <div class="page is-container">
  51. <div class="main-sidebar text-centered">
  52. <img class="wmdelogo" alt="wikimedia logo" src="Wikimedia_Deutschland-Logo.svg"/>
  53. </div>
  54. <div class="main-content">
  55. <div class="is-row" style="border:0px solid blue">
  56. <div class="is-col is-70">
  57. <?php include "form.php" ?>
  58. </div>
  59. <div class="is-col is-30">
  60. <?php
  61. # $ct = @file_get_contents( "./locale/$loc/h1.php");
  62. # if ($ct==false)
  63. # $ct = file_get_contents( "h1.php");
  64. # echo $ct;
  65. ?>
  66. <?php
  67. $ct = @file_get_contents( "./locale/$loc/h2.php");
  68. if ($ct==false)
  69. $ct = file_get_contents( "h2.php");
  70. echo $ct;
  71. ?>
  72. </div>
  73. </div>
  74. <?php echo _($localeYaml['impressum'][$loc])?>: <a href="https://www.wikimedia.de/impressum/">https://www.wikimedia.de/impressum</a><br>
  75. <?php echo _($localeYaml['privacy'][$loc])?>: <a href="https://www.wikimedia.de/datenschutz/">https://www.wikimedia.de/datenschutz</a>
  76. </div>
  77. </div>
  78. <script src="js/kube.min.js"></script>
  79. <script src="addons/upload/kube.upload.min.js"></script>
  80. <script src="addons/kube-addons.min.js"></script>
  81. <script src="kaform.js"></script>
  82. <script src="iban.js/iban.js"></script>
  83. </body>
  84. </html>