my $apr = Apache2::Request->new($r);
my $dbh = Sesse::pr0n::Common::get_dbh();
- # Find the event
- $r->uri =~ m#^/([a-zA-Z0-9-]+)/?$#
- or error($r, "Could not extract event");
- my $event = $1;
+ my ($event, $abspath, $datesort, $tag);
+ if ($r->uri =~ /^\/\+all\/?/) {
+ $event = '+all';
+ $abspath = 1;
+ $tag = undef;
+
+ # augh, this needs 8.3, so we'll have to fiddle around a bit instead
+ # $datesort = 'DESC NULLS LAST';
+ $datesort = 'DESC';
+ } elsif ($r->uri =~ /^\/\+tags\/([a-zA-Z0-9-]+)\/?$/) {
+ $tag = $1;
+ $event = "+tags/$tag";
+ $abspath = 1;
+
+ $datesort = 'DESC';
+ } else {
+ # Find the event
+ $r->uri =~ /^\/([a-zA-Z0-9-]+)\/?$/
+ or error($r, "Could not extract event");
+ $event = $1;
+ $abspath = 0;
+ $tag = undef;
+ $datesort = 'ASC';
+ }
# Fix common error: pr0n.sesse.net/event -> pr0n.sesse.net/event/
- if ($r->uri !~ m#/$#) {
- $r->headers_out->{'location'} = "/$event/";
+ if ($r->uri !~ /\/$/) {
+ $r->headers_out->{'location'} = $r->uri . "/";
return Apache2::Const::REDIRECT;
}
# Internal? (Ugly?)
- if ($r->get_server_name =~ /internal/ || $r->get_server_name =~ /skoyen\.bilder\.knatten\.com/) {
+ if ($r->get_server_name =~ /internal/ || $r->get_server_name =~ /skoyen\.bilder\.knatten\.com/ || $r->get_server_name =~ /lia\.heimdal\.org/) {
my $user = Sesse::pr0n::Common::check_access($r);
if (!defined($user)) {
return Apache2::Const::OK;
xres => -1,
yres => -1,
start => 1,
- num => -1,
+ num => 100,
all => 1,
infobox => 1,
rot => 0,
sel => 0,
fullscreen => 0,
+ model => undef,
+ lens => undef,
+ author => undef
);
+ my $where;
+ if (defined($tag)) {
+ my $tq = $dbh->quote($tag);
+ $where = " AND id IN ( SELECT image FROM tags WHERE tag=$tq )";
+ } elsif ($event eq '+all') {
+ $where = '';
+ } else {
+ $where = ' AND event=' . $dbh->quote($event);
+ }
+
# Any NEF files => default to processing
- my $ref = $dbh->selectrow_hashref('SELECT * FROM images WHERE event=? AND LOWER(filename) LIKE \'%.nef\' LIMIT 1',
- undef, $event)
+ my $ref = $dbh->selectrow_hashref("SELECT * FROM images WHERE vhost=? $where AND LOWER(filename) LIKE '%.nef' LIMIT 1",
+ undef, $r->get_server_name)
and $defsettings{'xres'} = $defsettings{'yres'} = undef;
# Reduce the front page load when in overload mode.
my %settings = %defsettings;
- for my $s qw(thumbxres thumbyres xres yres start num all infobox rot sel fullscreen) {
+ for my $s qw(thumbxres thumbyres xres yres start num all infobox rot sel fullscreen model lens author) {
my $val = $apr->param($s);
if (defined($val) && $val =~ /^(\d+)$/) {
$settings{$s} = $val;
if (($s eq "num" || $s eq "xres" || $s eq "yres") && defined($val) && $val == -1) {
$settings{$s} = $val;
}
+ if ($s eq "model" || $s eq "lens" || $s eq "author") {
+ $settings{$s} = Sesse::pr0n::Common::pretty_unescape($val);
+ }
}
my $thumbxres = $settings{'thumbxres'};
my $infobox = $settings{'infobox'} ? '' : 'nobox/';
my $rot = $settings{'rot'};
my $sel = $settings{'sel'};
+ my $model = $settings{'model'};
+ my $lens = $settings{'lens'};
+ my $author = $settings{'author'};
+
+ # Construct SQL for this filter
+ if ($all == 0) {
+ $where .= ' AND selected=\'t\'';
+ }
+ if (defined($model) && defined($lens)) {
+ my $mq = $dbh->quote($model);
+ my $lq = $dbh->quote($lens);
+
+ if ($model eq '') {
+ # no defined model
+ $where .= " AND id NOT IN ( SELECT image FROM exif_info WHERE key='Model' AND TRIM(value)<>'' )";
+ } else {
+ $where .= " AND id IN ( SELECT image FROM exif_info WHERE key='Model' AND TRIM(value)=$mq )";
+ }
+
+ # This doesn't match 1:1 if there's both lens and lensspec, but it should be OK in practice
+ if ($lens eq '') {
+ # no defined lens
+ $where .= " AND id NOT IN ( SELECT image FROM exif_info WHERE (key='Lens' OR key='LensSpec') AND TRIM(value)<>'' )";
+ } else {
+ $where .= " AND id IN ( SELECT image FROM exif_info WHERE (key='Lens' OR key='LensSpec') AND TRIM(value)=$lq )";
+ }
+ }
+ if (defined($author)) {
+ my $aq = $dbh->quote($author);
+
+ $where .= " AND takenby=$aq";
+ }
if (defined($num) && $num == -1) {
$num = undef;
}
- $ref = $dbh->selectrow_hashref('SELECT name,date,EXTRACT(EPOCH FROM last_update) AS last_update FROM events WHERE id=? AND vhost=?',
- undef, $event, $r->get_server_name)
- or error($r, "Could not find event $event", 404, "File not found");
+ my ($date, $name);
- my $date = HTML::Entities::encode_entities(Encode::decode_utf8($ref->{'date'}));
- my $name = HTML::Entities::encode_entities(Encode::decode_utf8($ref->{'name'}));
- $r->set_last_modified($ref->{'last_update'});
+ if ($event eq '+all' || defined($tag)) {
+ $ref = $dbh->selectrow_hashref("SELECT EXTRACT(EPOCH FROM MAX(last_update)) AS last_update FROM events WHERE vhost=?",
+ undef, $r->get_server_name)
+ or error($r, "Could not list events", 404, "File not found");
+ $date = undef;
+ $name = Sesse::pr0n::Templates::fetch_template($r, 'all-event-title');
+ $r->set_last_modified($ref->{'last_update'});
+ } else {
+ $ref = $dbh->selectrow_hashref("SELECT name,date,EXTRACT(EPOCH FROM last_update) AS last_update FROM events WHERE vhost=? AND event=?",
+ undef, $r->get_server_name, $event)
+ or error($r, "Could not find event $event", 404, "File not found");
+
+ $date = HTML::Entities::encode_entities(Encode::decode_utf8($ref->{'date'}));
+ $name = HTML::Entities::encode_entities(Encode::decode_utf8($ref->{'name'}));
+ $r->set_last_modified($ref->{'last_update'});
+ }
# If the client can use cache, do so
if ((my $rc = $r->meets_conditions) != Apache2::Const::OK) {
}
# Count the number of selected images.
- $ref = $dbh->selectrow_hashref("SELECT COUNT(*) AS num_selected FROM images WHERE event=? AND selected=\'t\'", undef, $event);
+ $ref = $dbh->selectrow_hashref("SELECT COUNT(*) AS num_selected FROM images WHERE vhost=? $where AND selected=\'t\'", undef, $r->get_server_name);
my $num_selected = $ref->{'num_selected'};
# Find all images related to this event.
- my $q;
- my $where = ($all == 0) ? ' AND selected=\'t\'' : '';
+ my $limit = (defined($start) && defined($num) && !$settings{'fullscreen'}) ? (" LIMIT $num OFFSET " . ($start-1)) : "";
- if (defined($start) && defined($num) && !$settings{'fullscreen'}) {
- $q = $dbh->prepare("SELECT *, (date - INTERVAL '6 hours')::date AS day FROM images WHERE event=? $where ORDER BY (date - INTERVAL '6 hours')::date,takenby,date,filename LIMIT $num OFFSET " . ($start-1))
- or dberror($r, "prepare()");
- } else {
- $q = $dbh->prepare("SELECT *, (date - INTERVAL '6 hours')::date AS day FROM images WHERE event=? $where ORDER BY (date - INTERVAL '6 hours')::date,takenby,date,filename")
- or dberror($r, "prepare()");
- }
- $q->execute($event)
+ my $q = $dbh->prepare("SELECT *, (date - INTERVAL '6 hours')::date AS day FROM images WHERE vhost=? $where ORDER BY COALESCE((date - INTERVAL '6 hours')::date, '1970-01-01') $datesort,takenby,date,filename $limit")
+ or dberror($r, "prepare()");
+ $q->execute($r->get_server_name)
or dberror($r, "image enumeration");
# Print the page itself
if ($settings{'fullscreen'}) {
$r->content_type("text/html; charset=utf-8");
- Sesse::pr0n::Templates::print_template($r, "fullscreen-header", { title => "$name [$event]" });
+
+ if (defined($tag)) {
+ my $title = Sesse::pr0n::Templates::process_template($r, "tag-title", { tag => $tag });
+ Sesse::pr0n::Templates::print_template($r, "fullscreen-header", { title => $title });
+ } else {
+ Sesse::pr0n::Templates::print_template($r, "fullscreen-header", { title => "$name [$event]" });
+ }
+
+ my @files = ();
while (my $ref = $q->fetchrow_hashref()) {
- $r->print(" \"" . $infobox . $ref->{'filename'} . "\",\n");
+ push @files, [ $ref->{'event'}, $ref->{'filename'} ];
+ }
+
+ for my $i (0..$#files) {
+ $r->print(" [ \"" . $files[$i]->[0] . "\", \"" . $files[$i]->[1] . "\" ]");
+ $r->print(",") unless ($i == $#files);
+ $r->print("\n");
}
my %settings_no_fullscreen = %settings;
Sesse::pr0n::Templates::print_template($r, "fullscreen-footer", {
vhost => $r->get_server_name,
- event => $event,
start => $settings{'start'} - 1,
returnurl => $returnurl,
sel => $settings{'sel'},
+ infobox => $infobox
});
} else {
- Sesse::pr0n::Common::header($r, "$name [$event]");
- Sesse::pr0n::Templates::print_template($r, "date", { date => $date });
+ if (defined($tag)) {
+ my $title = Sesse::pr0n::Templates::process_template($r, "tag-title", { tag => $tag });
+ Sesse::pr0n::Common::header($r, $title);
+ } else {
+ Sesse::pr0n::Common::header($r, "$name [$event]");
+ }
+ if (defined($date)) {
+ Sesse::pr0n::Templates::print_template($r, "date", { date => $date });
+ }
if (Sesse::pr0n::Overload::is_in_overload($r)) {
Sesse::pr0n::Templates::print_template($r, "overloadmode");
print_viewres($r, $event, \%settings, \%defsettings);
print_pagelimit($r, $event, \%settings, \%defsettings);
print_infobox($r, $event, \%settings, \%defsettings);
- print_nextprev($r, $event, \%settings, \%defsettings);
print_selected($r, $event, \%settings, \%defsettings) if ($num_selected > 0);
print_fullscreen($r, $event, \%settings, \%defsettings);
-
- # Find the equipment used
- my $eq = $dbh->prepare('
- SELECT DISTINCT
- model.value AS model,
- coalesce(lens_spec.value, lens.value) AS lens
- FROM images i
- LEFT JOIN exif_info model ON i.id=model.image
- LEFT JOIN ( SELECT * FROM exif_info WHERE tag=\'Lens\' ) lens ON i.id=lens.image
- LEFT JOIN ( SELECT * FROM exif_info WHERE tag=\'LensSpec\') lens_spec ON i.id=lens_spec.image
- WHERE event=? AND model.tag=\'Model\'
- ORDER BY 1,2')
- or die "Couldn't prepare to find equipment: $!";
- $eq->execute($event)
- or die "Couldn't find equipment: $!";
-
- my @equipment = ();
- my %cameras_seen = ();
- while (my $ref = $eq->fetchrow_hashref) {
- if (!defined($ref->{'lens'}) && exists($cameras_seen{$ref->{'model'}})) {
- #
- # Some compact cameras seem to add lens info sometimes and not at other
- # times; if we have seen a camera with at least one specific lens earlier,
- # just ignore entries without a lens.
- #
- next;
+ print_nextprev($r, $event, $where, \%settings, \%defsettings);
+
+ if (1 || $event ne '+all') {
+ # Find the equipment used
+ my $eq = $dbh->prepare("
+ SELECT
+ TRIM(model.value) AS model,
+ coalesce(TRIM(lens_spec.value), TRIM(lens.value)) AS lens,
+ COUNT(*) AS num
+ FROM ( SELECT * FROM images WHERE vhost=? $where ) i
+ LEFT JOIN exif_info model ON i.id=model.image
+ LEFT JOIN ( SELECT * FROM exif_info WHERE key='Lens' ) lens ON i.id=lens.image
+ LEFT JOIN ( SELECT * FROM exif_info WHERE key='LensSpec') lens_spec ON i.id=lens_spec.image
+ WHERE model.key='Model'
+ GROUP BY 1,2
+ ORDER BY 1,2")
+ or die "Couldn't prepare to find equipment: $!";
+ $eq->execute($r->get_server_name)
+ or die "Couldn't find equipment: $!";
+
+ my @equipment = ();
+ my %cameras_seen = ();
+ while (my $ref = $eq->fetchrow_hashref) {
+ if (!defined($ref->{'lens'}) && exists($cameras_seen{$ref->{'model'}})) {
+ #
+ # Some compact cameras seem to add lens info sometimes and not at other
+ # times; if we have seen a camera with at least one specific lens earlier,
+ # just combine entries without a lens with the previous one.
+ #
+ $equipment[$#equipment]->{'num'} += $ref->{'num'};
+ next;
+ }
+ push @equipment, $ref;
+ $cameras_seen{$ref->{'model'}} = 1;
}
- push @equipment, $ref;
- $cameras_seen{$ref->{'model'}} = 1;
- }
- $eq->finish;
-
- if (scalar @equipment > 0) {
- Sesse::pr0n::Templates::print_template($r, "equipment-start");
- for my $e (@equipment) {
- $r->print(" <li>" . $e->{'model'});
- if (defined($e->{'lens'})) {
- $r->print(", " . $e->{'lens'} . "</li>\n");
- } else {
- $r->print("</li>\n");
+ $eq->finish;
+
+ if (scalar @equipment > 0) {
+ Sesse::pr0n::Templates::print_template($r, "equipment-start");
+ for my $e (@equipment) {
+ my $eqspec = $e->{'model'};
+ $eqspec .= ', ' . $e->{'lens'} if (defined($e->{'lens'}));
+ $eqspec = HTML::Entities::encode_entities($eqspec);
+
+ my %newsettings = %settings;
+
+ my $action;
+ if (defined($model) && defined($lens)) {
+ chomp ($action = Sesse::pr0n::Templates::fetch_template($r, "unfilter"));
+ $newsettings{'model'} = undef;
+ $newsettings{'lens'} = undef;
+ } else {
+ chomp ($action = Sesse::pr0n::Templates::fetch_template($r, "filter"));
+ $newsettings{'model'} = $e->{'model'};
+ $newsettings{'lens'} = defined($e->{'lens'}) ? $e->{'lens'} : '';
+ }
+
+ my $url = "/$event/" . Sesse::pr0n::Common::get_query_string(\%newsettings, \%defsettings);
+
+ # This isn't correct for all languages. Fix if we ever need to care. :-)
+ if ($e->{'num'} == 1) {
+ Sesse::pr0n::Templates::print_template($r, "equipment-item-singular", { eqspec => $eqspec, filterurl => $url, action => $action });
+ } else {
+ Sesse::pr0n::Templates::print_template($r, "equipment-item", { eqspec => $eqspec, num => $e->{'num'}, filterurl => $url, action => $action });
+ }
}
+ Sesse::pr0n::Templates::print_template($r, "equipment-end");
}
- Sesse::pr0n::Templates::print_template($r, "equipment-end");
}
-
my $toclose = 0;
my $lastupl = "";
+ my $img_num = (defined($start) && defined($num)) ? $start : 1;
# Print out all thumbnails
if ($rot == 1) {
$r->print(" <form method=\"post\" action=\"/rotate\">\n");
$r->print(" <input type=\"hidden\" name=\"event\" value=\"$event\" />\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\"";
+ 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(" </p>\n\n") if ($lastupl ne "" && $rot != 1);
+ $lastupl = $takenby;
+
+ my %newsettings = %settings;
+
+ my $action;
+ if (defined($author)) {
+ chomp ($action = Sesse::pr0n::Templates::fetch_template($r, "unfilter"));
+ $newsettings{'author'} = undef;
+ } else {
+ chomp ($action = Sesse::pr0n::Templates::fetch_template($r, "filter"));
+ $newsettings{'author'} = $ref->{'takenby'};
}
- 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 $url = "/$event/" . Sesse::pr0n::Common::get_query_string(\%newsettings, \%defsettings);
+
+ $r->print(" <h2>");
+ Sesse::pr0n::Templates::print_template($r, "submittedby", { author => $lastupl, action => $action, filterurl => $url });
+ print_fullscreen_fromhere($r, $event, \%settings, \%defsettings, $img_num);
+ $r->print("</h2>\n");
+
+ if ($rot != 1) {
+ $r->print(" <p class=\"photos\">\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(" <p><a href=\"$uri\"><img src=\"${thumbxres}x${thumbyres}/$filename\" alt=\"\"$imgsz /></a>\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(" <p>");
+ } else {
+ $r->print(" ");
+ }
+ $r->print("<a href=\"$prefix$uri\"><img src=\"$prefix${thumbxres}x${thumbyres}/$filename\" alt=\"\"$imgsz /></a>\n");
+
+ if ($rot == 1) {
$r->print(" 90 <input type=\"checkbox\" name=\"rot-" .
$ref->{'id'} . "-90\" />\n");
$r->print(" 180 <input type=\"checkbox\" name=\"rot-" .
$r->print(" " .
" Del <input type=\"checkbox\" name=\"del-" . $ref->{'id'} . "\" /></p>\n");
}
- $r->print(" <input type=\"submit\" value=\"Rotate\" />\n");
- $r->print(" </form>\n");
- } elsif ($sel == 1) {
- $r->print(" <form method=\"post\" action=\"/select\">\n");
- $r->print(" <input type=\"hidden\" name=\"event\" value=\"$event\" />\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";
- }
-
- my $selected = $ref->{'selected'} ? ' checked="checked"' : '';
+
+ ++$img_num;
+ }
- $r->print(" <p><a href=\"$uri\"><img src=\"${thumbxres}x${thumbyres}/$filename\" alt=\"\"$imgsz /></a>\n");
- $r->print(" <input type=\"checkbox\" name=\"sel-" .
- $ref->{'id'} . "\"$selected /></p>\n");
- }
- $r->print(" <input type=\"submit\" value=\"Select\" />\n");
+ if ($rot == 1) {
+ $r->print(" <input type=\"submit\" value=\"Rotate\" />\n");
$r->print(" </form>\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(" </p>\n\n") if ($lastupl ne "");
- $lastupl = $takenby;
- Sesse::pr0n::Templates::print_template($r, "submittedby", { author => $lastupl });
- $r->print(" <p>\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";
- }
-
- $r->print(" <a href=\"$uri\"><img src=\"${thumbxres}x${thumbyres}/$filename\" alt=\"\"$imgsz /></a>\n");
- }
$r->print(" </p>\n");
}
- print_nextprev($r, $event, \%settings, \%defsettings);
+ print_nextprev($r, $event, $where, \%settings, \%defsettings);
Sesse::pr0n::Common::footer($r);
}
}
sub print_nextprev {
- my ($r, $event, $settings, $defsettings) = @_;
+ my ($r, $event, $where, $settings, $defsettings) = @_;
my $start = $settings->{'start'};
my $num = $settings->{'num'};
my $dbh = Sesse::pr0n::Common::get_dbh();
return unless (defined($start) && defined($num));
# determine total number
- my $ref = $dbh->selectrow_hashref('SELECT count(*) AS num_images FROM images WHERE event=?',
- undef, $event)
+ my $ref = $dbh->selectrow_hashref("SELECT count(*) AS num_images FROM images WHERE vhost=? $where",
+ undef, $r->get_server_name)
or dberror($r, "image enumeration");
my $num_images = $ref->{'num_images'};
$end = $num_images;
}
- $r->print(" <p>\n");
+ $r->print(" <p class=\"nextprev\">\n");
# Previous
if ($start > 1) {
Sesse::pr0n::Common::print_link($r, $title, "/$event/", \%newsettings, $defsettings);
$r->print("</p>\n");
}
+
+sub print_fullscreen_fromhere {
+ my ($r, $event, $settings, $defsettings, $start) = @_;
+
+ chomp (my $title = Sesse::pr0n::Templates::fetch_template($r, 'fullscreen-fromhere'));
+
+ my %newsettings = %$settings;
+ $newsettings{'fullscreen'} = 1;
+ $newsettings{'start'} = $start;
+
+ $r->print(" <p class=\"fsfromhere\">");
+ Sesse::pr0n::Common::print_link($r, $title, "/$event/", \%newsettings, $defsettings);
+ $r->print("</p>\n");
+}
1;