miner.php only show the current date header once
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/miner.php b/miner.php
index 7ee732f..5d8c55f 100644
--- a/miner.php
+++ b/miner.php
@@ -35,6 +35,10 @@ $warnfont = '<font color=red><b>';
$warnoff = '</b></font>';
$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 '<tr><td class=sta>Date: '.date($dfmt).'</td></tr>';
+ if ($showndate === false)
+ {
+ echo '<tr><td class=sta>Date: '.date($dfmt).'</td></tr>';
+
+ echo $tableend.$tablebegin;
- echo $tableend.$tablebegin;
+ $showndate = true;
+ }
if (isset($list['STATUS']))
{