diff options
Diffstat (limited to 'bucky2/cgi-bin/history')
| -rwxr-xr-x | bucky2/cgi-bin/history | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/bucky2/cgi-bin/history b/bucky2/cgi-bin/history new file mode 100755 index 0000000..129d727 --- /dev/null +++ b/bucky2/cgi-bin/history @@ -0,0 +1,44 @@ +#!/usr/bin/perl +use lib "../lib"; +use Bucky; +my $bucky = new Bucky; + +print "Content-type: text/html\n\n"; +my $files = $bucky->db->select("file", "group by thread"); + +my $i = 0; +my $count = 0; +print "<font size=-1><table>"; +foreach my $file (@$files) + { + my $z_thread = $file->{'thread'}; + my $z_img; + if ($file->{'filename'} =~ /(jpg|png|gif)/i) + { + my $ext = $1; + my $username = $file->{'username'}; + my $filename = $file->{'filename'}; + my $lc_filename = lc($file->{'filename'}); + my $label_filename = $filename; + $label_filename =~ s/\.$ext//g; + $label_filename =~ s/\W+/ /g; + $label_filename =~ s/_+/ /g; + $z_img .= "<a href='/bucky/data/$z_thread/$filename' target=_new>"; + $z_img .= "<img src=\"/bucky/data/$z_thread/.thumb/t.$lc_filename\" width=200 hspace=10 vspace=10>"; + $z_img .= "</a>"; + $z_img .= "<br>".$label_filename; + } + next unless $z_img; + if ($i == 0) + { print "<tr>"; } + print "<td>"; + print $z_img; + print "</td>"; + $i++; + $count++; + if ($i == 5) + { print "</tr>\n"; $i = 0; } + } + print "</table>"; + print $count." images found\n"; +1; |
