getList(); //ブログデータ取得 $blog = new Entry; $logs = array(); switch($action){ case "top": $logs = $blog ->getRecent(1); break; case "recent": $logs = $blog ->getRecent(5); break; case "id": $tmp = explode("-",$parm); if (count($tmp) != 2){ $_SESSION["MESSAGE"] ="log_id specified incorrectly."; header('Location: '.URL_ERROR); exit; } $log_id["id"] = $tmp[0]; $log_id["log_date"] = $tmp[1]; $logs[] = $blog ->getLog($log_id["id"],$log_id["log_date"]); break; case "category": $logs = $blog ->getCagetoryList($parm); if (!empty($logs) and is_array($logs)){ //最新を先頭に $logs = array_reverse($logs); } break; case "month": case "day": $logs = $blog ->getLogList($parm); //最新を先頭に $logs = array_reverse($logs); break; default: $logs = $blog ->getRecent(1); } // ---------------------------------------------------------------------------------------------------------- // ここからHTML // ---------------------------------------------------------------------------------------------------------- ?>