{include file="$admintemplatepath/header.template"}
{include file="$admintemplatepath/navigation.template" showOpt=blockedHosts title=$locale->tr("blockedHosts")}
{include file="common.template"}
{if $pluginEnabled}
<form name="editBlockedHost" action="admin.php" method="post" onSubmit="return checkIpAddress(this);">
 <fieldset class="inputField">
 <legend>{$locale->tr("edit_blocked_host")}</legend>
  {include file="$admintemplatepath/successmessage.template"}
  {include file="$admintemplatepath/errormessage.template"} 
  <div class="field">
   <label for="blockedHost">{$locale->tr("ip_address")}</label>
   <span class="required">*</span>
   <div class="formHelp">{$locale->tr("host_to_block_help")}</div>
    <input style="width:40px;" type="text" size="3" maxlength="3" name="ip1" id="ip1" value="{$ip1}" />.
    <input style="width:40px;" type="text" size="3" maxlength="3" name="ip2" id="ip2" value="{$ip2}" />.
    <input style="width:40px;" type="text" size="3" maxlength="3" name="ip3" id="ip3" value="{$ip3}" />.
    <input style="width:40px;" type="text" size="3" maxlength="3" name="ip4" id="ip4" value="{$ip4}" />
    / <select name="mask" id="mask">
     <option value="4" {if $blockedhost->getMask() == 4} selected="selected"{/if}>4 {$locale->tr("bits")}</option>
     <option value="8" {if $blockedhost->getMask() == 8} selected="selected"{/if}>8 {$locale->tr("bits")}</option>
     <option value="12" {if $blockedhost->getMask() == 12} selected="selected"{/if}>12 {$locale->tr("bits")}</option>
     <option value="16" {if $blockedhost->getMask() == 16} selected="selected"{/if}>16 {$locale->tr("bits")}</option>
     <option value="20" {if $blockedhost->getMask() == 20} selected="selected"{/if}>20 {$locale->tr("bits")}</option>
     <option value="24" {if $blockedhost->getMask() == 24} selected="selected"{/if}>24 {$locale->tr("bits")}</option>
     <option value="28" {if $blockedhost->getMask() == 28} selected="selected"{/if}>28 {$locale->tr("bits")}</option>
     <option value="32" {if $blockedhost->getMask() == 32} selected="selected"{/if}>32 {$locale->tr("bits")}</option>
    </select>
  </div>

  <div class="field">
   <label for="blockType">{$locale->tr("block_type")}</label>
   <span class="required"></span>
   <div class="formHelp">{$locale->tr("block_type_help")}</div>
     <select name="blockType" id="blockType">
     <option value="1" {if $blockedhost->getType() == 1} selected="selected" {/if}>{$locale->tr("access_blocked")}</option>
     <option value="2" {if $blockedhost->getType() == 2} selected="selected" {/if}>{$locale->tr("posting_blocked")}</option>
    </select> 
  </div>

  <div class="field">
   <label for="reason">{$locale->tr("reason")}</label>
   <span class="required"></span>
   <div class="formHelp">{$locale->tr("reason_help")}</div>
   <input type="text" name="reason" id="reason" value="{$blockedhost->getReason()}"/>
  </div>

 </fieldset>

 <div class="buttons">
  <input type="hidden" name="op" value="updateBlockedHost" />
  <input type="hidden" name="hostId" value="{$blockedhost->getId()}" />
  <input type="reset" name="reset" value="{$locale->tr("reset")}" />	
  <input type="submit" name="Add" value="{$locale->tr("update")}"/>  
 </div> 

</form>
{else}
 {include file="$admintemplatepath/errormessage.template"} 
{/if}
{include file="$admintemplatepath/footernavigation.template"}
{include file="$admintemplatepath/footer.template"}
