From cffd5aee30315db5e0b47b872370a97c04b75a00 Mon Sep 17 00:00:00 2001 From: Kano Date: Mon, 25 Jun 2012 18:01:49 +1000 Subject: [PATCH 1/4] miner.php make fontname/size configurable with myminer.php --- miner.php | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/miner.php b/miner.php index 728a4ebc..cdcfbac0 100644 --- a/miner.php +++ b/miner.php @@ -60,6 +60,11 @@ $warnfont = ''; $warnoff = ''; $dfmt = 'H:i:s j-M-Y \U\T\CP'; # +global $miner_font_family, $miner_font_size; +# +$miner_font_family = 'verdana,arial,sans'; +$miner_font_size = '13pt'; +# # This below allows you to put your own settings into a seperate file # so you don't need to update miner.php with your preferred settings # every time a new version is released @@ -78,6 +83,7 @@ $rigerror = array(); # function htmlhead($checkapi) { + global $miner_font_family, $miner_font_size; global $error, $readonly, $here; if ($readonly === false && $checkapi === true) { @@ -87,21 +93,22 @@ function htmlhead($checkapi) || $access['STATUS']['STATUS'] != 'S') $readonly = true; } -?> -Mine + $miner_font = "font-family:$miner_font_family; font-size:$miner_font_size;"; + + echo "Mine @@ -785,7 +810,7 @@ function doforeach($cmd, $des, $sum, $head, $datetime) foreach ($dthead as $name => $x) { if ($item == 'STATUS' && $name == '') - echo ""; + echo ""; else { if (isset($row[$name])) @@ -868,7 +893,7 @@ function doforeach($cmd, $des, $sum, $head, $datetime) if ($rig === 'total') echo "Total:"; else - echo ""; + echo ""; } else { @@ -891,17 +916,30 @@ function doforeach($cmd, $des, $sum, $head, $datetime) } } # +function refreshbuttons() +{ + global $readonly; + global $ignorerefresh, $changerefresh, $autorefresh; + + if ($ignorerefresh == false && $changerefresh == true) + { + echo '    '; + echo ""; + echo ""; + echo ""; + } +} +# function doOne($rig, $preprocess) { - global $error, $readonly, $notify; - global $rigs; + global $error, $readonly, $notify, $rigs; - htmlhead(true); + htmlhead(true, $rig); $error = null; echo ""; + echo ""; if (count($rigs) > 1) echo ""; echo "
"; - echo " "; @@ -913,6 +951,7 @@ function doOne($rig, $preprocess) echo ""; echo " "; } + refreshbuttons(); echo "
"; if ($preprocess != null) @@ -938,6 +977,14 @@ function display() global $tablebegin, $tableend; global $miner, $port; global $error, $readonly, $notify, $rigs; + global $ignorerefresh, $autorefresh; + + if ($ignorerefresh == false) + { + $ref = trim(getparam('ref', true)); + if ($ref != null && $ref != '') + $autorefresh = intval($ref); + } $rig = trim(getparam('rig', true)); @@ -1006,10 +1053,12 @@ function display() return; } - htmlhead(false); + htmlhead(false, null); echo "
"; echo ""; + echo " "; + refreshbuttons(); echo "
"; if ($preprocess != null) From 5ef85284706d1fed3b1d254ca54f7a348e63107e Mon Sep 17 00:00:00 2001 From: Kano Date: Mon, 25 Jun 2012 20:02:40 +1000 Subject: [PATCH 4/4] miner.php remove unneeded '.'s --- miner.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miner.php b/miner.php index 3b03a0a5..7c4d8891 100644 --- a/miner.php +++ b/miner.php @@ -98,7 +98,7 @@ function htmlhead($checkapi, $rig) $paramrig = ''; if ($rig != null && $rig != '') - $paramrig .= "&rig=$rig"; + $paramrig = "&rig=$rig"; if ($ignorerefresh == true || $autorefresh == 0) $refreshmeta = ''; @@ -947,7 +947,7 @@ function doOne($rig, $preprocess) { $rg = ''; if (count($rigs) > 1) - $rg .= " Rig $rig"; + $rg = " Rig $rig"; echo ""; echo " "; }