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.
20 righe
865 B
20 righe
865 B
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->gerarchia < 100) { |
|
if (isset($_GET["query"])) { |
|
$text = $_GET["query"]; |
|
$bind = [":codice_fiscale"=>$_GET["query"]."%"]; |
|
$strsql = "SELECT codice, codice_fiscale_impresa, ragione_sociale, pec FROM b_operatori_economici |
|
WHERE codice_fiscale_impresa LIKE :codice_fiscale ORDER BY ragione_sociale "; |
|
$risultato = $pdo->go($strsql,$bind); |
|
$rec = array(); |
|
if ($risultato->rowCount()>0) { |
|
while ($record = $risultato->fetch(PDO::FETCH_ASSOC)) { |
|
$rec[] = array("value"=>$record["codice"],"label"=>$record["codice_fiscale_impresa"] . " - " . $record["ragione_sociale"] . " - " . $record["pec"]); |
|
} |
|
} |
|
echo json_encode($rec); |
|
} |
|
} |
|
?>
|
|
|