Browse Source

php - '*' mark blocks after orphans

master
kanoi 10 years ago
parent
commit
7858a71492
  1. 4
      pool/page.php
  2. 16
      pool/page_blocks.php

4
pool/page.php

@ -129,6 +129,10 @@ h1 {margin-top: 20px; float:middle; font-size: 20px;}
.dls {text-align: left; padding: 2px 8px; text-decoration:line-through; font-weight:lighter; }
.drs {text-align: right; padding: 2px 8px; text-decoration:line-through; font-weight:lighter; }
.dcs {text-align: center; padding: 2px 8px; text-decoration:line-through; font-weight:lighter; }
.st0 {font-weight:bold; }
.st1 {color:red; font-weight:bold; }
.st2 {color:green; font-weight:bold; }
.st3 {color:blue; font-weight:bold; }
</style>\n";
$head .= '<meta name="robots" content="noindex">';

16
pool/page_blocks.php

@ -76,6 +76,16 @@ function doblocks($data, $user)
if ($stat == '1-Confirm')
$stat = 'Conf';
$stara = '';
$starp = '';
if (isset($ans['status:'.($i+1)]))
if ($ans['status:'.($i+1)] == 'Orphan'
&& $stat != 'Orphan')
{
$stara = '<span class=st1>*</span>';
$starp = '<span class=st0>*</span>';
}
$hi = $ans['height:'.$i];
$hifld = "$blink$hi>$hi</a>";
@ -87,7 +97,7 @@ function doblocks($data, $user)
{
$pct = 100.0 * $diffacc / $netdiff;
list($fg, $bg) = pctcolour($pct);
$bpct = "<font color=$fg>".number_format($pct, 2).'%</font>';
$bpct = "<font color=$fg>$starp".number_format($pct, 2).'%</font>';
$bg = " bgcolor=$bg";
$blktot += $diffacc;
if ($stat != 'Orphan')
@ -105,8 +115,8 @@ function doblocks($data, $user)
$pg .= "<td class=dr$ex>".btcfmt($ans['reward:'.$i]).'</td>';
$pg .= "<td class=dl$ex>".gmdate('Y-m-d H:i:s+00', $ans['firstcreatedate:'.$i]).'</td>';
$pg .= "<td class=dr$ex>".$stat.'</td>';
$pg .= "<td class=dr>".$acc.'</td>';
$pg .= "<td class=dr$bg>".$bpct.'</td>';
$pg .= "<td class=dr>$stara$acc</td>";
$pg .= "<td class=dr$bg>$bpct</td>";
$pg .= "</tr>\n";
}
}

Loading…
Cancel
Save