<?php include 'en/admin/_adminheader.php'; ?>
<h2>Prayer Requests Page: Prayer Letters</h2>
<p>
	Below is a list of the prayer letters that you have on the Prayer Requests page.
	You can add, edit or delete articles.
</p>
<p>
	<a href='/admin/prayerrequests.php?what=prayerletters&do=add' title='Add a Prayer Letter' class='action'>Add a prayer letter</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['letters'] as $letter): ?>
		<tr <?php if($count % 2 == 1): echo "class='alt_row'"; endif; $count++; ?>>
			<td><?php echo $letter->title ?></td>
			<td><?php echo $letter->date ?></td>
			<td><?php echo $letter->file ?></td>
			<td>
				<a href='/admin/prayerrequests.php?what=prayerletters&do=edit&which=<?php echo $letter['id'] ?>' title='Edit Prayer Letter' class='action'>Edit</a>
				<a href='/admin/prayerrequests.php?what=prayerletters&do=delete&which=<?php echo $letter['id'] ?>' title='Delete Prayer Letter' class='action'>Delete</a>
			</td>
		</tr>
<?php endforeach; ?>
	</tbody>
</table>
	