if (!isset($_SESSION['UsuarioID'])) {
echo "";
echo "";
}
/*$nivel = $_SESSION['UsuarioNivel'];
if ($nivel <> 1) {
session_destroy();
echo "";
echo "";
}*/
include "conexao.php";
$query = mysqli_query($conexao,"SELECT * FROM apoioTecnico order by unidade";
$executar_query = mysqli_query($query);
$contar = mysqli_num_rows($executar_query);
for($i=0;$i<1;$i++){
$html[$i] = "";
$html[$i] .= "
";
$html[$i] .= "";
$html[$i] .= "id | ";
$html[$i] .= "Unidade | ";
$html[$i] .= "Setor | ";
$html[$i] .= "Titulo Projeto | ";
$html[$i] .= "Objetivo | ";
$html[$i] .= "Justificativa | ";
$html[$i] .= "Planodo Projeto | ";
$html[$i] .= "nicio do Projeto | ";
$html[$i] .= "terminodo Projeto | ";
$html[$i] .= "Carga Hora | ";
$html[$i] .= "N° de Bolsista | ";
$html[$i] .= "Nome Orientador | ";
$html[$i] .= "Funcao Orientador | ";
$html[$i] .= "Siape Orientador | ";
$html[$i] .= "email Orientador | ";
$html[$i] .= "codTel Orientador | ";
$html[$i] .= "Telefone Orientador | ";
$html[$i] .= "codCel Orientador | ";
$html[$i] .= "celularOrient | ";
$html[$i] .= "Nome Supervisor | ";
$html[$i] .= "Funcao Supervisor | ";
$html[$i] .= "siape Supervisor | ";
$html[$i] .= "email Supervisor | ";
$html[$i] .= "codTel Supervisor | ";
$html[$i] .= "telefone Supervisor | ";
$html[$i] .= "codCel Supervisorr | ";
$html[$i] .= "celular Supervisor | ";
$html[$i] .= "Centro de Custo | ";
$html[$i] .= "programa | ";
$html[$i] .= "fonte | ";
$html[$i] .= "linhaAtuacao | ";
$html[$i] .= "dataInsc | ";
$html[$i] .= "Código do Projeto | ";
$html[$i] .= "Avaliacao | ";
$html[$i] .= "obs Avaliacao | ";
$html[$i] .= "Data Avalia | ";
$html[$i] .= "
";
$html[$i] .= "
";
}
$i = 1;
while($row = mysqli_fetch_array($executar_query)){
$id= $row['id'];
$unidade=$row['unidade'];
$setor =$row['setor'];
$tituloProjeto=$row['tituloProjeto'];
$objetivo= $row['objetivo'];
$justificativa= $row['justificativa'];
$plano= $row['plano'];
$inicio= $row['inicio'];
$termino= $row['termino'];
$cargaHora= $row['cargaHora'];
$nunBolsista= $row['nunBolsista'];
$nomeOrient= $row['nomeOrient'];
$funcaoOrient= $row['funcaoOrient'];
$siapeOrient= $row['siapeOrient'];
$emailOrient= $row['emailOrient'];
$codTelOrient= $row['codTelOrient'];
$telefoneOrient= $row['telefoneOrient'];
$codCelOrient= $row['codCelOrient'];
$celularOrient= $row['celularOrient'];
$nomeSuper= $row['nomeSuper'];
$funcaoSuper= $row['funcaoSuper'];
$siapeSuper= $row['siapeSuper'];
$emailSuper= $row['emailSuper'];
$codTelSuper= $row['codTelSuper'];
$telefoneSuper= $row['telefoneSuper'];
$codCelSuper= $row['codCelSuper'];
$celularSuper= $row['celularSuper'];
$cCusto= $row['cCusto'];
$programa= $row['programa'];
$fonte= $row['fonte'];
$linhaAtuacao= $row['linhaAtuacao'];
$dataInsc= $row['dataInsc'];
$codProg= $row['codProg'];
$html[$i] .= "";
$html[$i] .= "";
$html[$i] .= "$id | ";
$html[$i] .= "$unidade | ";
$html[$i] .= "$setor | ";
$html[$i] .= "$tituloProjeto | ";
$html[$i] .= "$objetivo | ";
$html[$i] .= "$justificativa | ";
$html[$i] .= "$plano | ";
$html[$i] .= "$inicio | ";
$html[$i] .= "$termino | ";
$html[$i] .= "$cargaHora | ";
$html[$i] .= "$nunBolsista | ";
$html[$i] .= "$nomeOrient | ";
$html[$i] .= "$funcaoOrient | ";
$html[$i] .= "$siapeOrient | ";
$html[$i] .= "$emailOrient | ";
$html[$i] .= "$codTelOrient | ";
$html[$i] .= "$telefoneOrient | ";
$html[$i] .= "$codCelOrient | ";
$html[$i] .= "$celularOrient | ";
$html[$i] .= "$nomeSuper | ";
$html[$i] .= "$funcaoSuper | ";
$html[$i] .= "$siapeSuper | ";
$html[$i] .= "$emailSuper | ";
$html[$i] .= "$codTelSuper | ";
$html[$i] .= "$telefoneSuper | ";
$html[$i] .= "$codCelSuper | ";
$html[$i] .= "$celularSuper | ";
$html[$i] .= "$cCusto | ";
$html[$i] .= "$programa | ";
$html[$i] .= "$fonte | ";
$html[$i] .= "$linhaAtuacao | ";
$html[$i] .= "$dataInsc | ";
$html[$i] .= "$codProg | ";
$html[$i] .= "$avaliacao | ";
$html[$i] .= "$obsAvalia | ";
$html[$i] .= "$dataAvalia | ";
$html[$i] .= "
";
$html[$i] .= "
";
$i++;
}
$arquivo = 'Projetos_PDAI_Ativos.xls';
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header ("Last-Modified: " . gmdate("D,d M YH:i:s") . " GMT");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
header ("Content-type: application/x-msexcel");
header ("Content-Disposition: attachment; filename={$arquivo}" );
header ("Content-Description: PHP Generated Data" );
for($i=0;$i<=$contar;$i++){
echo $html[$i];
}
?>