#!/usr/bin/perl #--------------- # program-ID:pet14.cgi # auther :tokuda # date :2002/02/05 #----------------------- use CGI; use DBI; $query = new CGI; $t0id = $query->param('ibango'); print "content-type: text/html\n\n"; #---------- $username="egi"; if($t0id){ $dbh = DBI->connect("dbi:Pg:dbname=egi",$username) or die "cannot connect: ",$DBI->errstr(); $iselect = "select banngo, name, petname, type, sex, owner, birthday, comment, photo from pet_info where banngo=?"; $sth = $dbh->prepare($iselect) or die "cannot prepare: ",$dbh->errstr(); $sth->execute($t0id) or die "cannot execute: ", $sth->errstr(); } #----------- print "<HTML>\n"; print "<HEAD><TITLE>select</TITLE>\n"; print "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;charset=x-euc-jp\">\n"; #print "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=EUC-JP\"> #print "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;charset=ISO-2002-JP\">\n" #print "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;charset=shift_JIS\">\n" print "</HEAD>\n"; print "<BODY bgcolor=LINEN>\n"; #print "<CENTER>\n"; print "<H5>\n"; print "<TABLE BORDER = 1 bgcolor=#98FBBB>\n"; if($t0id){ @row = $sth->fetchrow_array(); } print "<I>$row[1]のページ</I>\n"; print "<P>\n"; print "<TR BGCOLOR=><TH>番号</TH><TD>$row[0]</TD></TR>\n"; print "<TR BGCOLOR=><TH>名前</TH><TD>$row[1]</TD></TR>\n"; print "<TR BGCOLOR=><TH>愛称</TH><TD>$row[2]</TD></TR>\n"; print "<TR BGCOLOR=><TH>種類</TH><TD>$row[3]</TD></TR>\n"; print "<TR BGCOLOR=><TH>性別</TH><TD>$row[4]</TD></TR>\n"; print "<TR BGCOLOR=><TH>飼い主</TH><TD>$row[5]</TD></TR>\n"; print "<TR BGCOLOR=><TH>誕生日</TH><TD>$row[6]</TD></TR>\n"; print "<TR BGCOLOR=><TH>飼い主のコメント</TH><TD>$row[7]</TD></TR>\n"; print "<TR BGCOLOR=><TH>写真</TH><TD>$row[8]</TD></TR>\n"; print "</TABLE>\n"; print "<P>"; print "<IMG SRC=\"../photo/$row[8]\">"; #print "<IMG SRC=mimi2000-1.jpg>"; print "<A HREF=\"./pet11.cgi\">戻る</A>"; #print "</CENTER>\n"; print "</BODY>\n"; print "</HTML>\n";