mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-09 14:28:12 +00:00
miner.php - fix/enable autorefresh for custom pages
This commit is contained in:
parent
edd1f83a77
commit
f43ee5d652
15
miner.php
15
miner.php
@ -117,21 +117,24 @@ $showndate = false;
|
|||||||
global $rigerror;
|
global $rigerror;
|
||||||
$rigerror = array();
|
$rigerror = array();
|
||||||
#
|
#
|
||||||
function htmlhead($checkapi, $rig)
|
function htmlhead($checkapi, $rig, $pg = null)
|
||||||
{
|
{
|
||||||
global $miner_font_family, $miner_font_size;
|
global $miner_font_family, $miner_font_size;
|
||||||
global $error, $readonly, $here;
|
global $error, $readonly, $here;
|
||||||
global $ignorerefresh, $autorefresh;
|
global $ignorerefresh, $autorefresh;
|
||||||
|
|
||||||
$paramrig = '';
|
$extraparams = '';
|
||||||
if ($rig != null && $rig != '')
|
if ($rig != null && $rig != '')
|
||||||
$paramrig = "&rig=$rig";
|
$extraparams = "&rig=$rig";
|
||||||
|
else
|
||||||
|
if ($pg != null && $pg != '')
|
||||||
|
$extraparams = "&pg=$pg";
|
||||||
|
|
||||||
if ($ignorerefresh == true || $autorefresh == 0)
|
if ($ignorerefresh == true || $autorefresh == 0)
|
||||||
$refreshmeta = '';
|
$refreshmeta = '';
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$url = "$here?ref=$autorefresh$paramrig";
|
$url = "$here?ref=$autorefresh$extraparams";
|
||||||
$refreshmeta = "\n<meta http-equiv='refresh' content='$autorefresh;url=$url'>";
|
$refreshmeta = "\n<meta http-equiv='refresh' content='$autorefresh;url=$url'>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +165,7 @@ td.lst { color:blue; $miner_font background:#ffffdd }
|
|||||||
function pr(a,m){if(m!=null){if(!confirm(m+'?'))return}window.location='$here?ref=$autorefresh'+a}\n";
|
function pr(a,m){if(m!=null){if(!confirm(m+'?'))return}window.location='$here?ref=$autorefresh'+a}\n";
|
||||||
|
|
||||||
if ($ignorerefresh == false)
|
if ($ignorerefresh == false)
|
||||||
echo "function prr(a){if(a){v=document.getElementById('refval').value}else{v=0}window.location='$here?ref='+v+'$paramrig'}\n";
|
echo "function prr(a){if(a){v=document.getElementById('refval').value}else{v=0}window.location='$here?ref='+v+'$extraparams'}\n";
|
||||||
|
|
||||||
if ($readonly === false && $checkapi === true)
|
if ($readonly === false && $checkapi === true)
|
||||||
{
|
{
|
||||||
@ -1206,7 +1209,7 @@ function showcustompage($pagename)
|
|||||||
{
|
{
|
||||||
global $customsummarypages;
|
global $customsummarypages;
|
||||||
|
|
||||||
htmlhead(false, null);
|
htmlhead(false, null, $pagename);
|
||||||
|
|
||||||
pagetop(null, $pagename);
|
pagetop(null, $pagename);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user