From 8760de2115c322cf49906a2e24e8228f5d0763c5 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Wed, 14 Apr 2010 14:29:15 +0300 Subject: More fixes --- public/month.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'public/month.php') diff --git a/public/month.php b/public/month.php index a3cd47e..07325aa 100644 --- a/public/month.php +++ b/public/month.php @@ -32,7 +32,7 @@ $first = mktime(0, 0, 0, $_SESSION['m'], 0); $last = mktime(0, 0, 0, $_SESSION['m']+1, 0); $days = ($last-$first)/3600/24; - + ?> @@ -40,17 +40,20 @@ execute(array($_SESSION['user'], date('Y-m-d', $current))); - $tmp = current($stmt->fetchAll()); - $work = $tmp['done']/3600; + foreach(range(1, $days) as $d): + + $current = $first+3600*24*$d; + $txt = date('D, d', $current); + $stmt->execute(array($_SESSION['user'], date('Y-m-d', $current))); + $tmp = current($stmt->fetchAll()); + $work = $tmp['done']/3600; ?> -
+
h
-- cgit v1.2.3