miner.php also add current time like single rig page
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
diff --git a/miner.php b/miner.php
index c2c1bee..7ee732f 100644
--- a/miner.php
+++ b/miner.php
@@ -27,12 +27,13 @@ $rigs = array('127.0.0.1:4028');
#
$here = $_SERVER['PHP_SELF'];
#
-global $tablebegin, $tableend, $warnfont, $warnoff;
+global $tablebegin, $tableend, $warnfont, $warnoff, $dfmt;
+#
$tablebegin = '<tr><td><table border=1 cellpadding=5 cellspacing=0>';
$tableend = '</table></td></tr>';
$warnfont = '<font color=red><b>';
$warnoff = '</b></font>';
-
+$dfmt = 'H:i:s j-M-Y \U\T\CP';
#
function htmlhead($checkapi)
{
@@ -203,7 +204,7 @@ function getparam($name, $both = false)
#
function fmt($section, $name, $value)
{
- $dfmt = 'H:i:s j-M-Y \U\T\CP';
+ global $dfmt;
$errorclass = ' class=err';
$warnclass = ' class=warn';
@@ -365,11 +366,9 @@ function showhead($cmd, $item, $values)
#
function details($cmd, $list, $rig)
{
- global $tablebegin, $tableend;
+ global $tablebegin, $tableend, $dfmt;
global $poolcmd, $readonly;
- $dfmt = 'H:i:s j-M-Y \U\T\CP';
-
$stas = array('S' => 'Success', 'W' => 'Warning', 'I' => 'Informational', 'E' => 'Error', 'F' => 'Fatal');
echo $tablebegin;
@@ -559,7 +558,7 @@ function doforeach($cmd, $des, $sum, $head, $datetime)
{
global $miner, $port;
global $error, $readonly, $notify, $rigs;
- global $tablebegin, $tableend, $warnfont, $warnoff;
+ global $tablebegin, $tableend, $warnfont, $warnoff, $dfmt;
$header = $head;
$anss = array();
@@ -595,6 +594,10 @@ function doforeach($cmd, $des, $sum, $head, $datetime)
if ($datetime)
{
+ echo '<tr><td class=sta>Date: '.date($dfmt).'</td></tr>';
+
+ echo $tableend.$tablebegin;
+
$dthead = array('' => 1, 'STATUS' => 1, 'Description' => 1, 'When' => 1);
showhead('', null, $dthead);