+ my $toclose = 0;
+ my $lastupl = "";
+
+ # Print out all thumbnails
+ if ($rot == 1) {
+ $r->print(" <form method=\"post\" action=\"/rotate\">\n");
+
+ while (my $ref = $q->fetchrow_hashref()) {
+ my $imgsz = "";
+ my $takenby = $ref->{'takenby'};
+ if (defined($ref->{'day'})) {
+ $takenby .= ", " . $ref->{'day'};
+ }
+
+ if ($takenby ne $lastupl) {
+ $lastupl = $takenby;
+ Sesse::pr0n::Templates::print_template($r, "submittedby", { author => $lastupl });
+ }
+ 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";
+ }
+
+ $r->print(" <p><a href=\"$uri\"><img src=\"${thumbxres}x${thumbyres}/$filename\" alt=\"\"$imgsz /></a>\n");
+ $r->print(" 90 <input type=\"checkbox\" name=\"rot-" .
+ $ref->{'id'} . "-90\" />\n");
+ $r->print(" 180 <input type=\"checkbox\" name=\"rot-" .
+ $ref->{'id'} . "-180\" />\n");
+ $r->print(" 270 <input type=\"checkbox\" name=\"rot-" .
+ $ref->{'id'} . "-270\" />\n");
+ $r->print(" " .
+ " Del <input type=\"checkbox\" name=\"del-" . $ref->{'id'} . "\" /></p>\n");