]> dev.renevier.net Git - syp.git/blob - inc/html/index.php
fixes listfeatures called without argument in upgrade.php
[syp.git] / inc / html / index.php
1 <?php
2 /* Copyright (c) 2009 Arnaud Renevier, Inc, published under the modified BSD
3    license. */
4
5 @include_once ("./inc/settings.php");
6 require_once ("./inc/db/" . (defined ("DBTYPE")? DBTYPE: "mysql") . ".php");
7
8 try {
9     $connection->connect (DBHOST, DBUSER, DBPWD, DBNAME, DBPREFIX);
10 } catch (Exception $e) {
11 }
12
13 if (defined ("THUMBSMAXSIZE") && (THUMBSMAXSIZE > 0)) {
14     $thumbsmaxsize = THUMBSMAXSIZE;
15 } else {
16     $thumbsmaxsize = 400; // default value;
17 }
18
19 if (defined ("POPUPPOS")) {
20     $popuppos = POPUPPOS;
21 } else {
22     $popuppos = 3;
23 }
24 ?>
25 <html lang="<?php echo $lang?>">
26 <head>
27     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
28     <title><?php echo defined ("SITETITLE") ? htmlspecialchars (SITETITLE) : "SYP"?></title>
29     <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="news.php">
30     <link rel="stylesheet" href="./openlayers/theme/default/style.css" type="text/css">
31     <link rel="stylesheet" href="./media/syp.css" type="text/css">
32
33     <style type="text/css">
34         .olPopup {
35             <?php printf("_width: expression(Math.min(parseInt(this.scrollWidth) + 7, %d) + 'px');\n", ($thumbsmaxsize + 30))?>
36         }
37         .olPopup p {
38             <?php printf("max-width: %dpx;\n", $thumbsmaxsize - 20)?>
39
40         }
41         .olPopup img {
42             <?php printf("max-height: %dpx;\n", $thumbsmaxsize)?>
43             <?php printf("max-width: %dpx;\n", $thumbsmaxsize)?>
44
45             /* for IE (does not understand max-heigth max-width) */
46             <?php printf("_height: expression((this.scrollHeight>this.scrollWidth) ? 
47                  Math.min(parseInt(this.scrollHeight), %d ) + 'px' : 'auto');\n", $thumbsmaxsize)?>
48             <?php printf("_width: expression((this.scrollWidth>this.scrollHeight) ? 
49                  Math.min(parseInt(this.scrollWidth), %d ) + 'px' : 'auto');\n", $thumbsmaxsize)?>
50         }
51     </style>
52
53 <?php
54     if (file_exists ("./media/syp_custom.css")) {
55         printf("    <link rel=\"stylesheet\" href=\"./media/syp_custom.css\" type=\"text/css\">\n");
56     }
57 ?>
58
59     <script type="text/javascript">
60         var SypStrings = {
61             language: "<?php echo $lang ?>",
62             poweredByLink: "<?php ptrans('powered by <a href=\"http://syp.renevier.net\">syp</a>')?>",
63             noImageRegistered: "<?php ptrans('There is no image registered on this site.')?>"
64         };
65         var sypSettings =  {
66             popupPos: <?php printf ($popuppos)?>
67         };
68     </script>
69     <script src="./openlayers/OpenLayers.js" type="text/javascript"></script>
70     <script src="./js/syp.js" type="text/javascript"></script>
71
72     <noscript>
73     <style type="text/css">
74         #map {
75             display: none;
76         }
77     </style>
78     </noscript>
79
80     </head>
81
82     <body onload="SYP.init();">
83
84         <noscript>
85             <p><?php ptrans('SYP needs javascript. Please activate scripts in your browser.')?></p>
86         </noscript>
87
88         <div id="map"></div>
89         <div id="message"></div>
90
91     <div id="bigimg_container">
92     <div id="bigimg_transparency"></div>
93         <div id="bigimg_content">
94             <img id="bigimg" onclick="SYP.closeBigImage()">
95             <img id="bigimg_close" alt="<?php ptrans('close')?>" 
96                     src="openlayers/theme/default/img/close.gif" 
97                     onclick="SYP.closeBigImage()">
98         </div>
99     </div>
100
101 </body>
102 </html>