<% my $id = $Request->QueryString('id'); %>
Wiadomo¶ci


<% use DBI; my $dbh = DBI->connect("dbi:Pg:dbname=forum", "forum", "alamakota")|| warn "Cannot connect do database, $DBI::errstr"; my $sth=$dbh->prepare(" select id, author, head, title, picture, caption, teaser, body , to_char(ts,'yyyy.mm.dd hh24:mi') as time from news where id = '$id' "); $sth->execute(); my ($id, $author, $head, $title, $body, $picture, $caption, $time); while ( ($id, $author, $head, $title, $picture, $caption, $teaser, $body, $time) = $sth->fetchrow_array ) { print "

$head

\n"; print "

$title

\n"; if ($picture ) { if ( -e "../images/news/mini/$picture" ) { print $caption?'
':'', " ", $caption? "

$caption

": ''; } else { print $caption?'
':''," ", $caption? "

$caption

": ''; } } my @body = split ("\n", $body ); foreach (@body) { print "

$_

\n"; } print "
$author
" ; } %>