This repository has been archived on 2024-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
mybb-digest/email.php

48 lines
1.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
function print_email($username, $unsubscription, $threads) { ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<head>
<title>Daily digest from Olympic Business Forum</title>
</head>
<body>
<p><?php echo $username ?>,</p>
<p>Heres a daily update of activity on the Olympic Business forum.</p>
<p><table style="padding: 1em">
<thead>
<th style="padding: 0.5em">Forum</th>
<th style="padding: 0.5em">Thread</th>
<th style="padding: 0.5em">Started by</th>
<th style="padding: 0.5em">Post count</th>
<th style="padding: 0.5em">Last update</th>
</thead>
<tbody>
<?php foreach ($threads as $thread) { ?>
<tr>
<td style="padding: 0.5em"><?php echo $thread['name'] ?></td>
<td style="padding: 0.5em"><?php echo $thread['subject'] ?></td>
<td style="padding: 0.5em">
<?php echo $thread['username'] ?>,
<?php echo date('d.m.Y H:m:i', $thread['dateline']) ?>
</td>
<td style="padding: 0.5em"><?php echo $thread['posts'] ?></td>
<td style="padding: 0.5em">
<?php echo $thread['lastposter'] ?>,
<?php echo date('d.m.Y H:m:i', $thread['lastpost']) ?>
</td>
</tr>
<?php } ?>
</tbody>
</table></p>
<p>Thank you,<br>
Olympic Business Forum Staff</p>
<p>To unsubscribe from these daily digests, click here: <a href="<?php echo $unsubscription ?>"><?php echo $unsubscription ?></a></p>
</body>
</html>
<?php } ?>