2 /* Copyright (c) 2009 Arnaud Renevier, Inc, published under the modified BSD
5 @include_once ("./inc/settings.php");
6 require_once ("./inc/db/mysql.php");
9 $connection->connect (DBHOST, DBUSER, DBPWD, DBNAME, DBPREFIX);
10 } catch (Exception $e) {
13 if (defined ("THUMBSMAXSIZE") && (THUMBSMAXSIZE > 0)) {
14 $thumbsmaxsize = THUMBSMAXSIZE;
16 $thumbsmaxsize = 400; // default value;
19 if (defined ("POPUPPOS")) {
25 <html lang="<?php echo $lang?>">
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 <style type="text/css">
34 <?php printf("_width: expression(Math.min(parseInt(this.scrollWidth) + 7, %d) + 'px');\n", ($thumbsmaxsize + 30))?>
37 <?php printf("max-width: %dpx;\n", $thumbsmaxsize - 20)?>
41 <?php printf("max-height: %dpx;\n", $thumbsmaxsize)?>
42 <?php printf("max-width: %dpx;\n", $thumbsmaxsize)?>
44 /* for IE (does not understand max-heigth max-width) */
45 <?php printf("_height: expression((this.scrollHeight>this.scrollWidth) ?
46 Math.min(parseInt(this.scrollHeight), %d ) + 'px' : 'auto');\n", $thumbsmaxsize)?>
47 <?php printf("_width: expression((this.scrollWidth>this.scrollHeight) ?
48 Math.min(parseInt(this.scrollWidth), %d ) + 'px' : 'auto');\n", $thumbsmaxsize)?>
52 <script type="text/javascript">
54 language: "<?php echo $lang ?>",
55 poweredByLink: "<?php ptrans('powered by <a href=\"http://syp.renevier.net\">syp</a>')?>",
56 noImageRegistered: "<?php ptrans('There is no image registered on this site.')?>"
59 popupPos: <?php printf ($popuppos)?>
62 <script src="./openlayers/OpenLayers.js" type="text/javascript"></script>
63 <script src="./js/syp.js" type="text/javascript"></script>
66 <style type="text/css">
75 <body onload="SYP.init();">
78 <p><?php ptrans('SYP needs javascript. Please activate scripts in your browser.')?></p>
82 <div id="message"></div>
84 <div id="bigimg_container">
85 <div id="bigimg_transparency"></div>
86 <div id="bigimg_content">
87 <img id="bigimg" onclick="SYP.closeBigImage()">
88 <img id="bigimg_close" alt="<?php ptrans('close')?>"
89 src="openlayers/theme/default/img/close.gif"
90 onclick="SYP.closeBigImage()">