#!/usr/local/bin/perl ##----製作者----## # # Players who's who Version 1.10 # # This is Freeware. # Script written by Masayoshi # Created on: 2002.09.15 # Update: 2002.09.16 # Copyright (C) 2002 Masayoshi. All Rights Reserved. # I can be reached at: masayosi@mahoroba.ne.jp # Scripts Found at: http://www3.mahoroba.ne.jp/~masayosi/cgi-labo/index.html # ############################################################ require '../cgi-lib.pl'; &ReadParse(in); ##----設定----## # タイトル $title = "Players who's who"; # 記録ファイル $dat = "pww.dat"; # Home Page URL $home = "http://www3.mahoroba.ne.jp/~masayosi/cgi-labo/index.html"; # 色設定 $bgcolor = "#8080FF"; $tdbg = "#FFFFFF"; $text = "#000000"; $link = "#000000"; $vlink = "#990000"; $alink = "#FF3300"; $hlink = "#FF0000"; ##----設定終了----## $in{'word'} =~ s//>/g; $word = $in{'word'}; $start = $in{'start'}; $hyouji = $in{'hyouji'}; print "Content-type: text/html\n\n"; print <<"EOM"; $title

$title

EOM ##----分岐----## if($word eq ""){ &input; &end; exit; } else{ print "

You searched for : $word

\n"; &seek; &end; } ##----検索窓----## sub input{ print <<"EOM";

EOM } ##----検索----## sub seek{ open (FILE, "$dat"); @allbody = ; close(FILE); $hit = 0; $count = 0; foreach $line (@allbody){ $count += 1; if($count > $start){ $position = index $line, $word; if($position > 0){ chomp $line; ($ename, $jname, $natio, $birthplace, $position, $heiwei, $birth, $caps, $score, $wcup, $club) = split(/:/,$line); $club =~ s/<>/
/g; $wcup =~ s/<>/
/g; $hit += 1; &result; &next; } } } if($hit == 0){ print "

一致しませんでした

\n"; } $last = @allbody; if($count == $last){ &end; } } ##----結果表示----## sub result{ print <<"EOM";
名前 $ename
$jname
国籍 $natio 出身地 $birthplace
ポジション $position 生年月日 $birth
代表\歴 $caps試合 $score得点 身長・体重 $heiwei
所属クラブ W杯出場
$club $wcup

EOM } ##----次項表示----## sub next{ if($hit == $hyouji){ print <<"EOM";
EOM &end; } } ##----終了----## sub end{ print <<"EOM";

Players who's who Ver. 1.10

EOM exit; }