From 7d7ff21dba36e2895d4f6451d441ec7edfc92e82 Mon Sep 17 00:00:00 2001 From: Vittorio Lo Mele Date: Mon, 29 Jan 2024 22:07:26 +0100 Subject: [PATCH] Nuova GUI assemblee --- assemblee/assricgen.php | 348 +++++++++++-------------- assemblee/insver.php | 135 +++++++++- assemblee/insver2.php | 59 ++++- assemblee/registra_firmapresidente.php | 6 +- assemblee/ricgen.php | 253 +++++++++--------- contr/compleanni.php | 129 +++++++++ lib/funtestnew.php | 12 + lib/funzioni.php | 2 +- login/ele_ges.php | 3 + regclasse/elencoalunni.php | 10 +- 10 files changed, 613 insertions(+), 344 deletions(-) create mode 100644 contr/compleanni.php diff --git a/assemblee/assricgen.php b/assemblee/assricgen.php index a867bd59..dd210dae 100644 --- a/assemblee/assricgen.php +++ b/assemblee/assricgen.php @@ -4,6 +4,7 @@ /* Copyright (C) 2015 Pietro Tamburrano + Copyright (C) 2023 Michele Sacco - Flowopia Network [Rielaborazione sezione assemblee per adeguamento nuova UI] Questo programma è un software libero; potete redistribuirlo e/o modificarlo secondo i termini della GNU Affero General Public License come pubblicata dalla Free Software Foundation; sia la versione 3, @@ -63,228 +64,173 @@ if (mysqli_num_rows($risass) == 0) { alert("Non hai richiesto/effettuato ancora nessuna assemblea"); -} else -{ +} else { + // Titolo della pagina $classe = "SELECT anno,sezione,specializzazione FROM tbl_classi WHERE idclasse=$idclasse"; $risclasse = eseguiQuery($con, $classe); $val = mysqli_fetch_array($risclasse); print "
Riepilogo assemblee " . $val['anno'] . $val['sezione'] . " " . $val['specializzazione'] . "

"; - print ""; - print " - - - - "; - print " - - - - - - - - "; - while ($dataass = mysqli_fetch_array($risass)) - { + + // Inizio Tabella assemblee + print (" +
+
RICHIESTASVOLGIMENTOESITO
DataO.d.G.Rapp. di classeDocentiAutorizzazioneVerbaleEsame verbale
+ + + + + + + + + + + "); + + while($dataass = mysqli_fetch_array($risass)){ $idassemblea = $dataass['idassemblea']; print ""; - - -//DATA RICHIESTA - print ""; - -//ORDINE DEL GIORNO - print ""; - -//RAPPRESENTANTI - $alu = "SELECT cognome,nome FROM tbl_alunni + // sezione RICHIESTA + // Data + // Richiesta + print (""); + + // Info (O.d.G. - Docente Ora - Rapp. Richiedenti) + print(""; - - -//DOCENTI CONCEDENTI - $doc = "SELECT cognome,nome FROM tbl_docenti WHERE iddocente=" . $dataass['docenteconcedente1']; - if ($dataass['docenteconcedente2'] != 0) - { - $doc .= " OR iddocente=" . $dataass['docenteconcedente2'] . " ORDER BY cognome"; - } - print ""); + // Esito Richiesta + print(""; - -//DOCENTE AUTORIZZANTE (se esiste) -//AUTORIZZAZIONE - - if ($dataass['autorizzato'] == 0) - { - print ""; - } else - { - if ($dataass['autorizzato'] == 2) - { - print ""; - } else - { - print ""; - } - } - -//VERBALE - if ($alurapp) - { - if ($dataass['verbale'] == '' and $dataass['autorizzato'] == 1 and date('Y-m-d') > $dataass['dataassemblea']) - { - print ""); + // Verbale + print(""; - - - print ""; - - - - - - print ""; } - - print "
RICHIESTASVOLGIMENTO
DataInfoEsitoVerbale
Rich.: " . data_italiana($dataass['datarichiesta']) . "
"; -//DATA ASSEMBLEA - print "Svolg.: " . data_italiana($dataass['dataassemblea']) . "
"; -//INIZIO - FINE - print "Ora: " . $dataass['orainizio'] . " - " . $dataass['orafine'] . "
" . nl2br($dataass['odg']) . "Richiesta il " . data_italiana($dataass['datarichiesta']) . "
"); + // Svolgimento + print ("Svolta il " . data_italiana($dataass['dataassemblea']) . " (" . $dataass['orainizio'] . " - " . $dataass['orafine'] . ")
"); + // OdG + print(""); + // Rapp. di Classe + // Array nomi rappresentanti + $rapp = []; + // Query sql + $alu = "SELECT cognome,nome FROM tbl_alunni WHERE idalunno=" . $dataass['rappresentante1'] . " OR idalunno=" . $dataass['rappresentante2'] . " ORDER BY cognome"; - - $risalu = eseguiQuery($con, $alu); - print ""; - $numerorappresentantirichiedenti = 0; - while ($dataalu = mysqli_fetch_array($risalu)) - { - print ($dataalu['cognome'] . " " . $dataalu['nome'] . "
"); - $numerorappresentantirichiedenti++; - } - - if ($numerorappresentantirichiedenti == 1 & $_SESSION['idstudente'] != $dataass['rappresentante1']) - { - if ($alurapp) - { - print "CONFERMA RICHIESTA"; - } - } - print "
"; - $risdoc = eseguiQuery($con, $doc); - $cont = 1; - while ($datadoc = mysqli_fetch_array($risdoc)) - { - if ($cont == 1) - { - if ($dataass['concesso1'] == 1) - { - $fontin = ""; - $fontfi = ""; - } else if ($dataass['concesso1'] == 2) - { - $fontin = ""; - $fontfi = ""; - } else - { - $fontin = ""; - $fontfi = ""; + $risalu = eseguiQuery($con, $alu); + while($dataalu = mysqli_fetch_array($risalu)){ + $ncrapp = $dataalu['cognome'] ." " .$dataalu['nome']; + array_push($rapp, $ncrapp); + }; + // Check se assemblea confermata | TRUE = Info Rapp. Classe - FALSE = No Info Rapp. Classe + if($dataass['rappresentante2'] == 0 & $_SESSION['idstudente'] != $dataass['rappresentante1']){ + if ($alurapp) + { + print (" "); + }else{ + print(" "); + } } - } else - { - if ($dataass['concesso2'] == 1) - { - $fontin = ""; - $fontfi = ""; - } else if ($dataass['concesso2'] == 2) - { - $fontin = ""; - $fontfi = ""; - } else - { - $fontin = ""; - $fontfi = ""; + else{ + print(" "); + } + // Docenti Interessati + // Output nomi docenti concedenti + // Check se docente ha concesso l'assemblea + if($dataass['concesso1'] == 1){$fontc1 = '';} elseif($dataass['concesso1'] == 2){$fontc1 = '';}; + if($dataass['concesso2'] == 1){$fontc2 = '';} elseif($dataass['concesso2'] == 2){$fontc2 = '';}; + // Dati Docenti + // Primo + $docout1 = "" .estrai_dati_docente($dataass['docenteconcedente1'], $con) ." $fontc1"; + // Secondo (se esiste) + if($dataass['docenteconcedente2'] != 0){ + $docout2 = "
" .estrai_dati_docente($dataass['docenteconcedente2'], $con) ." $fontc2"; + } + print(" "); + print("
"); + if($dataass['autorizzato'] == 2){ + print(" ". estrai_dati_docente($dataass['docenteautorizzante'], $con) .""); + if($dataass['note'] != NULL){ + print("
"); + } + }elseif($dataass['autorizzato'] == 1){ + print(" ". estrai_dati_docente($dataass['docenteautorizzante'], $con) .""); + if($dataass['note'] != NULL){ + print("
"); } } - print ($fontin . $datadoc['cognome'] . " " . $datadoc['nome'] . "
" . $fontfi); - $cont++; - } - print "
 

" . nl2br($dataass['note']) . "
" . estrai_dati_docente($dataass['docenteautorizzante'], $con) . "

" . nl2br($dataass['note']) . "
" . estrai_dati_docente($dataass['docenteautorizzante'], $con) . "
"; - print "
Inserisci verbale!"; - } else - { - if ($dataass['verbale'] == '' and $dataass['autorizzato'] == 1 and date('Y-m-d') == $dataass['dataassemblea']) - { - print "

INSERISCI"; - } else - { - if (date('Y-m-d') < $dataass['dataassemblea']) - print "
 "; - else if ($dataass['verbale'] != "") - print "" . nl2br($dataass['verbale']); - else - print " "; - - if ($dataass['verbale'] != "") - { - if ($dataass['oratermine'] != "00:00:00") - { - print "
Ora termine: " . substr($dataass['oratermine'], 0, 5) . "
"; - } else - { - print "
"; - } -//SEGRETARIO - $alu = "SELECT cognome,nome FROM tbl_alunni - WHERE idalunno=" . $dataass['alunnosegretario']; - - $risalu = eseguiQuery($con, $alu); - $dataalu = mysqli_fetch_array($risalu); - print "
SEGRETARIO
" . $dataalu['cognome'] . " " . $dataalu['nome'] . "

"; - -//PRESIDENTE - if ($dataass['alunnopresidente'] != 0) - { - $alu = "SELECT cognome,nome FROM tbl_alunni - WHERE idalunno=" . $dataass['alunnopresidente']; - - $risalu = eseguiQuery($con, $alu); - $dataalu = mysqli_fetch_array($risalu); - print "
PRESIDENTE
" . $dataalu['cognome'] . " " . $dataalu['nome'] . "
"; - } else - { - if ($idalunno != $dataass['alunnosegretario']) - { - print "
CONFERMA E TRASMETTI VERBALE
"; - } else - { - print "
CORREGGI VERBALE


PRESIDENTE
Firma non presente!
Verbale non ancora trasmesso!"; - } + print("
"); + // Modal visualizzazione verbale + $modalverb = " + "; + // Check se alunno è rappresentante + if($alurapp){ + // Check se verbale non è stato inviato + if($dataass['verbale'] == NULL & $dataass['autorizzato'] == 1 & date('Y-m-d') >= $dataass['dataassemblea']){ + // Pulsante invio verbale + print(" Inserisci"); + }else{ + // Check se siamo in data dell'assemblea oppure no + if(date('Y-m-d') >= $dataass['dataassemblea']){ + // Check se verbale non è firmato dal presidente + if($dataass['alunnopresidente'] == 0 & $idalunno != $dataass['alunnosegretario'] & $dataass['autorizzato'] == 1){ + print(" Firma e Invia"); + // Stampa verbale + print($modalverb); + print(""); + // Fine stampa verbale + print(" Correggi"); + }elseif($dataass['autorizzato'] == 1 & $dataass['alunnopresidente'] == 0){ + print($modalverb); + print(""); + print(" Correggi"); + }elseif($dataass['autorizzato'] == 1){ + print($modalverb); + print(""); } } } + }else{ + // Check se verbale è inserito, firmato sia da segretario sia da presidente + if($dataass['verbale'] != NULL & $dataass['autorizzato'] == 1 & $dataass['alunnopresidente'] != 0 & $dataass['alunnosegretario'] != 0){ + print($modalverb); + print(""); + } } - } else // Alunno non rappresentante - { - if ($dataass['alunnopresidente'] != 0 & $dataass['alunnosegretario'] != 0) - print "" . $dataass['verbale'] . ""; - else - print ""; - } - print "" . nl2br($dataass['commenti_verbale']) . "
" . estrai_dati_docente($dataass['docente_visione'], $con) . "
"; -} - - - -if ($alurapp) -{ - print "
"; - print "

"; - print "

"; - print "

"; + // Fine tabella assemblee + print(" + + + "); + + // Output pulsante Richiesta Assemblea + if($alurapp){ + print "
"; + print "

"; + print "

"; + print "

"; + } } +?> -stampa_piede_new(""); +PAGINA PRINCIPALE - Visualizza assemblee - $titolo", "", $_SESSION['nome_scuola'], $_SESSION['comune_scuola']); +// TESTATA +stampa_testata_new("PAGINA PRINCIPALE - Visualizza assemblee - $titolo", "", $_SESSION['nome_scuola'], $_SESSION['comune_scuola']); +// Prelievo id assemblea $idassemblea = stringa_html('idassemblea'); $ver = ''; $orat = ''; @@ -56,10 +59,101 @@ $d = mysqli_fetch_array($ris); $ver = $d['verbale']; $orat = $d['oratermine']; -$data = $d['dataassemblea']; +$data = data_italiana($d['dataassemblea']); +$segret = $d['alunnosegretario']; +$odg = $d['odg']; if ($orat == "00:00:00") $orat = ""; -print "
"; + +if($idalunno == $d['rappresentante1'] || $idalunno == $d['rappresentante2']){ + if ($ver == NULL){ + // FORM GENERAZIONE VERBALE - insver2.php + print(" + + + "); + // Stampa data assemblea + print(" + + + + "); + // Stampa OdG + print(" + + + + "); + // Inserimento orario di inizio + print(" + + + "); + // Inserimento argomenti trattati nei vari punti all'OdG + print(" +
+ + + + +
+
+ "); + // Inserimento orario di fine + print(" + + + "); + // Inserimento firma segretario + print(" + + + + + "); + // Invio verbale + print(" +
+ +
+ "); + print("
"); + }else{ + // Modifica verbale già immesso/generato + print(" +
+ + "); + // Modifica ESCLUSIVAMENTE del verbale interamente e dell'ora fine + print(" + + + + + + "); + // Firma segretario + print(" + + + "); + // Inserimento del verbale modificato + print(" +
+ +
+ "); + } +}else{ + print(" +
+ +
+ "); +} +/*print ""; print "
Inserisci verbale assemblea " . data_italiana($data) . "
"; print ""; print "

"; @@ -69,8 +163,33 @@ print ""; print "

"; -print "
"; +print "";*/ + +?> + + + +PAGINA PRINCIPALE - Visualizza assemblee - $titolo", "", $_SESSION['nome_scuola'], $_SESSION['comune_scuola']); +stampa_testata_new("PAGINA PRINCIPALE - Visualizza assemblee - $titolo", "", $_SESSION['nome_scuola'], $_SESSION['comune_scuola']); +// Recupero variabili da form con POST $idassemblea = stringa_html('idassemblea'); - +$data = stringa_html('dataass'); +$odg = stringa_html('odg'); +$orainizio = stringa_html('orainizio'); +// Recupero punti ODG +$puntiodg = [stringa_html('p1'), stringa_html('p2'), stringa_html('p3'), stringa_html('p4'), stringa_html('p5'), stringa_html('p6'), stringa_html('p7'), stringa_html('p8'), stringa_html('p9'), stringa_html('p10')]; +$oratermine = stringa_html('orafine'); $segretario = stringa_html('segretario'); -$verbale = stringa_html('verbale'); -$oratermine = stringa_html('oratermine'); +$modifica = stringa_html('modifica'); -$query = "UPDATE tbl_assemblee SET verbale='" . $verbale . "', alunnosegretario=$segretario, oratermine='$oratermine' WHERE idassemblea=$idassemblea"; -$ris2 = eseguiQuery($con, $query); +// Controllo se esiste verbale == modifica verbale (non inserimento) +$query = "SELECT * FROM tbl_assemblee WHERE idassemblea=$idassemblea"; +$ris3 = eseguiQuery($con, $query); +$verbass = mysqli_fetch_array($ris3); +// Controllo se idalunno = rapp +$query = "SELECT * FROM tbl_classi WHERE idclasse=$idclasse"; +$ris = eseguiQuery($con, $query); +$rdc = mysqli_fetch_array($ris); +$rappdc1 = $rdc['rappresentante1']; +$rappdc2 = $rdc['rappresentante2']; +if($idalunno == $rappdc1 || $idalunno == $rappdc2){ + + if($verbass['verbale'] == NULL){ + // Assemblaggio verbale + // Stampa argomenti punti ODG + $printpunti = ""; + for($i = 0; $i<10; $i++){ + if($puntiodg[$i] != ""){ + $t = $i+1; + $temp = $puntiodg[$i]; + $printpunti = $printpunti ."Si analizza il $t. punto all'odg: \n$temp \n"; + } + } -header("Location: assricgen.php?idclasse=$idclasse"); + $verbale = "Il giorno $data, alle ore $orainizio, la classe si è riunita in assemblea per trattare gli argomenti del seguente $odg \n" .$printpunti ."\nLetto e approvato il seguente verbale,"; + $verbale = $con->real_escape_string($verbale); + $query = "UPDATE tbl_assemblee SET verbale='$verbale', alunnosegretario='$segretario', oratermine='$oratermine:00' WHERE idassemblea=$idassemblea"; + $ris2 = eseguiQuery($con, $query); + header("Location: assricgen.php?idclasse=$idclasse"); + }else{ + // Modifica verbale già esistente + $modifica = $con->real_escape_string($modifica); + $query = "UPDATE tbl_assemblee SET verbale= '$modifica' , oratermine='$oratermine' WHERE idassemblea=$idassemblea"; + $ris4 = eseguiQuery($con, $query); + header("Location: assricgen.php?idclasse=$idclasse"); + } +} -stampa_piede(""); +stampa_piede_new(""); mysqli_close($con); diff --git a/assemblee/registra_firmapresidente.php b/assemblee/registra_firmapresidente.php index 64b90444..17ae2e68 100644 --- a/assemblee/registra_firmapresidente.php +++ b/assemblee/registra_firmapresidente.php @@ -35,8 +35,8 @@ $idstudente = $_SESSION['idstudente']; $titolo = "Firma presidente"; $script = ""; -stampa_head($titolo, "", $script, "L"); -stampa_testata("PAGINA PRINCIPALE - Assemblee di classe - $titolo", "", $_SESSION['nome_scuola'], $_SESSION['comune_scuola']); +stampa_head_new($titolo, "", $script, "L"); +stampa_testata_new("PAGINA PRINCIPALE - Assemblee di classe - $titolo", "", $_SESSION['nome_scuola'], $_SESSION['comune_scuola']); $con = mysqli_connect($db_server, $db_user, $db_password, $db_nome) or die("Errore: " . mysqli_error($con)); @@ -56,5 +56,5 @@ "); mysqli_close($con); -stampa_piede(""); +stampa_piede_new(""); diff --git a/assemblee/ricgen.php b/assemblee/ricgen.php index 0a7949d2..f5ef666a 100644 --- a/assemblee/ricgen.php +++ b/assemblee/ricgen.php @@ -4,6 +4,7 @@ /* Copyright (C) 2015 Pietro Tamburrano + Copyright (C) 2023 Michele Sacco - Flowopia Network [Rielaborazione sezione assemblee per adeguamento nuova UI] Questo programma è un software libero; potete redistribuirlo e/o modificarlo secondo i termini della GNU Affero General Public License come pubblicata dalla Free Software Foundation; sia la versione 3, @@ -37,7 +38,7 @@ die; } -//prendo la data odierna +// Pickup data odierna $giorno = date('d'); $mese = date('m'); $anno = date('Y'); @@ -96,8 +97,8 @@ function abildisabdoc2() "; $idalunno = $_SESSION['idstudente']; $idclasse = stringa_html('idclasse'); -stampa_head($titolo, "", $script, "L"); -stampa_testata("PAGINA PRINCIPALE - Assemblee di classe - $titolo", "", $_SESSION['nome_scuola'], $_SESSION['comune_scuola']); +stampa_head_new($titolo, "", $script, "L"); +stampa_testata_new("PAGINA PRINCIPALE - Assemblee di classe - $titolo", "", $_SESSION['nome_scuola'], $_SESSION['comune_scuola']); $con = mysqli_connect($db_server, $db_user, $db_password, $db_nome) or die("Errore durante la connessione: " . mysqli_error($con)); @@ -107,150 +108,162 @@ function abildisabdoc2() { $f = 0; } -// print "
"; -print ""; -print "
"; -//DATA RICHIESTA -print " - - - "; -//DATA ASSEMBLEA -$dataassemblea = stringa_html('data'); -print " - "; +if($idclasse == NULL){ + print(" +
+ +
+ "); +}else{ + // Estrapolo id alunni dei rapp. di classe da tbl + $query = "SELECT * FROM tbl_classi WHERE idclasse=$idclasse"; + $ris = eseguiQuery($con, $query); + $rdc = mysqli_fetch_array($ris); + $rappdc1 = $rdc['rappresentante1']; + $rappdc2 = $rdc['rappresentante2']; +} -print" "; +if($idalunno == $rappdc1 || $idalunno == $rappdc2){ + // Form Richiesta Assemblea + print(""); -print" "; + // Data Richiesta + print(" + + "); -//ORA INIZIO-FINE -$ore = stringa_html('ora_inizio'); -print " - - "; - -$ora_inizio = substr($ore, 0, 1); -$ora_fine = substr($ore, 2, 1); + print(""); -//controllo se le ore richieste sono 1 o 2 -$ore_richieste = 0; -if ($ora_inizio == $ora_fine) -{ - $ore_richieste = 1; -} - -$docenteconcedente1 = stringa_html('docenteconcedente1'); -$docenteconcedente2 = stringa_html('docenteconcedente2'); -//$materia1 = stringa_html('materia1'); -//$materia2 = stringa_html('materia2'); -//se viene richiesta l'assemblea di 1 ora, il docente concedente sarà uno solo -print ""; -//se le ore sono due, viene visualizzata la select del secondo docente concedente -if ($_SESSION['numeromassimooreassemblea'] == 2) -{ - print(""; -} -print ""; -print ""; + print ""; + //se le ore sono due, viene visualizzata la select del secondo docente concedente + if ($_SESSION['numeromassimooreassemblea'] == 2) + { + $resd = eseguiQuery($con, $sqld); + if (!$resd) + { + print ("


Impossibile visualizzare i dati

"); + } else + { + print(" + + "; + } + } -print ""; -$rap1 = stringa_html('rappresentante1'); -print "
Data richiesta
Data assemblea
Ore assemblea (prima-ultima):"); + + // Ora dell'assemblea (Inizio - Fine) + $ore = stringa_html('ora_inizio'); + print(" + +
"; -$sqld = "SELECT DISTINCT tbl_docenti.cognome AS cognome, tbl_docenti.nome AS nome, tbl_docenti.iddocente AS iddocente_doc, tbl_cattnosupp.iddocente AS iddocente_cat, tbl_cattnosupp.idclasse AS idclasse - FROM tbl_docenti,tbl_cattnosupp - WHERE (tbl_docenti.iddocente=tbl_cattnosupp.iddocente) AND (tbl_cattnosupp.iddocente!=1000000000) AND (idclasse=$idclasse) ORDER BY cognome, nome"; -print "Docente concedente (prima ora)"; -print ""; -$resd = eseguiQuery($con, $sqld); -if (!$resd) -{ - print ("


Impossibile visualizzare i dati

"); -} else -{ - print (""; -print "
"); - print "Docente concedente (seconda ora)"; - print ""; + // Docente concedente + $docenteconcedente1 = stringa_html('docenteconcedente1'); + $docenteconcedente2 = stringa_html('docenteconcedente2'); + //se viene richiesta l'assemblea di 1 ora, il docente concedente sarà uno solo + $sqld = "SELECT DISTINCT tbl_docenti.cognome AS cognome, tbl_docenti.nome AS nome, tbl_docenti.iddocente AS iddocente_doc, tbl_cattnosupp.iddocente AS iddocente_cat, tbl_cattnosupp.idclasse AS idclasse + FROM tbl_docenti,tbl_cattnosupp + WHERE (tbl_docenti.iddocente=tbl_cattnosupp.iddocente) AND (tbl_cattnosupp.iddocente!=1000000000) AND (idclasse=$idclasse) ORDER BY cognome, nome"; $resd = eseguiQuery($con, $sqld); if (!$resd) { print ("


Impossibile visualizzare i dati

"); } else { - print (" + "); + print(""); + print(">" .$datal['cognome'] ." " .$datal['nome'] .""); } - print ""; } - print "
Rappresentante
Ordine del giorno
Rappresentante
"; -print "

"; -print "

"; + // Rappresentante Richiedente + print(" + + + + "); -//invio dati -/* - print "

"; - print "

"; - print "

"; - print "

"; - print "

"; - print "

"; - print "

"; - print "

"; + // Ordine del Giorno + print(" + + + "); - print "

"; + // Firma Rappresentante + print(" + + + + "); + $rap1 = stringa_html('rappresentante1'); - print "

"; - print ""; + print "

"; + print ""; +}else{ + print(" +
+ +
+ "); +} - */ +?> -stampa_piede(""); +PAGINA PRINCIPALE - $titolo", "", $_SESSION['nome_scuola'], $_SESSION['comune_scuola']); + +$con = mysqli_connect($db_server, $db_user, $db_password, $db_nome); +if (!$con) { + print("

Connessione al server fallita

"); + exit; +} + +$qdocenti = "SELECT nome, cognome FROM `tbl_docenti` WHERE MONTH(datanascita) = MONTH(CURRENT_DATE()) AND DAY(datanascita) = DAY(CURRENT_DATE())"; +$rdocenti = eseguiQuery($con, $qdocenti); + +$qalunni = "SELECT nome, cognome, anno, sezione, specializzazione FROM `tbl_alunni`, `tbl_classi` WHERE `tbl_alunni`.`idclasse` = `tbl_classi`.`idclasse` AND MONTH(datanascita) = MONTH(CURRENT_DATE()) AND DAY(datanascita) = DAY(CURRENT_DATE());"; +$ralunni = eseguiQuery($con, $qalunni); + +$qamm = "SELECT nome, cognome FROM `tbl_amministrativi` WHERE MONTH(datanascita) = MONTH(CURRENT_DATE()) AND DAY(datanascita) = DAY(CURRENT_DATE())"; +$ramm = eseguiQuery($con, $qamm); + +?> +
+
+

Compleanni di oggi

+ +

Studenti

+ + + + + + + + + + Nessun compleanno in data odierna"); + }else{ + while ($alunno = mysqli_fetch_assoc($ralunni)) { + print(""); + } + } + ?> + +
Cognome e NomeClasse
" . $alunno['cognome'] . " " . $alunno['nome'] . "" . $alunno['anno'] . " " . $alunno['sezione'] . " " . $alunno['specializzazione'] . "
+ +

Docenti

+ + + + + + + + + Nessun compleanno in data odierna"); + }else{ + while ($docente = mysqli_fetch_assoc($rdocenti)) { + print(""); + } + } + ?> + +
Cognome e Nome
" . $docente['cognome'] . " " . $docente['nome'] . "
+ +

Impiegati di segreteria

+ + + + + + + + + Nessun compleanno in data odierna"); + }else{ + while ($amm = mysqli_fetch_assoc($ramm)) { + print(""); + } + } + ?> + +
Cognome e Nome
" . $amm['cognome'] . " " . $amm['nome'] . "
+
+ +
+ + + + + + @@ -71,6 +76,13 @@ function() { }); }; + + document.addEventListener("DOMContentLoaded", function(){ + var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')); + var popoverList = popoverTriggerList.map(function(element){ + return new bootstrap.Popover(element); + }); + }); Port = $_SESSION['smtpport']; - $mail->setFrom($from, 'Registro Elettronico LAMPSchool'); + $mail->setFrom($from, $_SESSION['nome_scuola']); $mail->addAddress($to); $mail->addReplyTo($reply); diff --git a/login/ele_ges.php b/login/ele_ges.php index 6f08a089..75e9f323 100644 --- a/login/ele_ges.php +++ b/login/ele_ges.php @@ -596,6 +596,7 @@ } menu_title_begin('STATISTICHE E RIEPILOGHI'); menu_item('../contr/statinsertot.php', 'STATISTICHE INSERIMENTO DATI'); + menu_item('../contr/compleanni.php', 'COMPLEANNI DI OGGI'); menu_item('../valutazioni/riepvoticlasse.php', 'RIEPILOGO MEDIE PER CLASSE'); menu_item('../lezioni/vis_lez.php', 'CORREZIONE LEZIONI'); menu_item('../contr/verifsovrapp.php', 'VERIFICA SOVRAPPOSIZIONI'); @@ -850,6 +851,7 @@ menu_title_end(); menu_title_begin('STATISTICHE E RIEPILOGHI'); menu_item('../contr/statinsertot.php', 'STATISTICHE INSERIMENTO DATI'); + menu_item('../contr/compleanni.php', 'COMPLEANNI DI OGGI'); menu_item('../valutazioni/riepvoticlasse.php', 'RIEPILOGO MEDIE PER CLASSE'); menu_item('../lezioni/vis_lez.php', 'CORREZIONE LEZIONI'); menu_item('../contr/verifsovrapp.php', 'VERIFICA SOVRAPPOSIZIONI'); @@ -1004,6 +1006,7 @@ menu_separator("DATI E STATISTICHE"); menu_title_begin('STATISTICHE E RIEPILOGHI'); menu_item('../contr/statinsertot.php', 'STATISTICHE INSERIMENTO DATI'); + menu_item('../contr/compleanni.php', 'COMPLEANNI DI OGGI'); menu_item('../valutazioni/riepvoticlasse.php', 'RIEPILOGO MEDIE PER CLASSE'); menu_item('../lezioni/vis_lez.php', 'CORREZIONE LEZIONI'); menu_item('../contr/verifsovrapp.php', 'VERIFICA SOVRAPPOSIZIONI'); diff --git a/regclasse/elencoalunni.php b/regclasse/elencoalunni.php index 8229589c..7a58a529 100644 --- a/regclasse/elencoalunni.php +++ b/regclasse/elencoalunni.php @@ -50,7 +50,7 @@ $esistono = false; if (mysqli_num_rows($rs) > 0) { - print ""; + print "
N.CognomeNomeData nascitaCod. Fisc.Magg.Cens.Funz.Aut.
usc.
ant.
"; if (verifica_classe_coordinata($_SESSION['idutente'], $idclasse, $con)) { print ""; @@ -71,12 +71,20 @@ print ""; else print ""; + + if ($rec['liberatoria']) { + print ""; + } else { + print ""; + } + if ($rec['autuscitaantclasse']) print ""; elseif (maggiorenne($rec['datanascita'])) print ""; else print ""; + $cont++; if (verifica_classe_coordinata($_SESSION['idutente'], $idclasse, $con)) {
N.CognomeNomeData nascitaCod. Fisc.Magg.Cens.Funz.Lib.
foto
Aut.
usc.
ant.
Telefoni genitoriC.F.SNSMAGG.N