#!/usr/bin/perl $file = '../../NEWS/nph-n001.html'; $file = '../../NEWS/news_daily.html'; require '../libs/vibeinit.pl'; &init; &parse_option; &page_header; # if($FORM{name} eq "") { &error('name undefined.'); } my $news_ymd = $FORM{news_ymd}; my $news_index = ''; my $news_description = ''; @usagelist = ( 'news_ymd', 'YMD', '日付' ); $dbh=&dbi_connect; unless ($news_ymd) { $sth = $dbh->prepare( " select max(to_char(news_ymd, 'YYYY.MM.DD')) from news where web_flg = '1'" ) || &dbi_error; $sth->execute; if( @row = $sth->fetchrow ) { $news_ymd = $row[0]; } $sth->finish; if( $news_ymd eq '' ) { $dbh->disconnect; &error('データベースが存在しません'); } } my( $year, $month, $mday ) = split /\D/, $news_ymd; $news_ymd = sprintf("%d.%d.%d", $year, $month, $mday); $execsql= <= trunc(sysdate) and News.JOHO_Src = JOHO_Src.JOHO_Src(+) and News.Cont_CD1 = Cont1.Cont_CD(+) and trunc(sysdate) <= NVL(Cont1.limit_ymd(+), sysdate) and News.Cont_CD2 = Cont2.Cont_CD(+) and trunc(sysdate) <= NVL(Cont2.limit_ymd(+), sysdate) ORDER BY TO_NUMBER(News.News_rnk) EOM $sth = $dbh->prepare($execsql) || &dbi_errir; $sth->execute; my $count = 0; my $total = 0; my $arrowinit1 = ''; my $arrowinit2 = ''; $sth->bind_columns( undef, \( $header, $joho_src, $detail, $cont1, $cont2, $hanken1, $hanken2, $news_cd, $real, $wmp, $news_rnk ) ); while( $sth->fetch ) { my $button = 'button' . ($count * 3 + 1); my $bbsbutton = 'button' . ($count * 3 + 2); my $topbutton = 'button' . ($count * 3 + 3); $arrowinit1 .= < \t\t\t\t\t\t\t\t\t\tarrow \t\t\t\t\t\t\t\t\t\t$header $joho_src \t\t\t\t\t\t\t\t\t EOM $news_descriptions .= < \t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t
$news_ymd
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$header
$detail $joho_src
\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t EOM $news_descriptions .= < EOM if( $cont1 ) { if( $cont2 ) { $news_descriptions .= < \t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t(c)$hanken1 \t\t\t\t\t\t\t\t\t\t\t(c)$hanken2 \t\t\t\t\t\t\t\t\t\t\t EOM } else { $news_descriptions .= <
\t\t\t\t\t\t\t\t\t\t\t(c)$hanken1 EOM } } $news_descriptions .= < \t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t
ニュース画像が
\t\t\t\t\t\t\t\t\t\t\t\t\t\tストリーミングで
\t\t\t\t\t\t\t\t\t\t\t\t\t\tご覧いただけます。
EOM $news_descriptions .= < \t\t\t\t\t\t\t\t\t\t\t\t\t\tReal Player
EOM $news_descriptions .= <
Windows
\t\t\t\t\t\t\t\t\t\t\t\t\t\tMedia Player
EOM $news_descriptions .= < \t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t
EOM $news_descriptions .= < \t\t\t\t\t\t\t\t\t EOM } $sth->finish; $dbh->disconnect; $arrowinit1 .= $arrowinit2; ## デザインファイルの読み込み if( open(F, $file) ) { while( ) { if( ~ //$news_ymd/g; ~ s//$news_index/g; ~ s//$news_descriptions/g; ~ s//$arrowinit1/g; } print; } close F; }