Fixes #63 and adds proper wallet information: * Wallet balance * Locked balance for users * Liquid assets available to pool owner
26 lines
671 B
PHP
26 lines
671 B
PHP
<?php
|
|
|
|
// Make sure we are called from index.php
|
|
if (!defined('SECURITY'))
|
|
die('Hacking attempt');
|
|
|
|
// Check user to ensure they are admin
|
|
if (!$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
|
header("HTTP/1.1 404 Page not found");
|
|
die();
|
|
}
|
|
|
|
if ($bitcoin->can_connect() === true){
|
|
$dBalance = $bitcoin->query('getbalance');
|
|
} else {
|
|
$dBalance = 0;
|
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to connect to litecoind RPC service: ' . $bitcoin->can_connect(), 'TYPE' => 'errormsg');
|
|
}
|
|
|
|
$smarty->assign("BALANCE", $dBalance);
|
|
$smarty->assign("LOCKED", $transaction->getLockedBalance());
|
|
|
|
// Tempalte specifics
|
|
$smarty->assign("CONTENT", "default.tpl");
|
|
?>
|