header("HTTP/1.1 200 OK"); header("Content-Language: JA"); header("Content-Type: text/html; charset=utf-8"); header("Content-Script-Type: text/javascript"); header("content-style-type: text/css"); //インクルード require('config/all_config.php'); ini_set("include_path", PLAMO_DIR."/libs"); ini_set("display_errors","on"); error_reporting(E_ALL ^ E_NOTICE); //定数 define('TEMPLATE_LITE_DIR', 'Smarty/src/'); define('PUBLISH_CHARSET', 'UTF-8'); require('Smarty/libs/Smarty.class.php'); $cache_id = 'pages|index'; $smarty = new Smarty; $smarty->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[] = '