<?php echo $header; ?>
<div id="content">
<br>
<?php if ($error_warning) { ?>
<?php echo p3html::tb_alert('error', $error_warning, true, 'warning'); ?>
<?php } ?>
  <div class="box">
    <div class="heading">
      <h1><i class="icon-truck"></i> <?php echo $heading_title; ?></h1>
      <div class="buttons form-actions form-actions-top">
				<?php echo p3html::tb_form_button_save($button_save); ?>
				<?php echo p3html::tb_form_button_cancel($button_cancel, $cancel); ?>
			</div>
    </div>
  	<div class="content">
	  <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
	    <table class="form">
	      <tr>
	        <td><span class="required">*</span> <?php echo $entry_postcode; ?><br /><br />
	          </td>
	        <td><input name="correios_postcode" type="text" id="correios_postcode" value="<?php echo $correios_postcode; ?>" /><br /><br />
	         <?php if ($error_postcode) { ?>
	         <span class="error"><?php echo $error_postcode; ?></span>
	         <?php  } ?>
	        </td>
	      </tr>
	      
          <tr>
            <td><?php echo $entry_servicos; ?><br /><br /></td>
            <td>
	        <?php if ($error_servico) { ?>
	        <span class="error"><?php echo $error_servico; ?></span>
	        <?php  } ?>              
            <div class="scrollbox">
                <?php $class = 'odd'; ?>
                <div class="even">
                  <?php if ($correios_41106) { ?>
                  <input type="checkbox" name="correios_41106" value="1" checked="checked" />
                  <?php echo $text_pac; ?>
                  <?php } else { ?>
                  <input type="checkbox" name="correios_41106" value="1" />
                  <?php echo $text_pac; ?>
                  <?php } ?>
                </div>
                <div class="odd">
                  <?php if ($correios_40010) { ?>
                  <input type="checkbox" name="correios_40010" value="1" checked="checked" />
                  <?php echo $text_sedex; ?>
                  <?php } else { ?>
                  <input type="checkbox" name="correios_40010" value="1" />
                  <?php echo $text_sedex; ?>
                  <?php } ?>
                </div>
                <div class="even">
                  <?php if ($correios_40045) { ?>
                  <input type="checkbox" name="correios_40045" value="1" checked="checked" />
                  <?php echo $text_sedex_cobrar; ?>
                  <?php } else { ?>
                  <input type="checkbox" name="correios_40045" value="1" />
                  <?php echo $text_sedex_cobrar; ?>
                  <?php } ?>
                </div>
                <div class="odd">
                  <?php if ($correios_40215) { ?>
                  <input type="checkbox" name="correios_40215" value="1" checked="checked" />
                  <?php echo $text_sedex_10; ?>
                  <?php } else { ?>
                  <input type="checkbox" name="correios_40215" value="1" />
                  <?php echo $text_sedex_10; ?>
                  <?php } ?>
                </div>
                <div class="even">
                  <?php if ($correios_81019) { ?>
                  <input type="checkbox" name="correios_81019" value="1" checked="checked" />
                  <?php echo $text_esedex; ?>
                  <?php } else { ?>
                  <input type="checkbox" name="correios_81019" value="1" />
                  <?php echo $text_esedex; ?>
                  <?php } ?>
                </div> 
          	</div>
         	<br /><br /></td>
          </tr>	      

	      <tr>
	        <td><?php echo $entry_esedex; ?><br /><br /><br />
	          </td>
	        <td>
	        <?php echo $entry_esedex_codigo; ?><br /><input name="correios_esedex_codigo" type="text" id="correios_esedex_codigo" value="<?php echo $correios_esedex_codigo; ?>" /><br/><br />
	        <?php echo $entry_esedex_senha; ?><br /><input name="correios_esedex_senha" type="text" id="correios_esedex_senha" value="<?php echo $correios_esedex_senha; ?>" />
	        <br /><br /></td>
	      </tr>
	      
	      <tr>
	        <td><?php echo $entry_mao_propria; ?><br /><br />
	          </td>
	        <td>
	        <select name="correios_mao_propria">
		        <option value="n" <?php echo ($correios_mao_propria == 'n') ? ' selected="selected" ' : ''; ?>><?php echo $text_nao; ?></option>
		        <option value="s" <?php echo ($correios_mao_propria == 's') ? ' selected="selected" ' : ''; ?>><?php echo $text_sim; ?></option>
			</select>
	        <br /><br /></td>
	      </tr>
	      
	      <tr>
	        <td><?php echo $entry_aviso_recebimento; ?><br /><br />
	          </td>
	        <td>
	        <select name="correios_aviso_recebimento">
		        <option value="n" <?php echo ($correios_aviso_recebimento == 'n') ? ' selected="selected" ' : ''; ?>><?php echo $text_nao; ?></option>
		        <option value="s" <?php echo ($correios_aviso_recebimento == 's') ? ' selected="selected" ' : ''; ?>><?php echo $text_sim; ?></option>
			</select>
	        <br /><br /></td>
	      </tr> 
	      
	      <tr>
	        <td><?php echo $entry_declarar_valor; ?><br /><br />
	          </td>
	        <td>
	        <select name="correios_declarar_valor">
		        <option value="n" <?php echo ($correios_declarar_valor == 'n') ? ' selected="selected" ' : ''; ?>><?php echo $text_nao; ?></option>
		        <option value="s" <?php echo ($correios_declarar_valor == 's') ? ' selected="selected" ' : ''; ?>><?php echo $text_sim; ?></option>
			</select>
	        <br /><br /></td>
	      </tr>
	      
	      <tr>
	        <td><?php echo $entry_adicional; ?><br /><br />
	          </td>
	        <td><input name="correios_adicional" type="text" id="correios_adicional" value="<?php echo $correios_adicional; ?>" />
	        <br /><br /></td>
	      </tr> 
	      
	      <tr>
	        <td><?php echo $entry_prazo_adicional; ?><br /><br />
	          </td>
	        <td><input name="correios_prazo_adicional" type="text" id="correios_prazo_adicional" value="<?php echo $correios_prazo_adicional; ?>" />
	        <br /><br /></td>
	      </tr> 	                            
	      
	      <tr>
	        <td><?php echo $entry_tax; ?><br /><br /></td>
	        <td><select name="correios_tax_class_id">
	          <option value="0"><?php echo $text_none; ?></option>
	          <?php foreach ($tax_classes as $tax_class) { ?>
	          <?php if ($tax_class['tax_class_id'] == $correios_tax_class_id) { ?>
	          <option value="<?php echo $tax_class['tax_class_id']; ?>" selected="selected"><?php echo $tax_class['title']; ?></option>
	          <?php } else { ?>
	          <option value="<?php echo $tax_class['tax_class_id']; ?>"><?php echo $tax_class['title']; ?></option>
	          <?php } ?>
	          <?php } ?>
	        </select><br /><br /></td>
	      </tr>
	      <tr>
	        <td><?php echo $entry_geo_zone; ?><br /><br /></td>
	        <td><select name="correios_geo_zone_id">
	            <option value="0"><?php echo $text_all_zones; ?></option>
	            <?php foreach ($geo_zones as $geo_zone) { ?>
	            <?php if ($geo_zone['geo_zone_id'] == $correios_geo_zone_id) { ?>
	            <option value="<?php echo $geo_zone['geo_zone_id']; ?>" selected="selected"><?php echo $geo_zone['name']; ?></option>
	            <?php } else { ?>
	            <option value="<?php echo $geo_zone['geo_zone_id']; ?>"><?php echo $geo_zone['name']; ?></option>
	            <?php } ?>
	            <?php } ?>
	          </select><br /><br /></td>
	      </tr>
	      <tr>
	        <td width="25%"><?php echo $entry_status; ?><br /><br /></td>
	        <td><select name="correios_status">
	            <?php if ($correios_status) { ?>
	            <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
	            <option value="0"><?php echo $text_disabled; ?></option>
	            <?php } else { ?>
	            <option value="1"><?php echo $text_enabled; ?></option>
	            <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
	            <?php } ?>
	          </select><br /><br /></td>
	      </tr>
	      <tr>
	        <td><?php echo $entry_sort_order; ?><br /><br /></td>
	        <td><input type="text" name="correios_sort_order" value="<?php echo $correios_sort_order; ?>" size="1" /><br /><br /></td>
	      </tr>
	    </table>
	  </form>
    </div>
  </div>
</div>
<?php echo $footer; ?>
