#!/usr/bin/perl
#
設定
$body = '';
#タイトル
$title = '簡易データベース';
#1ページの表示数
$page = 10;
#HPのフルパス
#$url = "http://www.treasures-jp.com/e-surugadai";
$url = "";
require 'su_sub.pl';
#■リクエスト処理
&request;
###########################################
if($FORM{'type'} eq "fra_san") {
&fra_san;
} elsif($FORM{'type'} eq "fra_text") {
&fra_text;
} elsif($FORM{'type'} eq "fra_que") {
&fra_que;
} elsif($FORM{'type'} eq "chi_san") {
&chi_san;
} elsif($FORM{'type'} eq "chi_text") {
&chi_text;
} elsif($FORM{'type'} eq "shin_text") {
&shin_text;
} elsif($FORM{'type'} eq "env_text") {
&env_text;
} elsif($FORM{'type'} eq "dic") {
&dic;
} elsif($FORM{'type'} eq "wine") {
&wine;
} elsif($FORM{'type'} eq "philo") {
&philo;
} elsif($FORM{'type'} eq "lite") {
&lite;
} elsif($FORM{'type'} eq "nov") {
&nov;
} elsif($FORM{'type'} eq "law") {
&law;
} elsif($FORM{'type'} eq "eng") {
ŋ
} elsif($FORM{'type'} eq "ger") {
&ger;
} elsif($FORM{'type'} eq "other") {
&other;
} elsif($FORM{'type'} eq "link") {
&link;
} elsif($FORM{'type'} eq "what") {
&what;
}
###########################################
#-----------------------------------------------------------------------------------
sub fra_san {
#データベースファイル
$file = "csvdata/fra_san.csv";
#■検索処理
&search;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/fra_san_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$kind,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$price2,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/fla_san_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub fra_text {
#データベースファイル
$file = "csvdata/fra_text.csv";
#■検索処理
&search;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/fra_text_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$kind,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$price2,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/fla_text_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub fra_que {
#データベースファイル
$file = "csvdata/fra_que.csv";
#■検索処理
&search;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/fra_que_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$kind,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$price2,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/fla_que_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub chi_san {
#データベースファイル
$file = "csvdata/chi_san.csv";
#■検索処理
&search;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/chi_san_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$kind,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$price2,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/chi_san_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub chi_text {
#データベースファイル
$file = "csvdata/chi_text.csv";
#■検索処理
&search;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/chi_text_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$kind,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$price2,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/chi_text_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub shin_text {
#データベースファイル
$file = "csvdata/shin_text.csv";
#■検索処理
&search1;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/shin_text_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$kind,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/shin_text_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub env_text {
#データベースファイル
$file = "csvdata/env_text.csv";
#■検索処理
&search3;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/env_text_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/env_text_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub dic {
#データベースファイル
$file = "csvdata/dic.csv";
#■検索処理
&search;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/dic_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$kind,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$price2,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/dic_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub wine {
#データベースファイル
$file = "csvdata/wine.csv";
#■検索処理
&search;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/wine_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$kind,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$price2,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/wine_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub philo {
#データベースファイル
$file = "csvdata/philo.csv";
#■検索処理
&search1;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/philo_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$kind,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/philo_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub lite {
#データベースファイル
$file = "csvdata/lite.csv";
#■検索処理
&search1;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/lite_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$kind,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/lite_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub nov {
#データベースファイル
$file = "csvdata/nov.csv";
#■検索処理
&search1;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/nov_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$kind,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/nov_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub law {
#データベースファイル
$file = "csvdata/law.csv";
#■検索処理
&search1;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/law_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$kind,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/law_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub eng {
#データベースファイル
$file = "csvdata/eng.csv";
#■検索処理
&search;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/eng_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$kind,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$price2,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/eng_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub ger {
#データベースファイル
$file = "csvdata/ger.csv";
#■検索処理
&search;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/ger_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$kind,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$price2,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/ger_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub other {
#データベースファイル
$file = "csvdata/other.csv";
#■検索処理
&search2;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/other_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$title,$sub,$name1,$name2,$kikaku,$pag,$price1,$price2,$isbn,$com,$writerurl,$imgfile) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/mainimg/other_r1_c1.gif";
&description;
print "\n";
&desp_mail;
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
#-----------------------------------------------------------------------------------
sub what {
#データベースファイル
$file = "csvdata/what.csv";
#■検索処理
&searchw;
print "Content-type: text/html\n\n";
$topnavi = "$url/mainimg/what_r01_c01.gif";
&starthp;
###########################################
#######ここからデータ処理
if (!@NEW) { print "●ご指定のデーターは見当たりませんでした.\n"; }
else {
foreach $data (@NEW) {
($number,$today,$title,$subcontents,$contents) = split(/\,/,$data);
#######ここからデータ表示
$stitle = "$url/top/top_r1_c1.gif";
print <<"EOL";
\n";
}
###########################################
if ($next_num ne '') {
while (($key,$val) = each %FORM2) {
if ($key ne 'FF') { $buf = "$buf&$key=$val"; }
}
print "
\n";
}
}
############################################
&endhp;
}
print "\n";
exit;