#!/usr/local/bin/perl
##############################################################################
# shiromuku(bu2)BBS version 2.82
# Created 04/22/2002
# Copyright 2002 Shiromuku
# Available at http://www.t-okada.com/cgi/
###############################################################################
# COPYRIGHT NOTICE (著笹國の告示)
# Copyright 2002 Shiromuku All Rights Reserved.
# This script can be used and modified free of charge as long as you don't change this header or any of the parts that give me credit for writing this. (このスクE廛箸鰐欺で使用または改変できます。ただしこの著笹國の告知と上記のコメント、及びCGIによE言さEETML表示下部にあE笹國表示部は変えないで下さい。)
# By using this script you agree to indemnify me from any liability that might arise from its use. In simple English, if this script somehow makes your computer run amuck and kill the pope, it's not my fault.(このスクE廛箸鮖藩僂垢E海箸砲茲蝓∋藩兌圓呂修了藩僂砲茲辰撞こE椎柔のあEいなE柄に対すE嫐海砲弔い討癲∋Shiromukuに免責の保証を与えE海箸貌碓佞靴燭發里箸靴泙后)
# Redistributing and selling the code for this program without prior written consent is expressly forbidden.(前もって書面での承諾を得E海箸覆このプ前ラムのコードを再配布したE笋辰燭蠅垢E海箸 明確に禁じらE討い泙后)
#######################
require './jcode.pl';
require './sbu2_bbs_lib.cgi';
#######################
use strict;
my $gl = &get_globals("sbu2_bbs_gl.cgi");
$gl->{version} = "version 2.82";
my ($form, $filename);
my $config = &open_config ($gl);
if ($ENV{'CONTENT_LENGTH'} || $ENV{'QUERY_STRING'}) {$form = &parse_data($gl,$config);}
my %HoD = ();
@HoD{"gl", "config", "form"} = ($gl, $config, $form);
if ($config->{use_view_pass}) {
my%boardname = split(/\,/,$HoD{gl}{boardname});
my$cookie = &get_cookie (\%boardname);
#print "Content-type: text/html\n\n";
#print "cookie/$cookie->{view_password}\n";
if ($HoD{form}{view_password}) {
&check_view_pass (\%HoD,"view_pass");
}
else {
if ($cookie->{view_password}) {
$HoD{form}{view_password} = $cookie->{view_password};
&check_view_pass (\%HoD,"view_pass");
}
else {&return_login(\%HoD); exit (0) ;}
}
}
if ($ENV{'REQUEST_METHOD'} eq "POST") {
if ($form->{action} eq "admin_enter") {&return_admin_enter(\%HoD);}
elsif ($form->{action} eq "show_icon") {&show_icon(\%HoD);}
elsif ($form->{action} eq "reply") {&return_reply(\%HoD);}
elsif ($form->{action} eq "search_all") {&search_all(\%HoD);}
elsif ($form->{action} eq "showlast") {&return_html(\%HoD);}
elsif ($form->{action} eq "user") {&user(\%HoD);}
elsif ($form->{action} eq "user_a") {&user(\%HoD);}
exit (0) ;
}
else {
if ($form->{action} eq "show_icon") {&show_icon(\%HoD); exit (0);}
$filename = "$gl->{basedir}/$gl->{passfile}";
if (-e $filename) {&return_html(\%HoD);}
else {
&head("管理用ページ", \%HoD);
print "