include($_SERVER['DOCUMENT_ROOT'] . "/utfdb2con.php");
if ($dbcon) {
$rtn = pg_exec("SELECT * FROM news_headline WHERE areash='Y' AND (ctgy=70 OR ctgy=71) ORDER BY tdate DESC LIMIT 8");
$n=pg_num_rows($rtn);
if(!$rtn || !$n){ "ERROR! table news_headline";
}else{
for($i=0;$i<$n;$i++){
$row=pg_fetch_array($rtn,$i);
$tdate = explode(" ",$row['tdate']);
$ttime = explode(":",$tdate[1]);
$tdate = explode("-",$tdate[0]);
if(time() > mktime($ttime[0],$ttime[1],0,$tdate[1],$tdate[2],$tdate[0])){
if($row['photo']=="Y"){ $photo = " "; }else{ $photo = ""; }
?>
| echo(htmlspecialchars(strip_tags($row['title']))); ?>( echo($tdate[1]); ?>/ echo($tdate[2]); ?> echo($ttime[0]); ?>: echo($ttime[1]); ?>掲載) echo($photo); ?> |
}
}
}
}
?>
|