diff --git a/Classes/Alunos.php b/Classes/Alunos.php index df6e2d6..5fc54aa 100644 --- a/Classes/Alunos.php +++ b/Classes/Alunos.php @@ -101,29 +101,51 @@ function exibir(){ }else{ $loc = "PASTA FÍSICA LOCALIZADA NO ARQUIVO NORTE"; } - echo "
- +
- +
- + - +
- + - +
- + - + - +
-
"; + + + "; }else{ echo ""; } diff --git a/Classes/Tabela.php b/Classes/Tabela.php index 10c8acf..ddbd83d 100644 --- a/Classes/Tabela.php +++ b/Classes/Tabela.php @@ -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"); @@ -116,7 +119,10 @@ function funcao1() } "; } -function exibir_tabela(){ +function exibir_tabela(){ + if(empty($this->tb)){ + echo "Esse aluno não tem nenhum documeto digitalizado."; + }else{ echo " @@ -132,6 +138,7 @@ function exibir_tabela(){ $this->tb
"; + } } } diff --git a/ad_uso.php b/ad_uso.php index d6dc0af..2ee2906 100644 --- a/ad_uso.php +++ b/ad_uso.php @@ -2,6 +2,7 @@ session_start(); if($_SESSION['acesso'] <> 4){ header("Location:index.php"); + die; } include_once "ConAL.php"; ?> diff --git a/admini.php b/admini.php index f192d86..3bc9fa8 100644 --- a/admini.php +++ b/admini.php @@ -51,7 +51,6 @@


-







diff --git a/alter_uso.php b/alter_uso.php index fcdfb63..aaa8c5d 100644 --- a/alter_uso.php +++ b/alter_uso.php @@ -2,6 +2,7 @@ session_start(); if($_SESSION['acesso']<>4){ header("Location:index.php"); +die; } include_once "ConAL.php"; $result_usuario = "SELECT * FROM log"; @@ -55,12 +56,11 @@ - - - + + @@ -68,51 +68,58 @@ while($row_usuario = mysqli_fetch_array($resultado_usuario)){ ?> - - - + + +
ID UsuarioSenha Nivel de acesso SetorEditarRemover
-
-
- - -
-
- - -
-
- - ""){ + + +alert('Usuario não existe!!')"; }else{ - echo "
- -

+ echo "


-

+

-



@@ -120,44 +127,5 @@ } } ?> - - - - diff --git a/css/es.css b/css/es.css index 8ac9c8b..45e1e94 100644 --- a/css/es.css +++ b/css/es.css @@ -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; @@ -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%; @@ -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; @@ -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; diff --git a/fun_enviar_documentos.php b/fun_enviar_documentos.php index 5812424..5223a8b 100644 --- a/fun_enviar_documentos.php +++ b/fun_enviar_documentos.php @@ -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; diff --git a/multup.php b/multup.php index 0b4d9f5..d7ec291 100644 --- a/multup.php +++ b/multup.php @@ -47,19 +47,29 @@
-        - + CUIDADO COM A UTILIZAÇÃO DESSE MODO!!!
O NOME DO ARQUIVO DEVE ESTAR COM O NÚMERO DE MATRÍCULA DO ALUNO.
NÃO PODE TER ESPAÇOS EM BRANCO. +
APÓS O UPLOAD VERIFICAR SE ESTÁ TUDO CORRETO.

+
+
+
+ + ' type='number' min='1900' max='' required> +
+
+
-
+ diff --git a/multup_fun.php b/multup_fun.php index aeb1576..48c7d5a 100644 --- a/multup_fun.php +++ b/multup_fun.php @@ -1,148 +1,79 @@ 4){ +if($_SESSION['acesso']<3){ header("Location:index.php"); + die; } - +require_once "Conec_PDO.php"; +set_time_limit(0); +date_default_timezone_set('America/Manaus'); ini_set('upload_max_filesize', '20000M'); ini_set('post_max_size', '20000M'); ini_set('max_input_time', 3000); ini_set('max_execution_time', 3000); -include_once 'ConAL.php'; + +$magemfinal = ""; $conf = fopen('conf.txt','r'); $conf = fgets($conf, 1024); $dire = "$conf/In/pdf/"; -$magemfinal = ""; if(!is_dir($dire)){ - echo "Pasta $dire nao existe"; -}else{ - $arquivo = isset($_FILES['arquivo']) ? $_FILES['arquivo'] : FALSE; - for ($controle = 0; $controle < count($arquivo['name']); $controle++){ - $numero = $arquivo['name'][$controle]; - $numero =explode('.', $numero); - $numerom = $numero[0]; - $numerox = $numero[1]; - if ($numerox == "pdf"){ - $numer = explode(' ', $numerom); - $numerom= $numer[0]; - if ($numer[1]==1){ - $tipodoc = "FICHA CADASTRAL"; - }else if($numer[1]==2){ - $tipodoc = "PROCESSO"; - } - else if($numer[1]==3){ - $tipodoc = "REQUERIMENTO"; - } - else if($numer[1]==4){ - $tipodoc = "TCE"; - } - else if($numer[1]==5){ - $tipodoc = "HISTÓRICO ESCOLAR"; - } - else if($numer[1]==6){ - $tipodoc = "OUTRO TIPO DE FICHA"; - } - $cladoc = explode('-',$numer[2]); - $cladoc = $cladoc[0].'.'.$cladoc[1]; - $comentario = explode('-',$numer[4]); - $comentario = $comentario[0].' '.$comentario[1]; - $comentario=strtoupper($comentario); - $result_usuario = "SELECT *,count(*) FROM Alunos WHERE Num_mat LIKE '$numerom'"; - $resultado_usuario = mysqli_query($conn, $result_usuario); - $row_usuario = mysqli_fetch_array($resultado_usuario); - if ($row_usuario['count(*)']==1) { - $matri = $row_usuario['Num_mat']; - $nomejh = $row_usuario['Nome_civil']; - $curso = $row_usuario['Cod_cur']; - $nun = $row_usuario['id']; - if ($tipodoc =="FICHA CADASTRAL" ){ - - $coman = "SELECT * FROM Ko WHERE imagem LIKE '$nun' AND class_doc LIKE 'FICHA CADASTRAL'"; - $ver = mysqli_query($conn,$coman); - $verificador = mysqli_fetch_array($ver); - $dois = $verificador['id']; - }if ($dois == ""){ - - date_default_timezone_set('America/Sao_Paulo'); - $dataLocal = date('d-m-Y', time()); - $dataL = date('Y-m-d', time()); - $data=date('H:i:s'); - $data=explode(':',$data); - $horari = $data[0]-1; - $horari = $horari = $dataLocal." -- ".$horari.":".$data[1].":".$data[2]; - $usuarioname = $_SESSION['usuarioname']; - $dire = "$conf/In/pdf/"; - $dire .=$nun."/"; - mkdir($dire); - chmod ($dire,0777); - if(move_uploaded_file($arquivo['tmp_name'][$controle], $dire.$tipodoc."->".$horari.".pdf")){ - echo $dire."
"; - $nome_pdf = $tipodoc."->".$horari.".pdf"; - $can = "/In/pdf/".$nun."/".$nome_pdf; - $result_usuarioife = "SELECT * FROM Ife WHERE cod LIKE '$cladoc'"; - $resultado_usuarioife = mysqli_query($conn, $result_usuarioife); - $row_usuarioife = mysqli_fetch_array($resultado_usuarioife); - $tipo_doc = $row_usuarioife ['cod']." -- ".$row_usuarioife ['nome_doc']; - $destin_fin = $row_usuarioife ['destin_fin']; - $fase_con =$row_usuarioife ['fase_con']; - $fase_con =explode(' ',$fase_con); - $ano_va = $fase_con[0]; - $fase_in = $row_usuarioife ['fase_in']; - $fase_in = explode(' ',$fase_in); - $ano_vb = $fase_in[0]; - if ($ano_va > 0){ - if ($ano_vb>0){ - $ano_ex = $ano_va+$ano_vb; - $ano_ex = $ano + $ano_ex; - $ano_ex ="'".$ano_ex."'"; - $fase_con =$row_usuarioife ['fase_con']; - $fase_in = $row_usuarioife ['fase_in']; - }else{ - $ano_ex = $ano_va; - $ano_ex = $ano + $ano_ex; - $ano_ex ="'".$ano_ex."'"; - $fase_con =$row_usuarioife ['fase_con']; - $fase_in = $row_usuarioife ['fase_in']; +echo "Pasta $dire nao existe"; - } - }else{ - if ($ano_vb>0){ - $ano_ex = $ano_vb; - $ano_ex =$ano + $ano_ex; - $ano_ex ="'".$ano_ex."'"; - $fase_con =$row_usuarioife ['fase_con']; - $fase_in = $row_usuarioife ['fase_in']; - - }else{ - $ano_ex ="NULL"; - $fase_con =$row_usuarioife ['fase_con']; - $fase_in = $row_usuarioife ['fase_in']; - } - } - $ano = $numer[3]; - $sql = "INSERT INTO Ko (id,nome, imagem,nome_pdf,tipo_doc,ano_doc,data_inserido,can,fase_con,fase_in,destin_fin,ano_ex,usuarioname,class_doc) VALUES (NULL,'$comentario', '$nun','$nome_pdf','$tipo_doc','$ano','$dataL','$can','$fase_con','$fase_in','$destin_fin',$ano_ex,'$usuarioname','$tipodoc')"; - $rs = mysqli_query($conn, $sql) or die(mysqli_error($conn)); - $magemfinal = $magemfinal."

Matricula:$curso --> $matri
Nome: $nomejh
Enviado com sucesso


"; - }else{ - $magemfinal = $magemfinal."Erro ao realizar upload"; - } +}else{ + if(isset($_POST['enviar1'])){ + $procura_ult = $pdo->prepare("SELECT id FROM Ko ORDER BY id DESC LIMIT 1"); + $procura_ult->execute(); + $procura_ult_resul = $procura_ult->fetchAll(PDO::FETCH_ASSOC); + $ult_registro = $procura_ult_resul[0]['id']; + $tipodoc = "FICHA CADASTRAL"; + $class_N = "125.43 -- Assentamentos individuais dos alunos (Dossiês dos alunos)"; + $complemento = "MATRICULA INSTITUCINAL"; + $fase_corrente = "Enquanto o aluno mantiver o vínculo com a instituição de ensino"; + $fase_intermediaria = "-"; + $destino_final = "Eliminação"; + $usuarioname = $_SESSION['usuarioname']; + $ano = $_POST['ano']; + $data_atual = date('Y-m-d'); + $arquivo = isset($_FILES['arquivo']) ? $_FILES['arquivo'] : FALSE; + for ($controle = 0; $controle < count($arquivo['name']); $controle++){ + $numero = explode('.',$arquivo['name'][$controle]); + if($numero[1] == "pdf"){ + $procura_al = $pdo->prepare("SELECT *,count(*) FROM Alunos WHERE Num_mat LIKE '$numero[0]'"); + $procura_al->execute(); + $procura_al_resul = $procura_al->fetchAll(PDO::FETCH_ASSOC); + if($procura_al_resul[0]['count(*)']==1){ + $id = $procura_al_resul[0]['id']; + if(!is_dir($conf."/In/pdf/".$id)){ + mkdir($conf."/In/pdf/".$id); + chmod ($conf."/In/pdf/".$id,0777); + } + $nomedocumento = $procura_al_resul[0]['Num_mat'].'-65-'.$controle."-".date('His').".pdf"; + $caminho = $id."/".$nomedocumento; + $destino = $conf."/In/pdf/".$caminho; + if (move_uploaded_file($arquivo['tmp_name'][$controle], $destino)) { + $ise = $pdo->prepare("INSERT INTO Ko SET nome = '$complemento',imagem = '$id',nome_pdf='$nomedocumento', + tipo_doc='$class_N',ano_doc='$ano',data_inserido='$data_atual',can='$caminho',fase_con='$fase_corrente',fase_in='$fase_intermediaria', + destin_fin='$destino_final',ano_ex='0',usuarioname='$usuarioname',class_doc='$tipodoc'"); + $ise->execute(); + $ult_registro++; + $al_ms = $procura_al_resul[0]['Num_mat']." -> ". $procura_al_resul[0]['Nome_civil']." -> ".$procura_al_resul[0]['Nome_cur']; + $magemfinal .="

$al_ms + Aperte para visualizar o pdf

"; + } }else{ - - $magemfinal = $magemfinal."

Matricula:$curso --> $matri
Nome: $nomejh
Aluno já tem ficha de cadastro


"; + $magemfinal .="

A matricula -> ".$numero[0]." tem mais de um resultado ou nenhum, portanto é impossível

"; } - - + }else{ - $msh =$row_usuario['Cod_cur']." --> ".$row_usuario['Num_mat']." --> ".$row_usuario['Nome_civil']; - $magemfinal = $magemfinal."

$msh
FALHA: possui mais de uma matricula, falha ao tentar enviar


"; + $magemfinal .="

o arquivo -> ".$numero[0]." não é pdf

"; } - }else{ - $magemfinal = $magemfinal."

$numerom.$numerox: tipo de arquivo não suportado


"; + } + $_SESSION['stuup']= $magemfinal; + header("Location:multup.php"); } -$_SESSION['stuup']= $magemfinal; -header("Location:multup.php"); + } ?> diff --git a/pg_res_pes_mat.php b/pg_res_pes_mat.php index d6f1376..c9ed717 100644 --- a/pg_res_pes_mat.php +++ b/pg_res_pes_mat.php @@ -90,21 +90,31 @@
-exibir(); ?> -
-exibir(); $tb = new Tabela(); $tb->setIm($al->getId()); $tb->pesquisa_doc(); -$tb->exibir_tabela(); +?> +
+exibir_tabela(); if(isset($_SESSION['msg_erro'])){ echo $_SESSION['msg_erro']; unset ($_SESSION['msg_erro']); } ?>
- +getTb())){ + echo ""; + if($_SESSION['acesso']==1){ + echo ""; + }else{ + echo ""; + } +} +?> @@ -116,6 +126,21 @@ }); "; -header("Location:rev_uso.php"); +if(is_numeric($_GET['id'])){ + $ida = $_GET['id']; + $vl ="DELETE FROM log WHERE log.id =".$ida; + $rvl = mysqli_query($conn, $vl); + $_SESSION['ifon']=""; + header("Location:alter_uso.php"); +} ?> diff --git a/soli_pas.php b/soli_pas.php index d73096a..a3314a5 100644 --- a/soli_pas.php +++ b/soli_pas.php @@ -55,8 +55,6 @@



-
- -
+ diff --git a/up_uso.php b/up_uso.php index 26999e7..788042d 100644 --- a/up_uso.php +++ b/up_uso.php @@ -5,14 +5,18 @@ die; } include_once "ConAL.php"; -$ida = filter_input(INPUT_POST,'ida',FILTER_SANITIZE_STRING); -$usernome = filter_input(INPUT_POST,'usernome',FILTER_SANITIZE_STRING); -$setor = filter_input(INPUT_POST,'setor',FILTER_SANITIZE_STRING); -$senhauso = filter_input(INPUT_POST,'senhauso',FILTER_SANITIZE_STRING); -$acesso = filter_input(INPUT_POST,'acesso',FILTER_SANITIZE_STRING); +if(isset($_GET['id']) AND is_numeric($_GET['id'])){ + $ida = $_GET['id']; + $usernome = filter_input(INPUT_POST,'usernome',FILTER_SANITIZE_STRING); + $setor = filter_input(INPUT_POST,'setor',FILTER_SANITIZE_STRING); + $acesso = filter_input(INPUT_POST,'acesso',FILTER_SANITIZE_STRING); -$vl ="UPDATE log SET ursu = '$usernome', senha = '$senhauso', acesso = '$acesso', setor = '$setor' WHERE log.id =".$ida; -$rvl = mysqli_query($conn, $vl); -$_SESSION['ifon']=""; -header("Location:alter_uso.php"); - ?> + $vl ="UPDATE log SET ursu = '$usernome', acesso = '$acesso', setor = '$setor' WHERE log.id =".$ida; + $rvl = mysqli_query($conn, $vl); + $_SESSION['ifon']=""; + header("Location:alter_uso.php"); +}else{ + header("Location:alter_uso.php"); + $_SESSION['ifon']=""; +} + ?> \ No newline at end of file