-###PERL;
+###RUN_PERL: #!/usr/bin/perl
#
# /bsta/g
-# goto.pl is generated from goto.1.pl.
-# 02.07.2017
-#
+###RUN_PERL: #!/usr/bin/perl
+
# The frame list
#
-# Copyright (C) 2017 Balthasar Szczepański
+# Copyright (C) 2017, 2023 Balthasar Szczepański
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
#
-# 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/>.
+# 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/>.
use strict;
#use warnings;
-###LIB;
+###PERL_LIB: use lib /botm/lib/bsta
use bsta_lib qw(failpage gethttpheader getcgi readdatafile printdatafile entityencode urlencode);
use File::Copy;
-###DATA_PATH;
-###SETTINGS_PATH;
-###STATE_PATH;
-###LIST_PATH;
-###WEBSITE_NAME;
-###FAVICON_PATH;
-###CSS_PATH;
-###LOGO_PATH;
-###WEBSITE;
-###CGI_PATH;
-###VIEWER_PATH;
+###PERL_CGI_PATH: CGI_PATH = /bsta/
+###PERL_CGI_CSS_PATH: CGI_CSS_PATH = /bsta/bsta.css
+###PERL_CGI_LOGO_PATH: CGI_LOGO_PATH = /bsta/botmlogo.png
+###PERL_CGI_VIEWER_PATH: CGI_VIEWER_PATH = /bsta/v
+
+###PERL_DATA_PATH: DATA_PATH = /botm/data/bsta/
+###PERL_DATA_SETTINGS_PATH: DATA_SETTINGS_PATH = /botm/data/bsta/settings
+###PERL_DATA_STATE_PATH: DATA_STATE_PATH = /botm/data/bsta/state
+###PERL_DATA_LIST_PATH: DATA_LIST_PATH = /botm/data/bsta/list
+###PERL_WEBSITE: WEBSITE = 1190.bicyclesonthemoon.info
+###PERL_WEBSITE_NAME: WEBSITE_NAME = Bicycles on the Moon
+###PERL_FAVICON_PATH: FAVICON_PATH = /img/favicon.png
my %http;
my %cgi;
my $line;
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
-###PATH;
+###PERL_SET_PATH: $ENV{'PATH'} = /usr/local/bin:/usr/bin:/bin;
if ($ENV{'REQUEST_METHOD'} =~ /^(HEAD|GET|POST)$/) {
$method=$1;
$password='';
}
-%settings=readdatafile(SETTINGS_PATH);
-%state=readdatafile(STATE_PATH);
-%gotolist=readdatafile(LIST_PATH);
+%settings=readdatafile(DATA_SETTINGS_PATH);
+%state=readdatafile(DATA_STATE_PATH);
+%gotolist=readdatafile(DATA_LIST_PATH);
if($password eq $settings{'password'}){
$passwordOK = 1;
print '<title>GOTO • '.entityencode($settings{'story'}).' • '.WEBSITE_NAME.'</title>'."\n";
print '<meta http-equiv="Content-type" content="text/html; charset=UTF-8">'."\n";
print '<link rel="icon" type="image/png" href="'.FAVICON_PATH.'">'."\n";
-print '<link rel="stylesheet" href="'.CSS_PATH.'">'."\n";
+print '<link rel="stylesheet" href="'.CGI_CSS_PATH.'">'."\n";
print '</head><body>'."\n";
-print '<a href="/"><img id="botmlogo" src="'.LOGO_PATH.'" alt="'.WEBSITE.'"></a>'."\n";
+print '<a href="/"><img id="botmlogo" src="'.CGI_LOGO_PATH.'" alt="'.WEBSITE.'"></a>'."\n";
print '<div id="all">'."\n";
print '<div id="inst" class="ins">'."\n";
}
@timetab=gmtime($ongtime);
- print '<span class="'.(($frame==$last && int($state{'state'}<2))?'ni':'br').'">'.sprintf('%03d',$frame).'</span> '.sprintf('%02d.%02d.%02d %02d:%02d',$timetab[3],$timetab[4]+1,$timetab[5]-100,$timetab[2],$timetab[1]).' <a href="'.VIEWER_PATH.'/'.$frame.($passwordOK?('?p='.urlencode($password)):'').'">'.entityencode($title).'</a><br>'."\n";
+ print '<span class="'.(($frame==$last && int($state{'state'}<2))?'ni':'br').'">'.sprintf('%03d',$frame).'</span> '.sprintf('%02d.%02d.%02d %02d:%02d',$timetab[3],$timetab[4]+1,$timetab[5]-100,$timetab[2],$timetab[1]).' <a href="'.CGI_VIEWER_PATH.'/'.$frame.($passwordOK?('?p='.urlencode($password)):'').'">'.entityencode($title).'</a><br>'."\n";
}
print '</div>'."\n";