You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fulcrm_mailshot/fulcrm_mailshot_user_mailsh...

50 lines
2.1 KiB
PHP

<div class="redeye-member-mailshots">
<h2>Emails from Redeye</h2>
<ul class="list-unstyled">
<?php foreach ( $mailshots as $mailshot ): ?>
<?php if ( $mailshot['completed'] ): ?>
<li><h3><q><?php print check_plain( $mailshot['campaign']['subject'] ); ?></q> <small><?php
$tz = new DateTimeZone('UTC');
$completed = DateTime::createFromFormat('Y-m-d\TH:i:s.u\Z',$mailshot['completed'],$timezone=$tz);
if ( $completed )
print format_date( $completed->getTimestamp(), 'custom', '\s\e\n\t \o\n j/M/Y \a\t ga' );
?></small></h3>
<blockquote>
<?php print text_summary( $mailshot['campaign']['d']['body'], 'full_html' ); ?>
<?php foreach ( $mailshot['_view_urls']['text/html'] as $k => $v ): ?>
<p><a href="<?php print check_plain($v); ?>" target="_blank">read more&hellip;</a></p>
<?php endforeach; ?>
</blockquote>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</div>
<nav aria-label="Page navigation">
<ul class="pagination">
<?php if ($page>1): ?>
<li>
<a href="/user/mailshots/<?php print $page-1;?>" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
<?php else: ?>
<li class="disabled"><a href="#" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li>
<?php endif; ?>
<?php for ( $i = 1; $i <= $pages; $i++ ): ?>
<li<?php if ($i==$page):?> class="active"<?php endif; ?>><a href="/user/mailshots/<?php print $i; ?>"><?php print $i; ?></a></li>
<?php endfor; ?>
<?php if ($page+1<$pages): ?>
<li>
<a href="/user/mailshots/<?php print $page+1; ?>" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
<?php else: ?>
<li class="disabled"><a href="#" aria-label="Next"><span aria-hidden="true">&raquo;</span></a></li>
<?php endif; ?>
</ul>
</nav>