diff options
| author | cassiopc <cassiopc@gmail.com> | 2012-08-22 14:39:03 +0000 |
|---|---|---|
| committer | cassiopc <cassiopc@gmail.com> | 2012-08-22 14:39:03 +0000 |
| commit | fc7990c62d85fdebef4a438a1fbc9d69a3710d55 (patch) | |
| tree | ba6e1a305b0e63fbeb719e1a682c8e5e578b726e /boca-1.5.0/src/admin/report | |
| parent | 059e2fdcf0cef7e3594a66e21b3fd682ac736856 (diff) | |
| download | boca-fc7990c62d85fdebef4a438a1fbc9d69a3710d55.tar.gz boca-fc7990c62d85fdebef4a438a1fbc9d69a3710d55.zip | |
small bug fixes, inclusion of file size limit configurable
Diffstat (limited to 'boca-1.5.0/src/admin/report')
| -rw-r--r-- | boca-1.5.0/src/admin/report/piechart.php | 10 | ||||
| -rw-r--r-- | boca-1.5.0/src/admin/report/stat.php | 12 |
2 files changed, 18 insertions, 4 deletions
diff --git a/boca-1.5.0/src/admin/report/piechart.php b/boca-1.5.0/src/admin/report/piechart.php index 18d8d04..e6dbf95 100644 --- a/boca-1.5.0/src/admin/report/piechart.php +++ b/boca-1.5.0/src/admin/report/piechart.php @@ -41,7 +41,12 @@ else $chart = new PieChart(400, 250); if(isset($_GET['order'])) $chart->order=true; +else $chart->order=false; +$tot=0; +for($i=1;$i<count($v); $i+=2) { + $tot += $v[$i+1]; +} for($i=1;$i<count($v); $i+=2) { $color = null; if($cor != null) { @@ -50,7 +55,10 @@ for($i=1;$i<count($v); $i+=2) { $b = hexdec( substr($cor[($i-1)/2], 4, 2) ); $color = array($r, $g, $b); } - $chart->addPoint(new Point($v[$i], $v[$i+1], $color)); + if($v[$i+1] > $tot/100) + $chart->addPoint(new Point($v[$i], $v[$i+1], $color)); + else + $chart->addPoint(new Point($v[$i], $tot/100, $color)); } $chart->setTitle($v[0]); diff --git a/boca-1.5.0/src/admin/report/stat.php b/boca-1.5.0/src/admin/report/stat.php index 7d99cb3..1abfa71 100644 --- a/boca-1.5.0/src/admin/report/stat.php +++ b/boca-1.5.0/src/admin/report/stat.php @@ -233,7 +233,9 @@ echo "<td>Total</td><td>Accepted</td></tr>\n"; reset($d['username']); while (list($keya, $vala) = each($d['username'])) { $keya = $d['username'][$keya]; - $vala = $d['user'][$keya]; + if(isset($d['user'][$keya])) + $vala = $d['user'][$keya]; + else $vala=0; echo "<tr><td>".$d['userfull'][$keya]."</td>"; reset($d['problem']); while (list($key, $val) = each($d['problem'])) { @@ -289,7 +291,9 @@ while (list($keya, $val) = each($d['timestamp'])) { $atual += $passo; $pos++; } - $res[$pos]++; + if(isset($res[$pos])) + $res[$pos]++; + else $res[$pos]=1; if($res[$pos] > $m) $m=$res[$pos]; } @@ -318,7 +322,9 @@ while (list($keya, $val) = each($d['timestampyes'])) { $atual += $passo; $pos++; } - $res[$pos]++; + if(isset($res[$pos])) + $res[$pos]++; + else $res[$pos]=1; } $str="Accepted Runs by Time Period" . chr(1) . $m; |