<h1><?php echo $this->translate('service.title.setup_receive'); ?></h1>

<h2><?php echo $this->service['name']; ?><?php echo $this->translate('service.caption.setting_info'); ?></h2>

<form action="<?php echo $this->appPath('controller'); ?>/setup_receive_commit" method="POST">

<input type="hidden" name="service_id" value="<?php echo $this->service['id']; ?>" />

<table class="def" style="width:70%">
<tr>
<th><?php echo $this->translate('common.operation.delete'); ?></th>
<th><?php echo $this->translate('service.label.pop3_type'); ?></th>
<th><?php echo $this->translate('service.label.pop3_host'); ?></th>
<th><?php echo $this->translate('service.label.pop3_port'); ?></th>
<th><?php echo $this->translate('service.label.pop3_user'); ?></th>
<th><?php echo $this->translate('service.label.pop3_pass'); ?></th>
</tr>
<?php foreach ((array) $this->service_settings as $setting) : ?>
<tr>
<td>
<input type="hidden" name="settings[<?php echo $setting['id']; ?>][delete]" value="0">
<input type="checkbox" name="settings[<?php echo $setting['id']; ?>][delete]" value="1">
</td>
<td>
<select name="settings[<?php echo $setting['id']; ?>][type]">
<option value="1" <?php if ($setting['type']==1) echo "selected"; ?>><?php echo $this->translate('service.label.inquiry_mailaddress'); ?></option>
<option value="2" <?php if ($setting['type']==2) echo "selected"; ?>><?php echo $this->translate('service.label.comment_mailaddress'); ?></option>
</select>
</td>
<td><input type="text" name="settings[<?php echo $setting['id']; ?>][pop3_host]" value="<?php echo $this->escape($setting['pop3_host']); ?>"></td>
<td><input type="text" name="settings[<?php echo $setting['id']; ?>][pop3_port]" value="<?php echo $this->escape($setting['pop3_port']); ?>"></td>
<td><input type="text" name="settings[<?php echo $setting['id']; ?>][pop3_user]" value="<?php echo $this->escape($setting['pop3_user']); ?>"></td>
<td><input type="password" name="settings[<?php echo $setting['id']; ?>][pop3_pass]" value="<?php echo $this->escape($setting['pop3_pass']); ?>"></td>
</tr>
<?php endforeach; ?>
<tr>
<td></td>
<td>
<select name="type">
<option value="1"><?php echo $this->translate('service.label.inquiry_mailaddress'); ?></option>
<option value="2"><?php echo $this->translate('service.label.comment_mailaddress'); ?></option>
</select>
</td>
<td><input type="text" name="settings[0][pop3_host]" value=""></td>
<td><input type="text" name="settings[0][pop3_port]" value=""></td>
<td><input type="text" name="settings[0][pop3_user]" value=""></td>
<td><input type="password" name="settings[0][pop3_pass]" value=""></td>
</tr>
</table>

<input type="submit" value="<?php echo $this->translate('common.operation.modify'); ?>" />
<input type="reset" value="<?php echo $this->translate('common.operation.reset'); ?>" />
</form>

<br/>
<ul>
<li>&gt;&gt;&nbsp;&nbsp;<a href="<?php echo $this->appPath('controller'); ?>"><?php echo $this->translate('service.operation.back_list'); ?></a></li>
</ul>