#!/usr/local/bin/perl ############################################################################## # shiromuku(fs6)DIARY version 2.29 # Created 10/17/2005 # Copyright 2005 Shiromuku # Available at http://www.t-okada.com/cgi/ ############################################################################### # COPYRIGHT NOTICE (著作権の告示) # Copyright 2005 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. (このスクリプトは無償で使用または改変できます。ただしこの著作権の告知と上記のコメント、及びCGIにより生成されるHTML表示下部にある著作権表示部は変えないで下さい。) # 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.(このスクリプトを使用することにより、使用者はその使用によって起こる可能性のあるいかなる事柄に対する責務についても、私Shiromukuに免責の保証を与えることに同意したものとします。) # Redistributing and selling the code for this program without prior written consent is expressly forbidden.(前もって書面での承諾を得ることなくこのプログラムのコードを再配布したり売ったりすることは 明確に禁じられています。) ####################### package main; use strict; use CGI::Carp qw(fatalsToBrowser); ############################ my $libdir = './slib'; #通常変更不要 my $libdir1 = './lib'; #通常変更不要 my $tmpldir = './tmpl'; #通常変更不要 my $gl_cgi = './sfs6_diary_gl.cgi'; #通常変更不要 unshift @INC, "$libdir"; push @INC, "$libdir1"; require Scgi::ParseData; require Scgi; my $ua = 0; if ($ENV{'HTTP_USER_AGENT'} =~ /(DoCoMo|SoftBank|J-PHONE|Vodafone|KDDI-|UP\.Browser|DDIPOCKET|WILLCOM)/i) { $ua = 1; } my $gl; $gl->{version} = "version 2.29"; $gl->{script_name} = "shiromuku(fs6)DIARY"; $gl->{credit_url} = "http://www.t-okada.com/cgi/"; $gl->{userip} = $ENV{'REMOTE_ADDR'}; $gl->{libdir} = $libdir; $gl->{libdir1} = $libdir1; $gl->{tmpldir} = $tmpldir; $gl->{ua} = $ua; my$ps = Scgi::ParseData->new($gl); $gl = $ps->get_globals("$gl_cgi"); my$form; my $config = $ps->open_config ("$gl->{basedir}/$gl->{configfile}",$gl); if ($ENV{'CONTENT_LENGTH'} || $ENV{'QUERY_STRING'}) { $form = $ps->parse_data($gl,$config); } my %HoD = (); @HoD{"gl", "config"} = ($gl, $config); foreach (split(/\,/,$config->{img_file1})) {++$HoD{img_file1}{$_};} my $key; foreach $key (keys %{$form}) { $HoD{$key} = $form->{$key}; } if ($gl->{ua} == 1) { #my @tmplfile = qw(tophtml iconhtml loginhtml return_result_html); my @tmplfile = qw(iconhtml loginhtml return_result_html); foreach (@tmplfile) { my $tmplfile = $gl->{$_}; $tmplfile = "m_" . $tmplfile; $gl->{$_} = $tmplfile; } #$ps->error_basic("/$gl->{iconhtml}/"); } my$proc = Scgi->new(\%HoD); my $html = $proc->run; if ($gl->{ua} == 1) { require 'jcode.pl'; jcode::convert(\$html,"sjis"); } print "Content-type: text/html\n\n"; print $html; exit;