infobox => 1,
rot => 0,
sel => 0,
+ fullscreen => 0,
);
# Reduce the front page load when in overload mode.
}
my %settings = %defsettings;
- my $fullscreen = (defined($apr->param('fullscreen')) && $apr->param('fullscreen') eq '1');
- for my $s qw(thumbxres thumbyres xres yres start num all infobox rot sel) {
+ for my $s qw(thumbxres thumbyres xres yres start num all infobox rot sel fullscreen) {
my $val = $apr->param($s);
if (defined($val) && $val =~ /^(\d+)$/) {
$settings{$s} = $val;
or dberror($r, "image enumeration");
# Print the page itself
- if ($fullscreen) {
+ if ($settings{'fullscreen'}) {
$r->content_type("text/html; charset=utf-8");
Sesse::pr0n::Templates::print_template($r, "fullscreen-header", { title => "$name [$event]" });
while (my $ref = $q->fetchrow_hashref()) {
$r->print(" \"" . $ref->{'filename'} . "\",\n");
}
- Sesse::pr0n::Templates::print_template($r, "fullscreen-footer", { vhost => $r->get_server_name, event => $event, start => $settings{'start'} - 1 });
+
+ my %settings_no_fullscreen = %settings;
+ $settings_no_fullscreen{'fullscreen'} = 0;
+
+ my $returnurl = "http://" . $r->get_server_name . "/" . $event . "/" .
+ Sesse::pr0n::Common::get_query_string(\%settings_no_fullscreen, \%defsettings);
+
+ Sesse::pr0n::Templates::print_template($r, "fullscreen-footer", {
+ vhost => $r->get_server_name,
+ event => $event,
+ start => $settings{'start'} - 1,
+ returnurl => $returnurl
+ });
} else {
Sesse::pr0n::Common::header($r, "$name [$event]");
Sesse::pr0n::Templates::print_template($r, "date", { date => $date });
set_opacity("previous", can_go_previous() ? 0.7 : 0.1);
set_opacity("next", can_go_next() ? 0.7 : 0.1);
+ set_opacity("close", 0.7);
}
function set_opacity(id, amount)
}
}
+function do_close()
+{
+ window.location = global_return_url;
+}
+
// enable the horrible horrible IE PNG hack
function ie_png_hack()
{
];
var global_vhost = "%VHOST%";
var global_evt = "%EVENT%";
+var global_return_url = "%RETURNURL%";
var global_image_num = %START%;
//-->
</script>
<div class="container" id="main"></div>
<img id="previous" src="/previous.png" alt="<-" onmousedown="if (can_go_previous()) set_opacity('previous', 1.0)" onmouseup="if (can_go_previous()) { set_opacity('previous', 0.7); go_previous(); }" onmouseout="if (can_go_previous()) { set_opacity('previous', 0.7); }" />
<img id="next" src="/next.png" alt="->" onmousedown="if (can_go_next()) set_opacity('next', 1.0)" onmouseup="if (can_go_next()) { set_opacity('next', 0.7); go_next(); }" onmouseout="if (can_go_next()) { set_opacity('next', 0.7); }" />
+ <img id="close" src="/close.png" alt="x" onmousedown="set_opacity('close', 1.0)" onmouseup="set_opacity('close', 0.7); do_close();" onmouseout="set_opacity('close', 0.7);" />
</body>
</html>