<?php 
include_once $_SERVER['DOCUMENT_ROOT'].
'/includes/helpers.inc.php';
?>
<!DOCTYPE html>
<html>
	<head>
	<meta charset='utf-8'>
	<title>Manage Poems: Search Results:</title>
	</head>
	<body dir=rtl>
	<h1>نتایج جستجو</h1>
	<?php if(isset($poems)): ?>
		<table>
		<tr><th>Poem Text</th><th>Options</th></tr>
		<?php foreach($poems as $poem): ?>
		<tr>
			<td><?php htmlout($poem['text']); ?></td>
			<td>
			<form action="?" method="post">
			<div>
			<input type=hidden name=id value="<?php
			htmlout($poem['id']); ?>">
			<input type=submit name="action" value="Edit">
			<input type=submit name=action value=Delete>
			</div>
			</form>
			</td>
		</tr>
		<?php endforeach; ?>
		</table>
		<?php endif; ?>
		<p><a href="?">جستجوی جدید</a></p>
		<p><a href="..">بازگشت به صفحه اصلی مدیریت سایت</a></p>
		<?php include '../logout.html.php'; ?>
	</body>
</html>
			
			
			
			
			
			
	
	
	