ymd => ".$ymd ."
"; print "
prev_ymd => ".$prev_ymd ."
"; } $chk_next = $max_line + 1; $profile = get_UserProf($p ,$ymd , '', $max_line ); $rest_profile = get_UserProf($p ,$ymd , '', $chk_next ); $prev_profile = get_UserProf($p ,$prev_ymd , '', 1 ); if(NOTEBOOK_DEBUG_MODE){ var_dump($rest_profile); print "
rest_profile => ".count($rest_profile)."
"; var_dump($prev_profile); print "
prev_profile => ".count($prev_profile)."
"; } // テンプレート読み込み $template =& loadTemplate( $p ); if(!empty($user_goal[0]['start_weight'])){ $start_date = sprintf("%d.%d.%d",substr($user_goal[0]['make_ymd'],0,4),substr($user_goal[0]['make_ymd'],4,2),substr($user_goal[0]['make_ymd'],6,2)); $diff = $profile[0]['weight'] - $user_goal[0]['start_weight']; if($diff > 0){ $diff = sprintf("+%s",$diff); } $template->setCurrentBlock('__StartDiffer__'); $template->setVariable('start_date',$start_date); $template->setVariable('diff',$diff); $template->parseCurrentBlock(); } if(!empty($user_goal[0]['goal_weight'])){ $rest = $profile[0]['weight'] - $user_goal[0]['goal_weight']; $template->setCurrentBlock('__ShowGoal__'); $template->setVariable('rest',$rest); $template->parseCurrentBlock(); } for($i=0;$isetCurrentBlock('__List__'); $template->setVariable('ymd_val',$profile[$i]['measure_ymd']); $template->setVariable('month',sprintf("%d",substr($profile[$i]['measure_ymd'],4,2))); $template->setVariable('date',sprintf("%d",substr($profile[$i]['measure_ymd'],6,2))); $template->setVariable('weight',$profile[$i]['weight']); $template->setVariable('bmi_val',$profile[$i]['bmi']); $template->parseCurrentBlock(); } if(0 < count($prev_profile) && count($rest_profile) > $max_line){ $template->setCurrentBlock('__PageNext__'); $template->setVariable('page_next',($p['page'] + 1)); $template->parseCurrentBlock(); } if(1 < $p['page']){ $template->setCurrentBlock('__PagePrev__'); $template->setVariable('page_prev',($p['page'] - 1)); $template->parseCurrentBlock(); } $template->show(); } nb_prof_list( $p ); ?>