setCurrentBlock('__DiaryTitle__'); $template->setVariable('diary_title',$todays_diary[0]['title']); $template->parseCurrentBlock(); } //- 料理上手タイトルセット if(!empty($todays_jouzu[0])){ $template->setCurrentBlock('__JouzuTitle__'); $template->setVariable('jouzu_title',$todays_jouzu[0]['title']); $template->parseCurrentBlock(); } //- 本日の新レシピ if(!empty($top_today['today'])){ if(("3" == $p['version']) || ("2" == $p['version'] && "i" == $p['carrier']) || "w" == $p['carrier'] || "g" == $p['carrier']){ $template->setCurrentBlock('__ShowImage__'); if(file_exists($img_path)){ $template->setVariable('recipe_image',sprintf("\"本日の新レシピ\"",str_replace(KTY_SERVER_ROOT,"",$img_path))); } $template->parseCurrentBlock(); } $template->setCurrentBlock('__TopRecipe__'); $template->setVariable('date',sprintf("%d/%d",substr($top_today['today_date'],4,2),substr($top_today['today_date'],6,2))); $template->setVariable('rcp_no',$top_today['today'][0]['uniq_id']); $template->setVariable('title',$top_today['today'][0]['rcp_nm']); $template->parseCurrentBlock(); } //- xhtml if("i" == $p['carrier'] && $p['xhtml']) { ini_set('default_mimetype', 'application/xhtml+xml'); /* if(ereg("F900i\(",$p['agent'])) { var_dump($p); header("Content-Type: application/xhtml+xml;charset=Shift_JIS"); } */ } elseif("i" == $p['carrier'] && ereg("F900i\(",$p['agent'])) { ini_set('default_mimetype', 'application/xhtml+xml'); header("Content-Type: application/xhtml+xml;charset=Shift_JIS"); } elseif("w" == $p['carrier'] && $p['xhtml']) { // header("Content-Type: application/xhtml+xml;charset=Shift_JIS"); // header("Content-Type: application/xhtml+xml;charset=EUC-JP"); /* if("test.katsuyo.net" == $_SERVER['HTTP_HOST']){ print "Load -> ".$template_dir."/".$p['template']."
"; print "Version -> ".$p['version']."
"; print "Device -> ".$p["device"]."
"; } */ }elseif("w" == $p['carrier'] && $p['xhtml']){ } $template->show(); } index($p); ?>