# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# TODO: FQ NBSP ?
+
package bsta_lib;
use strict;
#use warnings
use utf8;
+use Encode ('encode', 'decode');
use Exporter;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
'html_entity_encode_dec',
'merge_url',
'read_header_env',
- 'read_data_file', 'write_data_file'
+ 'read_data_file', 'write_data_file',
+ 'join_path'
);
###PERL_PATH_SEPARATOR: PATH_SEPARATOR = /
###PERL_CGI_TIMER_PATH: CGI_TIMER_PATH = /bsta/timer.js
###PERL_CGI_VIEWER_PATH: CGI_VIEWER_PATH = /bsta/v
+###PERL_DATA_PATH: DATA_PATH = /botm/data/bsta/
+###PERL_DATA_DEFAULT_PATH: DATA_DEFAULT_PATH = /botm/data/bsta/default
+
+###PERL_WWW_INDEX_PATH: WWW_INDEX_PATH = /botm/www/1190/bsta/index.htm
+
###PERL_SCHEME: SCHEME = http
###PERL_WEBSITE: WEBSITE = 1190.bicyclesonthemoon.info
###PERL_FAVICON_PATH: FAVICON_PATH = /img/favicon.png
# my $prev_frame = $frame - 1;
my $next_frame = $frame + 1;
- my $title = $frame_data->{'title'};
- my $command = $next_frame_data->{'title'};
+ my $title = $frame_data->{'title'};
+ my $command = ($frame_data->{'command'} ne '') ?
+ $frame_data->{'command'} :
+ $next_frame_data->{'title'};
my $access = $context->{'access'};
my $password_ok = $context->{'password_ok'};
);
my $show_command = (
$password_ok ||
+ (!$access) ||
($frame < $last_frame) || (
($ong_state >= STATE->{'ready'}) &&
$context->{'show_command'}
$viewer_next_url = merge_url($viewer_next_url, {'query' => $password_query, 'append_query' => 1});
$viewer_last_url = merge_url($viewer_last_url, {'query' => $password_query, 'append_query' => 1});
if ($frame_indirect) {
- $frame_url = merge_url($frame_url , {'query' => $password_query, 'append_query' => 1});
+ $frame_url = merge_url($frame_url , {'query' => $password_query, 'append_query' => 1});
}
if ($nextframe_indirect) {
- $frame_url = merge_url($frame_next_url, {'query' => $password_query, 'append_query' => 1});
+ $frame_next_url= merge_url($frame_next_url , {'query' => $password_query, 'append_query' => 1});
}
}
my $_base_url = html_entity_encode_dec($base_url , 1);
print $fh ':<span id="ongm" class="'.$timer_color_m.'">'.$timer_m.'</span>';
print $fh ':<span id="ongs" class="'.$timer_color_s.'">'.$timer_s.'</span>]<br>'."\n";
}
- print '>';
+ print $fh '>';
if ($show_command_link) {
print $fh '<a href="'.($access ? $_viewer_next_url : $_viewer_last_url).'">';
}