Merge branch 'next' into issue-145
This commit is contained in:
commit
62c0641131
@ -31,10 +31,10 @@ class RoundStats {
|
||||
**/
|
||||
public function getNextBlock($iHeight=0) {
|
||||
$stmt = $this->mysqli->prepare("
|
||||
SELECT height
|
||||
SELECT height
|
||||
FROM $this->tableBlocks
|
||||
WHERE height > ?
|
||||
ORDER BY height ASC
|
||||
ORDER BY height ASC
|
||||
LIMIT 1");
|
||||
if ($this->checkStmt($stmt) && $stmt->bind_param('i', $iHeight) && $stmt->execute() && $result = $stmt->get_result())
|
||||
return $result->fetch_object()->height;
|
||||
@ -46,10 +46,10 @@ class RoundStats {
|
||||
**/
|
||||
public function getPreviousBlock($iHeight=0) {
|
||||
$stmt = $this->mysqli->prepare("
|
||||
SELECT height
|
||||
SELECT height
|
||||
FROM $this->tableBlocks
|
||||
WHERE height < ?
|
||||
ORDER BY height DESC
|
||||
ORDER BY height DESC
|
||||
LIMIT 1");
|
||||
if ($this->checkStmt($stmt) && $stmt->bind_param('i', $iHeight) && $stmt->execute() && $result = $stmt->get_result())
|
||||
return $result->fetch_object()->height;
|
||||
@ -64,7 +64,7 @@ class RoundStats {
|
||||
public function getDetailsForBlockHeight($iHeight=0, $isAdmin=0) {
|
||||
$stmt = $this->mysqli->prepare("
|
||||
SELECT
|
||||
b.id, height, amount, confirmations, difficulty, FROM_UNIXTIME(time) as time, shares,
|
||||
b.id, height, blockhash, amount, confirmations, difficulty, FROM_UNIXTIME(time) as time, shares,
|
||||
IF(a.is_anonymous, IF( ? , a.username, 'anonymous'), a.username) AS finder
|
||||
FROM $this->tableBlocks as b
|
||||
LEFT JOIN $this->tableUsers AS a ON b.account_id = a.id
|
||||
|
||||
@ -201,7 +201,6 @@ class User {
|
||||
return $result->fetch_all(MYSQLI_ASSOC);
|
||||
}
|
||||
$this->debug->append("Unable to fetch users with AP set");
|
||||
echo $this->mysqli->error;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -77,6 +77,7 @@ $aSettings['website'][] = array(
|
||||
$aSettings['website'][] = array(
|
||||
'display' => 'Disable Blockexplorer', 'type' => 'select',
|
||||
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||
'default' => 0,
|
||||
'name' => 'website_blockexplorer_disabled', 'value' => $setting->getValue('website_blockexplorer_disabled'),
|
||||
'tooltip' => 'Enabled or disable the blockexplorer URL feature. Will remove any links using the blockexplorer URL.'
|
||||
);
|
||||
@ -90,6 +91,7 @@ $aSettings['website'][] = array(
|
||||
$aSettings['website'][] = array(
|
||||
'display' => 'Disable Chaininfo', 'type' => 'select',
|
||||
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||
'default' => 0,
|
||||
'name' => 'website_chaininfo_disabled', 'value' => $setting->getValue('website_chaininfo_disabled'),
|
||||
'tooltip' => 'Enabled or disable the chainfo URL feature. Will remove any links using the chaininfo URL.'
|
||||
);
|
||||
|
||||
@ -19,7 +19,6 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||
$iKey = $_REQUEST['height'];
|
||||
}
|
||||
}
|
||||
echo $iKey;
|
||||
$aDetailsForBlockHeight = $roundstats->getDetailsForBlockHeight($iKey, $user->isAdmin($_SESSION['USERDATA']['id']));
|
||||
$aRoundShareStats = $roundstats->getRoundStatsForAccounts($iKey, $user->isAdmin($_SESSION['USERDATA']['id']));
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<table>
|
||||
<tbody><tr><td>Username: </td><td>{$GLOBAL.userdata.username|escape}</td></tr>
|
||||
<tr><td>User Id: </td><td>{$GLOBAL.userdata.id}</td></tr>
|
||||
{if !$GLOBAL.config.website.api.disabled}<tr><td>API Key: </td><td><a href="{$smarty.server.PHP_SELF}?page=api&action=getuserstatus&api_key={$GLOBAL.userdata.api_key}&id={$GLOBAL.userdata.id}">{$GLOBAL.userdata.api_key}</a></td></tr>{/if}
|
||||
{if !$GLOBAL.website.api.disabled}<tr><td>API Key: </td><td><a href="{$smarty.server.PHP_SELF}?page=api&action=getuserstatus&api_key={$GLOBAL.userdata.api_key}&id={$GLOBAL.userdata.id}">{$GLOBAL.userdata.api_key}</a></td></tr>{/if}
|
||||
<tr><td>E-Mail: </td><td><input type="text" name="email" value="{nocache}{$GLOBAL.userdata.email|escape}{/nocache}" size="20"></td></tr>
|
||||
<tr><td>Payment Address: </td><td><input type="text" name="paymentAddress" value="{nocache}{$smarty.request.paymentAddress|default:$GLOBAL.userdata.coin_address|escape}{nocache}" size="40"></td></tr>
|
||||
<tr><td>Donation %: </td><td><input type="text" name="donatePercent" value="{nocache}{$smarty.request.donatePercent|default:$GLOBAL.userdata.donate_percent|escape}{nocache}" size="4"><font size="1"> [donation amount in percent (example: 0.5)]</font></td></tr>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{if !$GLOBAL.config.website.api.disabled}
|
||||
{if !$GLOBAL.website.api.disabled}
|
||||
{include file="global/block_header.tpl" BLOCK_HEADER="API String"}
|
||||
<p>This code will allow you to import the full API string into your mobile application.</p>
|
||||
<script type="text/javascript" src="{$PATH}/js/jquery.qrcode.min.js"></script>
|
||||
|
||||
@ -78,12 +78,14 @@ target and network difficulty and assuming a zero variance scenario.
|
||||
</td>
|
||||
</tr>
|
||||
{/section}
|
||||
{if $count > 0}
|
||||
<tr>
|
||||
<td colspan="6" class="right"><b>Totals</b></td>
|
||||
<td class="right">{$totalexpectedshares|number_format}</td>
|
||||
<td class="right">{$totalshares|number_format}</td>
|
||||
<td class="right"><font color="{if (($totalpercentage / $count) <= 100)}green{else}red{/if}">{($totalpercentage / $count)|number_format:"2"}</font>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
@ -19,5 +19,5 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{if !$GLOBAL.config.website.api.disabled}<li>These stats are also available in JSON format <a href="{$smarty.server.PHP_SELF}?page=api&action=public" target="_api">HERE</a></li>{/if}
|
||||
{if !$GLOBAL.website.api.disabled}<li>These stats are also available in JSON format <a href="{$smarty.server.PHP_SELF}?page=api&action=public" target="_api">HERE</a></li>{/if}
|
||||
{include file="global/block_footer.tpl"}
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
{/if}
|
||||
<tr>
|
||||
<td class="leftheader">Last Block Found</td>
|
||||
<td>{if $GLOBAL.website.blockexplorer.url}<a href="{$GLOBAL.website.blockexplorer.url}{$LASTBLOCKHASH}" target="_new">{$LASTBLOCK|default:"0"}</a>{else}{$LASTBLOCK|default:"0"}{/if}</td>
|
||||
<td>{if $GLOBAL.website.blockexplorer.url}<a href="{$GLOBAL.website.blockexplorer.url}{$LASTBLOCKHASH|default:""}" target="_new">{$LASTBLOCK|default:"0"}</a>{else}{$LASTBLOCK|default:"0"}{/if}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="leftheader">Current Difficulty</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user