<?php include_once $_SERVER['DOCUMENT_ROOT'].'/includes/helpers.inc.php';?>
<!DOCTYPE html>
<html>
	<head>
	<meta charset='utf-8'>
	<title><?php htmlout($pageTitle); ?></title>
	</head>
	<body dir=rtl>
	<h1><?php htmlout($pageTitle); ?></h1>
	<form action="?<?php htmlout($action); ?>" method=post>
	<div>
	<label>نام:<input type=text name=name value="<?php htmlout($name); ?>"></label>
	</div>
	<div>
	<label>ایمیل:<input type=text name=email value="<?php htmlout($email); ?>"></label>
	</div>
	<div>
	<label>کلمه عبور:<input type=password name=password></label>
	</div>
	<fieldset>
	<legend>نقش ها:</legend>
	<?php foreach($roles as $role): ?>
	<div>
	<label><input type=checkbox name="roles[]" 
	value="<?php htmlout($role['id']); ?>"
	<?php if($role['selected']){
		echo ' checked';
	}
	?>><?php htmlout($role['id']); ?></label>:
	<?php htmlout($role['description']); ?>
	</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>
	