prepare("SELECT * FROM transactions WHERE user_id = ? ORDER BY created_at DESC LIMIT 100"); $stmt->execute([$user['id']]); $records = $stmt->fetchAll(); } else { // If specific tabs for trading are needed, they can be implemented here $stmt = $db->prepare("SELECT * FROM transactions WHERE user_id = ? AND type LIKE ? ORDER BY created_at DESC LIMIT 100"); $stmt->execute([$user['id'], $tab . '%']); $records = $stmt->fetchAll(); } $types_map = [ 'recharge' => ['name' => __('recharge'), 'color' => 'success'], 'withdrawal' => ['name' => __('withdrawal'), 'color' => 'danger'], 'binary_win' => ['name' => __('binary_win'), 'color' => 'success'], 'binary_loss' => ['name' => __('binary_loss'), 'color' => 'danger'], 'spot_trade' => ['name' => __('spot_trade'), 'color' => 'primary'], 'contract_margin' => ['name' => __('contract_margin'), 'color' => 'warning'], 'contract_settle' => ['name' => __('contract_settle'), 'color' => 'info'], ]; ?>
| = __('type') ?> | = __('amount') ?> | = __('symbol') ?? 'Symbol' ?> | = __('status') ?> | = __('time') ?> |
|---|---|---|---|---|
| = __('no_records_found') ?> | ||||
| = $type['name'] ?> | = number_format($r['amount'], 4) ?> | = $r['symbol'] ?> | = __('completed') ?> = __('pending') ?> | = date('Y-m-d H:i:s', strtotime($r['created_at'])) ?> |