<?php 
if($_SESSION['nivel'] == 1){
?>
  <form action="miolo.php?miolo=documentos&acao=inserttipocertidao" 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" align="left" valign="middle"><strong class="style11">Cadastro de Tipo de Documentos </strong></td>
    <td height="25" align="left" valign="middle">&nbsp;</td>
    <td height="25" align="left" valign="middle"><a href="miolo.php?miolo=documentos&acao=gerenciar&cod=<? echo $_GET['cod']; ?>">Voltar</a></td>
  </tr>
  <tr>
    <td width="183" height="25" align="right" valign="middle"><span class="style11">Tipo de Documento: </span></td>
    <td height="25" colspan="2" align="left" valign="middle"><input name="codcli" type="hidden" value="<? echo $_GET['cod']; ?>"/><input name="tipo" type="text" id="tipo" size="50" /></td>
  </tr>
  <tr>
    <td height="24" colspan="3" align="center" valign="middle">&nbsp;</td>
  </tr>
  <tr>
    <td height="24" colspan="3" align="center" valign="middle"><input name="gravar" type="submit" id="gravar" value="Gravar" />
      <input name="limpar" type="reset" id="limpar" value="Limpar" /></td>
  </tr>
  <tr>
    <td height="24" colspan="3" align="left" valign="middle" class="style11">Listagem de tipos de Documentos </td>
  </tr>
  <tr>
    <td height="24" align="left" valign="middle" class="style11">Tipo</td>
    <td width="267" height="24" align="left" valign="middle" class="style11">Alterar</td>
    <td width="250" align="left" valign="middle" class="style11">Excluir</td>
  </tr>
<tr>
 <?
 $result=mysql_query("select * from crm_tipoCertidao");
  while ($linha=mysql_fetch_array($result)){
		list($id, $tipo)=$linha;
echo "<tr>
      <td><span class='style11'>$tipo </span></td>
   	  <td class='style11'><a href='miolo.php?miolo=documentos&acao=alttipocertidao&cod=$id&codemp=".$_GET["cod"]."'>Alterar</a></font></span></td>
  	  <td class='style11'><a href='miolo.php?miolo=documentos&acao=excluirtipocertidao&cod=$id&codemp=".$_GET["cod"]."'>Excluir</a></font></span></td>
    </tr>

	  <tr><td colspan='3'></td></tr>
    <tr><td colspan='3'><hr /></td></tr>";
}
?>
</tr>
</table>
</form>
<?
}
?>