]> dev.renevier.net Git - syp.git/blobdiff - inc/templates_index.php
multi user administration
[syp.git] / inc / templates_index.php
index 7fd2bb457744ecb3005e9446aa90760070a13bfa..64b965fe5181fb2b1663a3dd8ab3e05666ff6f01 100644 (file)
@@ -10,15 +10,40 @@ try {
 } catch (Exception $e) {
 }
 
-$bbox = $connection->mbr ();
+if (defined ("THUMBSMAXSIZE") && (THUMBSMAXSIZE > 0)) {
+    $thumbsmaxsize = THUMBSMAXSIZE;
+} else {
+    $thumbsmaxsize = 400; // default value;
+}
+
+if (defined ("POPUPNEARFEATURE") && (POPUPNEARFEATURE)) {
+    $popupnearfeature = true;
+} else {
+    $popupnearfeature = false;
+}
 ?>
-<html>
+<html lang="<?php echo $lang?>">
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
     <title><?php echo defined ("SITETITLE") ? SITETITLE : "SYP"?></title>
     <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="news.php">
     <link rel="stylesheet" href="./openlayers/theme/default/style.css" type="text/css">
     <link rel="stylesheet" href="./media/syp.css" type="text/css">
+    <style type="text/css">
+        .olPopup {
+            <?php printf("_width: %dpx;\n", ($thumbsmaxsize + 40))?>
+        }
+        .olPopup img {
+            <?php printf("max-height: %dpx;\n", $thumbsmaxsize)?>
+            <?php printf("max-width: %dpx;\n", $thumbsmaxsize)?>
+
+            /* for IE (does not understand max-heigth max-width) */
+            <?php printf("_height: expression((this.scrollHeight>this.scrollWidth) ? 
+                 Math.min(parseInt(this.scrollHeight), %d ) + 'px' : 'auto');\n", $thumbsmaxsize)?>
+            <?php printf("_width: expression((this.scrollWidth>this.scrollHeight) ? 
+                 Math.min(parseInt(this.scrollWidth), %d ) + 'px' : 'auto');\n", $thumbsmaxsize)?>
+        }
+    </style>
 
     <script type="text/javascript">
         var SypStrings = {
@@ -26,10 +51,9 @@ $bbox = $connection->mbr ();
             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]);
-        ?>
+        var sypSettings =  {
+            popupNearfeature: <?php printf ($popupnearfeature ? "true": "false")?>
+        };
     </script>
     <script src="./openlayers/OpenLayers.js" type="text/javascript"></script>
     <script src="./js/syp.js" type="text/javascript"></script>
@@ -53,5 +77,15 @@ $bbox = $connection->mbr ();
         <div id="map"></div>
         <div id="message"></div>
 
+    <div id="bigimg_container">
+    <div id="bigimg_transparency"></div>
+        <div id="bigimg_content">
+            <img id="bigimg" onclick="SYP.closeBigImage()">
+            <img id="bigimg_close" alt="<?php ptrans('close')?>" 
+                    src="openlayers/theme/default/img/close.gif" 
+                    onclick="SYP.closeBigImage()">
+        </div>
+    </div>
+
 </body>
 </html>