Skip to content

Commit

Permalink
12-01-20-adm
Browse files Browse the repository at this point in the history
  • Loading branch information
Natan-b201 committed Jan 13, 2020
1 parent 4123c81 commit 3f350ae
Show file tree
Hide file tree
Showing 13 changed files with 239 additions and 233 deletions.
44 changes: 33 additions & 11 deletions Classes/Alunos.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,29 +101,51 @@ function exibir(){
}else{
$loc = "PASTA FÍSICA LOCALIZADA NO ARQUIVO NORTE";
}

echo "<div id='dadosal'>
<label style='color:#FE642E;' >Nome civil: &nbsp</label>
<label style='color:#A52A2A;' >Nome civil: &nbsp</label>
<label> $this->Nome_civil </label><br>
<label style='color:#FE642E;'>Nome social: &nbsp</label>
<label style='color:#A52A2A;'>Nome social: &nbsp</label>
<label>$this->Nome_social</label><br>
<label style='color:#FE642E;' >Matrícula: &nbsp</label>
<label style='color:#A52A2A;' >Matrícula: &nbsp</label>
<label> $this->Num_mat &nbsp&nbsp&nbsp&nbsp&nbsp</label>
<label style='color:#FE642E;'>Curso: &nbsp</label>
<label style='color:#A52A2A;'>Curso: &nbsp</label>
<label>$this->Cod_cur-- &nbsp </label>
<label>$this->Nome_cur</label><br>
<label style='color:#FE642E;'>Forma de ingresso: &nbsp</label>
<label style='color:#A52A2A;'>Forma de ingresso: &nbsp</label>
<label >$this->Fin &nbsp&nbsp | &nbsp</label>
<label style='color:#FE642E;'>Ano de ingresso: &nbsp</label>
<label style='color:#A52A2A;'>Ano de ingresso: &nbsp</label>
<label >$this->Ain</label><br>
<label style='color:#FE642E;'>Forma de evasão: &nbsp</label>
<label style='color:#A52A2A;'>Forma de evasão: &nbsp</label>
<label>$this->Fev&nbsp&nbsp | &nbsp</label>
<label style='color:#FE642E; '>Ano de evsão: &nbsp</label>
<label style='color:#A52A2A; '>Ano de evasão: &nbsp</label>
<label>$this->Aev&nbsp&nbsp | &nbsp</label>
<label style='color:#FE642E';>Dados retirados do: &nbsp</label>
<label style='color:#A52A2A';>Dados retirados do: &nbsp</label>
<label>$this->sistema</label><br>
<label style='font-size: 11px;'>$loc</label>
</div>";
</div>
<div id='dadosal2' style='display:none;'>
<label style='color:#A52A2A;' >Nome civil:</label><br>
<label> $this->Nome_civil </label><br>
<label style='color:#A52A2A;'>Nome social:</label><br>
<label>$this->Nome_social</label><br>
<label style='color:#A52A2A;' >Matrícula:</label>
<label>$this->Num_mat</label><br>
<label style='color:#A52A2A;'>Curso: &nbsp</label>
<label>$this->Cod_cur:</label>
<label>$this->Nome_cur</label><br>
<label style='color:#A52A2A;'>Forma de ingresso: </label>
<label >$this->Fin</label><br>
<label style='color:#A52A2A;'>Ano de ingresso: </label>
<label >$this->Ain</label><br>
<label style='color:#A52A2A;'>Forma de evasão: </label>
<label>$this->Fev</label><br>
<label style='color:#A52A2A; '>Ano de evasão: </label>
<label>$this->Aev</label><br>
<label style='color:#A52A2A';>Dados retirados do: &nbsp</label>
<label>$this->sistema</label><br>
<label style='font-size: 40px;'>$loc</label>
</div>
";
}else{
echo "<script>window.location.href='psq_nome.php?nun=$this->matricula'</script>";
}
Expand Down
9 changes: 8 additions & 1 deletion Classes/Tabela.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ function setIm($im){
function getId(){
return $this->id;
}
function getTb(){
return $this->tb;
}
function pesquisa_doc(){
$pdo = new PDO( 'mysql:host=localhost;dbname=Al', 'root', '' );
$pdo -> query("SET NAMES UTF8");
Expand Down Expand Up @@ -116,7 +119,10 @@ function funcao1()
}
</script>";
}
function exibir_tabela(){
function exibir_tabela(){
if(empty($this->tb)){
echo "<span>Esse aluno não tem nenhum documeto digitalizado.</span>";
}else{
echo "
<table id='minhaTabela' class='tabfom'>
<thead class='cabecalj'>
Expand All @@ -132,6 +138,7 @@ function exibir_tabela(){
$this->tb
</tbody>
</table>";
}
}

}
Expand Down
1 change: 1 addition & 0 deletions ad_uso.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
session_start();
if($_SESSION['acesso'] <> 4){
header("Location:index.php");
die;
}
include_once "ConAL.php";
?>
Expand Down
1 change: 0 additions & 1 deletion admini.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
</div>
<div id="admini_buttons">
<button onclick="window.location.href='ad_uso.php'">Adicionar usuarios</button><br><br>
<button onclick="window.location.href='rev_uso.php'">Remover usuarios</button><br><br>
<button onclick="window.location.href='alter_uso.php'">Alterar usuarios</button><br><br>
<button onclick="window.location.href='relatorios.php'">Relatórios</button><br><br>
<button onclick="window.location.href='gerador_de_etq.php'">Gerar etiquetas</button><br><br>
Expand Down
96 changes: 32 additions & 64 deletions alter_uso.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
session_start();
if($_SESSION['acesso']<>4){
header("Location:index.php");
die;
}
include_once "ConAL.php";
$result_usuario = "SELECT * FROM log";
Expand Down Expand Up @@ -55,109 +56,76 @@
<table style="position:absolute;top:0px;" id='minhaTabela'>
<thead>
<tr>
<th>ID</th>
<th>Usuario</th>
<th>Senha</th>
<th>Nivel de acesso</th>
<th>Setor</th>

<th>Editar</th>
<th>Remover</th>
<tr>
</thead>
<tbody>
<?php
while($row_usuario = mysqli_fetch_array($resultado_usuario)){
?>
<tr>
<td><?php echo $row_usuario['id'];?></td>
<td><?php echo $row_usuario['ursu']; ?></td>
<td><?php echo $row_usuario['senha']; ?></td>
<td><?php echo $row_usuario['acesso']; ?></td>
<td><?php echo $row_usuario['setor']; ?></td>

<td><button onclick="window.location.href='alter_uso.php?id=<?php echo $row_usuario['id']; ?>'">Editar</button></td>
<td><button onclick="remov(<?php echo $row_usuario['id']; ?>);">Remover</button></td>
</tr>
<?php } ?>

</tbody>

</table>
</div>
<div>
<form method="POST">
<input id="bv" type="text" name="nome">
<input id= "san" style="position:absolute;width:250px;left:680px;top:340px;"name="sand" type="submit" value="Abrir detalhes">
</form>
<form method="POST" action="admini.php">
<input id="bv" type="text" name="nome">
<input id= "san" style="position:absolute;width:120px;left:480px;top:340px;" name="sand" type="submit" value="Voltar">
</form>
</div>

<?php $nun = filter_input(INPUT_POST,'nome',FILTER_SANITIZE_STRING);
if($nun <> ""){
<button style='position: absolute;left:20px;top:320;font-size:40px;' onclick="window.location.href='admini.php'">Voltar</button>
<script>
function remov(id) {
var r = confirm("Deseja remolver usuário ?");
if (r == true) {
window.location.href='rev_uso_fun.php?id='+id;
} else {

}
}
</script>
<?php
if(isset($_GET['id']) AND is_numeric($_GET['id'])){
$nun=$_GET['id'];
$vl ="SELECT * FROM log WHERE id LIKE '".$nun."'";
$rvl = mysqli_query($conn, $vl);
$linha = mysqli_fetch_assoc($rvl);
$ida = $linha['id'];
$usuario = $linha['ursu'];
$senha = $linha['senha'];
$acesso = $linha['acesso'];
$setor = $linha['setor'];
if ($linha['id']==""){
echo "<script>alert('Usuario não existe!!')</script>";
}else{
echo "<div id='up_usarios'> <form method='POST' action='up_uso.php'>
<label class='formataurd' style='left:0px;top:560;font-size:40px;'>Id:</label>
<input class='formataurd' style='left:410px;top:560;' type='text' name='ida' value='$ida' readonly><br><br>
echo "<div id='up_usarios'> <form method='POST' action='up_uso.php?id=$ida'>
<label class='formataurd' style='left:0px;top:320;font-size:40px;'>Nome de usuario:</label>
<input class='formataurd' style='left:410px;top:320;' type='text' name='usernome' value='$usuario'><br><br>
<label class='formataurd' style='left:0px;top:380;font-size:40px;'>Setor:</label>
<input class='formataurd' style='left:410px;top:380;' type='text' name='setor' value='$setor'><br><br>
<select class='formataurd' style='left:410px;top:380;' name='setor'>
<option>$setor</option>
<option>Arquivo acadêmico</option>
<option>CAUSA</option>
<option>CRC</option>
<option>CRD</option>
<option>CM</option>
<option>COA</option>
<option>DPA</option>
<option>Protocolo</option>
</select><br><br>
<label style='left:0px;top:440;' class='formataurd'>Digite a senha:</label>
<input class='formataurd' style='left:410px;top:440;' type='text' name='senhauso'value='$senha' required><br><br>
<label class='formataurd' style='left:0px;top:500;'>Nivel de acesso</label>
<input class='formataurd' style='left:410px;top:500;' type='number' min='1' max='4' value='$acesso' name='acesso' required><br><br>
<input class='formataurd' style='left:820px;top:380;' type='submit' value='Atualizar'>
</form></div>";
}
}
?>



<script type="text/javascript">
var tabela = document.getElementById("minhaTabela");
var linhas = tabela.getElementsByTagName("tr");
for(var i = 0; i < linhas.length; i++){
var linha = linhas[i];
linha.addEventListener("click", function(){
selLinha(this, false);
});
}
function selLinha(linha, multiplos){
if(!multiplos){
var linhas = linha.parentElement.getElementsByTagName("tr");
for(var i = 0; i < linhas.length; i++){
var linha_ = linhas[i];
linha_.classList.remove("selecionado");
}
}
linha.classList.toggle("selecionado");
}
tabela.addEventListener("click", function(){
var selecionados = tabela.getElementsByClassName("selecionado");
if(selecionados.length < 1){
alert("Selecione pelo menos uma linha");
return false;
}
var dados = "";
for(var i = 0; i < selecionados.length; i++){
var selecionado = selecionados[i];
selecionado = selecionado.getElementsByTagName("td");
dados += "ID: " + selecionado[0].innerHTML + " - Nome: " + selecionado[1].innerHTML + " - Idade: " + selecionado[2].innerHTML + "\n";
var d = selecionado[0].innerHTML;
}
document.getElementById("bv").value = d;
});

</script>
</body>
</html>
46 changes: 42 additions & 4 deletions css/es.css
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,16 @@ border-radius: 15px;
border: 1px solid black;
border-radius: 15px;
}

#dadosal2{
position: absolute;
left:5%;
font-size: 20px;
padding: 20px 5px;
margin: 5px;
width: 90%;
border: 1px solid black;
border-radius: 15px;
}
.tabelapgmat{
position: absolute;

Expand Down Expand Up @@ -933,13 +942,15 @@ font-size: 50px;
text-align: center;
margin: 15px;
width:92%;
height: 300px;
border:1px solid black;
border-radius: 25px;
height: 60px;

}
#resuupmul{
position: absolute;
left: 3%;
top:420px;
overflow: auto;
height: 400px;
width:90%;
Expand All @@ -962,13 +973,31 @@ font-size: 50px;
color: black;
}

#formmultup input{
width:400px;
#formmultup input[type='submit']{
width:100px;
border:1px solid black;
border-radius: 25px;
margin: 10px;
font-size: 25px;
}
#formmultup input[type='number']{
width:70px;
border:1px solid black;
border-radius: 25px;
margin: 10px;
font-size: 25px;
}
#formmultup input[type='file']{
width:300px;
border:1px solid black;
border-radius: 25px;
margin: 10px;
font-size: 25px;
}
#formmultup label{
margin: 10px;
font-size: 25px;
}
#formulario_envia_doc{

width:800px;
Expand Down Expand Up @@ -1572,6 +1601,15 @@ width:100%;
border: 1px solid white;
border-radius: 20px;
}
/** Visualização de informações dos alunos **/
#dadosal2{
font-size: 80px;
word-wrap: break-word;

}
#tab{
display: none;
}
/** Menus de pesquisa**/
#btn_pesquisa_mat{
height: 240px;
Expand Down
2 changes: 2 additions & 0 deletions fun_enviar_documentos.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
ini_set('post_max_size', '20000M');
ini_set('max_input_time', 3000);
ini_set('max_execution_time', 3000);
set_time_limit(0);

$conf = fopen('conf.txt','r');
$conf = fgets($conf,1022);
$arquivo = isset($_FILES['pdf']) ? $_FILES['pdf'] : FALSE;
Expand Down
16 changes: 13 additions & 3 deletions multup.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,29 @@
</nav>
<div id="formmultup">
<form enctype="multipart/form-data" method="POST" action="multup_fun.php">
<input type="file" name="arquivo[]" multiple="multiple" required/>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
<input name="enviar" type="submit" value="Enviar">
<span>CUIDADO COM A UTILIZAÇÃO DESSE MODO!!!<br/> O NOME DO ARQUIVO DEVE ESTAR COM O NÚMERO DE MATRÍCULA DO ALUNO.<br/>NÃO PODE TER ESPAÇOS EM BRANCO.
<br/>APÓS O UPLOAD VERIFICAR SE ESTÁ TUDO CORRETO.</span><br/>
<input type="file" accept='application/pdf' name="arquivo[]" multiple="multiple" required/><br/>
<label>Tipo de Documento: FICHA CADASTRAL</label><br/>
<label>Observação:MATRICULA INSTITUCIONAL</label><br/>
<label>Ano dos documentos:</label>
<input name='ano' value='<?php echo date('Y');?>' type='number' min='1900' max='<?php echo date('Y');?>' required>
<br/>
<input name="enviar1" type="submit" value="Enviar">
</form>
</div>

<div id="resuupmul">

<?php

if(isset($_SESSION['stuup'])){
$stuo = $_SESSION['stuup'];
echo $stuo;
unset ($_SESSION['stuup']);
}

?>
</div>

</body>
</html>
Loading

0 comments on commit 3f350ae

Please sign in to comment.