-
Notifications
You must be signed in to change notification settings - Fork 0
/
gallery.php
executable file
·72 lines (67 loc) · 2.42 KB
/
gallery.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
require('/files/scripts/commonWebLibrary.php');
require('/files/scripts/commonWebLibrary_gallery.php');
error_reporting(E_ALL);
if (isset($_GET['gallery'])) {
$gallery = $_GET['gallery'];
$title = OEPGallery::getTitle($gallery);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo $title;?></title>
<link rel="stylesheet" href="smoothgallery/css/layout.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="smoothgallery/css/jd.gallery.css" type="text/css" media="screen" charset="utf-8" />
<script src="smoothgallery/scripts/mootools-1.2.1-core-yc.js" type="text/javascript"></script>
<script src="smoothgallery/scripts/mootools-1.2-more.js" type="text/javascript"></script>
<script src="smoothgallery/scripts/jd.gallery.js" type="text/javascript"></script>
<style type="text/css">
#myGallery
{
width: <?php echo ceil(OEPGallery::$SCALES[OEPGallery::SCALE__MEDIUM]['new_height']*4.0/3);?>px !important;
height: <?php echo OEPGallery::$SCALES[OEPGallery::SCALE__MEDIUM]['new_height'];?>px !important;
}
</style>
</head>
<body>
<h1><?php echo $title;?></h1>
<script type="text/javascript">
function startGallery() {
var myGallery = new gallery($('myGallery'), {
timed: true,
showInfopane: false
});
}
window.addEvent('domready',startGallery);
</script>
<div class="content">
<div id="myGallery">
<?php
foreach (OEPGallery::getImageURLs($gallery) as $img ) {
?>
<div class="imageElement">
<h3><?php echo $img;?></h3>
<p></p>
<a href="<?php echo $img;?>" title="open image" class="open"></a>
<img src="<?php echo OEPGallery::getPrefixedName($img, OEPGallery::SCALE__MEDIUM);?>" class="full"/>
<img src="<?php echo OEPGallery::getPrefixedName($img, OEPGallery::SCALE__THUMB);?>" class="thumbnail" />
</div>
<?php
}
?>
</div>
</div>
</body>
</html>
<?php
}
else {
HTML_frame::beginFrame('Gallery');
echo "<h1>Image galleries</h1><hr>";
foreach (array_reverse(OEPGallery::getGalleryNames()) as $gallery) {
echo "<a href='?gallery=$gallery'>".OEPGallery::getTitle($gallery)."</a><br>\n";
}
HTML_frame::endFrame();
}
?>