<? _title($this, $this->Language('Emailer'), array(array('href' => '?page=emailer', 'name' => 'All emails'), array('href' => '?page=emailer_add', 'name' => 'Send emails'), array('href' => '?page=statistics', 'name' => 'Email statistics'))); ?>



<select name="heads">
<option value="all"><?=$this->Language('Kõik');?></option>
<?
	while($row = $this->heads->Assoc()){

		$head_name = json_decode($row['name'], true);
		$name = $head_name[$_SESSION['language']];

		echo '<option value="'.$row['id'].'">'.$name.'</option>';
	}
?>
</select>
<input type="submit" name="add_head" value="<?=$this->Language('Lisa valdkond');?>"/>
<div id="heads_list"></div>