<?php include 'en/admin/_adminheader.php'; ?>
<h2>Prayer Requests Page: E-mail Updates</h2>
<p>
	Below is a list of the e-mail updates that you have on the Prayer Requests page.
	You can add, edit or delete articles.
</p>
<p>
	<a href='/admin/prayerrequests.php?what=emailupdates&do=add' title='Add an E-mail Update' class='action'>Add an e-mail update</a>
</p>
<table>
	<thead>
		<tr>
			<td>Title</td>
			<td>Date</td>
			<td>File</td>
			<td>Actions</td>
		</tr>
	</thead>
	<tbody>
<?php $count = 0; foreach($this->data['updates'] as $update): ?>
		<tr <?php if($count % 2 == 1): echo "class='alt_row'"; endif; $count++; ?>>
			<td><?php echo $update->title ?></td>
			<td><?php echo $update->date ?></td>
			<td><?php echo $update->file ?></td>
			<td>
				<a href='/admin/prayerrequests.php?what=emailupdates&do=edit&which=<?php echo $update['id'] ?>' title='Edit E-mail Update' class='action'>Edit</a>
				<a href='/admin/prayerrequests.php?what=emailupdates&do=delete&which=<?php echo $update['id'] ?>' title='Delete E-mail Update' class='action'>Delete</a>
			</td>
		</tr>
<?php endforeach; ?>
	</tbody>
</table>
	