X-Git-Url: http://git.treefish.org/banana.git/blobdiff_plain/78533c089d9413327f981cb2b20090a28f25e5e5..f0f8ed081a8af374676dea9f97b60e336f8b4ae7:/summary.php diff --git a/summary.php b/summary.php index b59c7bb..cfc0565 100644 --- a/summary.php +++ b/summary.php @@ -17,20 +17,22 @@ $tot_done = 0; - foreach ($SESSIONS as $session) { - if ($session['id'] == $SESSIONS_next) { break; } + if( isset($SESSIONS) ) { + foreach ($SESSIONS as $session) { + if ($session['id'] == $SESSIONS_next) { break; } - $exdone = $db->query("SELECT thisdone, manydone FROM workdone WHERE mnumber=" . $mnumber . " AND session=" . $session['id'])->fetch(PDO::FETCH_NUM); + $exdone = $db->query("SELECT thisdone, manydone FROM workdone WHERE mnumber=" . $mnumber . " AND session=" . $session['id'])->fetch(PDO::FETCH_NUM); - if ( $exdone[1] == "" ) { $exdone[1] = "0"; } + if ( $exdone[1] == "" ) { $exdone[1] = "0"; } - $tot_done = $tot_done + $exdone[1]; + $tot_done = $tot_done + $exdone[1]; - print "