@@ -5,24 +5,45 @@ namespace BNETDocs\Templates;
5
5
use \CarlBennett \MVC \Libraries \Common ;
6
6
use \CarlBennett \MVC \Libraries \Pair ;
7
7
8
+ use \BNETDocs \Libraries \User ;
9
+
8
10
$ title = 'Donate ' ;
9
11
$ description = 'Donate to BNETDocs to show your support for this project! ' ;
10
12
11
13
$ this ->opengraph ->attach (new Pair ('url ' , '/donate ' ));
12
14
$ this ->opengraph ->attach (new Pair ('type ' , 'article ' ));
13
15
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
+ }
16
24
17
25
require ('./header.inc.phtml ' );
18
26
?>
19
27
<article>
20
28
<header>Support Us</header>
21
29
<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 )) { ?>
23
37
<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 )) { ?>
24
40
<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>
26
47
</section>
27
48
<header>Disclaimer</header>
28
49
<section>
0 commit comments