<div class="form form-profile aif" style='width:auto'>
	<h2 style="margin-top:0px;">
		Blog Categories - <a href="/category/all" title="View Categories page" target="_blank">View Categories 
		<i class="fa fa-angle-right" aria-hidden="true"></i></a>
	</h2>
	
	<table class="admintable" style="margin:10px; width:98%">
		<tr>
			<th width="100">Image</th>
			<th width="150">Name</th>
			<th width="300">Filename</th>
			<th>Actions</th>
		</tr>
		<?php
		foreach ($categories as $cat) {
			echo "<tr>
			<td style='padding:10px;'><img src='/{$cat['image']}' 
			onerror=\"this.src='/static/system/placeholder.jpg'\"
			alt='{$cat['title']}' style='width:100%; max-width:100px; height:auto;' /></td>
			<td style='padding:10px;'>{$cat['title']}</td>
			<td style='padding:10px;'>{$cat['image']}</td>
			<td style='padding:10px; text-align:center;'>
				<a href='?project_cat&edit={$cat['id']}'>edit</a> | 
				<a href='?project_cat&delete={$cat['id']}' class='confirm'>delete</a>
			</td>
			</tr>";
		}
		?>
	</table>
	
	<div style="margin:10px;">
		<a href='?project_cat&add' class='btn btn-blue'>Add New</a>
	</div>
                            
</div>