]> dev.renevier.net Git - syp.git/blobdiff - inc/templates_index.php
i18n and english translation
[syp.git] / inc / templates_index.php
diff --git a/inc/templates_index.php b/inc/templates_index.php
new file mode 100644 (file)
index 0000000..2d59926
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+/* Copyright (c) 2009 Arnaud Renevier, Inc, published under the modified BSD
+   license. */
+
+require_once ("./inc/settings.php");
+require_once ("./inc/db/mysql.php");
+
+try {
+    $connection->connect (DBHOST, DBUSER, DBPWD, DBNAME, DBPREFIX);
+} catch (Exception $e) {
+}
+
+$bbox = $connection->mbr ();
+?>
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
+    <title><?php echo defined ("SITETITLE") ? SITETITLE : "SYP"?></title>
+    <link rel="stylesheet" href="./openlayers/theme/default/style.css" type="text/css">
+    <link rel="stylesheet" href="./media/syp.css" type="text/css">
+
+    <script type="text/javascript">
+        var SypStrings = {
+            language: "<?php echo $lang ?>",
+            propulsedByLink: "<?php ptrans('propulsed by <a href=\"http://syp.renevier.net\">syp</a>')?>",
+            noImageRegistered: "<?php ptrans('There is no image registered on this site.')?>"
+        };
+        <?php
+            printf ("var sypOrig = [%.18F, %.18F, %.18F, %.18F];\n",
+                    $bbox [0], $bbox [1], $bbox [2], $bbox [3]);
+        ?>
+    </script>
+    <script src="./openlayers/OpenLayers.js" type="text/javascript"></script>
+    <script src="./js/syp.js" type="text/javascript"></script>
+
+    <noscript>
+    <style type="text/css">
+        #map {
+            display: none;
+        }
+    </style>
+    </noscript>
+
+    </head>
+
+    <body onload="SYP.init();">
+
+        <noscript>
+            <p><?php ptrans('SYP needs javascript. Please activate scripts in your browser.')?></p>
+        </noscript>
+
+        <div id="map"></div>
+        <div id="message"></div>
+
+</body>
+</html>