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.
63 righe
3.1 KiB
63 righe
3.1 KiB
<? |
|
if (isset($codice_oe) && isset($config) && isset($__listHistory) && isset($pdo)) { |
|
$risPartecipanti = $pdo->go("SELECT * FROM r_partecipanti_gare WHERE codice_operatore = :oe AND conferma = 'S'",[":oe"=>$codice_oe]); |
|
$risInviti = $pdo->go("SELECT * FROM r_inviti_gare WHERE codice_operatore = :oe",[":oe"=>$codice_oe]); |
|
$checkRound = $pdo->prepare("SELECT b_gare.oggetto, b_gare.codice FROM b_gare_round JOIN b_gare ON b_gare_round.codice_gara = b_gare.codice |
|
WHERE b_gare.stato >= 20 AND b_gare.stato NOT IN (80,90) AND b_gare_round.codice = :round"); |
|
$results = ["totale"=>0,"schede" => []]; |
|
if ($risPartecipanti->rowCount() > 0) { |
|
$results["schede"]["partecipazioni"] = ["label"=>"Partecipazioni","data"=>[]]; |
|
while($p = $risPartecipanti->fetch(PDO::FETCH_ASSOC)) { |
|
$checkRound->execute([":round"=>$p["codice_round"]]); |
|
if (!empty($checkRound->rowCount())) { |
|
$info = $checkRound->fetch(PDO::FETCH_ASSOC); |
|
$stato = "Partecipato"; |
|
$color = ""; |
|
$icon = ""; |
|
if ($p["escluso"] == "S") { |
|
$stato = "Escluso"; |
|
$color = "text-danger"; |
|
$icon = "fa fa-ban"; |
|
} |
|
if ($p["aggiudicatario"] == "S") { |
|
$stato = "Aggiudicatario"; |
|
$color = "text-success"; |
|
$icon = "fa fa-trophy"; |
|
} |
|
$results["schede"]["partecipazioni"]["data"][] = [ |
|
"modulo" => "gare", |
|
"id" => $info["codice"], |
|
"oggetto" => $info["oggetto"], |
|
"url" => "/backend/gare/panel.php?codice={$info["codice"]}", |
|
"stato" => $stato, |
|
"color" => $color, |
|
"icon" => $icon, |
|
"timestamp" => $p["timestamp"] |
|
]; |
|
$results["totale"]++; |
|
} |
|
} |
|
} |
|
if ($risInviti->rowCount() > 0) { |
|
$results["schede"]["inviti"] = ["label"=>"Inviti","data"=>[]]; |
|
while($p = $risInviti->fetch(PDO::FETCH_ASSOC)) { |
|
$checkRound->execute([":round"=>$p["codice_round"]]); |
|
if (!empty($checkRound->rowCount())) { |
|
$info = $checkRound->fetch(PDO::FETCH_ASSOC); |
|
$results["schede"]["inviti"]["data"][] = [ |
|
"modulo" => "gare", |
|
"id" => $info["codice"], |
|
"oggetto" => $info["oggetto"], |
|
"url" => "/backend/gare/panel.php?codice={$info["codice"]}", |
|
"stato" => "Invitato", |
|
"color" => "", |
|
"icon" => "", |
|
"timestamp" => $p["timestamp"] |
|
]; |
|
$results["totale"]++; |
|
} |
|
} |
|
} |
|
return $results; |
|
} |
|
?>
|