<?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-dollar"></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><?php echo $entry_total; ?><br /><br /></td>
            <td><input type="text" name="cielo_total" value="<?php echo $cielo_total; ?>" /><br /><br /></td>
          </tr> 
		  <tr>
            <td><span class="required">*</span> <?php echo $entry_afiliacao; ?><br /><br /></td>
            <td><input type="text" name="cielo_afiliacao" value="<?php echo $cielo_afiliacao; ?>" />
              <?php if ($error_afiliacao) { ?>
              <span class="error"><?php echo $error_afiliacao; ?></span>
              <?php } ?>
			<br /><br /></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_chave; ?><br /><br /></td>
            <td><input style="width:500px" type="text" name="cielo_chave" value="<?php echo $cielo_chave; ?>" />
              <?php if ($error_chave) { ?>
              <span class="error"><?php echo $error_chave; ?></span>
              <?php } ?>
			<br /><br /></td>
          </tr>
          <tr>
            <td><?php echo $entry_teste; ?><br /><br /></td>
            <td><select name="cielo_teste">
                <?php if ($cielo_teste) { ?>
                <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                <option value="0"><?php echo $text_no; ?></option>
                <?php } else if (!$cielo_teste) { ?>
                <option value="1"><?php echo $text_yes; ?></option>
                <option value="0" selected="selected"><?php echo $text_no; ?></option>
                <?php } else { ?>
                <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                <option value="0"><?php echo $text_no; ?></option>
                <?php } ?>
                </select>
			<br /><br /></td>
          </tr>
          <tr>
            <td><?php echo $entry_cartao_visa; ?><br /><br /></td>
            <td><select name="cielo_cartao_visa">
                <?php if ($cielo_cartao_visa) { ?>
                <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                <option value="0"><?php echo $text_no; ?></option>
                <?php } else if (!$cielo_cartao_visa) { ?>
                <option value="1"><?php echo $text_yes; ?></option>
                <option value="0" selected="selected"><?php echo $text_no; ?></option>
                <?php } else { ?>
                <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                <option value="0"><?php echo $text_no; ?></option>
                <?php } ?>
                </select>
                &nbsp;<?php echo $entry_parcelas;?><input style="width:20px" type="text" name="cielo_visa_parcelas" value="<?php echo $cielo_visa_parcelas; ?>" />
			<br /><br /></td>
          </tr>
          <tr>
            <td><?php echo $entry_cartao_visae; ?><br /><br /></td>
            <td><select name="entry_cartao_visae">
                <?php if ($entry_cartao_visae) { ?>
                <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                <option value="0"><?php echo $text_no; ?></option>
                <?php } else if (!$entry_cartao_visae) { ?>
                <option value="1"><?php echo $text_yes; ?></option>
                <option value="0" selected="selected"><?php echo $text_no; ?></option>
                <?php } else { ?>
                <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                <option value="0"><?php echo $text_no; ?></option>
                <?php } ?>
                </select>
                &nbsp;<?php echo $entry_parcelas;?><input style="width:20px" type="text" name="cielo_visae_parcelas" value="<?php echo $cielo_visae_parcelas; ?>" />
			<br /><br /></td>
          </tr>
          <tr>
            <td><?php echo $entry_cartao_mastercard; ?><br /><br /></td>
            <td><select name="cielo_cartao_mastercard">
                <?php if ($cielo_cartao_mastercard) { ?>
                <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                <option value="0"><?php echo $text_no; ?></option>
                <?php } else if (!$cielo_cartao_mastercard) { ?>
                <option value="1"><?php echo $text_yes; ?></option>
                <option value="0" selected="selected"><?php echo $text_no; ?></option>
                <?php } else { ?>
                <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                <option value="0"><?php echo $text_no; ?></option>
                <?php } ?>
                </select>
                &nbsp;<?php echo $entry_parcelas;?><input style="width:20px" type="text" name="cielo_mastercard_parcelas" value="<?php echo $cielo_mastercard_parcelas; ?>" />
			<br /><br /></td>
          </tr>
          <tr>
            <td><?php echo $entry_cartao_diners; ?><br /><br /></td>
            <td><select name="cielo_cartao_diners">
                <?php if ($cielo_cartao_diners) { ?>
                <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                <option value="0"><?php echo $text_no; ?></option>
                <?php } else if (!$cielo_cartao_diners) { ?>
                <option value="1"><?php echo $text_yes; ?></option>
                <option value="0" selected="selected"><?php echo $text_no; ?></option>
                <?php } else { ?>
                <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                <option value="0"><?php echo $text_no; ?></option>
                <?php } ?>
                </select>
                &nbsp;<?php echo $entry_parcelas;?><input style="width:20px" type="text" name="cielo_diners_parcelas" value="<?php echo $cielo_diners_parcelas; ?>" />
			<br /><br /></td>
          </tr>
          <tr>
            <td><?php echo $entry_cartao_discover; ?><br /><br /></td>
            <td><select name="cielo_cartao_discover">
                <?php if ($cielo_cartao_discover) { ?>
                <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                <option value="0"><?php echo $text_no; ?></option>
                <?php } else if (!$cielo_cartao_discover) { ?>
                <option value="1"><?php echo $text_yes; ?></option>
                <option value="0" selected="selected"><?php echo $text_no; ?></option>
                <?php } else { ?>
                <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                <option value="0"><?php echo $text_no; ?></option>
                <?php } ?>
                </select>
                &nbsp;<?php echo $entry_parcelas;?><input style="width:20px" type="text" name="cielo_discover_parcelas" value="<?php echo $cielo_discover_parcelas; ?>" />
			<br /><br /></td>
          </tr>
          <tr>
            <td><?php echo $entry_cartao_elo; ?><br /><br /></td>
            <td><select name="cielo_cartao_elo">
                <?php if ($cielo_cartao_elo) { ?>
                <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                <option value="0"><?php echo $text_no; ?></option>
                <?php } else if (!$cielo_cartao_elo) { ?>
                <option value="1"><?php echo $text_yes; ?></option>
                <option value="0" selected="selected"><?php echo $text_no; ?></option>
                <?php } else { ?>
                <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                <option value="0"><?php echo $text_no; ?></option>
                <?php } ?>
                </select>
                &nbsp;<?php echo $entry_parcelas;?><input style="width:20px" type="text" name="cielo_elo_parcelas" value="<?php echo $cielo_elo_parcelas; ?>" />
			<br /><br /></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_cartao_semjuros;?><br /><br /></td>
            <td><input style="width:20px" type="text" name="cielo_cartao_semjuros" value="<?php echo $cielo_cartao_semjuros; ?>" />
              <?php if ($error_cartao_semjuros) { ?>
              <span class="error"><?php echo $error_cartao_semjuros; ?></span>
              <?php } ?>
			<br /><br /></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_cartao_minimo;?><br /><br /></td>
            <td><input style="width:100px" type="text" name="cielo_cartao_minimo" value="<?php echo $cielo_cartao_minimo; ?>" />
              <?php if ($error_cartao_minimo) { ?>
              <span class="error"><?php echo $error_cartao_minimo; ?></span>
              <?php } ?>
			<br /><br /></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_cartao_juros;?><br /><br /></td>
            <td><input style="width:20px" type="text" name="cielo_cartao_juros" value="<?php echo $cielo_cartao_juros; ?>" />
              <?php if ($error_cartao_juros) { ?>
              <span class="error"><?php echo $error_cartao_juros; ?></span>
              <?php } ?>
			<br /><br /></td>
          </tr>
          <tr>
            <td><?php echo $entry_parcelamento; ?><br /><br /></td>
            <td><select name="cielo_parcelamento">
                <?php if ($cielo_parcelamento == '2') { ?>
                <option value="2" selected="selected"><?php echo $text_loja; ?></option>
                <option value="3"><?php echo $text_administradora; ?></option>
                <?php } else if ($cielo_parcelamento == '3') { ?>
                <option value="2"><?php echo $text_loja; ?></option>
                <option value="3" selected="selected"><?php echo $text_administradora; ?></option>
                <?php } else { ?>
                <option value="2" selected="selected"><?php echo $text_loja; ?></option>
                <option value="3"><?php echo $text_administradora; ?></option>
                <?php } ?>
                </select>
			<br /><br /></td>
          </tr>
          <tr>
            <td><?php echo $entry_aprovado; ?><br /><br /></td>
            <td><select name="cielo_aprovado_id">
                <?php foreach ($order_statuses as $order_status) { ?>
                <?php if ($order_status['order_status_id'] == $cielo_aprovado_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>
			<br /><br /></td>
          </tr>
          <tr>
            <td><?php echo $entry_nao_aprovado; ?><br /><br /></td>
            <td><select name="cielo_nao_aprovado_id">
                <?php foreach ($order_statuses as $order_status) { ?>
                <?php if ($order_status['order_status_id'] == $cielo_nao_aprovado_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>
			<br /><br /></td>
          </tr>
          <tr>
            <td><?php echo $entry_geo_zone; ?><br /><br /></td>
            <td><select name="cielo_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'] == $cielo_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><?php echo $entry_status; ?><br /><br /></td>
            <td><select name="cielo_status">
                <?php if ($cielo_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="cielo_sort_order" value="<?php echo $cielo_sort_order; ?>" size="1" /><br /><br /></td>
          </tr>
        </table>
      </form>
    </div>
  </div>
</div>
<?php echo $footer; ?> 