From: Steinar H. Gunderson
\n"); } + } + + if ($ref->{'width'} != -1 && $ref->{'height'} != -1) { + my $width = $ref->{'width'}; + my $height = $ref->{'height'}; + + ($width, $height) = Sesse::pr0n::Common::scale_aspect($width, $height, $thumbxres, $thumbyres); + $imgsz = " width=\"$width\" height=\"$height\""; + } - $r->print("
\n"); + my $filename = $ref->{'filename'}; + my $uri = $infobox . $filename; + if (defined($xres) && defined($yres) && $xres != -1) { + $uri = "${xres}x$yres/$infobox$filename"; + } elsif (defined($xres) && $xres == -1) { + $uri = "original/$infobox$filename"; + } + + my $prefix = ""; + if ($abspath) { + $prefix = "/" . $ref->{'event'} . "/"; + } + + if ($rot == 1) { + $r->print("
"); + } else { + $r->print(" "); + } + $r->print("\n"); + + if ($rot == 1) { $r->print(" 90 {'id'} . "-90\" />\n"); $r->print(" 180 {'id'} . "-270\" />\n"); $r->print(" " . " Del {'id'} . "\" />
\n"); - - ++$img_num; } + + ++$img_num; + } + + if ($rot == 1) { $r->print(" \n"); $r->print(" \n"); } else { - while (my $ref = $q->fetchrow_hashref()) { - my $imgsz = ""; - my $takenby = $ref->{'takenby'}; - if (defined($ref->{'day'})) { - $takenby .= ", " . $ref->{'day'}; - } - - if ($takenby ne $lastupl) { - $r->print(" \n\n") if ($lastupl ne ""); - $lastupl = $takenby; - $r->print("\n"); - } - if ($ref->{'width'} != -1 && $ref->{'height'} != -1) { - my $width = $ref->{'width'}; - my $height = $ref->{'height'}; - - ($width, $height) = Sesse::pr0n::Common::scale_aspect($width, $height, $thumbxres, $thumbyres); - $imgsz = " width=\"$width\" height=\"$height\""; - } - - my $filename = $ref->{'filename'}; - my $uri = $infobox . $filename; - if (defined($xres) && defined($yres) && $xres != -1) { - $uri = "${xres}x$yres/$infobox$filename"; - } elsif (defined($xres) && $xres == -1) { - $uri = "original/$infobox$filename"; - } - - my $prefix = ""; - if ($abspath) { - $prefix = "/" . $ref->{'event'} . "/"; - } - - $r->print(" \n"); - - ++$img_num; - } $r->print("
\n"); }