# ------------------------- # # Main Program # メイン処理 # ------------------------- # &decode; &openinpetdata; &titlecheck; if ($FORM{'mode'} eq "end") { &error("$endmsg"); } elsif ($FORM{'mode'} eq "endname") { &error; } elsif ($FORM{'mode'} eq "newpet") { &newpet; } elsif ($FORM{'mode'} eq "nopet") { &nopet; } elsif ($FORM{'mode'} eq "owner") { &ownerlist; } elsif ($FORM{'mode'} eq "entername") { &petform; } elsif ($FORM{'mode'} eq "back") { &petform; } elsif (!$FORM{'mode'}) { &entername; } else { &action; } exit; |
# ------------------------- # # Sub Error # エラー # ------------------------- # sub error { &unlock; if ($headflag == 0) { &header; } print "<center><hr width='80%'><P>\n"; if ($FORM{'mode'} eq 'endname') { if ($ending == 1) { print "<center>\n"; print "<img src=\"$img$endimg\">\n"; print "</center>\n"; } print "<P>$font2<B>$FORM{'name'}さん、また来てね。</B></font>\n"; } else { if ($FORM{'mode'} eq 'end' && $ending == 1) { print "<center>\n"; print "<img src=\"$img$endimg\">\n"; print "</center>\n"; } print "<P>$font2<B>$_[0]</B></font>\n"; } # ←忘れずに閉じてください。 print "<P><hr width='80%'></center>\n"; &footer; exit; } |
# ------------------------- # # Sub Body Bottom # ボディ下部 # ------------------------- # sub bodybottom { print "</td>\n"; print "</tr>\n"; print "<tr>\n"; print "<td>\n"; print "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"$barcolor\">\n"; print "<tr>\n"; print "<td valign=\"bottom\"><img src=\"$img$lbimg\" width=\"$ris\" height=\"$ris\"></td>\n"; print "<td><div align=\"center\">"; print "<a href=\"$backurl\" target=\"$backtarget\">[$backword]</a>\n" if $printback == 1; print " <a href=\"$cgiurl?mode=owner&name=$FORM{'name'}&pass=$FORM{'pass'}\">[飼い主ランキング]</a>\n" if $actionflag == 1; if ($FORM{'mode'} eq "owner") { print " <a href=\"$cgiurl?mode=back&name=$FORM{'name'}&pass=$FORM{'pass'}\">[戻る]</a>\n"; } elsif ($FORM{'mode'} ne "end") { if (!$FORM{'mode'}) { print " <a href=\"$cgiurl?mode=end\">[終了]</a>\n"; } else { print " <a href=\"$cgiurl?mode=endname&name=$FORM{'name'}\">[終了]</a>\n"; } } print "</div></td>"; print "<td valign=\"bottom\"><div align=\"right\"><img src=\"$img$rbimg\" width=\"$ris\" height=\"$ris\"></div></td>\n"; print "</tr>\n"; print "</table>\n"; print "</td>"; print "</tr>\n"; print "</form>\n"; print "</table>\n"; print "</div>\n"; } |