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.
68 righe
2.6 KiB
68 righe
2.6 KiB
<? |
|
trait TedEsenderSuggestions { |
|
|
|
/** |
|
* Get a suggestion |
|
* @param |
|
* |
|
* @param string|int $key |
|
* @return mixed |
|
*/ |
|
public function getSuggetion($key) |
|
{ |
|
if (!empty($this->suggestions)) { |
|
foreach($this->suggestions AS $suggestionKey => $suggestion) { |
|
if (strpos($key,$suggestionKey) !== false) { |
|
return $suggestion; |
|
} |
|
} |
|
} |
|
} |
|
|
|
|
|
public function setSuggestions() { |
|
if (empty($this->suggestions)) { |
|
$return = []; |
|
$return["_attributes.CURRENCY"] = "EUR"; |
|
$return["CONTRACTING_BODY.RADIO_FOR_INFORMATION_OPT"] = "ADDRESS_FURTHER_INFO_IDEM"; |
|
$return["CONTRACTING_BODY.RADIO_FOR_ADDRESS_SEND_TENDERS_REQUEST"] = "ADDRESS_PARTICIPATION_IDEM"; |
|
$return["RADIO_FOR_ECONOMIC_CRITERIA_DOC"] = "ECONOMIC_CRITERIA_DOC"; |
|
$return["RADIO_FOR_TECHNICAL_CRITERIA_DOC"] = "TECHNICAL_CRITERIA_DOC"; |
|
if (!empty($this->info["modulo"]) && !empty($this->info["codice_elemento"])) { |
|
$path = self::moduliCollegati()[$this->info["modulo"]]; |
|
global $beRoot; |
|
if (file_exists($beRoot.$path)) { |
|
$contents = include_once($beRoot.$path); |
|
if (is_array($contents)) { |
|
$return += $contents; |
|
} |
|
} |
|
} |
|
if (empty($this->info["codice"])) { |
|
if (!empty($return["__codice_ente"])) { |
|
$this->info["codice_ente"] = $return["__codice_ente"]; |
|
} |
|
if (!empty($return["__titolo"])) { |
|
$this->info["titolo"] = $return["__titolo"]; |
|
} |
|
} |
|
$codice_ente = (!empty($this->info["codice_ente"])) ? $this->info["codice_ente"] : $_SESSION["ente"]->codice; |
|
$ente = ente::getInfoFromID($codice_ente)[0] ?? null; |
|
if ($ente) { |
|
$return["ADDRESS_CONTRACTING_BODY.OFFICIALNAME"] = $ente["denominazione"]; |
|
$return["ADDRESS_CONTRACTING_BODY.ADDRESS"] = $ente["indirizzo"]; |
|
$return["ADDRESS_CONTRACTING_BODY.TOWN"] = $ente["citta"]; |
|
$return["ADDRESS_CONTRACTING_BODY.POSTAL_CODE"] = $ente["cap"]; |
|
$return["ADDRESS_CONTRACTING_BODY.COUNTRY"] = "IT"; |
|
$return["ADDRESS_CONTRACTING_BODY.PHONE"] = $ente["telefono"]; |
|
$return["ADDRESS_CONTRACTING_BODY.FAX"] = $ente["fax"]; |
|
$return["ADDRESS_CONTRACTING_BODY.E_MAIL"] = $ente["pec"]; |
|
$return["ADDRESS_CONTRACTING_BODY.URL_GENERAL"] = $ente["url"]; |
|
$return["ADDRESS_CONTRACTING_BODY.URL_BUYER"] = "https://".$_SESSION["ente"]->getInfo()["dominio"]; |
|
} |
|
$this->suggestions = $return; |
|
} |
|
} |
|
|
|
} |
|
?>
|