<?php
if($_SESSION['nivel'] == 2) {
  	
  $codigocli = $_SESSION['idUser'];
  $result = mysql_query("select * from crm_upload where codcli='".$codigocli."' AND statusUpload = 1 order by id desc");
  $rescli = mysql_query("select cli.empresa, cli.email, cli.email01, cli.email02, cli.email03, cli.login, cli.senha from crm_cliente cli where cli.id='".$codigocli."'") or die (mysql_error());
  $aempre = mysql_fetch_array($rescli);
  list($empresa, $email, $email01, $email02, $email03, $login, $senha) = $aempre;

?>

    <table width="600" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#FFFFFF">
    <form id="form1" name="form1" method="post" action="miolo.php?miolo=uploadArquivo" enctype="multipart/form-data">
  <input type="hidden" name="codcli" value="<? echo $codigocli; ?>">
  <input name="email" value="<? echo $email; ?>" type="hidden">
  <input name="email01" value="<? echo $email01; ?>" type="hidden">
  <input name="email02" value="<? echo $email02; ?>" type="hidden">
  <input name="email03" value="<? echo $email03; ?>" type="hidden">
      <tr class="linha-topo">
        <td height="35" colspan="2" align="left" valign="middle"><span class="titulo">Arquivos da empresa: <? echo utf8_encode($empresa); ?></span></td>
      </tr>
      <tr>
        <td colspan="2">&nbsp;</td>
      </tr>
      <tr>
        <td width="129" height="35" align="center" valign="middle" bgcolor="#F8F8F8"><span class="rotulo"><font color="#70292b"><b>Novo Arquivo:</b></font></span></td>
        <td height="35" align="left" valign="middle" bgcolor="#F8F8F8"><input name="nomearquivo" type="file" id="nomearquivo">
        <input name="empresa" type="hidden" id="empresa" value="<? echo $empresa; ?>"></td>
      </tr>
      <tr>
        <td width="129" height="35" align="center" valign="middle" bgcolor="#F8F8F8"><span class="rotulo"><font color="#70292b"><b>Descri&ccedil;&atilde;o:</b></font></span></td>
        <td height="35" align="left" valign="middle" bgcolor="#F8F8F8">
        <textarea name="upload" id="upload" cols="45" rows="5"></textarea></td>
      </tr>
      <tr>
        <td height="35" colspan="2" align="center" valign="middle" bgcolor="#F8F8F8"><input name="enviar" type="submit" id="enviar" value="Enviar" />
        <input type="reset" name="Reset" value="Limpar" />
        <label></label>
      </form>
  </table>
  <?
}
?>