Example #1
0
.layinput{height: 22px;line-height: 22px;width: 150px;margin: 0;border:1px #000 solid;font-size:15px;}
</style>
</head>

<body>
<?php 
session_start();
$username = $_SESSION["username"];
$runTime = 0;
$distance = 0;
$heat = 0;
$sumRunTime = 0;
$sumDistance = 0;
$sumHeat = 0;
require '../model/healthService.class.php';
$res = HealthService::findExercise($username);
if ($item = $res->fetchArray(SQLITE3_ASSOC)) {
    $runTime = $item['RUNTIME'];
    $distance = $item['DISTANCE'];
    $heat = $item['HEAT'];
}
if (is_array($_GET) && count($_GET) > 0) {
    if (isset($_GET["date"])) {
        if ($_GET['date'] != "") {
            $res = HealthService::findExerciseByDate($username, $_GET['date']);
            if ($item = $res->fetchArray(SQLITE3_ASSOC)) {
                $runTime = $item['RUNTIME'];
                $distance = $item['DISTANCE'];
                $heat = $item['HEAT'];
            } else {
                $runTime = 0;