<?php
include_once('../class/class.mysql.php');
include_once('class.feriado.php');
include_once('../include/utilitarios.php');

extract($_POST);
if ($ax == 'Novo') {
  echo '<input name="btnOpcaoSalvar" id="btnOpcaoSalvar" type="hidden" value="novo" />';
}

if ($ax == 'configurar') {
  $mysqlCom = new MysqlConnect();
  $feriado = new Feriado();
  echo '<input name="btnOpcaoSalvar" id="btnOpcaoSalvar" type="hidden" value="configurar" />';
  $feriado->Select($id);
  while ($row = mysqli_fetch_object($feriado->qry)) {
    $id_feriado       = $row->id_feriado;
    $descricao       = $row->descricao;
    $data         = InverterData($row->data);
  }
}


?>
<script>
  $(".Calendario").datepicker();
  $(".Calendario").datepicker({
    altFormat: 'dd/mm/yyyy'
  });
</script>
<form id="formConfigurar">
  <table width="700" border="0">
    <tr class="dados">
      <th width="195">Campos</th>
      <th width="495">Dados</th>
    </tr>
    <tr>
      <td class="descricao">Feriado</td>
      <td class="dados">
        <div align="left" style="margin-left:5px">
          <input name="EdtDescricao" type="text" id="EdtDescricao" value="<?php echo $descricao ?>" class="obr" size="50" />
        </div>
      </td>
    </tr>
    <tr>
      <td class="descricao">Data</td>
      <td class="dados">
        <div align="left" style="margin-left:5px">
          <input name="edtData" type="text" class="Calendario obr date" onblur="VerificarDupliciade($(this).val(),'spDupData','<?php echo $data ?>', 'data')" alt="date" id="edtData" value="<?php echo $data ?>" size="30" />
          <span id="spDupData" style="color:#F00; font-size:10px;"><input type="hidden" class="edtDuplicidade" value="nDupli" /></span>
        </div>
      </td>
    </tr>
  </table>
</form>


<!--    /*Script para mudar cor da linha de cada tabela*/-->
<script type="text/javascript" src="js/table.js"></script>
<input type="hidden" name="id" id="id" value="<?php echo $id_feriado ?>" />