setCurrentBlock('__List__'); $template->setVariable('ymd_val',$meals[$i]['eat_ymd']); $template->setVariable('month',sprintf("%d",substr($meals[$i]['eat_ymd'],4,2))); $template->setVariable('date',sprintf("%d",substr($meals[$i]['eat_ymd'],6,2))); $template->setVariable('calorie_val',$meals[$i]['total_calorie']); $template->parseCurrentBlock(); } //- 平均カロリー摂取量計算 $ave = $weekly_total / $i; $template->setVariable('days',$i); $template->setVariable('calorie_ave',round($ave)); if(1 < $p['page']){ $template->setCurrentBlock('__PageNext__'); $template->setVariable('page_next',($p['page'] - 1)); $template->parseCurrentBlock(); } if(1 < count($prev_meals)){ $template->setCurrentBlock('__PagePrev__'); $template->setVariable('page_prev',($p['page'] + 1)); $template->parseCurrentBlock(); } if("3" == $p['version'] || ("i" == $p['carrier'] && "2" == $p['version']) || "w" == $p['carrier'] || "g" == $p['carrier']){ $prof = get_UserProf($p , date("Ymd"),'',7); //print "count -> ".count($prof)."
"; if(1 < count($prof)){ $template->touchBlock('__GoProfileGraph__'); } } $template->show(); } nb_cal_list( $p ); ?>