Initial commit — Rosary Presenter App

Full source for loveandrosary.com: slide-based Rosary/novena/Divine Mercy
Chaplet presentation tool with multi-user roles, SVG bead ring, audio uploads,
donate strip, and public session profiles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-13 18:44:08 -07:00
commit 663fde3909
46 changed files with 10902 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
<?php
/**
* includes/donate.php — Renders the public donate strip if enabled.
* Include on any public page: require_once __DIR__ . '/includes/donate.php';
* Then call: render_donate_strip();
*/
function render_donate_strip(): void {
if (!get_setting('donate_enabled', '0')) return;
$type = get_setting('donate_type', 'custom');
$handle = trim(get_setting('donate_handle', ''));
$label = trim(get_setting('donate_label', ''));
if ($handle === '') return;
// Build URL and default label by type
switch ($type) {
case 'paypal':
$url = 'https://paypal.me/' . rawurlencode(ltrim($handle, '@'));
$icon = '&#x1F49B;'; // 💛
$label = $label ?: 'Support via PayPal';
break;
case 'venmo':
$url = 'https://venmo.com/u/' . rawurlencode(ltrim($handle, '@'));
$icon = '&#x1F4B8;'; // 💸
$label = $label ?: '@' . ltrim($handle, '@') . ' on Venmo';
break;
case 'buymeacoffee':
$url = 'https://buymeacoffee.com/' . rawurlencode(ltrim($handle, '@'));
$icon = '&#x2615;'; // ☕
$label = $label ?: 'Buy Me a Coffee';
break;
default: // custom
$url = $handle; // full URL stored in handle field for custom
$icon = '&#x2764;'; // ❤
$label = $label ?: 'Support This Ministry';
break;
}
?>
<div class="donate-strip">
<span class="donate-strip-text">Help keep this site running</span>
<a href="<?= htmlspecialchars($url) ?>" target="_blank" rel="noopener" class="donate-strip-link">
<?= $icon ?> <?= htmlspecialchars($label) ?>
</a>
</div>
<?php
}