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.

127 lines
3.6 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>$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. <img class="wmdelogo" alt="wikimedia logo" src="Wikimedia_Deutschland-Logo.svg"/>
  49. </div>
  50. <div class="main-content">
  51. <div class="is-row" style="border:0px solid blue">
  52. <div class="is-col is-70">
  53. <?php include "form.php" ?>
  54. </div>
  55. <div class="is-col is-30">
  56. <?php
  57. # $ct = @file_get_contents( "./locale/$loc/h1.php");
  58. # if ($ct==false)
  59. # $ct = file_get_contents( "h1.php");
  60. # echo $ct;
  61. ?>
  62. <?php
  63. $ct = @file_get_contents( "./locale/$loc/h2.php");
  64. if ($ct==false)
  65. $ct = file_get_contents( "h2.php");
  66. echo $ct;
  67. ?>
  68. </div>
  69. </div>
  70. <?php echo $localeYaml['impressum'][$loc]?>: <a href="https://www.wikimedia.de/impressum/">https://www.wikimedia.de/impressum</a><br>
  71. <?php echo $localeYaml['privacy'][$loc]?>: <a href="https://www.wikimedia.de/datenschutz/">https://www.wikimedia.de/datenschutz</a>
  72. </div>
  73. </div>
  74. <script src="js/kube.min.js"></script>
  75. <script src="kaform.js"></script>
  76. <script src="addons/upload/kube.upload.min.js"></script>
  77. <script src="addons/kube-addons.min.js"></script>
  78. <script src="iban.js/iban.js"></script>
  79. <script>
  80. error_alert_projectid = "<?php echo $localeYaml['error_alert_projectid'][$loc]?>";
  81. error_alert_realname = "<?php echo $localeYaml['error_alert_realname'][$loc]?>";
  82. error_alert_email = "<?php echo $localeYaml['error_alert_email'][$loc]?>";
  83. error_alert_iban = "<?php echo $localeYaml['error_alert_iban'][$loc]?>";
  84. error_alert_bic = "<?php echo $localeYaml['error_alert_bic'][$loc]?>";
  85. error_alert_paypal = "<?php echo $localeYaml['error_alert_paypal'][$loc]?>";
  86. error_alert_expenses = "<?php echo $localeYaml['error_alert_expenses'][$loc]?>";
  87. error_alert_agreement = "<?php echo $localeYaml['error_alert_agreement'][$loc]?>";
  88. error_alert_ismailable = "<?php echo $localeYaml['error_alert_ismailable'][$loc]?>";
  89. error_alert_date = "<?php echo $localeYaml['error_alert_date'][$loc]?>";
  90. error_alert_description = "<?php echo $localeYaml['error_alert_description'][$loc]?>";
  91. error_alert_sum = "<?php echo $localeYaml['error_alert_sum'][$loc]?>";
  92. expenses_table_description_placeholder = "<?php echo $localeYaml['expenses_table_description_placeholder'][$loc]?>";
  93. expenses_table_file_placeholder = "<?php echo $localeYaml['expenses_table_file_placeholder'][$loc]?>";
  94. </script>
  95. </body>
  96. </html>