print ' </div>'."\n";
-print_html_body_end(\*STDOUT);
+print_html_body_end(\*STDOUT, $ong_state == STATE->{'inactive'});
print_html_end(\*STDOUT);
###PERL_COIN_DATE: COIN_DATE = 13-Nov-2016 22:15
###PERL_INTF_DATE: INTF_DATE = 28-Sep-2016 20:34
+###PERL_STORY_CREDITS: STORY_CREDITS = "BSTA" by Balthasar Szczepański
+###PERL_INTF_CREDITS: INTF_CREDITS = Online interface © Balthasar Szczepański; AGPL 3 license
+###PERL_SOURCE_URL: SOURCE_URL = http://bicyclesonthemoon.info/git-projects/?p=ott/bsta
+
use constant STATE => {
'inactive' => 0,
'waiting' => 1,
}
sub print_html_body_end {
- (my $fh) = @_;
+ (my $fh, my $hide_credits) = @_;
print $fh ' </div>'."\n";
+ unless ($hide_credits) {
+ print $fh ' <p>'."\n";
+ print $fh ' '.html_entity_encode_dec(STORY_CREDITS(),1).'<br>'."\n";
+ print $fh ' '.html_entity_encode_dec(INTF_CREDITS(),1).'<br>'."\n";
+ print $fh ' <a href="'.html_entity_encode_dec(SOURCE_URL(),1).'" class="cz">source code</a>'."\n";
+ print $fh ' </p>'."\n";
+ }
print $fh ' <a href="/" class="cz">'.html_entity_encode_dec(WEBSITE(),1).'</a>'."\n";
print $fh ' </body>'."\n";
}
print $fh " </div>\n";
print $fh " </div>\n";
- print_html_body_end($fh);
+ print_html_body_end($fh, $ong_state == STATE->{'inactive'});
print_html_end($fh);
print $fh ' </tr>'."\n";
print $fh ' </table>'."\n";
print $fh ' <address>Apache/2.2.22 (Debian) Server at '.$_website.' Port 80</address>'."\n";
- print $fh ' /body>'."\n";
+ print $fh ' </body>'."\n";
print_html_end ($fh);
}
# the launch index
print $fh " </div>\n";
- print_html_body_end($fh);
+ print_html_body_end($fh, $ong_state == STATE->{'inactive'});
print_html_end($fh);
}
close ($fh);
#
# The coincidence interface
#
-# Copyright (C) 2016, 2017, 2023 Balthasar Szczepański
+# Copyright (C) 2016, 2017, 2023, 2024 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
'html_entity_encode_dec',
);
use bsta_lib (
- 'CHAT_STATE', 'CHAT_ACTION',
+ 'STATE', 'CHAT_STATE', 'CHAT_ACTION',
'fail_method', 'fail_content_type',
'get_remote_addr', 'get_id', 'get_password',
'print_html_start', 'print_html_end',
###PERL_DATA_CHAT_PATH: DATA_CHAT_PATH = /botm/data/bsta/chat
###PERL_DATA_COIN_PATH: DATA_COIN_PATH = /botm/data/bsta/coincidence
###PERL_DATA_SETTINGS_PATH: DATA_SETTINGS_PATH = /botm/data/bsta/settings
+###PERL_DATA_STATE_PATH: DATA_STATE_PATH = /botm/data/bsta/state
###PERL_WEBSITE_NAME: WEBSITE_NAME = Bicycles on the Moon
my %coin;
my %chat;
my %settings;
+my %state;
my $time = time();
srand ($time-$$);
%coin = read_data_file(DATA_COIN_PATH());
%settings = read_data_file(DATA_SETTINGS_PATH());
+%state = read_data_file(DATA_STATE_PATH());
$password_ok = ($password eq $settings{'password'});
print ' </div>'."\n";
-print_html_body_end(\*STDOUT);
+print_html_body_end(\*STDOUT, int($state{'state'}) == STATE->{'inactive'});
print_html_end(\*STDOUT);
story_length : 16
firstpage_length: 4
page_length : 16
+
+story_credits: "BSTA" by Balthasar Szczepański
+intf_credits: Online interface © Balthasar Szczepański; AGPL 3 license
+source_url: http://bicyclesonthemoon.info/git-projects/?p=ott/bsta
story_length : 16
firstpage_length: 4
page_length : 16
+
+story_credits: "BSTA" by Balthasar Szczepański
+intf_credits: Online interface © Balthasar Szczepański; AGPL 3 license
+source_url: http://bicyclesonthemoon.info/git-projects/?p=ott/bsta
story_length : 16
firstpage_length: 4
page_length : 16
+
+story_credits: "BSTA" by Balthasar Szczepański
+intf_credits: Online interface © Balthasar Szczepański; AGPL 3 license
+source_url: http://bicyclesonthemoon.info/git-projects/?p=ott/bsta
story_length : 16
firstpage_length: 4
page_length : 16
+
+story_credits: "BSTA" by Balthasar Szczepański
+intf_credits: Online interface © Balthasar Szczepański; AGPL 3 license
+source_url: http://bicyclesonthemoon.info/git-projects/?p=ott/bsta
PERL_COIN_DATE = @_PERL_CONSTANT_STR( COIN_DATE, $coin_date)
PERL_INTF_DATE = @_PERL_CONSTANT_STR( INTF_DATE, $intf_date)
+PERL_STORY_CREDITS = @_PERL_CONSTANT_STR( STORY_CREDITS, $story_credits)
+PERL_INTF_CREDITS = @_PERL_CONSTANT_STR( INTF_CREDITS , $intf_credits)
+PERL_SOURCE_URL = @_PERL_CONSTANT_STR( SOURCE_URL , $source_url)
+
PERL_GZIP = @_PERL_CONSTANT_STR( GZIP, $gzip)
PERL_RESET_PASSWORD = @_PERL_CONSTANT_STR( RESET_PASSWORD, $reset_password)