blob: b635bfc33694ab104242f54409c15977fe72381f (
plain)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
<?php
include_once("../scripts/config.php");
include_once("../scripts/album.php");
include_once("../scripts/thumbnail.php");
$width = 100;
$height = 75;
function image($album, $file) {
global $album_root;
echo $album_root . $album . "/" . $file;
}
if($album) {
$a = new Album($album);
if($image) {
$photo = new Photo("", "");
$prev = "";
$next = "";
foreach($a->photos as $p) {
if($image == $p->file) {
$photo = $p;
}
if($image == $last->file) {
$next = $p;
break;
}
$prev = $last;
$last = $p;
}
?>
<div class="gallery">
<div class="headline"><?php echo $a->title; ?></div>
<div class="center">Copyright <?php echo $a->copyright; ?></div>
<div class="gallery_image">
<img alt="<?php echo $photo->text ?>" src="<?php image($album, $photo->file); ?>"/>
</div>
<div class="description"><?php echo $photo->text; ?></div>
<?php if($prev) { ?>
<div class="gallery_image">
<a href="?page=photoview&image=<?php echo $prev->file ?>&album=<?php echo $album ?>" >
<img alt="prev" src="<?php echo thumbnail($album, $prev->file, $width, $height); ?>"/>
</a>
</div>
<?php } else { ?>
<div class="gallery_image">
<img alt="stop" src="gfx/stop.jpg"/>
</div>
<?php } ?>
<div class="gallery_image">
<a href="?page=photoview&album=<?php echo $album ?>" >
<img alt="home" src="gfx/home.jpg"/>
</a>
</div>
<?php if($next) { ?>
<div class="gallery_image">
<a href="?page=photoview&image=<?php echo $next->file; ?>&album=<?php echo $album ?>" >
<img alt="next" src="<?php echo thumbnail($album, $next->file, $width, $height); ?>"/>
</a>
</div>
<?php } else { ?>
<div class="gallery_image">
<img alt="stop" src="gfx/stop.jpg"/>
</div>
<?php } ?>
</div>
<?php
} else {
echo "<div class=\"headline\">" . $a->title . "</div>\n";
echo "<div class=\"gallery\">\n";
foreach($a->photos as $photo) {
?>
<div class="gallery_image">
<a href="?page=photoview&image=<?php echo $photo->file ?>&album=<?php echo $album ?>">
<img alt="<?php echo $photo->file; ?>"
src="<?php echo thumbnail($album, $photo->file, 200, 150); ?>"/>
</a>
</div>
<?php
}
echo "</div>\n";
}
}
?>
|