PageRenderTime 21ms CodeModel.GetById 16ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/halogy/application/modules/events/views/admin/comments.php

https://bitbucket.org/haloweb/halogy-1.0/
PHP | 40 lines | 33 code | 7 blank | 0 comment | 3 complexity | 90d306bce720608b40b7074e4cbb4a0b MD5 | raw file
 1<h1>Blog comments</h1>
 2
 3<?php if ($blog_comments): ?>
 4
 5<?php echo $this->pagination->create_links(); ?>
 6
 7<table class="default clear">
 8	<tr>
 9		<th><?php echo order_link('/admin/blog/viewall','dateCreated','Date'); ?></th>
10		<th><?php echo order_link('/admin/blog/viewall','fullName','Poster name'); ?></th>
11		<th><?php echo order_link('/admin/blog/viewall','email','Poster email'); ?></th>
12		<th><?php echo order_link('/admin/blog/viewall','comment','Comment'); ?></th>	
13		<th class="narrow"><?php echo order_link('/admin/blog/viewall','status','Approved'); ?></th>
14		<th class="narrow">&nbsp;</th>
15	</tr>
16<?php foreach ($blog_comments as $comment): ?>
17	<tr>
18		<td><?php echo dateFmt($comment['dateCreated']); ?></td>
19		<td><?php echo $comment['fullName']; ?></td>
20		<td><?php echo $comment['email']; ?></td>
21		<td><?php echo substr($comment['comment'], 0, 50).'...'; ?></td>						
22		<td>
23			<?php
24				if ($comment['status']) echo 'Yes';
25				else echo 'No';
26			?>
27		</td>
28		<td>
29			[ <?php echo anchor('/admin/blog/delete_comment/'.$comment['commentID'], 'Delete', 'onclick="return confirm(\'Are you sure you want to delete this?\')"'); ?> ]
30		</td>
31	</tr>
32<?php endforeach; ?>
33</table>
34
35<?php echo $this->pagination->create_links(); ?>
36
37<p style="text-align: right;"><a href="#" class="button grey" id="totop">Back to top</a></p>
38
39<?php endif; ?>
40