Admin Portal

Full Control Panel

Total Users

0

Platform Balance

$0

Active Tasks

0

Pending

0

Quick Actions

Transactions

Review payments

Users

Manage accounts

Management Tools

+ parseFloat(data.totalBalance || 0).toFixed(2); document.getElementById('activeTasks').textContent = data.tasks?.active || 0; document.getElementById('pendingCount').textContent = (data.deposits?.pending || 0) + (data.withdrawals?.pending || 0) + (data.tasks?.pending || 0); } catch (error) { console.error('Failed to load admin stats:', error); alert('Failed to load admin data'); navigateTo('home'); } } function showTasksManagement() { alert('Task Management:\n\n• Review pending tasks\n• Approve/reject new tasks\n• View task analytics\n• Monitor completions\n\nNavigating to dedicated page...'); // In production, navigate to admin_tasks screen } function showSettings() { alert('App Settings:\n\n• USD to GHS rate: 16.5\n• Withdrawal fees: 5% / 2% Pro\n• Deposit bonus: Free / 2% Pro\n• Min withdrawal: $5\n• Min deposit: $1\n\nSettings management coming soon!'); } function showRankRewards() { const reward1 = prompt('Enter 1st place reward (current: $50):', '50'); const reward2 = prompt('Enter 2nd place reward (current: $30):', '30'); const reward3 = prompt('Enter 3rd place reward (current: $20):', '20'); if (reward1 && reward2 && reward3) { alert('Rank rewards updated!\n\n1st: $' + reward1 + '\n2nd: $' + reward2 + '\n3rd: $' + reward3); // In production, save to database via API } } function showNotificationPublisher() { const title = prompt('Notification Title:'); if (!title) return; const message = prompt('Notification Message:'); if (!message) return; const type = prompt('Type (system/payments/tasks):', 'system'); alert('Notification sent to all users!\n\nTitle: ' + title + '\nMessage: ' + message); // In production, send via API to all users } function showMaintenanceMode() { const confirm = window.confirm('Enable maintenance mode?\n\nThis will lock the app for all users except admins.'); if (confirm) { alert('⚠️ Maintenance mode activated\n\nOnly admins can access the app now.\n\nDisable it from the same button.'); // In production, update app_settings in database } } loadAdminStats();