<?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>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="FuturaKomerci_nome" value="<?php echo $FuturaKomerci_nome; ?>" size="70" /></td>
          </tr>
          <tr>
            <td><?php echo $entry_total; ?></td>
            <td><input class="dinheiro" type="text" name="FuturaKomerci_total" value="<?php echo $FuturaKomerci_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="FuturaKomerci_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'] == $FuturaKomerci_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="FuturaKomerci_status">
                <?php if ($FuturaKomerci_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="FuturaKomerci_sort_order" value="<?php echo $FuturaKomerci_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="FuturaKomerci_afiliacao" value="<?php echo $FuturaKomerci_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="FuturaKomerci_order_status_id">
                <?php foreach ($order_statuses as $order_status) { ?>
                <?php if ($order_status['order_status_id'] == $FuturaKomerci_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="FuturaKomerci_aprovado">
                <?php foreach ($order_statuses as $order_status) { ?>
                <?php if ($order_status['order_status_id'] == $FuturaKomerci_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="FuturaKomerci_cancelado">
                <?php foreach ($order_statuses as $order_status) { ?>
                <?php if ($order_status['order_status_id'] == $FuturaKomerci_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="FuturaKomerci_visa_ativo">
                <?php if ($FuturaKomerci_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="FuturaKomerci_visa_div" value="<?php echo $FuturaKomerci_visa_div; ?>" size="1" />x - Sem juros <input type="text" onkeypress="return isNumberKey(event)" name="FuturaKomerci_visa_sem" value="<?php echo $FuturaKomerci_visa_sem; ?>" size="1" />x - Taxa de Juros <input class="dinheiro" type="text" name="FuturaKomerci_visa_juros" value="<?php echo $FuturaKomerci_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="FuturaKomerci_mastercard_ativo">
                <?php if ($FuturaKomerci_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="FuturaKomerci_mastercard_div" value="<?php echo $FuturaKomerci_mastercard_div; ?>" size="1" />x - Sem juros <input type="text" onkeypress="return isNumberKey(event)" name="FuturaKomerci_mastercard_sem" value="<?php echo $FuturaKomerci_mastercard_sem; ?>" size="1" />x - Taxa de Juros <input class="dinheiro" type="text" name="FuturaKomerci_mastercard_juros" value="<?php echo $FuturaKomerci_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="FuturaKomerci_diners_ativo">
                <?php if ($FuturaKomerci_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="FuturaKomerci_diners_div" value="<?php echo $FuturaKomerci_diners_div; ?>" size="1" />x - Sem juros <input type="text" onkeypress="return isNumberKey(event)" name="FuturaKomerci_diners_sem" value="<?php echo $FuturaKomerci_diners_sem; ?>" size="1" />x - Taxa de Juros <input class="dinheiro" type="text" name="FuturaKomerci_diners_juros" value="<?php echo $FuturaKomerci_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="FuturaKomerci_hiper_ativo">
                <?php if ($FuturaKomerci_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="FuturaKomerci_hiper_div" value="<?php echo $FuturaKomerci_hiper_div; ?>" size="1" />x - Sem juros <input type="text" onkeypress="return isNumberKey(event)" name="FuturaKomerci_hiper_sem" value="<?php echo $FuturaKomerci_hiper_sem; ?>" size="1" />x - Taxa de Juros <input class="dinheiro" type="text" name="FuturaKomerci_hiper_juros" value="<?php echo $FuturaKomerci_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="FuturaKomerci_hipercard_ativo">
                <?php if ($FuturaKomerci_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="FuturaKomerci_hipercard_div" value="<?php echo $FuturaKomerci_hipercard_div; ?>" size="1" />x - Sem juros <input type="text" onkeypress="return isNumberKey(event)" name="FuturaKomerci_hipercard_sem" value="<?php echo $FuturaKomerci_hipercard_sem; ?>" size="1" />x - Taxa de Juros <input class="dinheiro" type="text" name="FuturaKomerci_hipercard_juros" value="<?php echo $FuturaKomerci_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="FuturaKomerci_desconto_credito" value="<?php echo $FuturaKomerci_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="FuturaKomerci_minimo" value="<?php echo $FuturaKomerci_minimo; ?>" /></td>
          </tr> 
		  <tr>
            <td>Tipo Parcelamento:<span class="help">O tipo de parcelamento que ira usar.</span></td>
            <td><select name="FuturaKomerci_tipo_parcelamento">
                <?php if ($FuturaKomerci_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($FuturaKomerci_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="FuturaKomerci_debug">
                <?php if ($FuturaKomerci_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>
		  
		  <tr>
            <td>Modo de Teste:<span class="help">Modo de teste para o cliente</span></td>
            <td><select name="FuturaKomerci_modo_teste">
                <?php if ($FuturaKomerci_modo_teste) { ?>
                <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>Cliente de Teste:<span class="help">Coloque o ID do cliente de teste.</span></td>
            <td><input type="text" name="FuturaKomerci_cliente_teste" value="<?php echo $FuturaKomerci_cliente_teste; ?>" /></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; ?> 