<?php 
if($_SESSION['nivel'] == 1){
?>
  <form action="miolo.php?miolo=certidoes&acao=insertcertidao" method="post" enctype="multipart/form-data" name="form1" id="form1">

<table width="700" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="25" colspan="3" align="left" valign="middle" class="style11">Lan&ccedil;amento de Certid&otilde;es </td>
    </tr>
  <tr>
    <td width="198" height="25" align="right" valign="middle"><span class="style11">Certid&atilde;o: </span></td>
    <td width="21" align="right" valign="middle">&nbsp;</td>
    <td width="481" height="25" align="left" valign="middle"><input name="codcli" type="hidden" value="<? echo $_GET['cod']; ?>"/>
      <label>
      <select name="certidao" id="certidao">
	  <?
	  	$result=mysql_query("select id, tipo from crm_tipoCertidao order by tipo asc");
			  while($linha=mysql_fetch_array($result)){
			  list($id, $tipo)=$linha;
			  echo "<option  value='$tipo'> $tipo</option>";
			  }	  	  
	  ?>
      </select>
      <input name="empresa" type="hidden" id="empresa" value="<? echo $empresa; ?>"/>
      </label></td>
  </tr>
  <tr>
    <td height="25" align="right" valign="middle"><span class="style11">Emiss&atilde;o:</span></td>
    <td height="25" align="right" valign="middle">&nbsp;</td>
    <td height="25" align="left" valign="middle"><input name="emissao" type="text" id="emissao" class="data" size="10" maxlength="10" /></td>
  </tr>
  <tr>
    <td height="25" align="right" valign="middle"><span class="style11">N&ordm; do documento :</span></td>
    <td height="25" align="right" valign="middle">&nbsp;</td>
    <td height="25" align="left" valign="middle"><input name="documento" type="text" id="documento" size="25" /></td>
  </tr>
  <tr>
    <td height="25" align="right" valign="middle"><span class="style11">Validade:</span></td>
    <td height="25" align="right" valign="middle">&nbsp;</td>
    <td height="25" align="left" valign="middle"><input name="validade" type="text" id="validade" size="10" class="data" maxlength="10" /></td>
  </tr>
  <tr>
    <td height="25" align="right" valign="middle"><span class="style11">Arquivo:</span></td>
    <td height="25" align="right" valign="middle">&nbsp;</td>
    <td height="25" align="left" valign="middle"><input name="arq" type="file" id="arq" /></td>
  </tr>
  <tr>
    <td height="25" align="right" valign="middle">&nbsp;</td>
    <td height="25" align="right" valign="middle">&nbsp;</td>
    <td height="25" align="left" valign="middle">&nbsp;</td>
  </tr>
  <tr>
    <td height="24" colspan="3" align="center" valign="middle"><input name="voltar" type="button" onclick="javascript:history.go(-1);" id="voltar" value="Voltar" />
      <input name="gravar" type="submit" id="gravar" value="Gravar" />
      <input name="limpar" type="reset" id="limpar" value="Limpar" /></td>
    </tr>
</table>
</form>
<?
}
?>