X-Git-Url: https://git.treefish.org/banana.git/blobdiff_plain/8db41c98817b1b48532dc3cebf4bea166e42bb70..98bd1a7add3a56c08fb03293824e392b6d871613:/summary.php?ds=inline diff --git a/summary.php b/summary.php index 3354ca3..bd7ac7f 100644 --- a/summary.php +++ b/summary.php @@ -17,20 +17,24 @@ $tot_done = 0; - foreach ($SESSIONS as $session) { - if ($session['id'] == $SESSIONS_next) { break; } + if( isset($SESSIONS) ) { + foreach ($SESSIONS as $session) { + if ( isset($SESSIONS_next) ) { + 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 ""; - print "" . $session['timestr'] . "  "; - print "" . $session['examples'] . "(" . $session['nexamples'] . ")" . "  "; - print "" . $exdone[1] . "/" . $session['nexamples'] . "(" . $exdone[0] . ")" . "  "; - print ""; + print ""; + print "" . $session['timestr'] . "  "; + print "" . $session['examples'] . "(" . $session['nexamples'] . ")" . "  "; + print "" . $exdone[1] . "/" . $session['nexamples'] . "(" . $exdone[0] . ")" . "  "; + print ""; + } } print ""; print "" . $tot_done . "/" . $SESSIONS_totex . ""; @@ -47,13 +51,13 @@ for( $ib=0; $ib<$blackdone; $ib++ ) { echo " * "; } - break; + exit; } ?>
- +
Last submission
Summary