fazendo get do ano letivo

This commit is contained in:
Reginaldo
2023-10-03 16:45:57 -03:00
parent 7c088faa60
commit 412afb0390
3 changed files with 23 additions and 0 deletions

View File

@@ -18,4 +18,12 @@ class BoletimController{
echo json_encode($Logins);
return json_encode($Logins);
}
public function mostrarBoletim($params){
$ANO = $params->ANO;
$CIDADE = $params->CIDADE;
$Log = new Controller();
$Logins = $Log->getMostrarBoletim($ANO,$CIDADE);
echo json_encode($Logins);
return json_encode($Logins);
}
}

View File

@@ -100,6 +100,20 @@ class Controller extends DBA{
die('informação incompleta...');
}
}
public function getMostrarBoletim($ANO,$CIDADE){
if(!$ANO==''){
$this->sql = "SELECT FIRST 1 * FROM SEC_INTERVALO_DATAS WHERE EXTRACT(YEAR FROM DT_INICIAL) = ? ORDER BY DT_INICIAL";
$Con = new Controller();
$this->stmt = $Con -> getSTMT($CIDADE,$this->sql);
$this->stmt->bindValue(1,$ANO);
$this->stmt->execute();
$this->res = $this->stmt->fetchAll(PDO::FETCH_ASSOC);
return $this-> res;
}else{
//caso o id não foi passado recebe essa mensagem
die('informação incompleta...');
}
}
public function getPasse($CD_ALUNO,$CIDADE){
if(!$CD_ALUNO == ''){
$this->sql = "SELECT PC.DT_CADASTRO,PC.NR_CARTEIRA,PC.VALIDADE_CARTEIRINHA, PC.NR_TRANSPORTE, PC.TURNO, A.NR_RA, A.DT_NASCIMENTO,PS.DESC_SERIE, PS.GRAU

View File

@@ -28,6 +28,7 @@ $router= [
"/deleta" => function(){load("PaisController","deleta");},
"/boletim_notas" => function(){load("BoletimController","notas");},
"/boletim_faltas" => function(){load("BoletimController","faltas");},
"/mostrar_boletim" => function(){load("BoletimController","mostrarBoletim");},
"/calendario_home" => function(){load("CalendarioController","home");},
"/calendario" => function(){load("CalendarioController","calendario");},
"/ocorrencia" => function(){load("OcorrenciaController","ocorrencia");},