Skip to content

Commit

Permalink
1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Guiazis committed Oct 25, 2019
1 parent f2c5dbf commit e76df2e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion html/editar_beneficio.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function adicionar_beneficios(){
<div class="form-group">
<label class="col-md-3 control-label" for="profileCompany">Data Fim</label>
<div class="col-md-8">
<input type="date" placeholder="dd/mm/aaaa" maxlength="10" class="form-control" name="data_fim" id="data_fim" max=<?php echo date('Y-m-d'); ?> >
<input type="date" placeholder="dd/mm/aaaa" maxlength="10" class="form-control" name="data_fim" id="data_fim">
</div>
</div>
<div class="form-group">
Expand Down
38 changes: 20 additions & 18 deletions html/profile_funcionario.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@
}else if(!isset($_SESSION['epi'])) {
$id_funcionario=$_GET['id_funcionario'];
header('Location: ../controle/control.php?metodo=listarEpi&nomeClasse=FuncionarioControle&nextPage=../html/profile_funcionario.php?id_funcionario='.$id_funcionario.'&id_funcionario='.$id_funcionario);
}else if(isset($_SESSION['funcionario']) && isset($_SESSION['beneficio']) && isset($_SESSION['epi'])){
$teste = $_SESSION['funcionario'];
$bene = $_SESSION['beneficio'];
$ep = $_SESSION['epi'];
}
}else{

$func = $_SESSION['funcionario'];
$bene = $_SESSION['beneficio'];
$epi = $_SESSION['epi'];
unset($_SESSION['funcionario']);
unset($_SESSION['beneficio']);
unset($_SESSION['epi']);

}

$mysqli = new mysqli("localhost","root","root","wegia");
$situacao = $mysqli->query("SELECT * FROM situacao");
Expand Down Expand Up @@ -265,11 +269,10 @@ function cancelar_outros(){
$("#botaoEditarOutros").attr('onclick', "return editar_outros()");

}

function clicar_epi(id){
window.location.href = "../html/editar_epi.php?id_funcionario="+id;
window.location.href ="../html/editar_epi.php?id_funcionario="+id ;
}

function clicar_beneficio(id){
window.location.href = "../html/editar_beneficio.php?id_funcionario="+id;
}
Expand All @@ -286,11 +289,11 @@ function alterardate(data){
var date=data.split("/")
return date[2]+"-"+date[1]+"-"+date[0];
}

$(function(){

var funcionario = <?php echo $teste;?>;
<?php unset($teste) ?>;
var funcionario = <?= $func ?>;

console.log(funcionario);
$.each(funcionario,function(i,item){

Expand Down Expand Up @@ -402,8 +405,8 @@ function alterardate(data){
//Beneficios
$(function(){

var beneficio = <?php echo $bene;?>;
<?php unset($bene); ?>;
var beneficio = <?= $bene ?>;

console.log(beneficio);
$.each(beneficio,function(i,item){
$("#tabela")
Expand Down Expand Up @@ -436,9 +439,9 @@ function alterardate(data){
*/
//EPI
$(function(){

var epi = <?php echo $ep;?>;
<?php unset($ep); ?>;
var epi = <?= $epi ?>;

console.log(epi);
$.each(epi,function(i,item){
$("#tabela_epi")
Expand Down Expand Up @@ -607,7 +610,6 @@ function validarCPF(strCPF){
}

}
console.log(funcionario);

</script>
<script language="JavaScript">
Expand Down Expand Up @@ -1287,7 +1289,7 @@ function funcao2(){
<div class="form-group">
<label class="col-md-3 control-label" for="profileCompany">Data Fim</label>
<div class="col-md-8">
<input type="date" placeholder="dd/mm/aaaa" maxlength="10" class="form-control" name="data_fim" id="data_fim" max=<?php echo date('Y-m-d'); ?> >
<input type="date" placeholder="dd/mm/aaaa" maxlength="10" class="form-control" name="data_fim" id="data_fim" >
</div>
</div>
<div class="form-group">
Expand Down

0 comments on commit e76df2e

Please sign in to comment.