<?php
include_once $_SERVER['DOCUMENT_ROOT'].
'/includes/helpers.inc.php'; ?>
<!DOCTYPE html>
<html>
	<head>
	<meta charset='utf-8'>
	<title><?php htmlout($pageTitle); ?></title>
	<style type="text/css">
	textarea{
		display:block;
		width:50%;
	}
	</style>
	</head>
	<body dir=rtl>
	<h1><?php htmlout($pageTitle); ?></h1>
	<form action="?<?php htmlout($action); ?>" method=post>
	<div>
	<label>متن شعر:</label>
	<textarea name=text rows=3 cols=40>
	<?php htmlout($text);?>
	</textarea>
	</div>
	<div>
	<label>ارسال کننده:</label>
	<select name=sender>
	<option value="">انتخاب کنید</option>
	<?php foreach($senders as $sender): ?>
		<option value="<?php htmlout($sender['id']);?>"
		<?php if($sender['id']==$senderid){
			echo ' selected';
		}
		?>><?php htmlout($sender['name']); ?></option>
		<?php endforeach; ?>
		</select>
		</div>
		<fieldset>
			<legend>دسته بندی:</legend>
			<?php foreach($categories as $category): ?>
			<div>
			<label><input type=checkbox name="categories[]" value="<?php htmlout($category['id']); ?>"
			<?php if($category['selected']){
				echo ' checked';
			}
			?>><?php htmlout($category['name']);?>
			</label>
			</div>
			<?php endforeach; ?>
			</fieldset>
			<div>
			<input type=hidden name=id value="<?php htmlout($id); ?>">
			<input type=submit value="<?php htmlout($button); ?>">
			</div>
		</form>
	</body>
</html>
			
			
			
			
		
		
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	