$lmealeaten = $value['time']; } } if (strlen($lmealeaten) > 0) { $timeD = fatloss_model::getHourDiff($end . ":00", $value['time']); if ($timeD < 2) { $areaofimprovement[$aimpi++] = "Ate more than every 2-3 hr"; } else { if ($timeD > 3) { $areaofimprovement[$aimpi++] = "Did not eat every 2-3 hours"; } else { $youdidwell[$ydi++] = "Ate every 2-3 hours"; } } } else { $timeD = fatloss_model::getHourDiff($waketime, $end . ":00"); if ($timeD > 0.5) { $areaofimprovement[$aimpi++] = "Did not eat w/in 30 min of rising"; } } if ($countfatlossplate > 0 && $countnotfatlossplate == 0) { $youdidwell[$ydi++] = "All Meals were Fat Loss Plates"; } if ($countfatlossplate > 0 && $countnotfatlossplate == 0 && $this->session->userdata('sex') == "Male" && $burning_total['all_calories'] >= 2025 && $burning_total['all_calories'] <= 2450) { $areaofimprovement[$aimpi++] = "Too many calories"; } if ($countfatlossplate > 0 && $countnotfatlossplate == 0 && $this->session->userdata('sex') == "Female" && $burning_total['all_calories'] >= 1575 && $burning_total['all_calories'] <= 1950) { $areaofimprovement[$aimpi++] = "Too many calories"; } if ($this->session->userdata('sex') == "Male" && $burning_total['all_saturatedfat'] > 27) { $areaofimprovement[$aimpi++] = "Too much saturated fat";
').addClass('unit-<?php echo $finalArray[$key]['value']; ?> '); $('.<?php echo "hour" . $key; ?> ').removeClass('unit-0'); }); </script> <?php } } ///////////////////calculate grade fat burning percentage/////////// $total_score = 0; $tempfeedbackh = fatloss_model::getHourDiff($waketime, date("H:i:s")); ///scenario 1 if ($tempfeedbackh <= 1.0) { $date['fat_burning_mode'] = 100; } else { if ($totalwakeup > 0) { $date['fat_burning_mode'] = $totalfatburning / $totalwakeup * 100; } else { $date['fat_burning_mode'] = 0; } } $total_score += $date['fat_burning_mode'] / 2; ////////////// $daily = User_model::getDaily($jDate); if ($this->session->userdata('sex') == "Male") { ////////////////////////////////////////get calories score//////