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.

133 lines
3.9 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. $lang=$_GET['lang'];
  7. // optional code for reading the accept language header
  8. /*
  9. $acceptlang='de-DE';
  10. // get the accept-language header
  11. foreach (getallheaders() as $name => $value) {
  12. if ($name == 'Accept-Language'){
  13. // echo "$name $value";
  14. $acceptlang = $value;
  15. }
  16. }
  17. echo "$acceptlang";
  18. print "oi $lang oi";
  19. */
  20. if ( in_array ($lang, array('en-US'))){
  21. $loc1 = "$lang".".utf8";
  22. $loc = $lang;
  23. }
  24. else
  25. $loc = "de-DE";
  26. //$loc = "en-US";
  27. //print "$loc $loc1";
  28. $domain = "messages";
  29. setlocale(LC_MESSAGES, $loc);
  30. setlocale(LC_ALL, $loc);
  31. $results = putenv("LC_ALL=$loc");
  32. $results = putenv("LC_MESSAGES=$loc");
  33. //$results = bindtextdomain($domain,"./locale");
  34. ?>
  35. <html >
  36. <head>
  37. <title><?php echo $localeYaml['title'][$loc]?></title>
  38. <meta charset="utf-8">
  39. <meta name="viewport" content="width=device-width, initial-scale=1">
  40. <!-- Kube CSS -->
  41. <link rel="stylesheet" href="css/kube.min.css">
  42. <link rel="stylesheet" href="addons/kube-addons.min.css" />
  43. <link rel="stylesheet" href="master.css" />
  44. </head>
  45. <body>
  46. <div class="page is-container">
  47. <div class="main-sidebar text-centered">
  48. <div id="container">
  49. <img class="wmdelogo" alt="wikimedia logo" src="Wikimedia_Deutschland-Logo.svg"/>
  50. <center>
  51. <a class="languageSelect" href="/lucavm/KAform/?lang=de-DE"><?php echo $localeYaml['languageSelectDe'][$loc]?></a><br>
  52. <a class="languageSelect" href="/lucavm/KAform/?lang=en-US"><?php echo $localeYaml['languageSelectEn'][$loc]?></a>
  53. </center>
  54. </div>
  55. </div>
  56. <div class="main-content">
  57. <div class="is-row" style="border:0px solid blue">
  58. <div class="is-col is-70">
  59. <?php include "form.php" ?>
  60. </div>
  61. <div class="is-col is-30">
  62. <?php
  63. # $ct = @file_get_contents( "./locale/$loc/h1.php");
  64. # if ($ct==false)
  65. # $ct = file_get_contents( "h1.php");
  66. # echo $ct;
  67. ?>
  68. <?php
  69. $ct = @file_get_contents( "./locale/$loc/h2.php");
  70. if ($ct==false)
  71. $ct = file_get_contents( "h2.php");
  72. echo $ct;
  73. ?>
  74. </div>
  75. </div>
  76. <?php echo $localeYaml['impressum'][$loc]?>: <a href="https://www.wikimedia.de/impressum/">https://www.wikimedia.de/impressum</a><br>
  77. <?php echo $localeYaml['privacy'][$loc]?>: <a href="<?php echo $localeYaml['privacyLink'][$loc]?>"><?php echo $localeYaml['privacyLink'][$loc]?></a>
  78. </div>
  79. </div>
  80. <script src="js/kube.min.js"></script>
  81. <script src="kaform.js"></script>
  82. <script src="addons/upload/kube.upload.min.js"></script>
  83. <script src="addons/kube-addons.min.js"></script>
  84. <script src="iban.js/iban.js"></script>
  85. <script>
  86. error_alert_projectid = "<?php echo $localeYaml['error_alert_projectid'][$loc]?>";
  87. error_alert_realname = "<?php echo $localeYaml['error_alert_realname'][$loc]?>";
  88. error_alert_email = "<?php echo $localeYaml['error_alert_email'][$loc]?>";
  89. error_alert_iban = "<?php echo $localeYaml['error_alert_iban'][$loc]?>";
  90. error_alert_bic = "<?php echo $localeYaml['error_alert_bic'][$loc]?>";
  91. error_alert_paypal = "<?php echo $localeYaml['error_alert_paypal'][$loc]?>";
  92. error_alert_expenses = "<?php echo $localeYaml['error_alert_expenses'][$loc]?>";
  93. error_alert_agreement = "<?php echo $localeYaml['error_alert_agreement'][$loc]?>";
  94. error_alert_ismailable = "<?php echo $localeYaml['error_alert_ismailable'][$loc]?>";
  95. error_alert_date = "<?php echo $localeYaml['error_alert_date'][$loc]?>";
  96. error_alert_description = "<?php echo $localeYaml['error_alert_description'][$loc]?>";
  97. error_alert_sum = "<?php echo $localeYaml['error_alert_sum'][$loc]?>";
  98. expenses_table_description_placeholder = "<?php echo $localeYaml['expenses_table_description_placeholder'][$loc]?>";
  99. expenses_table_file_placeholder = "<?php echo $localeYaml['expenses_table_file_placeholder'][$loc]?>";
  100. </script>
  101. </body>
  102. </html>