assign("mode", $mode); ## file ## $file = "index"; $smarty->assign("file", $file); ## キャリアチェック if($o_ua->carrier == "pc"){ ##スマートフォンか確認 include(_PROPERTIES_PATH."smartphone.inc"); $smp = 0; for($a = 0; $a < count($smartphone)-1 ; $a++) { $str = "/".$smartphone[$a]."/i"; $result = preg_match($str, $_SERVER['HTTP_USER_AGENT']); if ($result != 0 ){ $smp = 1; } } if($smp == 0){ ##PCにリダイレクト header("Location: "._DOCUMENT_ROOT); exit; } } ## クラス読み込み include(_CLASS_PATH."News.class.php"); $o_news = new News($o_db, _DOCUMENT_ROOT_LOCAL, $o_common); $limit = 1; ##重要なお知らせリストを取得 $news_list1 = $o_news->GetViewList(1, $limit); $smarty->assign("news_list1", $news_list1); ##重要なお知らせリストを取得 $news_list2 = $o_news->GetViewList(2, $limit); $smarty->assign("news_list2", $news_list2); ##ニュースリリースリストを取得 $news_list3 = $o_news->GetViewList(3, $limit); $smarty->assign("news_list3", $news_list3); if(date("Y")>=2017){ $smarty->assign("new_year_flag", 1); } $smarty->display("index.tpl"); ?>