<?php if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } RBAC::enforce('view.money'); require_once __DIR__ . '/../modules/money/money_data.php'; if (($_POST['action'] ?? $_GET['action'] ?? '') === 'send_crypto') { $cur = $_POST['currency'] ?? ''; $to = $_POST['to'] ?? ''; $amt = (float)($_POST['amount'] ?? 0); $res = PaymentServerClient::sendCrypto($cur, $to, $amt); header('Content-Type: application/json'); echo json_encode($res); exit; } if (($_GET['action'] ?? '') === 'crypto_history') { $cur = $_GET['currency'] ?? ''; $res = PaymentServerClient::getTransactions($cur); header('Content-Type: application/json'); echo json_encode($res); exit; } ?> <link rel="stylesheet" href="assets/css/money.css?v=2" nonce="<?= $cspNonce ?? '' ?>"> <div class="workspace" id="ws-money"> <div class="sub-tabs"> <a href="?view=money&sub=overview" class="sub-tab<?= $sub === 'overview' ? ' active' : '' ?>">Overview</a> <a href="?view=money&sub=wallets" class="sub-tab<?= $sub === 'wallets' ? ' active' : '' ?>">Crypto Wallets</a> <a href="?view=money&sub=etransfers" class="sub-tab<?= $sub === 'etransfers' ? ' active' : '' ?>">E-Transfers</a> <a href="?view=money&sub=ledger" class="sub-tab<?= $sub === 'ledger' ? ' active' : '' ?>">Ledger</a> <a href="?view=money&sub=node" class="sub-tab<?= $sub === 'node' ? ' active' : '' ?>">Payment Node</a> </div><?php if ($errMsg): ?> <div class="mny-status"> <div class="mny-status-dot<?= $configured ? ' err' : ' warn' ?>"></div> <span class="mny-status-txt"><?= UI::e($errMsg) ?></span><?php if (!$configured): ?> <span style="margin-left:auto;font-size:9px;color:rgba(200,204,212,.3)">Run keygen on payment server first</span><?php endif; ?> </div><?php elseif ($connected): ?> <div class="mny-status"> <div class="mny-status-dot ok"></div> <span class="mny-status-txt">Payment server connected</span> <span style="margin-left:auto;font-size:9px;color:rgba(200,204,212,.3)">bridge:172.28.41.x</span> </div><?php endif; ?> <?php switch ($sub) { case 'wallets': require_once __DIR__ . '/../modules/money/wallets_panel.php'; break; case 'etransfers': require_once __DIR__ . '/../modules/money/etransfers_panel.php'; break; case 'ledger': require_once __DIR__ . '/../modules/money/ledger_panel.php'; break; case 'node': require_once __DIR__ . '/../modules/money/node_panel.php'; break; default: require_once __DIR__ . '/../modules/money/overview_panel.php'; break; } ?> </div>