Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
486 righe
20 KiB
486 righe
20 KiB
<?php |
|
|
|
require_once ROOT . "lib/classes/IDataClass.php"; |
|
|
|
/** |
|
* Description of DomandaContratti |
|
* |
|
* @author Anselmo |
|
*/ |
|
class DomandaSconti extends DataClass { |
|
|
|
const TABLE_NAME = "DOMANDA_SCONTI"; |
|
const VIEW = "VIEW_EXPORT_SCONTI"; |
|
const SEQ_NAME = "DOMANDA_SCONTI_ID_SEQ"; |
|
|
|
// const FNZ_SLOTCONTRATTI = "FNSLOTCONTRATTI"; |
|
public $ID = 0; |
|
public $ID_DOMANDA = 0; |
|
public $COGNOME = ""; |
|
public $NOME = ""; |
|
public $DATA_NASCITA = null; |
|
public $RAPPORTO_PARENTELA = 0; |
|
public $CODICE_FISCALE = ""; |
|
public $COMUNE_RESIDENZA = ""; |
|
public $PROV_RESIDENZA = ""; |
|
public $CAP_RESIDENZA = ""; |
|
public $STUDENTE = 0; |
|
public $DISABILE = 0; |
|
public $PRIORITY = 0; |
|
public $COMPAGNIA_AEREA = ""; |
|
public $NUMERO_VOLO = ""; |
|
public $DATA_ACQUISTO = null; |
|
public $DATA_VOLO = null; |
|
public $COSTO_TRATTA = 0; |
|
public $AEROPORTO_PARTENZA = ""; |
|
public $AEROPORTO_PARTENZA_CODICE = ""; |
|
public $AEROPORTO_DESTINAZIONE = ""; |
|
public $AEROPORTO_DESTINAZIONE_CODICE = ""; |
|
public $FILEPATH_BIGLIETTO = ""; |
|
public $FILEPATH_CARTAIMBARCO = ""; |
|
public $ISEE = 0; |
|
public $DATA_RILASCIO_ISEE = null; |
|
public $FILEPATH_ISEE = ""; |
|
public $IBAN = ""; |
|
public $ISTITUTO_CREDITO = ""; |
|
public $FILIALE_CREDITO = ""; |
|
public $STATO = 0; |
|
public $DATA_REGISTRAZIONE = null; |
|
public $ID_UID_FIREBASE = 0; |
|
public $DATA_ESPORTAZIONE = null; |
|
public $DATA_ESITO = null; |
|
public $DATA_EROGAZIONE = null; |
|
public $NOTE = ""; |
|
public $SCONTO_TOTALE = 0; |
|
public $COMPAGNIA_ID = 0; |
|
public $FORZA_RESIDENZA = 0; |
|
public $CITTADINANZA = 0; |
|
public $FILEPATH_BIGLIETTO_HASH = ""; |
|
public $FILEPATH_CARTAIMBARCO_HASH = ""; |
|
|
|
public function __construct($src = null) { |
|
global $con; |
|
if ($src == null) { |
|
return; |
|
} |
|
if (is_array($src)) { |
|
if (isset($src['ID']) && $src['ID'] > 0) { |
|
$this->_loadAndFillObject($src['ID'], self::TABLE_NAME, $src); |
|
} else { |
|
$this->_loadByRow($src); |
|
} |
|
} 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(); |
|
} |
|
} |
|
} |
|
|
|
/** |
|
* |
|
* @param type $filter |
|
* @return type |
|
*/ |
|
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::VIEW, $searchQuery, $searchArray, $columnName, $columnSortOrder, $start, $offset); |
|
} |
|
|
|
/** |
|
* |
|
* @global type $con |
|
* @global type $LoggedAccount |
|
* @param type $id_domanda |
|
* @return type array |
|
*/ |
|
public static function load($id_domanda = 0, $stato) { |
|
global $con, $LoggedAccount; |
|
$rows = array(); |
|
if (intval($id_domanda) > 0) { |
|
|
|
if ($stato == RS_IN_ELABORAZIONE) { |
|
$filter = "AND STATO = :stato "; |
|
} elseif ($stato == RS_PRESA_IN_CARICO) { |
|
$filter = "AND STATO >= :stato "; |
|
} else { |
|
$filter = ""; |
|
} |
|
|
|
|
|
$sql = "SELECT * FROM " . self::VIEW . " WHERE ID_DOMANDA=:id_domanda " . $filter . " ORDER BY ID_DOMANDA ASC "; |
|
$query = $con->prepare($sql); |
|
$query->bindParam(":id_domanda", $id_domanda); |
|
if ($stato >= 0) { |
|
$query->bindParam(":stato", $stato); |
|
} |
|
|
|
try { |
|
$query->execute(); |
|
$rows = $query->fetchAll(PDO::FETCH_ASSOC); |
|
} catch (Exception $exc) { |
|
$exc->getMessage(); |
|
} |
|
} |
|
return $rows; |
|
} |
|
|
|
public static function checkVerificaDatiPreSalvataggio() { |
|
global $LoggedAccount; |
|
$domanda = Domanda::loadDomandaFromAccount(); |
|
$_POST['ID'] = intval(Utils::get_filter_int_POST('ID')); |
|
$_POST['ID_DOMANDA'] = $domanda->ID; |
|
$_POST['CODICE_FISCALE'] = Utils::get_filter_string_POST('CODICE_FISCALE'); |
|
$_POST['NUMERO_VOLO'] = Utils::get_filter_string_POST('NUMERO_VOLO'); |
|
$_POST['DATA_ACQUISTO'] = Utils::get_filter_string_POST('DATA_ACQUISTO'); |
|
$_POST['DATA_VOLO'] = Utils::get_filter_string_POST('DATA_VOLO'); |
|
$_POST['AEROPORTO_PARTENZA'] = Utils::get_filter_string_POST('AEROPORTO_PARTENZA'); |
|
$_POST['AEROPORTO_PARTENZA_CODICE'] = Utils::get_filter_string_POST('AEROPORTO_PARTENZA_CODICE'); |
|
$_POST['AEROPORTO_DESTINAZIONE'] = Utils::get_filter_string_POST('AEROPORTO_DESTINAZIONE'); |
|
$_POST['AEROPORTO_DESTINAZIONE_CODICE'] = Utils::get_filter_string_POST('AEROPORTO_DESTINAZIONE_CODICE'); |
|
$_POST['COMPAGNIA_AEREA'] = Utils::get_filter_string_POST('COMPAGNIA_AEREA'); |
|
$_POST['COSTO_TRATTA'] = Utils::get_filter_string_POST('COSTO_TRATTA'); |
|
$_POST['FORZA_RESIDENZA'] = Utils::get_filter_string_POST('FORZA_RESIDENZA'); |
|
// $_POST['FORZA_RESIDENZA'] = (strtolower($_POST['FORZA_RESIDENZA']) == 'on' ? 1 : 0); |
|
$_POST['CITTADINANZA'] = Utils::get_filter_string_POST('CITTADINANZA'); |
|
} |
|
|
|
public function checkDatiPreSave() { |
|
global $LoggedAccount, $SCALI_FASE1, $TRATTE_ESCLUSE; |
|
$response = array(); |
|
|
|
$controllValidita = true; |
|
$dati_mancanti = ''; |
|
|
|
$compagnieAderenti = explode("|", COMPAGNIE_ADERENTI); |
|
if (!(in_array($this->COMPAGNIA_ID, $compagnieAderenti)) || |
|
!(in_array($this->AEROPORTO_PARTENZA_CODICE, $SCALI_FASE1) && in_array($this->AEROPORTO_DESTINAZIONE_CODICE, $SCALI_FASE1))) { |
|
//voli fase 1 |
|
$this->FORZA_RESIDENZA = 0; |
|
} |
|
|
|
if (trim($this->CODICE_FISCALE) == '') { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>Il codice fiscale del passeggero</b><br> "; |
|
} |
|
if (trim($this->NUMERO_VOLO) == '') { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>Il numero del volo</b><br> "; |
|
} |
|
if (!Utils::VerificaNumeroBigliettoAereo(trim($this->NUMERO_VOLO))) { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>Il numero del volo non è corretto</b><br> "; |
|
} |
|
|
|
if (trim($this->DATA_ACQUISTO) == '') { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>La data di acquisto del biglietto</b><br> "; |
|
} else { |
|
$this->DATA_ACQUISTO = Date::dateOracleDate($this->DATA_ACQUISTO, 'd-m-Y'); |
|
$checkRilascio = Date::checkSaveDate(MIN_DATA_ACQUISTO_BIGLIETTO_PHP, $this->DATA_ACQUISTO, "", true); |
|
if ($checkRilascio['esito'] != 1) { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>Data di acquisto del biglietto minore del " . MIN_DATA_ACQUISTO_BIGLIETTO_PHP . " </b>"; |
|
} |
|
} |
|
if (trim($this->DATA_VOLO) == '') { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>La data del volo</b><br> "; |
|
} |
|
|
|
/* if (trim($this->CITTADINANZA) == '') { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>Campo Cittadinanza</b><br> "; |
|
} */ |
|
if (trim($this->AEROPORTO_PARTENZA) == '' || trim($this->AEROPORTO_PARTENZA_CODICE) == '') { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>L'aeroporto di partenza</b><br> "; |
|
} |
|
if (trim($this->AEROPORTO_DESTINAZIONE) == '' || trim($this->AEROPORTO_DESTINAZIONE_CODICE) == '') { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>L'aeroporto di destinazione</b><br> "; |
|
} |
|
if (trim($this->COMPAGNIA_AEREA) == '') { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>La compagnia aerea</b><br> "; |
|
} |
|
|
|
|
|
if ( |
|
isset($TRATTE_ESCLUSE[$this->COMPAGNIA_ID]) && |
|
in_array( |
|
$this->AEROPORTO_PARTENZA_CODICE . '-' . $this->AEROPORTO_DESTINAZIONE_CODICE, |
|
$TRATTE_ESCLUSE[$this->COMPAGNIA_ID], |
|
true |
|
) |
|
) { |
|
$controllValidita = false; |
|
$dati_mancanti .= "<br><b>La tratta selezionata non è disponibile per la compagnia indicata.</b><br>"; |
|
} |
|
|
|
|
|
|
|
if (intval($this->COSTO_TRATTA) == 0 || trim($this->COSTO_TRATTA) == '') { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>Il costo del volo per singola tratta</b><br> "; |
|
} |
|
|
|
if (trim($this->FILEPATH_BIGLIETTO) == '') { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>Il file del biglietto elettronico: formato atteso PDF, dimensione max 30mb</b><br> "; |
|
} |
|
if (trim($this->FILEPATH_CARTAIMBARCO) == '') { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>Il file della carta di imbarco: formato atteso PDF, dimensione max 30mb</b><br> "; |
|
} |
|
|
|
$checkContratto = Date::checkSaveDate($this->DATA_VOLO); |
|
if ($checkContratto['esito'] != 1) { |
|
$controllValidita = false; |
|
$dati_mancanti .= "Controllo data volo: " . $checkContratto['erroreDescrizione'] . "<br>"; |
|
} |
|
|
|
if (trim($this->CODICE_FISCALE) == '' || strlen(trim($this->CODICE_FISCALE)) < MIN_CF || strlen(trim($this->CODICE_FISCALE)) > MAX_CF) { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>Il campo passeggero</b><br> "; |
|
} |
|
if (CONTROLLO_FORMATTAZIONE_CF && !Utils::ControlloCodiceFiscale(trim($this->CODICE_FISCALE))) { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>Il codice fiscale del beneficiario non è valido</b><br> "; |
|
} |
|
if (!$LoggedAccount->isNucleoFamiliare(trim($this->CODICE_FISCALE))) { |
|
$controllValidita = false; |
|
$dati_mancanti .= " <br><b>Il codice fiscale del beneficiario non è presente nel proprio nucleo familiare</b><br> "; |
|
} else { |
|
$beneficiario = AccountNucleoFamiliare::loadFromCf(trim($this->CODICE_FISCALE)); |
|
$this->COGNOME = $beneficiario->COGNOME; |
|
$this->NOME = $beneficiario->NOME; |
|
$this->DATA_NASCITA = $beneficiario->DATA_NASCITA; |
|
$this->RAPPORTO_PARENTELA = $beneficiario->RAPPORTO_PARENTELA; |
|
/* $this->COMUNE_RESIDENZA = $beneficiario->COMUNE_RESIDENZA; |
|
$this->PROV_RESIDENZA = $beneficiario->PROV_RESIDENZA; |
|
$this->CAP_RESIDENZA = $beneficiario->CAP_RESIDENZA; |
|
$this->STUDENTE = $beneficiario->STUDENTE; |
|
$this->DISABILE = $beneficiario->DISABILE; */ |
|
} |
|
|
|
// $checkNativoResidente = Utils::isNativoOrResidente("", $beneficiario->COMUNE_RESIDENZA, $beneficiario->CODICE_FISCALE); |
|
// if (!$checkNativoResidente) { |
|
// $controllValidita = false; |
|
// $dati_mancanti .= REQUISITI_NATIVO; |
|
// } |
|
|
|
|
|
$checkCittadinanza = Utils::checkCittadinanza($beneficiario->COMUNE_RESIDENZA, $beneficiario->CODICE_FISCALE /* , trim($this->CITTADINANZA) */); |
|
if (!$checkCittadinanza) { |
|
$controllValidita = false; |
|
$dati_mancanti .= REQUISITI_NATIVO; |
|
} |
|
|
|
|
|
|
|
$this->COSTO_TRATTA = str_replace(",", ".", $this->COSTO_TRATTA); |
|
|
|
$this->DATA_ACQUISTO = Date::dateOracleDate($this->DATA_ACQUISTO, 'd-M-y'); |
|
$this->DATA_VOLO = Date::dateOracleDate($this->DATA_VOLO, 'd-M-y'); |
|
|
|
/** Controllo maggiorenni |
|
* Nel caso in cui il rapporto di parentela con il dichiarante sia di TUTORE e il beneficiario abbia una disabilità maggiore di 67% |
|
* il controllo viene bypassato. |
|
*/ |
|
if (Date::GetEta(Date::dateOracleDateNascita($this->DATA_NASCITA, "d/m/Y"), Date::dateOracleDate($this->DATA_ACQUISTO, 'd/m/Y')) >= ETA_MINORENNI && $this->RAPPORTO_PARENTELA > 0 && ($this->RAPPORTO_PARENTELA < CODICE_TUTORE || ($this->RAPPORTO_PARENTELA == CODICE_TUTORE && Utils::isDisable($beneficiario->FLAG) == 0)) |
|
) { |
|
$controllValidita = false; |
|
$dati_mancanti .= "Il caricamento può essere effettuato solo per figli minori. Gli altri componenti del nucleo familiare maggiorenni, che intendono aderire alla richiesta di rimborso, dovranno effettuare apposito caricamento facendo accesso in piattaforma con il proprio SPID"; |
|
} |
|
|
|
/** |
|
* Inserire il controllo sulle nuove tratte e sulla data di attivazione prevista dal decreto Art. 1 |
|
*/ |
|
$dataVolo = new DateTime($this->DATA_VOLO); |
|
$dataAperturaTratte = new DateTime(DATA_APERTURA_TRATTE); |
|
|
|
// if (!self::isValidTratta($this->AEROPORTO_PARTENZA_CODICE, $this->COMPAGNIA_ID, $dataVolo) || |
|
// !self::isValidTratta($this->AEROPORTO_DESTINAZIONE_CODICE, $this->COMPAGNIA_ID, $dataVolo) |
|
// ) { |
|
// $controllValidita = false; |
|
// $dati_mancanti .= "Per la data scelta, la compagnia non effettua la tratta selezionata."; |
|
// } |
|
|
|
//if((!in_array($this->AEROPORTO_DESTINAZIONE_CODICE, $SCALI_FASE1) || !in_array($this->AEROPORTO_PARTENZA_CODICE, $SCALI_FASE1)) && $this->DATA_VOLO < DATA_APERTURA_TRATTE){ |
|
if ((!in_array($this->AEROPORTO_DESTINAZIONE_CODICE, $SCALI_FASE1) || !in_array($this->AEROPORTO_PARTENZA_CODICE, $SCALI_FASE1)) && $dataVolo < $dataAperturaTratte) { |
|
$controllValidita = false; |
|
$dati_mancanti .= LABEL_NO_TRATTE; |
|
} |
|
|
|
|
|
if ($this->FILEPATH_BIGLIETTO_HASH == $this->FILEPATH_CARTAIMBARCO_HASH) { |
|
$controllValidita = false; |
|
$dati_mancanti .= "Non è possibile caricare lo stesso file nel biglietto elettronico e nella carta d'imbarco"; |
|
} |
|
|
|
$response['checkDati'] = $controllValidita; |
|
$response['txt_dati_mancanti'] = $dati_mancanti; |
|
|
|
return $response; |
|
} |
|
|
|
public function isValidTratta($aeroporto, $compagnia, $data_volo) { |
|
global $TRATTE_SOSPESE; |
|
|
|
// di default la tratta è valida |
|
$return = true; |
|
|
|
if (!empty($aeroporto) && !empty($compagnia) && !empty($data_volo)) { |
|
// Normalizza la data del volo |
|
|
|
$dataVolo = ($data_volo instanceof DateTime) ? $data_volo : new DateTime($data_volo); |
|
|
|
if (!empty($TRATTE_SOSPESE[$aeroporto][$compagnia])) { |
|
$dataSospesaStr = $TRATTE_SOSPESE[$aeroporto][$compagnia]; |
|
$dataSospesa = new DateTime($dataSospesaStr); |
|
// Se la data volo è uguale o successiva alla sospensione → non valida |
|
if ($dataVolo >= $dataSospesa) { |
|
$return = false; |
|
} |
|
} |
|
} |
|
|
|
return $return; |
|
} |
|
|
|
public function isErasable() { |
|
global $LoggedAccount; |
|
$response = false; |
|
$domanda = Domanda::loadDomandaFromAccount(); |
|
if (($this->ID_DOMANDA == $domanda->ID) && $this->STATO == RS_IN_ELABORAZIONE) { |
|
$response = true; |
|
} |
|
return $response; |
|
} |
|
|
|
/** |
|
* |
|
* @global type $con |
|
* @global type $LoggedAccount |
|
* @return type |
|
*/ |
|
public function Save() { |
|
global $con, $LoggedAccount; |
|
$vars = get_object_vars($this); |
|
unset($vars["DATA_REGISTRAZIONE"]); |
|
unset($vars["DISABILE"]); |
|
unset($vars["STUDENTE"]); |
|
$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'] = '<b>Richiesta già inserita!</b><br/> Non è possibile richiedere un ulteriore rimborso per questo biglietto'; |
|
} |
|
} catch (Exception $exc) { |
|
$it['erroreDescrizione'] = $exc->getMessage(); |
|
} |
|
return $it; |
|
} |
|
|
|
public function Delete() { |
|
return parent::_Delete(self::TABLE_NAME, "ID = " . $this->ID); |
|
} |
|
|
|
public function DeleteAll() { |
|
return parent::_Delete(self::TABLE_NAME, "ID_DOMANDA = " . $this->ID_DOMANDA); |
|
} |
|
|
|
public function Parse(&$record, $campo = "") { |
|
array_push($record, array("Campo" => $campo, "Valore" => $this->$campo)); |
|
} |
|
|
|
public function getPathInfoDocumento() { |
|
$response = array(); |
|
$response["TIPO_DOCUMENTO"] = TIPO_UPLOAD_OBBLIGATORIO; |
|
$response["PATH_DOCUMENTO"] = "biglietti"; |
|
return $response; |
|
} |
|
|
|
public function VerificaDataVolo() { |
|
$response = Utils::initDefaultResponse(); |
|
$from = new DateTime(MIN_DATA_CONTRIBUTO); |
|
$to = new DateTime(MAX_DATA_CONTRIBUTO); |
|
$data_volo = new DateTime($this->DATA_VOLO); |
|
$out = new DateTime($this->DATA_VOLO); |
|
$oggi = new DateTime(); |
|
$out->add(new DateInterval('P' . MIN_DATA_VOLO . 'DT23H59M59S')); |
|
if ($data_volo <= $to && $data_volo >= $from && $out >= $oggi) { |
|
$response['esito'] = 1; |
|
} elseif ($out < $oggi) { |
|
$response['esito'] = -999; |
|
$response['erroreDescrizione'] = "La data del volo supera i " . MIN_DATA_VOLO . " giorni previsti dal bando"; |
|
} elseif ($data_volo > $to) { |
|
$response['esito'] = -999; |
|
$response['erroreDescrizione'] = "La data del volo supera la data della fine (" . $to->format('d-M-y') . ") del contributo prevista dal bando"; |
|
} elseif ($data_volo < $from) { |
|
$response['esito'] = -999; |
|
$response['erroreDescrizione'] = "La data del volo è antecedente la data di inizio (" . $from->format('d-M-y') . ") del contributo prevista dal bando"; |
|
} else { |
|
$response['esito'] = -999; |
|
} |
|
|
|
return $response; |
|
} |
|
|
|
public static function controlloMinoreCancellabile($codice_fiscale = "") { |
|
global $con; |
|
$return = array(); |
|
$return['NUM_DOMANDE'] = 0; |
|
$sel = $con->prepare("SELECT COUNT(ID) AS NUM_DOMANDE FROM " . self::TABLE_NAME . " WHERE CODICE_FISCALE=:CODICE_FISCALE AND STATO>0"); |
|
$sel->bindParam(":CODICE_FISCALE", $codice_fiscale); |
|
try { |
|
$sel->execute(); |
|
$it = $sel->fetch(PDO::FETCH_ASSOC); |
|
$return['esito'] = 1; |
|
$return['NUM_DOMANDE'] = intval($it['NUM_DOMANDE']); |
|
} catch (Exception $exc) { |
|
$return['esito'] = -999; |
|
$return['erroreDescrizione'] = $exc->getMessage(); |
|
} |
|
return $return; |
|
} |
|
|
|
public static function getDrsFromLotto($lotto = 0) { |
|
global $con; |
|
$return = array(); |
|
$return['NUMERO_DRS'] = ""; |
|
$return['DATA_DRS'] = ""; |
|
$sel = $con->prepare("SELECT NUMERO_DRS, DATA_DRS, FILEPATH FROM ESPORTAZIONI WHERE LOTTO=:LOTTO"); |
|
$sel->bindParam(":LOTTO", $lotto); |
|
try { |
|
$sel->execute(); |
|
$it = $sel->fetch(PDO::FETCH_ASSOC); |
|
$return['NUMERO_DRS'] = $it['NUMERO_DRS']; |
|
$return['DATA_DRS'] = $it['DATA_DRS']; |
|
$return['FILEPATH'] = $it['FILEPATH']; |
|
} catch (PDOException $exc) { |
|
// echo $exc->getMessage(); |
|
} |
|
return $return; |
|
} |
|
}
|
|
|