<?php echo $header; ?>

<script type="text/javascript" src="http://jquerypriceformat.com/js/jquery.price_format.1.8.js"></script>
<script>
$(function(){
$('.dinheiro').priceFormat({
    prefix: '',
    thousandsSeparator: ''
});
});
</script>

<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <div class="box">
    <div class="heading">
      <h1><img src="view/image/payment.png" alt="" /> <?php echo $heading_title; ?> (Processador de Cart&otilde;es de Cr&eacute;dito Online)</h1>
      <div class="buttons"><a onclick="$('#form').submit();" class="button"><?php echo $button_save; ?></a><a href="<?php echo $cancel; ?>" class="button"><?php echo $button_cancel; ?></a></div>
    </div>
    <div class="content">
	
	
	<div id="tabs" class="htabs">
	<a href="#tab-configuracoes" class="" style="display: inline;">Configura&ccedil;&otilde;es</a>
	</div>
	
	<div id="tab-configuracoes">
      <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
        <table class="form">
		  <tr>
            <td>Serial:<span class="help">Serial de registro do m&oacute;dulo.</span></td>
            <td><input type="text" name="komerciloja5_serial" value="<?php echo $komerciloja5_serial; ?>" size="70" /></td>
          </tr>
		 <tr>
            <td>Nome do M&oacute;dulo:<span class="help">Nome que sera mostrado ao cliente na lista de meios de pagamento.</span></td>
            <td><input type="text" name="komerciloja5_nome" value="<?php echo $komerciloja5_nome; ?>" size="70" /></td>
          </tr>
          <tr>
            <td><?php echo $entry_total; ?></td>
            <td><input class="dinheiro" type="text" name="komerciloja5_total" value="<?php echo $komerciloja5_total; ?>" /></td>
          </tr> 
		  

		  
          <tr>
            <td><?php echo $entry_geo_zone; ?><span class="help">Locais em que o meio de pagamento ser&aacute; aceito.</span></td>
            <td><select name="komerciloja5_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'] == $komerciloja5_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></td>
          </tr>
          <tr>
            <td><?php echo $entry_status; ?><span class="help">Se quer ativar o m&oacute;dulo em sua loja.</span></td>
            <td><select name="komerciloja5_status">
                <?php if ($komerciloja5_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></td>
          </tr>
          <tr>
            <td><?php echo $entry_sort_order; ?><span class="help">Ordem do mesmo a mostrar na lista de meios de pagamento de sua loja.</span></td>
            <td><input type="text" name="komerciloja5_sort_order" value="<?php echo $komerciloja5_sort_order; ?>" size="1" /></td>
          </tr>

		  <tr>
            <td>Afilia&ccedil;&atilde;o:<br /><span class="help">De acordo a Komerci.</span></td>
            <td><input type="text" name="komerciloja5_afiliacao" value="<?php echo $komerciloja5_afiliacao; ?>" size="40" /></td>
          </tr>

		  <tr>
            <td><?php echo $entry_order_status; ?><br /><span class="help">Status padr&atilde;o que os pedidos seram criados e aguardando o pagamento.</span></td>
            <td><select name="komerciloja5_order_status_id">
                <?php foreach ($order_statuses as $order_status) { ?>
                <?php if ($order_status['order_status_id'] == $komerciloja5_order_status_id) { ?>
                <option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
                <?php } else { ?>
                <option value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option>
                <?php } ?>
                <?php } ?>
              </select></td>
          </tr>
		  
		  <tr>
            <td>Status Aprovado:<br /><span class="help">Status padr&atilde;o que os pedidos aprovado com captura.</span></td>
            <td><select name="komerciloja5_aprovado">
                <?php foreach ($order_statuses as $order_status) { ?>
                <?php if ($order_status['order_status_id'] == $komerciloja5_aprovado) { ?>
                <option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
                <?php } else { ?>
                <option value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option>
                <?php } ?>
                <?php } ?>
              </select></td>
          </tr>
		  
		  <tr>
            <td>Status Cancelado:<br /><span class="help">Status padr&atilde;o que os pedidos cancelados ou negados.</span></td>
            <td><select name="komerciloja5_cancelado">
                <?php foreach ($order_statuses as $order_status) { ?>
                <?php if ($order_status['order_status_id'] == $komerciloja5_cancelado) { ?>
                <option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
                <?php } else { ?>
                <option value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option>
                <?php } ?>
                <?php } ?>
              </select></td>
          </tr>
		  

		  <tr>
            <td>Ativar Visa:<br /><span class="help">(Cr&eacute;dito em at&eacute; 12x)</span></td>
            <td><select name="komerciloja5_visa_ativo">
                <?php if ($komerciloja5_visa_ativo==1) { ?>
                <option value="1" selected="selected">SIM</option>
                <option value="0">NAO</option>
                <?php } else { ?>
                <option value="1">SIM</option>
                <option value="0" selected="selected">NAO</option>
                <?php } ?>
              </select> - Dividir <input type="text" onkeypress="return isNumberKey(event)" name="komerciloja5_visa_div" value="<?php echo $komerciloja5_visa_div; ?>" size="1" />x - Sem juros <input type="text" onkeypress="return isNumberKey(event)" name="komerciloja5_visa_sem" value="<?php echo $komerciloja5_visa_sem; ?>" size="1" />x - Taxa de Juros <input class="dinheiro" type="text" name="komerciloja5_visa_juros" value="<?php echo $komerciloja5_visa_juros; ?>" size="1" />%.
			  </td>
          </tr>
		  
		  <tr>
            <td>Ativar Mastercard:<br /><span class="help">(Cr&eacute;dito em at&eacute; 12x)</span></td>
            <td><select name="komerciloja5_mastercard_ativo">
                <?php if ($komerciloja5_mastercard_ativo==1) { ?>
                <option value="1" selected="selected">SIM</option>
                <option value="0">NAO</option>
                <?php } else { ?>
                <option value="1">SIM</option>
                <option value="0" selected="selected">NAO</option>
                <?php } ?>
              </select> - Dividir <input type="text" onkeypress="return isNumberKey(event)" name="komerciloja5_mastercard_div" value="<?php echo $komerciloja5_mastercard_div; ?>" size="1" />x - Sem juros <input type="text" onkeypress="return isNumberKey(event)" name="komerciloja5_mastercard_sem" value="<?php echo $komerciloja5_mastercard_sem; ?>" size="1" />x - Taxa de Juros <input class="dinheiro" type="text" name="komerciloja5_mastercard_juros" value="<?php echo $komerciloja5_mastercard_juros; ?>" size="1" />%.
			  </td>
          </tr>

		  
		  <tr>
            <td>Ativar Diners:<br /><span class="help">(Cr&eacute;dito em at&eacute; 12x)</span></td>
            <td><select name="komerciloja5_diners_ativo">
                <?php if ($komerciloja5_diners_ativo==1) { ?>
                <option value="1" selected="selected">SIM</option>
                <option value="0">NAO</option>
                <?php } else { ?>
                <option value="1">SIM</option>
                <option value="0" selected="selected">NAO</option>
                <?php } ?>
              </select> - Dividir <input type="text" onkeypress="return isNumberKey(event)" name="komerciloja5_diners_div" value="<?php echo $komerciloja5_diners_div; ?>" size="1" />x - Sem juros <input type="text" onkeypress="return isNumberKey(event)" name="komerciloja5_diners_sem" value="<?php echo $komerciloja5_diners_sem; ?>" size="1" />x - Taxa de Juros <input class="dinheiro" type="text" name="komerciloja5_diners_juros" value="<?php echo $komerciloja5_diners_juros; ?>" size="1" />%.
			  </td>
          </tr>
		  
		  <tr>
            <td>Ativar Hiper:<br /><span class="help">(Cr&eacute;dito em at&eacute; 12x)</span></td>
            <td><select name="komerciloja5_hiper_ativo">
                <?php if ($komerciloja5_hiper_ativo==1) { ?>
                <option value="1" selected="selected">SIM</option>
                <option value="0">NAO</option>
                <?php } else { ?>
                <option value="1">SIM</option>
                <option value="0" selected="selected">NAO</option>
                <?php } ?>
              </select> - Dividir <input type="text" onkeypress="return isNumberKey(event)" name="komerciloja5_hiper_div" value="<?php echo $komerciloja5_hiper_div; ?>" size="1" />x - Sem juros <input type="text" onkeypress="return isNumberKey(event)" name="komerciloja5_hiper_sem" value="<?php echo $komerciloja5_hiper_sem; ?>" size="1" />x - Taxa de Juros <input class="dinheiro" type="text" name="komerciloja5_hiper_juros" value="<?php echo $komerciloja5_hiper_juros; ?>" size="1" />%.
			  </td>
          </tr>
		  
		  <tr>
            <td>Ativar Hipercard:<br /><span class="help">(Cr&eacute;dito em at&eacute; 12x)</span></td>
            <td><select name="komerciloja5_hipercard_ativo">
                <?php if ($komerciloja5_diners_ativo==1) { ?>
                <option value="1" selected="selected">SIM</option>
                <option value="0">NAO</option>
                <?php } else { ?>
                <option value="1">SIM</option>
                <option value="0" selected="selected">NAO</option>
                <?php } ?>
              </select> - Dividir <input type="text" onkeypress="return isNumberKey(event)" name="komerciloja5_hipercard_div" value="<?php echo $komerciloja5_hipercard_div; ?>" size="1" />x - Sem juros <input type="text" onkeypress="return isNumberKey(event)" name="komerciloja5_hipercard_sem" value="<?php echo $komerciloja5_hipercard_sem; ?>" size="1" />x - Taxa de Juros <input class="dinheiro" type="text" name="komerciloja5_hipercard_juros" value="<?php echo $komerciloja5_hipercard_juros; ?>" size="1" />%.
			  </td>
          </tr>

		  <tr>
            <td>Desconto Cr&eacute;dito a Vista:<span class="help">Caso n&atilde;o tenha ponha 0.00</span></td>
            <td><input class="dinheiro" type="text" name="komerciloja5_desconto_credito" value="<?php echo $komerciloja5_desconto_credito; ?>" /></td>
          </tr> 

		  <tr>
            <td>Parcela Minima:<span class="help">Nunca poderar ser menor que 5.00</span></td>
            <td><input class="dinheiro" type="text" name="komerciloja5_minimo" value="<?php echo $komerciloja5_minimo; ?>" /></td>
          </tr> 
		  <tr>
            <td>Tipo Parcelamento:<span class="help">O tipo de parcelamento que ira usar.</span></td>
            <td><select name="komerciloja5_tipo_parcelamento">
                <?php if ($komerciloja5_tipo_parcelamento==2) { ?>
                <option value="2" selected="selected">Parcelado Loja</option>
                <option value="3">Parcelado Operadora</option>
				<option value="0">Sem Juros Loja / Com Juros Operadora</option>
                <?php } elseif($komerciloja5_tipo_parcelamento==3) { ?>
                <option value="2">Parcelado Loja</option>
                <option value="3" selected="selected">Parcelado Operadora</option>
				<option value="0">Sem Juros Loja / Com Juros Operadora</option>
                <?php }else{ ?>
				<option value="2">Parcelado Loja</option>
                <option value="3">Parcelado Operadora</option>
				<option value="0" selected="selected">Sem Juros Loja / Com Juros Operadora</option>
				<?php } ?>
              </select></td>
          </tr>
		  
		  <tr>
            <td>Ativar Debug:<span class="help">Descobrir erros e problemas de integra&ccedil;&atilde;o.</span></td>
            <td><select name="komerciloja5_debug">
                <?php if ($komerciloja5_debug==1) { ?>
                <option value="1" selected="selected">SIM</option>
                <option value="0">NAO</option>
                <?php }else{ ?>
				<option value="1">SIM</option>
				<option value="0" selected="selected">NAO</option>
				<?php } ?>
              </select></td>
          </tr>


        </table>
      </form>
	 </div>

<script type="text/javascript">
<!--
$('#tabs a').tabs();
function isNumberKey(evt){
          var charCode = (evt.which) ? evt.which : event.keyCode;
          if (charCode != 46 && charCode > 31 
            && (charCode < 48 || charCode > 57))
             return false;

          return true;
}
//-->
</script>


    </div>
  </div>
</div>
<?php echo $footer; ?> 