From 849ba896af25e18dd91843fb048e9825192c4d75 Mon Sep 17 00:00:00 2001 From: Kano Date: Thu, 26 Apr 2012 11:20:05 +1000 Subject: [PATCH] miner.php only show the current date header once --- miner.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/miner.php b/miner.php index 7ee732fc..5d8c55f0 100644 --- a/miner.php +++ b/miner.php @@ -35,6 +35,10 @@ $warnfont = ''; $warnoff = ''; $dfmt = 'H:i:s j-M-Y \U\T\CP'; # +# Ensure it is only ever shown once +global $showndate; +$showndate = false; +# function htmlhead($checkapi) { global $error, $readonly, $here; @@ -368,14 +372,20 @@ function details($cmd, $list, $rig) { global $tablebegin, $tableend, $dfmt; global $poolcmd, $readonly; + global $showndate; $stas = array('S' => 'Success', 'W' => 'Warning', 'I' => 'Informational', 'E' => 'Error', 'F' => 'Fatal'); echo $tablebegin; - echo 'Date: '.date($dfmt).''; + if ($showndate === false) + { + echo 'Date: '.date($dfmt).''; + + echo $tableend.$tablebegin; - echo $tableend.$tablebegin; + $showndate = true; + } if (isset($list['STATUS'])) {