#!/usr/bin/perl require './set.cgi'; #┏━━━━━━━━━━━━━━━━━━━━━━┓ #┃HoMePeT Copyright (c) Merino ┃ #┃CGI-Sweets [ http://cgi-sweets.com/ ] ┃ #┗━━━━━━━━━━━━━━━━━━━━━━┛ ⊤ exit; sub top { my $sub_m_home = qq|

*Home

| if $mv_mode; my $cgi_sweets_url = $mv_mode ? 'http://cgi-sweets.com/m/' : 'http://cgi-sweets.com/'; my $speak_word = ''; open my $fh, "< $speak_file" or $speak_word = "$speak_fileがない。"; rand($.) < 1 and $speak_word = $_ while <$fh>; close $fh; $speak_word =~ s/%([a-z]+?)%/&replace_word($1)/eg; $speak_word =~ s/。/$tail_word。/g; my $pet = int(rand($#pets+1)); print "Content-type: text/html; charset=shift_jis\n\n"; print <<"EOM"; $title
$speak_word
EOM if ($admin_only) { print qq|\n|; print qq|\n|; } else { print qq|\n|; print qq|\n|; } print <<"EOM";
$pet_name
はなす
$pet_nameの詳細
言葉を教える
ランキング
管理室
- HoMePeT -
$sub_m_home EOM } sub replace_word { my $line = ''; my $replace_romaji = shift; open my $fh, "< $memorydir/$replace_romaji.cgi" or $word = "$replace_romaji.cgiがない。"; rand($.) < 1 and $line = $_ while <$fh>; close $fh; my($word, $dmy) = split /<>/, $line; return $word ? $word : "$replace_romaji?"; }