$row[0],'gname'=>$row[1],'part01'=>$row[2],'part02'=>$row[3]); } fclose($handle); if ($data != FALSE){ foreach($data as $key => $row){ $id[$key] = $row['id']; $gname[$key] = $row['gname']; $part01[$key] = $row['part01']; $part02[$key] = $row['part02']; } array_multisort($id, SORT_DESC, $data); } $today = strtotime("now"); $later_1d = strtotime("now +1 day"); $later_2d = strtotime("now +2 day"); $later_3d = strtotime("now +3 day"); $later_4d = strtotime("now +4 day"); $later_5d = strtotime("now +5 day"); $later_6d = strtotime("now +6 day"); $youbi = array("日","月","火","水","木","金","土"); $hiduke = date("n/j", $today); $hiduke_01 = date("n/j", $later_1d); $hiduke_02 = date("n/j", $later_2d); $hiduke_03 = date("n/j", $later_3d); $hiduke_04 = date("n/j", $later_4d); $hiduke_05 = date("n/j", $later_5d); $hiduke_06 = date("n/j", $later_6d); $youbi_00 = $youbi[date("w",$today)]; $youbi_01 = $youbi[date("w",$later_1d)]; $youbi_02 = $youbi[date("w",$later_2d)]; $youbi_03 = $youbi[date("w",$later_3d)]; $youbi_04 = $youbi[date("w",$later_4d)]; $youbi_05 = $youbi[date("w",$later_5d)]; $youbi_06 = $youbi[date("w",$later_6d)]; // ------------------------ // Smartyに割り当て // ------------------------ $smarty->assign("data",$data); $smarty->assign("hiduke",$hiduke); $smarty->assign("hiduke_01",$hiduke_01); $smarty->assign("hiduke_02",$hiduke_02); $smarty->assign("hiduke_03",$hiduke_03); $smarty->assign("hiduke_04",$hiduke_04); $smarty->assign("hiduke_05",$hiduke_05); $smarty->assign("hiduke_06",$hiduke_06); $smarty->assign("youbi_00",$youbi_00); $smarty->assign("youbi_01",$youbi_01); $smarty->assign("youbi_02",$youbi_02); $smarty->assign("youbi_03",$youbi_03); $smarty->assign("youbi_04",$youbi_04); $smarty->assign("youbi_05",$youbi_05); $smarty->assign("youbi_06",$youbi_06); // ------------------------ // Smartyを表示 // ------------------------ $smarty->display(basename($_SERVER['SCRIPT_NAME'],".html").".tpl"); ?>