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('index.html',$cache_id)) { $smarty->display('index.html',$cache_id); }else{ //ファイルチェック if(!file_exists(PLAMO_DIR.'/config'.SITE_DIR.'/ini/parts_config.ini')){include(PLAMO_DIR.'/setting/alarm/alarm2.php'); exit;} if(!file_exists(PLAMO_DIR.'/config'.SITE_DIR.'/left-menu.php')){include(PLAMO_DIR.'/setting/alarm/alarm3.php'); exit;} $ini = parse_ini_file(PLAMO_DIR.'/config'.SITE_DIR.'/ini/parts_config.ini'); if($ini['description'])$p_desc = str_replace('#keyword#',SITE_NAME,$ini['description']); if($ini[rssurl1] || $ini[rssurl2] || $ini[rssurl3]){ if(! file_exists('daily/'.date(Ymd).'.html')){ require("XML/RSS.php"); include(PLAMO_DIR.'/script/rssarchive.php');//RSS取得モジュール } } //トップページサイトマップ前処理 $catdata = @file(PLAMO_DIR.'/config'.SITE_DIR.'/category/category-list.php'); $i = 0; foreach($catdata as $items){ $items = preg_replace("/\r|\n/","",$items); if(file_exists(PLAMO_DIR.'/config'.SITE_DIR.'/category/entrylink_'.md5($items).'.php')){ $list[$i][title] = ''.$items.''; $entrylist = file(PLAMO_DIR.'/config'.SITE_DIR.'/category/entrylink_'.md5($items).'.php'); $count = count($entrylist); if($count > 9){ $entrylist = array_slice($entrylist,0,9); $entrylist[] = '
  • (他'.($count-9).'エントリー)
  • '; } $list[$i][body] = str_replace('BLOG_URL', BLOG_URL,@join("", $entrylist)); unset($entrylist,$count); $i++; } } if($list){ foreach($list as $item){ $sitemap .= '
    '.$item['title'].'
    '; } }else{ $sitemap .= '

    '; } /* //////////////////////////////////// //必須データ //////////////////////////////////// */ $smarty->assign('blogname' , SITE_NAME); //サイト名 $smarty->assign('blogurl' , BLOG_URL); //サイトURL $smarty->assign('pagetitle' , SITE_NAME); //ページタイトル $smarty->assign('pageurl' , BLOG_URL); //ページURL $smarty->assign('description', $p_desc); //左メニュー $smarty->assign("blogmenu" , str_replace('BLOG_URL', BLOG_URL ,join("",file(PLAMO_DIR.'/config'.SITE_DIR.'/left-menu.php')))); //コピーライト $smarty->assign('cpyright' , @join("" , @file("styles/cpyright.php"))); //ページURL //サイトマップ $smarty->assign('sitemap',$sitemap); /* //////////////////////////////////// //SMARTYインクルード・パス //////////////////////////////////// */ //トップページコンテンツ if(file_exists(PLAMO_DIR.'/config'.SITE_DIR.'/contents/toppage.php')){ $smarty->assign('topcontents', @join("",@file(PLAMO_DIR.'/config'.SITE_DIR.'/contents/toppage.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'))); } //アーカイブリスト if(file_exists('daily/archive_'.date(Ym).'.php')){ $smarty->assign('archivelist', @join("",@file('daily/archive_'.date(Ym).'.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.'/analyzer.php')){ $smarty->assign('analyzer' , @join("",@file(PLAMO_DIR.'/config'.SITE_DIR.'/analyzer.php'))); } $smarty->display('index.html',$cache_id); } ?>