95 lines
4 KiB
PHP
95 lines
4 KiB
PHP
<?php
|
|
// ─────────────────────────────────────────────
|
|
// donate.php · Support / Donations
|
|
// ─────────────────────────────────────────────
|
|
require_once 'db.php';
|
|
require_once 'auth.php';
|
|
requireLogin();
|
|
require_once 'nav.php';
|
|
|
|
$siteName = getSetting('site_name', 'Finance Planner');
|
|
$donMsg = getSetting('donation_message', 'If you find this app useful, please consider supporting its development!');
|
|
$paypalLink = getSetting('paypal_link', '');
|
|
$kofiLink = getSetting('kofi_link', '');
|
|
$bmcLink = getSetting('buymeacoffee_link', '');
|
|
$hasAny = $paypalLink || $kofiLink || $bmcLink;
|
|
|
|
renderHead('Donate');
|
|
renderTopBar('Support Us');
|
|
?>
|
|
<div class="page">
|
|
|
|
<div style="text-align:center;padding:28px 16px 20px">
|
|
<div style="font-size:3rem;margin-bottom:12px">❤️</div>
|
|
<h2 style="font-size:1.1rem;margin-bottom:10px">Support <?= htmlspecialchars($siteName) ?></h2>
|
|
<p style="color:var(--text-dim);font-size:.88rem;max-width:340px;margin:0 auto;line-height:1.6">
|
|
<?= htmlspecialchars($donMsg) ?>
|
|
</p>
|
|
</div>
|
|
|
|
<?php if (!$hasAny): ?>
|
|
<div class="card" style="padding:32px;text-align:center">
|
|
<div style="font-size:2rem;margin-bottom:10px">🔧</div>
|
|
<p style="color:var(--text-muted);font-size:.85rem">
|
|
No donation options have been set up yet.<br>
|
|
<?php if (isAdmin()): ?>
|
|
<a href="admin.php" style="color:var(--accent)">Configure them in the Admin Panel →</a>
|
|
<?php else: ?>
|
|
Check back soon!
|
|
<?php endif; ?>
|
|
</p>
|
|
</div>
|
|
<?php else: ?>
|
|
|
|
<div class="section-label">Choose a Platform</div>
|
|
<div class="card">
|
|
|
|
<?php if ($paypalLink): ?>
|
|
<div class="card-row">
|
|
<div style="font-size:1.8rem;margin-right:14px;width:36px;text-align:center">💳</div>
|
|
<div style="flex:1">
|
|
<div class="row-label">PayPal</div>
|
|
<div class="row-sub">Fast, secure, widely accepted</div>
|
|
</div>
|
|
<a href="<?= htmlspecialchars($paypalLink) ?>" target="_blank" rel="noopener noreferrer"
|
|
class="btn btn-primary" style="text-decoration:none;flex-shrink:0">Donate</a>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($kofiLink): ?>
|
|
<div class="card-row">
|
|
<div style="font-size:1.8rem;margin-right:14px;width:36px;text-align:center">☕</div>
|
|
<div style="flex:1">
|
|
<div class="row-label">Ko-fi</div>
|
|
<div class="row-sub">Buy me a coffee, no account needed</div>
|
|
</div>
|
|
<a href="<?= htmlspecialchars($kofiLink) ?>" target="_blank" rel="noopener noreferrer"
|
|
class="btn btn-primary" style="text-decoration:none;flex-shrink:0">Donate</a>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($bmcLink): ?>
|
|
<div class="card-row">
|
|
<div style="font-size:1.8rem;margin-right:14px;width:36px;text-align:center">☕</div>
|
|
<div style="flex:1">
|
|
<div class="row-label">Buy Me a Coffee</div>
|
|
<div class="row-sub">One-time or monthly support</div>
|
|
</div>
|
|
<a href="<?= htmlspecialchars($bmcLink) ?>" target="_blank" rel="noopener noreferrer"
|
|
class="btn btn-primary" style="text-decoration:none;flex-shrink:0">Donate</a>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<p style="text-align:center;color:var(--text-muted);font-size:.78rem;padding:20px 0">
|
|
Every donation, however small, keeps this project going. Thank you! ❤️
|
|
</p>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<?php renderNav('settings'); ?>
|
|
</body>
|
|
</html>
|