                            <div style="padding:10px">
                            	<table id="pagetable" style="width:100%">
                            		<tr style="border-bottom:1px solid #ddd; height:25px; padding-bottom:5px;">
										<th>PAGE NAME</th>
										<th>DATE CREATED</th>
										<th style="width:70px;">EDIT</th>
									</tr>
	                                <?php

	                                foreach ($pages as $page) {
										echo "<tr style='border-bottom:1px solid #ddd; padding:0px 0;'>
											<td style='padding-right:10px;'>
												<img src='/{$page['image']}' alt='img' 
												style='max-width:300px; width:100%'
												onerror=\"this.src='/static/system/share_banner.jpg'\"
												/><br /><br />
												<a href='?editPage={$page['id']}' target='_blank' 
												style='font-weight:600; font-size:17px;'>{$page['name']}</a>
												<br />
												<span style='font-weight:300;'>Author: {$page['author']['name']}</span>
											</td>
											<td style='font-weight:300;'>{$page['date_created']}
												<br />
												{$page['date_edited']}
											</td>
											<td>
												<br /><br />
												<i class='fa fa-television'></i> <a href='/{$page['slug']}' target='_blank'>view</a>
												<br /><br />
												<i class='fa fa-pencil-square-o'></i> <a href='/admin/page/{$page['id']}?edit'>edit</a>
												<br /><br />
												<i class='fa fa-times'></i> <a href='/admin/page/{$page['id']}?delete' class='confirm'>delete</a>
												<br /><br />
                                            	<i class='fa fa-envelope'></i> <a href='/admin/page/{$page['id']}?duplicate'>dupe</a>
                                            	<br /><br />											
											</td>
										</tr>";
									}

	                                ?>
                                </table>

                                <div style="margin:10px;">
									<input class="btn btn-blue" type="button" value="Add New Page" onclick="window.location = '/admin/page/new'" />
								</div>
                                <style>
                                #pagetable th {
                                	text-align: left;
                                }
                                </style>
                            </div>