caching = true; $smarty->cache_lifetime = 86400; $smarty->template_dir = SITE_PATH."/templates"; $smarty->compile_dir = SITE_PATH."/templates_c"; $smarty->cache_dir = SITE_PATH."/cache"; if($smarty->is_cached('archive.html',$cache_id)) { $smarty->display('archive.html',$cache_id); }else{ /* ////////////////////////////////////// //前処理 ////////////////////////////////////// */ if($getar == index){ function getMonth($month){ return mktime(date("H"),date("i"),date("s"),date("m")-$month,date("d"),date("Y")); } $count = 2; $i = 0; while($i<=11){ $file = date("Ym",getMonth($i)); if(file_exists("daily/archive_".$file.".php")){ if($count > 4)$count = 4; $ardata = @join("",@file("daily/archive_".$file.".php")); $data .= "".date(Y年m月,getMonth($i))."のエントリーリスト\n".$ardata; $count++; } $i++; } }else{ if(file_exists("daily/archive_".$_GET['archive'].".php")){ $ardata = @join("",@file("daily/archive_".$_GET['archive'].".php")); $data .= '

'.$pagetitle.'

'.$ardata.'
'; }else{$data .= "
".date(Y年m月,$_GET['archive'])."のアーカイブはありません。
\n";} } $smarty->assign('archive_data',$data);//アーカイブデータ unset($data); /* //////////////////////////////////// //必須データ //////////////////////////////////// */ $smarty->assign('blogname',SITE_NAME);//ブログ名 $smarty->assign('blogurl',BLOG_URL);//ブログURL $smarty->assign('pagetitle' , $page); //ページタイトル $smarty->assign('pageurl' , $pageurl); //ページURL $smarty->assign('categorytitle' , $page);//カテゴリータイトル //左メニュー $smarty->assign("blogmenu" , str_replace('', BLOG_URL ,join("",file(PLAMO_DIR.'/config'.SITE_DIR.'/left-menu.php')))); //コピーライト $smarty->assign('cpyright' , @join("" , @file("styles/cpyright.php"))); //ページURL /* //////////////////////////////////// //SMARTYインクルード・パス //////////////////////////////////// */ //アーカイブメニュー if(file_exists('daily/archive_'.date(Ym).'.php')){ $menu_archive = @join("",@file('daily/archive_'.date(Ym).'.php')); $smarty->assign('archivelist',$menu_archive); } //アクセス解析 if(file_exists(PLAMO_DIR.'/config'.SITE_DIR.'/analyzer.php')){ $smarty->assign('analyzer' , @join("",@file(PLAMO_DIR.'/config'.SITE_DIR.'/analyzer.php'))); } //メニューリンク if(file_exists(PLAMO_DIR.'/config'.SITE_DIR.'/sitelink.php')){ $smarty->assign('menulink', @join("",@file(PLAMO_DIR.'/config'.SITE_DIR.'/sitelink.php'))); } //メニューコンテンツ if(file_exists(PLAMO_DIR.'/config'.SITE_DIR.'/menu-bottom.php')){ $smarty->assign('menucontents', @join("",@file(PLAMO_DIR.'/config'.SITE_DIR.'/menu-bottom.php'))); } $smarty->display('archive.html',$cache_id); } ?>