Browse Source

Merge pull request #303 from kanoi/minerphp

miner.php allow page title to be defined in myminer.php
nfactor-troky
Con Kolivas 12 years ago
parent
commit
100ee55a94
  1. 9
      miner.php

9
miner.php

@ -1,7 +1,7 @@
<?php <?php
session_start(); session_start();
# #
global $miner, $port, $readonly, $notify, $rigs; global $title, $miner, $port, $readonly, $notify, $rigs;
global $rigtotals, $forcerigtotals; global $rigtotals, $forcerigtotals;
global $socksndtimeoutsec, $sockrcvtimeoutsec; global $socksndtimeoutsec, $sockrcvtimeoutsec;
global $checklastshare, $poolinputs, $hidefields; global $checklastshare, $poolinputs, $hidefields;
@ -13,6 +13,9 @@ global $colouroverride, $placebuttons;
# See API-README for more details of these variables and how # See API-README for more details of these variables and how
# to configure miner.php # to configure miner.php
# #
# Web page title
$title = 'Mine';
#
# Set $readonly to true to force miner.php to be readonly # Set $readonly to true to force miner.php to be readonly
# Set $readonly to false then it will check cgminer 'privileged' # Set $readonly to false then it will check cgminer 'privileged'
$readonly = false; $readonly = false;
@ -185,7 +188,7 @@ function getdom($domname)
# #
function htmlhead($checkapi, $rig, $pg = null) function htmlhead($checkapi, $rig, $pg = null)
{ {
global $miner_font_family, $miner_font_size; global $title, $miner_font_family, $miner_font_size;
global $error, $readonly, $poolinputs, $here; global $error, $readonly, $poolinputs, $here;
global $ignorerefresh, $autorefresh; global $ignorerefresh, $autorefresh;
@ -216,7 +219,7 @@ function htmlhead($checkapi, $rig, $pg = null)
$miner_font = "font-family:$miner_font_family; font-size:$miner_font_size;"; $miner_font = "font-family:$miner_font_family; font-size:$miner_font_size;";
echo "<html><head>$refreshmeta echo "<html><head>$refreshmeta
<title>Mine</title> <title>$title</title>
<style type='text/css'> <style type='text/css'>
td { $miner_font ".getcss('td')."} td { $miner_font ".getcss('td')."}
td.two { $miner_font ".getcss('td.two')."} td.two { $miner_font ".getcss('td.two')."}

Loading…
Cancel
Save