my $access = $context->{'access'};
my $password_ok = $context->{'password_ok'};
my $text_mode = $context->{'text_mode'}
+ my $static = $context->{'static'};
+
+ my $timer_unlocked = int($context->{'timer_unlocked'});
+ my $timer = int($context->{'timer'};
my $last_frame = int($state->{'last'});
my $ong_state = int($state->{'state'});
+ my $timer_color_h = (($timer_unlocked >= 1) || ($ong_state >= STATE->{'ready'})) ? 'br' : 'ni';
+ my $timer_color_m = (($timer_unlocked >= 2) || ($ong_state >= STATE->{'ready'})) ? 'br' : 'ni';
+ my $timer_color_s = (($timer_unlocked >= 3) || ($ong_state >= STATE->{'ready'})) ? 'br' : 'ni';
+
+ my $timer_h;
+ my $timer_m;
+ my $timer_s;
+ if ($timer > 0) {
+ $timer_s = sprintf('%02d', $timer % 60);
+ $timer_h = int($timer / 60);
+ $timer_m = sprintf('%02d', $timer_h % 60);
+ $timer_h = sprintf('%02d', $timer_h / 60);
+ }
+ elsif (($timer >= -15) && ($ong_state >= STATE->{'ready'})) {
+ $timer_h = '00';
+ $timer_m = '00';
+ $timer_s = 'NG';
+ }
+ else {
+ $timer_h = 'EE';
+ $timer_m = 'EE';
+ $timer_s = 'EE';
+ }
+
my $prev_available = (($frame > 0) && $access');
my $next_available = ($password_ok' || ($next_frame <= $last_frame));
my $prefetch_next = (
$frame_url = $frame_indirect ?
merge_url(
{'path' => CGI_FRAME_PATH()},
- {'path' => $context->{'frame'}}
+ {'path' => $frame}
) :
$frame_normal_url;
$frame_full_url = merge_url(
}
print $fh '<div id="command">'."\n";
- # TODO
+
+ if ($show_timer) {
+ print $fh '[<span id="ongh" class="'.$timer_color_h.'">'.$timer_h.'</span>';
+ print $fh ':<span id="ongm" class="'.$timer_color_m.'">'.$timer_m.'</span>';
+ print $fh ':<span id="ongm" class="'.$timer_color_s.'">'.$timer_s.'</span>]';
+ }
print_html_body_end($fh);
print_html_end($fh);