use Exporter;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+###PERL_EXPORT_VERSION: our $VERSION = 'x.x.x';
+our @ISA = qw(Exporter);
+our @EXPORT = ();
+our @EXPORT_OK = (
+ 'STATE',
+ 'entityencode', # TO REMOVE
+ 'failpage', 'fail_method', 'fail_content_type',
+ 'gethttpheader', 'getcgi', # TO REMOVE
+ 'urldecode', # TO REMOVE
+ 'readdatafile', 'writedatafile', 'printdatafile',
+ 'printdatafileht', # TO REMOVE ???
+ 'urlencode', # TO REMOVE
+ 'linehtml',
+ 'bb2ht', 'bb2bb'
+);
+
+###PERL_LIB: use lib /botm/lib/bsta
+use botm_common (
+ 'html_entity_encode_dec'
+);
+
+###PERL_CGI_GOTO_PATH: CGI_GOTO_PATH = /bsta/g
+###PERL_CGI_LOGO_PATH: CGI_LOGO_PATH = /bsta/botmlogo.png
+
+###PERL_WEBSITE: WEBSITE = 1190.bicyclesonthemoon.info
+
+
# TO REMOVE
use constant entitycode => {
'amp' => '&',
'/?' => '[/unknown!]',
};
-###PERL_EXPORT_VERSION: our $VERSION = 'x.x.x';
-our @ISA = qw(Exporter);
-our @EXPORT = ();
-our @EXPORT_OK = (
- 'STATE',
- 'entityencode' # TO REMOVE
- 'failpage', 'fail_method', 'fail_content_type',
- 'gethttpheader', 'getcgi', # TO REMOVE
- 'urldecode', # TO REMOVE
- 'readdatafile', 'writedatafile', 'printdatafile',
- 'printdatafileht', # TO REMOVE ???
- 'urlencode', # TO REMOVE
- 'linehtml',
- 'bb2ht', 'bb2bb'
-);
-
-###PERL_LIB: use lib /botm/lib/bsta
-use botm_common (
- 'html_entity_encode_dec'
-);
+use constant HTML_START =>
+ '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">'."\n".
+ '<html lang="en">'."\n";
+use constant HTML_END =>
+ '</html>'."\n";
+use constant HTML_HEAD_START =>
+ '<head>'."\n".
+ '<meta http-equiv="Content-type" content="text/html; charset=UTF-8">'."\n";
+use constant HTML_HEAD_END =>
+ '</head>'."\n";
+use constant HTML_BODY_START =>
+ '<body>'."\n".
+ '<a href="/"><img id="botmlogo" src="'.html_entity_encode_dec(CGI_LOGO_PATH).'" alt="'.html_entity_encode_dec(WEBSITE).'"></a>'."\n".
+ '<div id="all">'."\n";
+use constant HTML_BODY_END =>
+ '</div>'."\n".
+ '<a href="/" class="cz">'.html_entity_encode_dec(WEBSITE).'</a>'."\n".
+ '</body></html>'."\n";
# Function to return an error page
sub fail_content_type
{
- (my $content_type, $method) = @_
+ (my $content_type, my $method) = @_;
return failpage(
"Status: 415 Unsupported Media Type\n",
###PERL_LIB: use lib /botm/lib/bsta
use botm_common (
- 'read-header_env',
- 'read_data_file', 'write_data_file'
+ 'read_header_env',
+ 'read_data_file', 'write_data_file',
+ 'url_query_decode',
+ 'join_path'
);
use bsta_lib (
'STATE',
'fail_method', 'fail_content_type',
'entityencode',
- 'printdatafileht'
+ 'printdatafileht',
'urlencode',
- 'bb2ht', 'bb2bb', 'linehtml'
+ 'bb2ht', 'bb2bb', 'linehtml',
+
+ 'readdatafile', 'writedatafile'
);
use File::Copy;
else {
$frame = 0;
}
-$frame_data_path = join_path('/', DATA_PATH, $frame);
+$framedata_path = join_path('/', DATA_PATH, $frame);
if ($cgi{'p'} =~ /^(.+)$/) {
$password = $1;
%settings = read_data_file(DATA_SETTINGS_PATH);
%default = read_data_file(DATA_DEFAULT_PATH);
-%framedata= read_data_file($frame_data_path);
+%framedata= read_data_file($framedata_path);
if ($password eq $settings{'password'}) {
$passwordOK = 1;
}
if ($frame < 0) {
$frame = int($state{'last'}) + $frame +1;
- $frame_data_path = join_path('/', DATA_PATH, $frame);
- %framedata = read_data_file($frame_data_path);
+ $framedata_path = join_path('/', DATA_PATH, $frame);
+ %framedata = read_data_file($framedata_path);
}
if (