Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equipe cefet 240925 #741

Merged
merged 18 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dao/pet/exibir_cor.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
require_once'../Conexao.php';
<?php
require_once '../Conexao.php';
$pdo = Conexao::connect();
$sql = 'select * from pet_cor';
$stmt = $pdo->query($sql);
Expand Down
139 changes: 72 additions & 67 deletions html/adicionar_almoxarifado.php
Original file line number Diff line number Diff line change
@@ -1,50 +1,51 @@
<?php
session_start();
if(!isset($_SESSION['usuario'])){
header ("Location: ../index.php");
session_start();
if (!isset($_SESSION['usuario'])) {
header("Location: ../index.php");
}

$config_path = "config.php";
if (file_exists($config_path)) {
require_once($config_path);
} else {
while (true) {
$config_path = "../" . $config_path;
if (file_exists($config_path)) break;
}

$config_path = "config.php";
if(file_exists($config_path)){
require_once($config_path);
}else{
while(true){
$config_path = "../" . $config_path;
if(file_exists($config_path)) break;
}
require_once($config_path);
require_once($config_path);
}
$conexao = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
$id_pessoa = $_SESSION['id_pessoa'];
$resultado = mysqli_query($conexao, "SELECT * FROM funcionario WHERE id_pessoa=$id_pessoa");
if (!is_null($resultado)) {
$id_cargo = mysqli_fetch_array($resultado);
if (!is_null($id_cargo)) {
$id_cargo = $id_cargo['id_cargo'];
}
$conexao = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
$id_pessoa = $_SESSION['id_pessoa'];
$resultado = mysqli_query($conexao, "SELECT * FROM funcionario WHERE id_pessoa=$id_pessoa");
if(!is_null($resultado)){
$id_cargo = mysqli_fetch_array($resultado);
if(!is_null($id_cargo)){
$id_cargo = $id_cargo['id_cargo'];
}
$resultado = mysqli_query($conexao, "SELECT * FROM permissao WHERE id_cargo=$id_cargo and id_recurso=21");
if(!is_bool($resultado) and mysqli_num_rows($resultado)){
$permissao = mysqli_fetch_array($resultado);
if($permissao['id_acao'] < 3){
$msg = "Você não tem as permissões necessárias para essa página.";
header("Location: ./home.php?msg_c=$msg");
}
$permissao = $permissao['id_acao'];
}else{
$permissao = 1;
$resultado = mysqli_query($conexao, "SELECT * FROM permissao WHERE id_cargo=$id_cargo and id_recurso=21");
if (!is_bool($resultado) and mysqli_num_rows($resultado)) {
$permissao = mysqli_fetch_array($resultado);
if ($permissao['id_acao'] < 3) {
$msg = "Você não tem as permissões necessárias para essa página.";
header("Location: ./home.php?msg_c=$msg");
}
}else{
}
$permissao = $permissao['id_acao'];
} else {
$permissao = 1;
$msg = "Você não tem as permissões necessárias para essa página.";
header("Location: ./home.php?msg_c=$msg");
}
// Adiciona a Função display_campo($nome_campo, $tipo_campo)
require_once "personalizacao_display.php";
}
} else {
$permissao = 1;
$msg = "Você não tem as permissões necessárias para essa página.";
header("Location: ./home.php?msg_c=$msg");
}
// Adiciona a Função display_campo($nome_campo, $tipo_campo)
require_once "personalizacao_display.php";
?>
<!doctype html>
<html class="fixed">

<head>
<!-- Basic -->
<meta charset="UTF-8">
Expand All @@ -63,7 +64,7 @@
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.1.1/css/all.css">
<link rel="stylesheet" href="../assets/vendor/magnific-popup/magnific-popup.css" />
<link rel="stylesheet" href="../assets/vendor/bootstrap-datepicker/css/datepicker3.css" />
<link rel="icon" href="<?php display_campo("Logo",'file');?>" type="image/x-icon" id="logo-icon">
<link rel="icon" href="<?php display_campo("Logo", 'file'); ?>" type="image/x-icon" id="logo-icon">

<!-- Theme CSS -->
<link rel="stylesheet" href="../assets/stylesheets/theme.css" />
Expand All @@ -85,44 +86,48 @@
<script src="../assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script src="../assets/vendor/magnific-popup/magnific-popup.js"></script>
<script src="../assets/vendor/jquery-placeholder/jquery.placeholder.js"></script>

<!-- Specific Page Vendor -->
<script src="../assets/vendor/jquery-autosize/jquery.autosize.js"></script>

<!-- Theme Base, Components and Settings -->
<script src="../assets/javascripts/theme.js"></script>

<!-- Theme Custom -->
<script src="../assets/javascripts/theme.custom.js"></script>

<!-- Theme Initialization Files -->
<script src="../assets/javascripts/theme.init.js"></script>

<!-- javascript functions --> <script
src="../Functions/onlyNumbers.js"></script> <script
src="../Functions/onlyChars.js"></script> <script
src="../Functions/mascara.js"></script>
<!-- javascript functions -->
<script
src="../Functions/onlyNumbers.js"></script>
<script
src="../Functions/onlyChars.js"></script>
<script
src="../Functions/mascara.js"></script>

<!-- jquery functions -->
<script>
document.write('<a href="' + document.referrer + '"></a>');
document.write('<a href="' + document.referrer + '"></a>');
</script>

<script type="text/javascript">
$(function () {
$("#header").load("header.php");
$(".menuu").load("menu.php");
});
$(function() {
$("#header").load("header.php");
$(".menuu").load("menu.php");
});
</script>

</head>

<body>
<section class="body">

<!-- start: header -->
<header id="header" class="header">
<!-- end: search & user box -->

<!-- end: search & user box -->
</header>
<!-- end: header -->
<div class="inner-wrapper">
Expand All @@ -133,7 +138,7 @@
<section role="main" class="content-body">
<header class="page-header">
<h2>Cadastro</h2>

<div class="right-wrapper pull-right">
<ol class="breadcrumbs">
<li>
Expand All @@ -144,15 +149,15 @@
<li><span>Páginas</span></li>
<li><span>Adicionar Almoxarifado</span></li>
</ol>

<a class="sidebar-right-toggle"><i class="fa fa-chevron-left"></i></a>
</div>
</header>

<!-- start: page -->
<div class="row">
<div class="col-md-4 col-lg-2" style="visibility: hidden;"></div>
<div class="col-md-8 col-lg-8" >
<div class="col-md-8 col-lg-8">
<div class="tabs">
<ul class="nav nav-tabs tabs-primary">
<li class="active">
Expand All @@ -170,7 +175,7 @@
}else{
?>
<div class="form-group"><br>
<label class="col-md-3 control-label">Almoxarifado</label>
<label class="col-md-3 control-label">Insira o nome do almoxarifado:</label>
<div class="col-md-8">
<input type="text" class="form-control" name="descricao_almoxarifado" id="descricao_almoxarifado" required>
</div>
Expand All @@ -186,21 +191,21 @@
</a>
<a href="listar_almox.php" style="color: white; text-decoration:none;">
<button class="btn btn-success" type="button">Listar almoxarifado</button></a>
</div>
</div>
</div>
<?php
}
}
?>
</form>
</fieldset>
</fieldset>
</div>
</div>
</div>
</div>
</div>
<!-- end: page -->
<!-- end: page -->
</section>
</div>
</div>
<aside id="sidebar-right" class="sidebar-right">
<div class="nano">
<div class="nano-content">
Expand All @@ -210,9 +215,9 @@
</div>
</div>
</aside>
</section>
<div align="right">
<iframe src="https://www.wegia.org/software/footer/estoque.html" width="200" height="60" style="border:none;"></iframe>
</div>
<div align="right">
<iframe src="https://www.wegia.org/software/footer/memorando.html" width="200" height="60" style="border:none;"></iframe>
</div>
</body>
</html>

</html>
2 changes: 1 addition & 1 deletion html/adicionar_categoria.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<fieldset>
<form id="formulario" method="post" action="../controle/control.php">
<div class="form-group"><br>
<label class="col-md-3 control-label">Categoria</label>
<label class="col-md-3 control-label">Insira a nova categoria: </label>
<div class="col-md-8">
<input type="text" class="form-control" name="descricao_categoria" id="categoria" required>

Expand Down
4 changes: 2 additions & 2 deletions html/adicionar_tipoEntrada.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@
<div class="tabs">
<ul class="nav nav-tabs tabs-primary">
<li class="active">
<a href="#overview" data-toggle="tab">Adicionar tipo entrada</a>
<a href="#overview" data-toggle="tab">Adicionar tipo</a>
</li>
</ul>
<div class="tab-content">
<div id="overview" class="tab-pane active">
<fieldset>
<form method="post" id="formulario" action="../controle/control.php">
<div class="form-group"><br>
<label class="col-md-3 control-label">entrada</label>
<label class="col-md-3 control-label">Insira o novo tipo:</label>
<div class="col-md-8">
<input type="text" class="form-control" name="descricao" id="tipoentrada" required>
</div>
Expand Down
4 changes: 2 additions & 2 deletions html/adicionar_tipoSaida.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@
<div class="tabs">
<ul class="nav nav-tabs tabs-primary">
<li class="active">
<a href="#overview" data-toggle="tab">Adicionar tipo saida</a>
<a href="#overview" data-toggle="tab">Adicionar tipo</a>
</li>
</ul>
<div class="tab-content">
<div id="overview" class="tab-pane active">
<fieldset>
<form method="post" id="formulario" action="../controle/control.php">
<div class="form-group"><br>
<label class="col-md-3 control-label">saida</label>
<label class="col-md-3 control-label">Insira o novo tipo:</label>
<div class="col-md-8">
<input type="text" class="form-control" name="descricao" id="tiposaida" required>
</div>
Expand Down
3 changes: 1 addition & 2 deletions html/adicionar_unidade.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@
<fieldset>
<form method="post" id="formulario" action="../controle/control.php">
<div class="form-group"><br>
<label class="col-md-3 control-label">Unidade
</label>
<label class="col-md-3 control-label">Insira a nova unidade:</label>

<div class="col-md-8">
<input type="text" class="form-control" name="descricao_unidade" id="unidade" required>
Expand Down
4 changes: 4 additions & 0 deletions html/atendido/Informacao_Atendido.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ function clicar(id) {
<script src="../../assets/javascripts/tables/examples.datatables.default.js"></script>
<script src="../../assets/javascripts/tables/examples.datatables.row.with.details.js"></script>
<script src="../../assets/javascripts/tables/examples.datatables.tabletools.js"></script>

<div align="right">
<iframe src="https://www.wegia.org/software/footer/pessoa.html" width="200" height="60" style="border:none;"></iframe>
</div>
</body>
</html>

4 changes: 4 additions & 0 deletions html/atendido/cadastro_ocorrencia.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,5 +575,9 @@
<script src="<?php echo WWW;?>assets/javascripts/tables/examples.datatables.default.js"></script>
<script src="<?php echo WWW;?>assets/javascripts/tables/examples.datatables.row.with.details.js"></script>
<script src="<?php echo WWW;?>assets/javascripts/tables/examples.datatables.tabletools.js"></script>

<div align="right">
<iframe src="https://www.wegia.org/software/footer/pessoa.html" width="200" height="60" style="border:none;"></iframe>
</div>
</body>
</html>
25 changes: 15 additions & 10 deletions html/atendido/familiar_editarEndereco.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
$pdo = Conexao::connect();


$id = $_GET['id_pessoa'];
$cep = $_POST['cep'];
$estado = $_POST['uf'];
$cidade = $_POST['cidade'];
$bairro = $_POST['bairro'];
$rua = $_POST['rua'];
$numero = $_POST['numero_residencia'];
$complemento = $_POST['complemento'];
$ibge = $_POST['ibge'];
$id = filter_input(INPUT_GET, 'id_pessoa', FILTER_VALIDATE_INT);
$cep = filter_input(INPUT_POST, 'cep', FILTER_SANITIZE_STRING);
$estado = filter_input(INPUT_POST, 'uf', FILTER_SANITIZE_STRING);
$cidade = filter_input(INPUT_POST, 'cidade', FILTER_SANITIZE_STRING);
$bairro = filter_input(INPUT_POST, 'bairro', FILTER_SANITIZE_STRING);
$rua = filter_input(INPUT_POST, 'rua', FILTER_SANITIZE_STRING);
$numero = filter_input(INPUT_POST, 'numero_residencia', FILTER_SANITIZE_STRING);
$complemento = filter_input(INPUT_POST, 'complemento', FILTER_SANITIZE_STRING);
$ibge = filter_input(INPUT_POST, 'ibge', FILTER_SANITIZE_STRING);

define("ALTERAR_END", "UPDATE pessoa SET cep=:cep, estado=:estado, cidade=:cidade, bairro=:bairro, logradouro=:rua, numero_endereco=:numero, complemento=:complemento, ibge=:ibge where id_pessoa = :id");

Expand All @@ -48,7 +48,12 @@
}


$idatendido_familiares = $_GET['idatendido_familiares'];
$idatendido_familiares = filter_input(INPUT_GET, 'idatendido_familiares', FILTER_VALIDATE_INT);
if (!$idatendido_familiares) {
die('ID inválido para redirecionamento.');
}

header("Location: profile_familiar.php?id_dependente=$idatendido_familiares");
exit();

?>
4 changes: 4 additions & 0 deletions html/atendido/listar_ocorrencias_ativas.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ function clicar(id) {
<script src="../../assets/javascripts/tables/examples.datatables.default.js"></script>
<script src="../../assets/javascripts/tables/examples.datatables.row.with.details.js"></script>
<script src="../../assets/javascripts/tables/examples.datatables.tabletools.js"></script>

<div align="right">
<iframe src="https://www.wegia.org/software/footer/pessoa.html" width="200" height="60" style="border:none;"></iframe>
</div>
</body>
</html>

4 changes: 3 additions & 1 deletion html/atendido/pre_cadastro_atendido.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ function validarCPF(strCPF) {
<script src="<?php echo WWW; ?>assets/javascripts/tables/examples.datatables.row.with.details.js"></script>
<script src="<?php echo WWW; ?>assets/javascripts/tables/examples.datatables.tabletools.js"></script>


<div align="right">
<iframe src="https://www.wegia.org/software/footer/pessoa.html" width="200" height="60" style="border:none;"></iframe>
</div>
</body>

</html>
2 changes: 1 addition & 1 deletion html/cadastro_doador.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ function validar() {
<button id="enviar" class="btn btn-primary" type="submit">Enviar</button>
<input type="reset" class="btn btn-default">
<a href="cadastro_entrada.php" color: white; text-decoration: none;>
<button type="button" class="btn btn-info">voltar</button>
<button type="button" class="btn btn-info">Voltar</button>
</a>
<a href="listar_origem.php" style="color: white; text-decoration:none;"><button class="btn btn-success" type="button">Listar doadores</button></a>
</div>
Expand Down
Loading