use File::Spec;
my $show_img;
-my $send_archive;
my %args = (
'i' => { 'var' => \$show_img, 'check' => '\d+' },
- 'a' => { 'var' => \$send_archive }
);
our $meta;
our $num_photos;
-sub new() {
- if ($send_archive && $CF{'AllowArchives'}) {
- # FIXME?
- require UCW::Gallery::Archive;
- return new UCW::Gallery::Archive($send_archive);
- } else {
- return bless {};
- }
-}
-
sub error($) {
print "<p style='color:red'>Bad luck, the script is broken. Sorry.\n<p>$_[0]\n";
print "</body></html>\n";
my $annot = UCW::CGI::html_escape($m->{title});
my $tw = $tm->{w};
my $th = $tm->{h};
- my $thumb = $CF{'ThumbUrlPrefix'} . "/$thumb_fmt/$id.jpg";
+ my $thumb = $CF{'ThumbUrlPrefix'} . "$thumb_fmt/$id.jpg";
my $side_w = $CF{"ThumbW"} + 2*$CF{"InteriorMargin"};
my $side_h = $CF{"ThumbH"} + 2*$CF{"InteriorMargin"};
my $box_w = $CF{"LeftW"} + $side_w + $CF{"RightW"};
my $ol = $CF{'LeftW'} + $CF{'InteriorMargin'} + int(($CF{'ThumbW'} - $tw)/2);
my $ot = $CF{'TopH'} + $CF{'InteriorMargin'} + int(($CF{'ThumbH'} - $th)/2);
my $tit = ($annot ne "") ? " title=\"$annot\"" : "";
- my $url = ($CF{"ImageSubpages"} ? "?i=$id" : $orig);
+ my $url = ($CF{"ImageSubpages"} ? "?i=$idx" : $orig);
print "<a href='$url'><img src='$thumb' width=$w height=$h alt='$orig'$tit class=ti style='left: ${ol}px; top: ${ot}px'></a>\n";
print "<img src='$CF{'RightImg'}' width=$CF{'RightW'} height=$side_h alt='' class=tr>\n";
print "<img src='$CF{'BotImg'}' width=$box_w height=$CF{'BotH'} alt='' class=tb>\n";