php-mpos/public/include/pages/admin/wallet.inc.php
Sebastian Grewe 91d225e340 Adding wallet information in Admin panel
Fixes #63 and adds proper wallet information:

* Wallet balance
* Locked balance for users
* Liquid assets available to pool owner
2013-06-04 14:03:46 +02:00

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");
?>