//ファイルが存在すればループ
$fl=fopen("admin/news_en.txt","r");
while(!feof($fl)){
$cnt++;
$cnt_name="a".$cnt;
$newmark=mktime(date("H"),date("i"),date("s"),date("m"),date("d")-11,date("Y"));
$id2=fgets($fl,4097);
$ndate2=fgets($fl,4097);
$title2=fgets($fl,4097);
$body2=fgets($fl,4097);
if($sday2!="\n"){
$jun[$cnt_name]=ereg_replace("\n","",$ndate2);
$id[$cnt_name]=ereg_replace("\n","",$id2);
$ndate[$cnt_name]=ereg_replace("\n","",$ndate2);
$title[$cnt_name]=ereg_replace("\n","",$title2);
$body[$cnt_name]=ereg_replace("\n","",$body2);
}
}
arsort($jun,SORT_NUMERIC);
$junban=array_keys($jun);
for($i=0;$i<4;$i++){
if($title[$junban[$i]]!=""){
$tit="";
$tit=split(",",$title[$junban[$i]]);
if(file_exists("admin/enimg/".$id[$junban[$i]]."_1.jpg")){ $it="jpg"; }
if(file_exists("admin/enimg/".$id[$junban[$i]]."_1.gif")){ $it="gif"; }
?>
echo date("Y.m.d.",$ndate[$junban[$i]]); ?> |
"> echo $tit[0]; ?> if($it!=""){ echo " "; } ?> if($newmark<$ndate[$junban[$i]]){ echo " "; } ?> |
$it="";
}
}
?>