php-mpos/public/include/pages/admin/wallet.inc.php
Sebastian Grewe 2dd333b5d8 Changing wallet error message from litecoind
Since plenty scrypt based currencies are supported, changed error
message to say `wallet` instead of `litecoind` when failing to connect
to RPC service.
2013-07-01 12:47:33 +02:00

25 lines
713 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->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
header("HTTP/1.1 404 Page not found");
die("404 Page not found");
}
if ($bitcoin->can_connect() === true){
$dBalance = $bitcoin->query('getbalance');
} else {
$dBalance = 0;
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to connect to wallet RPC service: ' . $bitcoin->can_connect(), 'TYPE' => 'errormsg');
}
$smarty->assign("BALANCE", $dBalance);
$smarty->assign("LOCKED", $transaction->getLockedBalance());
// Tempalte specifics
$smarty->assign("CONTENT", "default.tpl");
?>