// -----------------------------------------------------------------------
	// 初期設定読込み
	// -----------------------------------------------------------------------
	@require_once("my_init.php");
	$page = f("p");
	if(!@preg_match("/^[\d]+$/",$page)){
		$page = 1;
	}
	
	// -----------------------------------------------------------------------
	// データ取得
	// -----------------------------------------------------------------------
	$_SESSION["ap"] = array();
	$fAry = array();
	$fAry = @glob(AP_FOL."*.dat");
	if(@count($fAry)){
		foreach($fAry as $k => $v){
			$ary = array();
			$ary = @unserialize(@file_get_contents($v));
			if($ary["visible"] == "表示"){
				$key = $ary["year"].$ary["month"].$ary["day"]."_".$ary["num"];
				$_SESSION["ap"][$key] = $ary;
			}
		}
	}
	
	
	// -----------------------------------------------------------------------
	// リスト生成
	// -----------------------------------------------------------------------
	$num  = f("n");
	$link = "";
	$data = "";
	if(@count($_SESSION["ap"])){
		@krsort($_SESSION["ap"]);
		$pmax = @ceil(@count($_SESSION["ap"])/MAX);
		$dAry = array();
		$dAry = @array_slice(@array_values($_SESSION["ap"]),(($page-1)*MAX),MAX);
		
		$linkAry = array();
		foreach($dAry as $k => $v){
			$flag = 0;
			if(!@preg_match("/^[\d]+_[\d]+$/",$num) && $data == ""){
				$flag++;
				$num = $v["num"];
			}else if($num == $v["num"]){
				$flag++;
			}
			
			// 表示記事
			if($flag){
				$sub_title1 = "";
				if($v["sub_title1"]){
$sub_title1=<<
\r\n EOL; if($v["start_year"] || $v["start_month"] || $v["start_day"]){ if($v["end_year"] || $v["end_month"] || $v["end_day"]){ $sub_title1 .= '
'; if($v["start_year"]){ $sub_title1 .= $v["start_year"]."年 ";} if($v["start_month"]){ $sub_title1 .= $v["start_month"]."月 ";} if($v["start_day"]){ $sub_title1 .= $v["start_day"]."日 〜 ";} if($v["end_year"]){ $sub_title1 .= $v["end_year"]."年 ";} if($v["end_month"]){ $sub_title1 .= $v["end_month"]."月 ";} if($v["end_day"]){ $sub_title1 .= $v["end_day"]."日";} $sub_title1 .= '
'; } } } $sub_title2 = ""; if($v["sub_title2"]){ $sub_title2=<<EOL; } if(@preg_match("/FUKUDAI/",$v["comment"])){ $comment = @preg_replace("/<\;FUKUDAI>\;/",'
',$v["comment"]); $comment = @preg_replace("/<\;\/FUKUDAI>\;/",'
',$comment); $comment = @preg_replace("/<\;FUKUDAI_CONTENT>\;/",'
',$comment); $comment = @preg_replace("/<\;\/FUKUDAI_CONTENT>\;/",'
',$comment); } $comment = @preg_replace("/<\;SUBTITLE>\;/",'',$comment); $comment = @preg_replace("/<\;\/SUBTITLE>\;/",'
',$comment); $comment = @preg_replace("/<\;CONTENT>\;/",'',$comment); $comment = @preg_replace("/<\;\/CONTENT>\;/",'
',$comment); $comment = @preg_replace("/SPBR/","'.$comment.'
'; } $title_sub = ""; if($v["title_sub"]){ $title_sub = '('.$v["title_sub"].')
'; } $data=<<$sub_title1 $sub_title2 $comment EOL; } // リンクリスト生成 $links = '
 
			