<? _title($this, $this->Language('Mass mail')); ?>

<form method="post">
<table class="header">
<tr>
	<th><?=$this->Language('emails', true);?></th>
	<td><textarea name="emails"><?=$_POST['emails'];?></textarea></td>
</tr>
<tr>
	<th><?=$this->Language('message');?></th>
	<td>
	<select name="message">
	<?
	while($row = $this->templates->Assoc()){

		echo '<option value="'.$row['name'].'" '.($_POST['message'] == $row['name'] ? 'selected="selected"' : '').'>'.$row['name'].'</option>';
	}
	?>
	</select>
	</td>
</tr>
<tr>
	<th></th>
	<td><input type="submit" name="create_emails" value="<?=$this->Language('Create emails');?>"/></td>
</tr>
</table>
</form>