|
|
|
@ -49,6 +49,13 @@ function doblocks($data, $user)
|
|
|
|
|
else |
|
|
|
|
$ans = getBlocks($user); |
|
|
|
|
|
|
|
|
|
if (nuem(getparam('csv', true))) |
|
|
|
|
$wantcsv = false; |
|
|
|
|
else |
|
|
|
|
$wantcsv = true; |
|
|
|
|
|
|
|
|
|
if ($wantcsv === false) |
|
|
|
|
{ |
|
|
|
|
$pg .= "<table callpadding=0 cellspacing=0 border=0>\n"; |
|
|
|
|
$pg .= "<tr class=title>"; |
|
|
|
|
$pg .= "<td class=dl>Height</td>"; |
|
|
|
@ -61,10 +68,12 @@ function doblocks($data, $user)
|
|
|
|
|
$pg .= "<td class=dr>%</td>"; |
|
|
|
|
$pg .= "<td class=dr>CDF</td>"; |
|
|
|
|
$pg .= "</tr>\n"; |
|
|
|
|
} |
|
|
|
|
$blktot = 0; |
|
|
|
|
$nettot = 0; |
|
|
|
|
$i = 0; |
|
|
|
|
$orph = false; |
|
|
|
|
$csv = "Height,Status,Timestamp,DiffAcc,NetDiff\n"; |
|
|
|
|
if ($ans['STATUS'] == 'ok') |
|
|
|
|
{ |
|
|
|
|
$count = $ans['rows']; |
|
|
|
@ -130,6 +139,8 @@ function doblocks($data, $user)
|
|
|
|
|
$cdf = '?'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($wantcsv === false) |
|
|
|
|
{ |
|
|
|
|
$pg .= "<tr class=$row>"; |
|
|
|
|
$pg .= "<td class=dl$ex>$hifld</td>"; |
|
|
|
|
if ($user !== null) |
|
|
|
@ -142,6 +153,20 @@ function doblocks($data, $user)
|
|
|
|
|
$pg .= "<td class=dr>$cdf</td>"; |
|
|
|
|
$pg .= "</tr>\n"; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
$csv .= "$hi,"; |
|
|
|
|
$csv .= "\"$stat\","; |
|
|
|
|
$csv .= $ans['firstcreatedate:'.$i].','; |
|
|
|
|
$csv .= "$diffacc,"; |
|
|
|
|
$csv .= "$netdiff\n"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if ($wantcsv === true) |
|
|
|
|
{ |
|
|
|
|
echo $csv; |
|
|
|
|
exit(0); |
|
|
|
|
} |
|
|
|
|
if ($nettot > 0) |
|
|
|
|
{ |
|
|
|
|