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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Restituisce i dati di un documento protocollato a partire da Anno e Numero di Protocollo
+
+
+
+
+ Restituisce i dati di un documento eventualmente protocollato a partire da IdDocumento
+
+
+
+
+ Inserisce un documento protocollato e le anagrafiche (max 100) ed eventualmente esegue l'avvio dell'iter
+
+
+
+
+ Inserisce un documento non protocollato e le anagrafiche (max 100) ed eventualmente esegue l'avvio dell'iter
+
+
+
+
+ Aggiunge uno o piu' allegati ad un documento o protocollo esistente
+
+
+
+
+ Restituisce i dati di un documento protocollato a partire da Anno e Numero di Protocollo nel caso di installazione multiDB
+
+
+
+
+ Restituisce i dati di un documento eventualmente protocollato a partire da IdDocumento nel caso di installazione multiDB
+
+
+
+
+ Inserisce un documento protocollato e le anagrafiche (max 100) ed eventualmente esegue l'avvio dell'iter in caso di installazione multiDB
+
+
+
+
+ Inserisce un documento non protocollato e le anagrafiche (max 100) ed eventualmente esegue l'avvio dell'iter in caso di installazione multiDM
+
+
+
+
+ Aggiunge uno o piu' allegati ad un documento o protocollo esistente in caso di installazione multiDB
+
+
+
+
+ Esegue l'autenticazione su IrideWeb
+
+
+
+
+ Esegue l'autenticazione su IrideWeb in caso di installazione multiDB
+
+
+
+
+ Esegue la ricerca di un soggetto per codice amministrazione e codice AOO
+
+
+
+
+ Esegue la ricerca di un soggetto per codice amministrazione e codice AOO in caso di installazione multiDB
+
+
+
+
+ Aggiunge uno o piu' allegati ad un documento o protocollo esistente - nuovo messaggio di ritorno
+
+
+
+
+ Inserisce un documento non protocollato a partire da un documento presente in Documentum ed eventualmente esegue l'avvio dell'iter
+
+
+
+
+ Modifica un documento o un protocollo e le anagrafiche (max 500)
+
+
+
+
+ Creazione delle copie di un documento o un protocollo (max 100)
+
+
+
+
+ Restituisce i dati di un documento eventualmente protocollato a partire dal codice a barre
+
+
+
+
+ Restituisce in formato stringa i dati di un documento eventualmente protocollato a partire da IdDocumento
+
+
+
+
+ Restituisce i dati in formato stringa di un documento protocollato a partire da Anno e Numero di Protocollo nel caso di installazione multiDB
+
+
+
+
+ Restituisce i dati in formato stringa di un documento eventualmente protocollato a partire dal codice a barre
+
+
+
+
+ Inserisce un documento non protocollato e le anagrafiche (max 100) ed eventualmente esegue l'avvio dell'iter a partire da dati in formato stringa e restituisce dati in formato stringa
+
+
+
+
+ Inserisce un documento protocollato e le anagrafiche (max 100) ed eventualmente esegue l'avvio dell'iter in caso a partire da dati in formato stringa e restituisce dati in formato stringa
+
+
+
+
+ Modifica un documento o un protocollo e le anagrafiche (max 500) in formato stringa
+
+
+
+
+ Restituisce gli estremi dei documenti (eventualmente solo quelli protocollati) per codice fiscale dell'intestatario in fomrato stringa
+
+
+
+
+ Aggiunge uno o piu' allegati ad un documento o protocollo esistente in formato stringa
+
+
+
+
+ Creazione delle copie di un documento o un protocollo (max 100) in formato stringa
+
+
+
+
+ Pubblicazione di un documento in formato stringa
+
+
+
+
+ Restituisce in formato stringa i dati di un soggetto a partire da IdSoggetto o CodiceFiscale
+
+
+
+
+ Restituisce in formato stringa i dati relativi alle copie di un documento
+
+
+
+
+ Elimina un allegato a partire dall'identificativo
+
+
+
+
+ Annulla un documento a partire dall'identificativo
+
+
+
+
+ Collega due documenti a partire dall'identificativo
+
+
+
+
+ Restituisce i dati in formato stringa di un documento protocollato a partire da Anno e Numero di Protocollo nel caso di installazione multiDB
+
+
+
+
+ Inserisce i dati utente associati a un documento, un soggetto o un'attivita'
+
+
+
+
+ Restituisce gli estremi dei documenti (eventualmente solo quelli protocollati) per codice fiscale dell'intestatario
+
+
+
+
+ Restituisce gli estremi dei documenti (eventualmente solo quelli protocollati) per codice fiscale dell'intestatario in caso di installazione multiDB
+
+
+
+
+
+
+ Restituisce i dati di un documento protocollato a partire da Anno e Numero di Protocollo
+
+
+
+
+ Restituisce i dati di un documento eventualmente protocollato a partire da IdDocumento
+
+
+
+
+ Restituisce i dati di un documento protocollato a partire da Anno e Numero di Protocollo nel caso di installazione multiDB
+
+
+
+
+ Restituisce i dati di un documento eventualmente protocollato a partire da IdDocumento nel caso di installazione multiDB
+
+
+
+
+ Esegue l'autenticazione su IrideWeb
+
+
+
+
+ Esegue l'autenticazione su IrideWeb in caso di installazione multiDB
+
+
+
+
+ Esegue la ricerca di un soggetto per codice amministrazione e codice AOO
+
+
+
+
+ Esegue la ricerca di un soggetto per codice amministrazione e codice AOO in caso di installazione multiDB
+
+
+
+
+ Restituisce i dati di un documento eventualmente protocollato a partire dal codice a barre
+
+
+
+
+ Restituisce in formato stringa i dati di un documento eventualmente protocollato a partire da IdDocumento
+
+
+
+
+ Restituisce i dati in formato stringa di un documento protocollato a partire da Anno e Numero di Protocollo nel caso di installazione multiDB
+
+
+
+
+ Restituisce i dati in formato stringa di un documento eventualmente protocollato a partire dal codice a barre
+
+
+
+
+ Inserisce un documento non protocollato e le anagrafiche (max 100) ed eventualmente esegue l'avvio dell'iter a partire da dati in formato stringa e restituisce dati in formato stringa
+
+
+
+
+ Inserisce un documento protocollato e le anagrafiche (max 100) ed eventualmente esegue l'avvio dell'iter in caso a partire da dati in formato stringa e restituisce dati in formato stringa
+
+
+
+
+ Modifica un documento o un protocollo e le anagrafiche (max 500) in formato stringa
+
+
+
+
+ Restituisce gli estremi dei documenti (eventualmente solo quelli protocollati) per codice fiscale dell'intestatario in fomrato stringa
+
+
+
+
+ Aggiunge uno o piu' allegati ad un documento o protocollo esistente in formato stringa
+
+
+
+
+ Creazione delle copie di un documento o un protocollo (max 100) in formato stringa
+
+
+
+
+ Pubblicazione di un documento in formato stringa
+
+
+
+
+ Restituisce in formato stringa i dati di un soggetto a partire da IdSoggetto o CodiceFiscale
+
+
+
+
+ Restituisce in formato stringa i dati relativi alle copie di un documento
+
+
+
+
+ Elimina un allegato a partire dall'identificativo
+
+
+
+
+ Annulla un documento a partire dall'identificativo
+
+
+
+
+ Collega due documenti a partire dall'identificativo
+
+
+
+
+ Restituisce i dati in formato stringa di un documento protocollato a partire da Anno e Numero di Protocollo nel caso di installazione multiDB
+
+
+
+
+ Inserisce i dati utente associati a un documento, un soggetto o un'attivita'
+
+
+
+
+ Restituisce gli estremi dei documenti (eventualmente solo quelli protocollati) per codice fiscale dell'intestatario
+
+
+
+
+ Restituisce gli estremi dei documenti (eventualmente solo quelli protocollati) per codice fiscale dell'intestatario in caso di installazione multiDB
+
+
+
+
+
+
+ Restituisce i dati di un documento protocollato a partire da Anno e Numero di Protocollo
+
+
+
+
+ Restituisce i dati di un documento eventualmente protocollato a partire da IdDocumento
+
+
+
+
+ Restituisce i dati di un documento protocollato a partire da Anno e Numero di Protocollo nel caso di installazione multiDB
+
+
+
+
+ Restituisce i dati di un documento eventualmente protocollato a partire da IdDocumento nel caso di installazione multiDB
+
+
+
+
+ Esegue l'autenticazione su IrideWeb
+
+
+
+
+ Esegue l'autenticazione su IrideWeb in caso di installazione multiDB
+
+
+
+
+ Esegue la ricerca di un soggetto per codice amministrazione e codice AOO
+
+
+
+
+ Esegue la ricerca di un soggetto per codice amministrazione e codice AOO in caso di installazione multiDB
+
+
+
+
+ Restituisce i dati di un documento eventualmente protocollato a partire dal codice a barre
+
+
+
+
+ Restituisce in formato stringa i dati di un documento eventualmente protocollato a partire da IdDocumento
+
+
+
+
+ Restituisce i dati in formato stringa di un documento protocollato a partire da Anno e Numero di Protocollo nel caso di installazione multiDB
+
+
+
+
+ Restituisce i dati in formato stringa di un documento eventualmente protocollato a partire dal codice a barre
+
+
+
+
+ Inserisce un documento non protocollato e le anagrafiche (max 100) ed eventualmente esegue l'avvio dell'iter a partire da dati in formato stringa e restituisce dati in formato stringa
+
+
+
+
+ Inserisce un documento protocollato e le anagrafiche (max 100) ed eventualmente esegue l'avvio dell'iter in caso a partire da dati in formato stringa e restituisce dati in formato stringa
+
+
+
+
+ Modifica un documento o un protocollo e le anagrafiche (max 500) in formato stringa
+
+
+
+
+ Restituisce gli estremi dei documenti (eventualmente solo quelli protocollati) per codice fiscale dell'intestatario in fomrato stringa
+
+
+
+
+ Aggiunge uno o piu' allegati ad un documento o protocollo esistente in formato stringa
+
+
+
+
+ Creazione delle copie di un documento o un protocollo (max 100) in formato stringa
+
+
+
+
+ Pubblicazione di un documento in formato stringa
+
+
+
+
+ Restituisce in formato stringa i dati di un soggetto a partire da IdSoggetto o CodiceFiscale
+
+
+
+
+ Restituisce in formato stringa i dati relativi alle copie di un documento
+
+
+
+
+ Elimina un allegato a partire dall'identificativo
+
+
+
+
+ Annulla un documento a partire dall'identificativo
+
+
+
+
+ Collega due documenti a partire dall'identificativo
+
+
+
+
+ Restituisce i dati in formato stringa di un documento protocollato a partire da Anno e Numero di Protocollo nel caso di installazione multiDB
+
+
+
+
+ Inserisce i dati utente associati a un documento, un soggetto o un'attivita'
+
+
+
+
+ Restituisce gli estremi dei documenti (eventualmente solo quelli protocollati) per codice fiscale dell'intestatario
+
+
+
+
+ Restituisce gli estremi dei documenti (eventualmente solo quelli protocollati) per codice fiscale dell'intestatario in caso di installazione multiDB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lib/app.config.php b/lib/app.config.php
index 09842d6..6fead94 100644
--- a/lib/app.config.php
+++ b/lib/app.config.php
@@ -10,7 +10,7 @@ $config = array(
"FILE_UPLOAD" => true,
"FIREBASE" => true,
"CAPTCHA" => false,
- "EMAIL" => false,
+ "EMAIL" => true,
"INFOCAMERE" => true,
"AVVISO" => true
);
diff --git a/lib/classes/Affitti/DomandaSconti.php b/lib/classes/Affitti/DomandaSconti.php
index a4a41db..33de9ef 100644
--- a/lib/classes/Affitti/DomandaSconti.php
+++ b/lib/classes/Affitti/DomandaSconti.php
@@ -518,7 +518,13 @@ GROUP BY T.STATO, T.LOTTO, T.DATA_ESPORTAZIONE,T.DATA_EROGAZIONE, T.DATA_ESITO,T
$result = array();
$res = array();
if (intval($lotto) > 0) {
- $sql2 = "SELECT COUNT(V.ID) AS NUM, V.STATO, SUM(V.SCONTO_TOTALE) AS SCONTO, SUM(V.COSTO_TRATTA) AS COSTO, V.LOTTO,TO_CHAR(V.DATA_ESPORTAZIONE, 'dd/mm/YYYY') AS DATA_ESPORTAZIONE, TO_CHAR(V.DATA_EROGAZIONE, 'dd/mm/YYYY') AS DATA_EROGAZIONE, TO_CHAR(V.DATA_ESITO, 'dd/mm/YYYY') AS DATA_ESITO, PRIORITA FROM VIEW_EXPORT_SCONTI V WHERE V.LOTTO = " . $lotto . " AND STATO = 2 GROUP BY V.STATO, V.LOTTO, TO_CHAR(V.DATA_ESPORTAZIONE, 'dd/mm/YYYY'),TO_CHAR(V.DATA_EROGAZIONE, 'dd/mm/YYYY'), TO_CHAR(V.DATA_ESITO, 'dd/mm/YYYY'), PRIORITA ORDER BY V.STATO desc, V.LOTTO asc";
+ $sql2 = "SELECT COUNT(V.ID) AS NUM, "
+ . "V.STATO, SUM(V.SCONTO_TOTALE) AS SCONTO, SUM(V.COSTO_TRATTA) "
+ . "AS COSTO, V.LOTTO,TO_CHAR(V.DATA_ESPORTAZIONE, 'dd/mm/YYYY') AS DATA_ESPORTAZIONE, "
+ . "TO_CHAR(V.DATA_EROGAZIONE, 'dd/mm/YYYY') AS DATA_EROGAZIONE, TO_CHAR(V.DATA_ESITO, 'dd/mm/YYYY') AS DATA_ESITO "
+ . "FROM VIEW_EXPORT_SCONTI V WHERE V.LOTTO = " . $lotto . " AND STATO = 2 "
+ . "GROUP BY V.STATO, V.LOTTO, TO_CHAR(V.DATA_ESPORTAZIONE, 'dd/mm/YYYY'),TO_CHAR(V.DATA_EROGAZIONE, 'dd/mm/YYYY'),"
+ . " TO_CHAR(V.DATA_ESITO, 'dd/mm/YYYY') ORDER BY V.STATO desc, V.LOTTO asc";
$query = $con->prepare($sql2);
try {
$query->execute();
@@ -979,13 +985,14 @@ LEFT JOIN ACCOUNT_ANAGRAFICA ON ACCOUNT_ANAGRAFICA.CODICE_FISCALE=VIEW_EXPORT_SC
V.DATA_NASCITA,
V.SCONTO_TOTALE
FROM VIEW_EXPORT_IBAN_AGGIORNATI V
- WHERE V.LOTTO = :LOTTO AND V.STATO = 2
+ WHERE V.LOTTO = :LOTTO AND V.STATO = :STATO
) T
WHERE T.SCONTO_TOTALE > 0
ORDER BY T.\"ID Richiesta\" ASC
";
$query = $con->prepare($sql);
$query->bindParam(":LOTTO", $lotto);
+ $query->bindParam(":STATO", $stato);
try {
$query->execute();
$res = $query->fetchAll(PDO::FETCH_ASSOC);
diff --git a/lib/classes/Impersonificazione.php b/lib/classes/Impersonificazione.php
new file mode 100644
index 0000000..337b9ae
--- /dev/null
+++ b/lib/classes/Impersonificazione.php
@@ -0,0 +1,116 @@
+ 0) {
+ $this->_loadAndFillObject($src['ID'], self::TABLE_NAME, $src);
+ } else {
+ $this->_loadByRow($src, $stripSlashes);
+ }
+ } elseif (intval($src)) {
+ $sql = "SELECT * FROM " . self::TABLE_NAME . " WHERE ID = :id";
+ $query = $con->prepare($sql);
+ $query->bindParam(":id", $src);
+ try {
+ $query->execute();
+ $it = $query->fetchAll(PDO::FETCH_ASSOC);
+ Utils::FillObjectFromRow($this, $it[0]);
+ } catch (Exception $exc) {
+ $exc->getMessage();
+ }
+ }
+ }
+ public static function Count($filter = null) {
+ return parent::_count(self::TABLE_NAME, $filter);
+ }
+
+ public static function LoadDataTable($searchQuery = "", $searchArray = array(), $columnName = array(), $columnSortOrder = array(), $start = 0, $offset = 0, $totCount = false) {
+ return parent::_loadDataTable(self::TABLE_NAME, $searchQuery, $searchArray, $columnName, $columnSortOrder, $start, $offset, $totCount);
+ }
+
+
+ /**
+ * Funzione di verifica dei dati POST prima del salvataggio
+ */
+ public static function checkVerificaDatiPreSalvataggio() {
+ global $LoggedAccount;
+ $_POST['CODICE_FISCALE'] = Utils::get_filter_string_POST('CODICE_FISCALE');
+ }
+
+ public function checkDatiPreSave() {
+ global $LoggedAccount;
+ $response = array();
+
+ $controllValidita = true;
+ $dati_mancanti = '';
+ if ($this->UID_FIREBASE_ADMIN == "") {
+ $controllValidita = false;
+ $dati_mancanti .= "
GUID ";
+ }
+ if ($this->CODICE_FISCALE == "") {
+ $controllValidita = false;
+ $dati_mancanti .= "
Codice Fiscale dell'utente da impersonificare ";
+ }
+
+
+ $response['checkDati'] = $controllValidita;
+ $response['txt_dati_mancanti'] = $dati_mancanti;
+
+ return $response;
+ }
+
+
+
+ public function Save() {
+ global $con, $LoggedAccount;
+ $vars = get_object_vars($this);
+// unset($vars["DATA_RICHIESTA"]);
+ $sql = Utils::prepareQuery(self::TABLE_NAME, $vars);
+ /* Utils::print_array($sql);
+ Utils::print_array($vars); */
+ $queryabi = $con->prepare($sql);
+ foreach ($vars as $k => $v) {
+ if ($k == "ID" && $v == 0) {
+ continue;
+ }
+ $queryabi->bindValue(":" . $k, $v);
+ }
+ try {
+ $it = parent::_Save($queryabi);
+ if (trim($it['erroreCode']) == 'HY000') {
+ $it['erroreDescrizione'] = 'Richiesta già inserita!
Non è possibile inviare una richiesta di integrazione per la stessa domanda di sconto.';
+ }
+ } catch (Exception $exc) {
+ $it['erroreDescrizione'] = $exc->getMessage();
+ }
+ return $it;
+ }
+
+ public function Delete() {
+ return parent::_Delete(self::TABLE_NAME, "ID = " . $this->ID);
+ }
+
+
+ public function Parse(&$record, $campo = "") {
+ array_push($record, array("Campo" => $campo, "Valore" => $this->$campo));
+ }
+
+
+
+}
diff --git a/lib/classes/ModuloPdf.php b/lib/classes/ModuloPdf.php
index 156f203..cb1e86a 100644
--- a/lib/classes/ModuloPdf.php
+++ b/lib/classes/ModuloPdf.php
@@ -68,3 +68,38 @@ class PdfMandato extends TCPDF {
}
+class PdfRichiestaIntegrazione extends TCPDF {
+
+ private $customFooterText = "";
+
+ //Page header
+ public function Header() {
+ }
+
+ public function setCustomFooterText($customFooterText) {
+ $this->customFooterText = $customFooterText;
+ }
+
+ // Page footer
+ public function Footer()
+ {
+ $this->SetY(-18);
+
+ $this->SetDrawColor(0, 0, 0);
+ $this->Line(15, $this->GetY(), 195, $this->GetY());
+
+ $this->Ln(2);
+
+ $this->SetFont('helvetica', '', 7);
+
+ $this->Cell(
+ 0,
+ 5,
+ 'Servizio 1 - Autotrasporto Persone Trasporto Regionale Aereo e Marittimo - Dirigente Generale: arch. Salvatore Lizzio',
+ 0,
+ 0,
+ 'C'
+ );
+ }
+
+}
\ No newline at end of file
diff --git a/lib/classes/Utils/Date.php b/lib/classes/Utils/Date.php
index 811949e..d4ffd6e 100644
--- a/lib/classes/Utils/Date.php
+++ b/lib/classes/Utils/Date.php
@@ -348,4 +348,23 @@ class Date {
$DateTime = $converteddate->format($format);
return $DateTime;
}
+
+
+ public static function convertiDataProtocollo(string $dataIso): string {
+ if (empty($dataIso)) {
+ return '';
+ }
+ // Tronca eventuali microsecondi a 6 cifre
+ $dataIso = preg_replace('/(\.\d{6})\d+/', '$1', $dataIso);
+
+ $dt = DateTime::createFromFormat('Y-m-d\TH:i:s.u', $dataIso);
+ if (!$dt) {
+ error_log("Parsing fallito: $dataIso");
+ return '';
+ }
+ return strtoupper($dt->format('d-M-y h:i:s')) . '.' .
+ str_pad($dt->format('u'), 6, '0', STR_PAD_RIGHT) . ' ' .
+ strtoupper($dt->format('A'));
+ }
+
}
\ No newline at end of file
diff --git a/lib/classes/Utils/EmailSms.php b/lib/classes/Utils/EmailSms.php
index a844838..0d9b218 100644
--- a/lib/classes/Utils/EmailSms.php
+++ b/lib/classes/Utils/EmailSms.php
@@ -589,5 +589,36 @@ class EmailSms {
}
return $value;
}
+
+
+ public static function sendGenericEmail($destinatario = "", $oggetto = "", $testo = "") {
+ if (!INVIO_EMAIL)
+ return 1;
+ date_default_timezone_set('Etc/UTC');
+ $mail = new PHPMailer;
+ $mail->IsSMTP();
+ $mail->CharSet = "UTF-8";
+ $mail->SMTPDebug = 0;
+ $mail->Debugoutput = 'html';
+ $mail->Host = EMAIL_HOST;
+ $mail->Port = EMAIL_PORT;
+ $mail->SMTPSecure = 'tls';
+ $mail->SMTPAuth = true;
+ $mail->Username = EMAIL_USERNAME;
+ $mail->Password = EMAIL_PASSWORD;
+ $mail->setFrom(EMAIL_SENDER, EMAIL_SENDER_DESCRIPTION);
+ $mail->addAddress($destinatario, $destinatario);
+ $mail->Subject = $oggetto;
+ $mail->msgHTML($testo);
+ $mail->AltBody = $testo;
+ if (!$mail->send()) {
+ $value = "Mailer Error: " . $mail->ErrorInfo;
+// Utils::print_array($value);
+ $value = 0;
+ } else {
+ $value = 1;
+ }
+ return $value;
+ }
}
diff --git a/lib/classes/Voli/Estrazioni.php b/lib/classes/Voli/Estrazioni.php
index c0737f0..540fa43 100644
--- a/lib/classes/Voli/Estrazioni.php
+++ b/lib/classes/Voli/Estrazioni.php
@@ -15,6 +15,11 @@ class Esportazioni extends DataClass
public $FILEPATH = null;
public $TIPO = null;
public $IMPORTO_MANDATO = null;
+ public $MESE_RIFERIMENTO = '';
+ public $CAPITOLO_BILANCIO = '';
+ public $ANNO_FINANZIARIO = '';
+ public $CODICE_FINANZIARIO = '';
+ public $FILEPATH_DRS = null;
public function __construct($src = null)
{
diff --git a/lib/classes/Voli/RichiestaIntegrazione.php b/lib/classes/Voli/RichiestaIntegrazione.php
new file mode 100644
index 0000000..8d0df0f
--- /dev/null
+++ b/lib/classes/Voli/RichiestaIntegrazione.php
@@ -0,0 +1,395 @@
+ 0) {
+ $this->_loadAndFillObject($src['ID'], self::TABLE_NAME, $src);
+ } else {
+ $this->_loadByRow($src, $stripSlashes);
+ }
+ } elseif (intval($src)) {
+ $sql = "SELECT * FROM " . self::TABLE_NAME . " WHERE ID = :id";
+ $query = $con->prepare($sql);
+ $query->bindParam(":id", $src);
+ try {
+ $query->execute();
+ $it = $query->fetchAll(PDO::FETCH_ASSOC);
+ Utils::FillObjectFromRow($this, $it[0]);
+ } catch (Exception $exc) {
+ $exc->getMessage();
+ }
+ }
+ }
+
+ public static function Count($filter = null) {
+ return parent::_count(self::TABLE_NAME, $filter);
+ }
+
+ public static function LoadDataTable($searchQuery = "", $searchArray = array(), $columnName = array(), $columnSortOrder = array(), $start = 0, $offset = 0) {
+
+ return parent::_loadDataTable(self::TABLE_NAME, $searchQuery, $searchArray, $columnName, $columnSortOrder, $start, $offset);
+ }
+
+ public static function load($id = 0, $stato = "") {
+ global $con, $LoggedAccount;
+ $rows = array();
+ if (intval($id) > 0) {
+
+ if (!empty($stato)) {
+ $filter = "AND STATO = :stato ";
+ } else {
+ $filter = "";
+ }
+
+
+ $sql = "SELECT * FROM " . self::TABLE_NAME . " WHERE ID=:id " . $filter . " ORDER BY ID ASC ";
+ $query = $con->prepare($sql);
+ $query->bindParam(":id", $id);
+ if (!empty($stato)) {
+ $query->bindParam(":stato", $stato);
+ }
+
+ try {
+ $query->execute();
+ $rows = $query->fetchAll(PDO::FETCH_ASSOC);
+ } catch (Exception $exc) {
+ $exc->getMessage();
+ }
+ }
+ return $rows;
+ }
+
+ public static function loadFromDomanda($id_domanda = 0, $stato = "") {
+ global $con, $LoggedAccount;
+ $rows = array();
+ if (intval($id_domanda) > 0) {
+
+ if (!empty($stato)) {
+ $filter = "AND STATO = :stato ";
+ } else {
+ $filter = "";
+ }
+
+ $integrazione = new RichiestaIntegrazione();
+ $sql = "SELECT * FROM " . self::TABLE_NAME . " WHERE ID_DOMANDA_SCONTI=:id " . $filter . " ORDER BY ID ASC ";
+ $query = $con->prepare($sql);
+ $query->bindParam(":id", $id_domanda);
+ if (!empty($stato)) {
+ $query->bindParam(":stato", $stato);
+ }
+
+ try {
+ $query->execute();
+ $rows = $query->fetch(PDO::FETCH_ASSOC);
+ Utils::FillObjectFromRow($integrazione, $rows);
+ } catch (Exception $exc) {
+ $exc->getMessage();
+ }
+ }
+ return $integrazione;
+ }
+
+ public function Save() {
+ global $con, $LoggedAccount;
+ $vars = get_object_vars($this);
+ unset($vars["DATA_RICHIESTA"]);
+ $sql = Utils::prepareQuery(self::TABLE_NAME, $vars);
+ /* Utils::print_array($sql);
+ Utils::print_array($vars); */
+ $queryabi = $con->prepare($sql);
+ foreach ($vars as $k => $v) {
+ if ($k == "ID" && $v == 0) {
+ continue;
+ }
+ $queryabi->bindValue(":" . $k, $v);
+ }
+ try {
+ $it = parent::_Save($queryabi);
+ if (trim($it['erroreCode']) == 'HY000') {
+ $it['erroreDescrizione'] = 'Richiesta già inserita!
Non è possibile inviare una richiesta di integrazione per la stessa domanda di sconto.';
+ }
+ } catch (Exception $exc) {
+ $it['erroreDescrizione'] = $exc->getMessage();
+ }
+ return $it;
+ }
+
+ public function Parse(&$record, $campo = "") {
+ array_push($record, array("Campo" => $campo, "Valore" => $this->$campo));
+ }
+
+ public function calcolaScadenzaDaInvio(): void {
+ if (!empty($this->DATA_INVIO_NOTIFICA)) {
+ try {
+ $dataInvio = new DateTime($this->DATA_INVIO_NOTIFICA);
+ $dataInvio->modify('+30 days');
+ $this->SCADENZA = $dataInvio->format('d-M-y');
+ $this->DATA_INVIO_NOTIFICA = Date::dateOracleDate($this->DATA_INVIO_NOTIFICA, 'd-M-y');
+ } catch (Exception $e) {
+ // Gestione errore se la data è malformata
+ error_log("Errore nel calcolo della scadenza: " . $e->getMessage());
+ $this->SCADENZA = null;
+ }
+ } else {
+ // Nessuna data di invio => nessuna scadenza calcolabile
+ $this->SCADENZA = null;
+ }
+ }
+}
+
+class CallSoapProtocollo {
+
+ private string $wsdl;
+ private string $location;
+ private SoapClient $client;
+
+ public function __construct(string $wsdl, string $location) {
+ $this->wsdl = $wsdl;
+ $this->location = $location;
+
+ $this->client = new SoapClient($this->wsdl, [
+ 'location' => $this->location,
+ 'style' => SOAP_RPC,
+ 'use' => SOAP_ENCODED,
+ 'soap_version' => SOAP_1_1,
+ 'cache_wsdl' => WSDL_CACHE_NONE,
+ 'connection_timeout' => 15,
+ 'encoding' => 'UTF-8',
+ 'exceptions' => true,
+ 'stream_context' => stream_context_create([
+ 'ssl' => [
+ 'verify_peer' => false,
+ 'verify_peer_name' => false,
+ 'allow_self_signed' => true
+ ]
+ ]),
+ 'trace' => 1
+ ]);
+ }
+
+ public function inviaRichiesta(string $funzione, array $parametri): ?array {
+ try {
+ // Chiamata SOAP
+ $response = $this->client->__soapCall($funzione, $parametri);
+// echo "=== XML inviato ===\n";
+// echo $this->client->__getLastRequest();
+ // Ultima risposta XML raw
+ $lastResponse = $this->client->__getLastResponse();
+
+ if (empty($lastResponse)) {
+ error_log("Risposta SOAP vuota.");
+ return null;
+ }
+ // Carica XML SOAP
+ $soap = simplexml_load_string($lastResponse);
+
+ // Naviga nel corpo: soap:Body -> InserisciProtocolloEAnagraficheStringResponse -> InserisciProtocolloEAnagraficheStringResult
+ $body = $soap->children('http://schemas.xmlsoap.org/soap/envelope/')->Body;
+ $risposta = $body->children('http://tempuri.org/')->InserisciProtocolloEAnagraficheStringResponse;
+ $resultXmlEscaped = (string) $risposta->InserisciProtocolloEAnagraficheStringResult;
+
+ // Decodifica da HTML entities a XML puro
+ $resultXml = html_entity_decode($resultXmlEscaped);
+
+ // Parsing XML interno
+ $internalXml = simplexml_load_string($resultXml);
+ if (!$internalXml) {
+ error_log("Parsing XML interno fallito.");
+ return null;
+ }
+ // Conversione in array
+ return json_decode(json_encode($internalXml), true);
+ } catch (SoapFault $e) {
+ // Log o gestione errore SOAP
+// error_log("Errore SOAP: " . $e->getMessage());
+// echo "
" . print_r($e, true) . "
";
+ return null;
+ } catch (Exception $e) {
+ // Errori generici
+// error_log("Errore generico: " . $e->getMessage());
+// echo "" . print_r($e, true) . "
";
+ return null;
+ }
+ }
+
+ public function getUltimaRispostaRaw(): string {
+ return $this->client->__getLastResponse();
+ }
+}
+
+class IntegrazioniEmailQueue extends DataClass {
+
+ const TABLE_NAME = "INTEGRAZIONI_EMAIL_QUEUE";
+ const SEQ_NAME = 'SEQ_EMAIL_QUEUE';
+
+ public $ID = 0;
+ public $ID_RICHIESTA = 0;
+ public $DESTINATARIO = "";
+ public $OGGETTO = "";
+ public $CORPO = "";
+ public $STATO = 0; //-- 1 = INVIATA, 99 = ERRORE
+ public $TENTATIVI = 0;
+ public $ERRORE_MESSAGGIO = "";
+ public $DATA_INSERIMENTO = null;
+ public $DATA_INVIO = null;
+
+ public function __construct($src = null) {
+ global $con;
+ if ($src == null) {
+ return;
+ }
+ $stripSlashes = 0;
+ if (is_array($src)) {
+ if (isset($src['ID']) && $src['ID'] > 0) {
+ $this->_loadAndFillObject($src['ID'], self::TABLE_NAME, $src);
+ } else {
+ $this->_loadByRow($src, $stripSlashes);
+ }
+ } elseif (intval($src)) {
+ $sql = "SELECT * FROM " . self::TABLE_NAME . " WHERE ID = :id";
+ $query = $con->prepare($sql);
+ $query->bindParam(":id", $src);
+ try {
+ $query->execute();
+ $it = $query->fetchAll(PDO::FETCH_ASSOC);
+ Utils::FillObjectFromRow($this, $it[0]);
+ } catch (Exception $exc) {
+ $exc->getMessage();
+ }
+ }
+ }
+
+ public static function load($id = 0, $stato = "") {
+ global $con, $LoggedAccount;
+ $rows = array();
+ if (intval($id) > 0) {
+
+ if (!empty($stato)) {
+ $filter = "AND STATO = :stato ";
+ } else {
+ $filter = "";
+ }
+
+
+ $sql = "SELECT * FROM " . self::TABLE_NAME . " WHERE ID=:id " . $filter . " ORDER BY ID ASC ";
+ $query = $con->prepare($sql);
+ $query->bindParam(":id", $id);
+ if (!empty($stato)) {
+ $query->bindParam(":stato", $stato);
+ }
+
+ try {
+ $query->execute();
+ $rows = $query->fetchAll(PDO::FETCH_ASSOC);
+ } catch (Exception $exc) {
+ $exc->getMessage();
+ }
+ }
+ return $rows;
+ }
+
+ public static function loadQueue($stato = 0) {
+ global $con, $LoggedAccount;
+ $rows = array();
+ if (!empty($stato)) {
+ $filter = "AND STATO = :stato ";
+ } else {
+ $filter = "";
+ }
+
+ $sql = "SELECT * FROM " . self::TABLE_NAME . " WHERE ID > 0 " . $filter . " ORDER BY DATA_INSERIMENTO ASC ";
+ $query = $con->prepare($sql);
+ if (!empty($stato)) {
+ $query->bindParam(":stato", $stato);
+ }
+
+ try {
+ $query->execute();
+ $rows = $query->fetchAll(PDO::FETCH_ASSOC);
+ } catch (Exception $exc) {
+ $exc->getMessage();
+ }
+
+ return $rows;
+ }
+
+ public static function Count($filter = null) {
+ return parent::_count(self::TABLE_NAME, $filter);
+ }
+
+ public function Save() {
+ global $con, $LoggedAccount;
+ $vars = get_object_vars($this);
+ unset($vars["DATA_INSERIMENTO"]);
+ $sql = Utils::prepareQuery(self::TABLE_NAME, $vars);
+ /* Utils::print_array($sql);
+ Utils::print_array($vars); */
+ $queryabi = $con->prepare($sql);
+ foreach ($vars as $k => $v) {
+ if ($k == "ID" && $v == 0) {
+ continue;
+ }
+ $queryabi->bindValue(":" . $k, $v);
+ }
+ try {
+ $it = parent::_Save($queryabi);
+ if (trim($it['erroreCode']) == 'HY000') {
+ $it['erroreDescrizione'] = 'Richiesta già inserita!
Non è possibile inviare una richiesta di integrazione per la stessa domanda di sconto.';
+ }
+ } catch (Exception $exc) {
+ $it['erroreDescrizione'] = $exc->getMessage();
+ }
+ return $it;
+ }
+
+ public function Parse(&$record, $campo = "") {
+ array_push($record, array("Campo" => $campo, "Valore" => $this->$campo));
+ }
+
+ public function processaCodaEmail() {
+ global $con, $LoggedAccount;
+ $rows = $this->loadQueue(0); // Stato 0 = In attesa di invio
+
+ foreach ($rows as $row) {
+ $emailQueue = new IntegrazioniEmailQueue($row['ID']);
+ $emailQueue->STATO = 1; // Imposta lo stato a "Inviata"
+ $emailQueue->DATA_INVIO = date(FORMAT_TIMESTAMP_ORACLE);
+
+ // Invia l'email (logica di invio email non implementata qui)
+ // ...
+ // Salva lo stato aggiornato
+ $emailQueue->Save();
+ }
+ }
+}
diff --git a/lib/config/avviso.config.php b/lib/config/avviso.config.php
index e2a2cc9..9a81552 100644
--- a/lib/config/avviso.config.php
+++ b/lib/config/avviso.config.php
@@ -77,6 +77,7 @@ define('PRESENTATA', PREPARATA);
define('AMMESSA', 3);
define('NONAMMESSA', 4);
define('CHIUSA', 5);
+define('INTEGRAZIONI', 33);
define('ANNULLATA', 999);
//
@@ -87,6 +88,7 @@ $STATI_DOMANDA = array(
AMMESSA => "AMMESSA AD AGEVOLAZIONE",
NONAMMESSA => "NON AMMESSA AD AGEVOLAZIONE",
CHIUSA => "CHIUSA",
+ INTEGRAZIONI => "RICHIESTA INTEGRAZIONI",
ANNULLATA => "ANNULLATA"
);
@@ -105,7 +107,8 @@ $COLOR_STATI_DOMANDA = array(
AMMESSA => "#046500",
NONAMMESSA => "#e80000",
CHIUSA => "#790000",
- ANNULLATA => "#790000"
+ ANNULLATA => "#790000",
+ INTEGRAZIONI => "#ff0000"
);
define('STATO_DOMANDA_IN_PREPARAZIONE', INPREPARAZIONE);
@@ -115,6 +118,7 @@ define('STATO_DOMANDA_AMMESSA', AMMESSA);
define('STATO_DOMANDA_NON_AMMESSA', NONAMMESSA);
define('STATO_DOMANDA_CHIUSA', CHIUSA);
define('STATO_DOMANDA_ANNULLATA', ANNULLATA);
+define('STATO_DOMANDA_INTEGRAZIONI', INTEGRAZIONI);
$CATEGORIE_NEWS = array(
1 => "Generiche",
@@ -228,6 +232,7 @@ define('RS_IN_ELABORAZIONE', 0);
define('RS_PRESA_IN_CARICO', 1);
define('RS_APPROVATA', 2);
define('RS_EROGATA', 3);
+define('RS_INTEGRAZIONE', 33);
define('RS_NON_APPROVATA', 99);
define('RS_ANNULLATE_UFFICIO', 999);
@@ -236,6 +241,7 @@ $STATI_RICHIESTE_SCONTI = array(
RS_PRESA_IN_CARICO => "PRESA IN CARICO",
RS_APPROVATA => "APPROVATO",
RS_EROGATA => "IN EROGAZIONE",
+ RS_INTEGRAZIONE => "RICHIESTA INTEGRAZIONE",
RS_NON_APPROVATA => "NON APPROVATO",
RS_ANNULLATE_UFFICIO => "ANNULLATE",
);
@@ -245,8 +251,9 @@ $COLOR_SRICHIESTE_SCONTI = array(
RS_PRESA_IN_CARICO => "#ff9e00",
RS_APPROVATA => "#018522",
RS_EROGATA => "#046500",
+ RS_INTEGRAZIONE => "#fac31b",
RS_NON_APPROVATA => "#e80000",
- RS_ANNULLATE_UFFICIO => "#ff0000"
+ RS_ANNULLATE_UFFICIO => "#ff0000",
);
$ICONE_STATI_RICHIESTE_SCONTI = array(
@@ -256,9 +263,24 @@ $ICONE_STATI_RICHIESTE_SCONTI = array(
RS_EROGATA => '',
RS_NON_APPROVATA => '',
RS_ANNULLATE_UFFICIO => '',
+ RS_INTEGRAZIONE => '',
);
+define("RI_INTEGRAZIONE_IN_ATTESA", 'IN_ATTESA');
+define("RI_INTEGRAZIONE_INSERITO", 'INSERITO');
+define("RI_INTEGRAZIONE_VALIDATO", 'VALIDATO');
+define("RI_INTEGRAZIONE_RIGETTATO", 'RIGETTATO');
+define("RI_INTEGRAZIONE_SCADUTO", 'SCADUTO');
+
+$COLOR_CARD_INTEGRAZIONE = array(
+ RI_INTEGRAZIONE_IN_ATTESA => "bg-warning",
+ RI_INTEGRAZIONE_INSERITO => "bg-warning text-white",
+ RI_INTEGRAZIONE_VALIDATO => "bg-success text-white",
+ RI_INTEGRAZIONE_RIGETTATO => "bg-danger",
+ RI_INTEGRAZIONE_SCADUTO => "bg-danger text-white"
+);
+global $TIPO_RICHIESTE_RIMBORSO_ISOLE, $FESTIVI, $UTENTI_NON_ABILITATI_IMPORTO, $COLOR_CARD_INTEGRAZIONE;
define("IMPORTO_MINIMO_VOLO", 1);
@@ -303,3 +325,35 @@ $TIPO_RICHIESTA = array(
define("PERCENTUALE_RESIDENTI", "0.015");
define("PERCENTUALE_PRIORITARI", "0.015");
+
+define("FRONTEND_URL", "http://voli-fe.localhost/login_spid.php");
+
+
+/*start protocollo regione siciliana*/
+define("WS_PROTOCOLLO", "http://93.41.160.67/ulisse/iride/web_services_20/WSprotocolloDM/WSProtocolloDM.asmx");
+define("WSDL_PROTOCOLLO", ROOT."assets/wsdl/WSProtocolloDM.asmx_wsdl");
+define("PROTO_CLASSIFICA", "");
+define("PROTO_TIPODOCUMENTO", "");
+define("PROTO_ORIGINE", "A");
+define("PROTO_AGGIORNAANAGRAFICHE", "F");
+define("PROTO_INCARICOA", "");
+define("PROTO_NUMEROPRATICA", "");
+define("PROTO_UTENTE", "");
+define("PROTO_RUOLO", "");
+define("PROTO_CODICEAMMINISTRAZIONE", "");
+define("PROTO_CODICEAOO","");
+/*end protocollo regione siciliana*/
+
+
+/* start email config */
+define("EMAIL_HOST", "");
+define("EMAIL_PORT", 25);
+define("EMAIL_USERNAME", "");
+define("EMAIL_PASSWORD", "");
+define("EMAIL_SENDER", "");
+define("EMAIL_SENDER_DESCRIPTION", "SiciliaPEI - Bando Caro Voli");
+/* end email config */
+
+
+define("ATTIVA_SOCCORSO_ISTRUTTORIO", 1);
+
diff --git a/lib/config/upload.config.php b/lib/config/upload.config.php
index 57a85ef..607b681 100644
--- a/lib/config/upload.config.php
+++ b/lib/config/upload.config.php
@@ -8,6 +8,7 @@ define("ROOT_UPLOAD_PRESENTAZIONE", ROOT_UPLOAD . "presentazione/");
define("ROOT_UPLOAD_PRESENTAZIONE_TMP", ROOT_UPLOAD . "presentazionetmp/");
define("ROOT_UPLOAD_PRESENTAZIONE_LOGS_P7M", "presentazionelogsp7m/");
define("ROOT_UPLOAD_PREPARAZIONE", ROOT_UPLOAD . "preparazione/");
+define("ROOT_UPLOAD_DRS", ROOT_UPLOAD . "MANDATI/");
/* SIZE */
diff --git a/lib/import/custom.php b/lib/import/custom.php
index fc62e72..4ab4645 100644
--- a/lib/import/custom.php
+++ b/lib/import/custom.php
@@ -17,5 +17,9 @@ require_once ROOT . "lib/classes/Affitti/DomandaScontiControlli.php";
require_once ROOT . "lib/classes/Voli/Aeroporti.php";
require_once ROOT . "lib/classes/Voli/Compagnie.php";
require_once ROOT . "lib/classes/Voli/Estrazioni.php";
+require_once ROOT . "lib/classes/Impersonificazione.php";
+require_once ROOT . "lib/classes/Voli/RichiestaIntegrazione.php";
+
+
?>
\ No newline at end of file
diff --git a/modules/private/domanda.php b/modules/private/domanda.php
index 6ac76b3..85a8f72 100644
--- a/modules/private/domanda.php
+++ b/modules/private/domanda.php
@@ -2,6 +2,8 @@
include '../../lib/api.php';
define('WS_MODULE', 'domanda');
+define('WS_MODULE_SCONTI', 'elenco_sconti');
+
$id_domanda = intval($_POST['domanda']);
define('THIS_PERMISSION', GRUPPO_ISTANZE);
define ('THIS_PERMISSION2' , GRUPPO_REGIONE);
@@ -478,6 +480,48 @@ exit();
});
}
+
+ function impersonificaUtente(codice_fiscale) {
+ Swal.fire({
+ title: 'Attenzione',
+ type: 'warning',
+ text: "Sei sicuro di voler proseguire con l'operazione selezionata?",
+ showCancelButton: true,
+ confirmButtonColor: "#31aa47",
+ confirmButtonText: "OK",
+ cancelButtonText: "ANNULLA",
+ closeOnConfirm: true,
+ closeOnCancel: true
+ }).then((result) => {
+ if (result.value == true) {
+ var object = {
+ module: "impersonificazione",
+ action: "saveRichiesta",
+ CODICE_FISCALE: codice_fiscale
+ };
+ $('#loader').show();
+ postdataClassic(WS_CALL, object, function (response, textStatus, xhr) {
+ var risp = jQuery.parseJSON(response);
+ if (risp.esito === 1) {
+ $('#loader').hide();
+ $.redirect("=FRONTEND_URL?>", {
+ id: risp.dati.id,
+ guid: risp.dati.guid,
+ cf: risp.dati.cf,
+ });
+ } else {
+ $('#loader').hide();
+ functionSwall('error', risp.erroreDescrizione, "");
+ }
+ }), function (reason) {
+ loader("hide");
+ console.log(reason);
+ swalfunction("error", "Errore " + reason.status)
+ };
+ }
+ });
+ }
+