@@ -5,24 +5,45 @@ namespace BNETDocs\Templates;
55use \CarlBennett \MVC \Libraries \Common ;
66use \CarlBennett \MVC \Libraries \Pair ;
77
8+ use \BNETDocs \Libraries \User ;
9+
810$ title = 'Donate ' ;
911$ description = 'Donate to BNETDocs to show your support for this project! ' ;
1012
1113$ this ->opengraph ->attach (new Pair ('url ' , '/donate ' ));
1214$ this ->opengraph ->attach (new Pair ('type ' , 'article ' ));
1315
14- $ btc_address = $ this ->getContext ()->donations ->btc_address ;
15- $ paypal_url = $ this ->getContext ()->donations ->paypal_url ;
16+ $ btc_address = $ this ->getContext ()->donations ->btc_address ;
17+ $ email_address = $ this ->getContext ()->donations ->email_address ;
18+ $ paypal_url = $ this ->getContext ()->donations ->paypal_url ;
19+ $ user_id = $ this ->getContext ()->donations ->user_id ;
20+
21+ if (!empty ($ user_id )) {
22+ $ user = new User ($ user_id );
23+ }
1624
1725require ('./header.inc.phtml ' );
1826?>
1927 <article>
2028 <header>Support Us</header>
2129 <section>
22- <p><ul>
30+ <p>
31+ The following are the methods available for supporting us:
32+ <ul type="circle">
33+ <?php if ($ user ) { ?>
34+ <li>Contact: <a href="<?= $ user ->getURI ()?> "><?= filter_var ($ user ->getName (), FILTER_SANITIZE_FULL_SPECIAL_CHARS )?> </a></li>
35+ <?php } ?>
36+ <?php if (!empty ($ paypal_url )) { ?>
2337 <li>PayPal: <a href="<?php echo filter_var ($ paypal_url , FILTER_SANITIZE_FULL_SPECIAL_CHARS ); ?> "><?php echo filter_var ($ paypal_url , FILTER_SANITIZE_FULL_SPECIAL_CHARS ); ?> </a></li>
38+ <?php } ?>
39+ <?php if (!empty ($ btc_address )) { ?>
2440 <li>BTC: <code><?php echo $ btc_address ; ?> </code></li>
25- </ul></p>
41+ <?php } ?>
42+ <?php if (!empty ($ email_address )) { ?>
43+ <li>Email us: <a href="mailto:<?= rawurlencode ($ email_address )?> "><?= filter_var ($ email_address , FILTER_SANITIZE_FULL_SPECIAL_CHARS )?> </a></li>
44+ <?php } ?>
45+ </ul>
46+ </p>
2647 </section>
2748 <header>Disclaimer</header>
2849 <section>
0 commit comments