source: t29-www/index.php @ 1391

Last change on this file since 1391 was 809, checked in by sven, 9 years ago

Backend: Bugfixes beim Hosterkennungssystem. Externe Hosts funktionieren jetzt etwas besser.

File size: 3.2 KB
RevLine 
[92]1<?php
2 /* technikum29 language negotation since v5.8.x
3  * automatical redirection based on user language
4  */
[809]5if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
[92]6 $de = strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'de');
7 $en = strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'en');
[809]8} else {
9 $de = $en = false;
10}
[357]11 
12 // Support web prefixes, aka installation of the homepage in
13 // subdirectorys and not in virtual hosts
14 // Basically relative redirects would do the trick, too,
15 // but officially they are not allowed (not standard compilant)
16 include "lib/host.php";
17 $host = t29Host::detect();
18 // this is not implemented in the HTML below, since actually
19 // there is no browser who see's that HTML.
20 
[92]21 if( ($en !== false && $de !== false && $de < $en) ||
[706]22     ($en === false && $de !== false)              )
[357]23        header("Location: {$host->web_prefix}/de/");
[92]24 else
[357]25        header("Location: {$host->web_prefix}/en/");
[92]26?>
27<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
28     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
29<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
30<head>
31    <title>technikum29</title>
32    <link rel="stylesheet" href="shared/css/startseite.css" type="text/css" title="technikum29" />
33    <link rel="start" href="/de/" title="Startseite" />
34    <link rel="bookmark" href="/de/" title="Startseite" />
35
36    <link rel="next" href="/de/" title="Deutsche Startseite" />
37    <link rel="copyright" href="/de/impressum.shtm" title="Kontakt, Impressum, Copyright" />
38
39    <script type="text/javascript" src="shared/js/startseite.js"></script>
40
41    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
42    <meta name="author" content="h. m&uuml;ller" />
43    <meta name="ICBM" content="50.14, 8.456" /> <!-- somewhere in Kelkheim -->
44    <meta http-equiv="Content-Script-Type" content="text/javascript" />
45    <meta http-equiv="Content-Style-Type" content="text/css" />
46    <meta name="DC.Format" content="text/html" />
47
48    <meta name="DC.Identifier" content="http://www.technikum29.de/" />
49    <meta name="DC.Language" content="de" />
50    <meta name="robots" content="index,follow" />
51    <meta name="keywords" content="technikum, Technikum29, Museum, Main-Taunus, Technikmuseum-Main-Taunus" />
52    <meta name="DC.Title" content="technikum29.de" />
53    <meta name="DC.Subject" content="technikum29 Homepage" />
54
55    <meta name="t29.thisversion" content="06.08.2006/v5.5.6" />
56</head>
57
58<body>
59<div id="container">
60    <h1>technikum29</h1>
61    <div id="languages">
62        <div lang="de" xml:lang="de" id="de">
63            <h2>technikum29 auf deutsch</h2>
64            <p class="text">Museum für Rechner-, Computer- und Kommunikationstechnik</p>
65            <p class="go" title="Weiter zur Homepage"><a href="/de/" title="Weiter">&raquo; <span>Deutsch</span></a></p>
66
67            <p class="author">Autor: h.M&uuml;ller (dipl.-phys.)</p>
68        </div>
69
70        <div lang="en" xml:lang="en" id="en">
71            <h2>technikum29 in english</h2>
72            <p class="text">Museum of calculator, computer and communication technology</p>
73            <p class="go"><a href="/en/" title="Next page...">&raquo; <span>English</span></a></p>
74
75            <p class="author">Author: h.M&uuml;ller (dipl.-phys.)</p>
76        </div>
77    </div>
78</div>
79</body>
80</html>
81
Note: See TracBrowser for help on using the repository browser.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License