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.
34 righe
1.5 KiB
34 righe
1.5 KiB
<? |
|
$return = false; |
|
if (!empty($sourceID) && !empty($_SESSION["utente"])) { |
|
if ($sourceType == "gare-accessoatti-lotto") { |
|
$sqlRiferimento = "SELECT codice_gara FROM b_gare_lotti WHERE codice = :codice"; |
|
} else if ($sourceType == "gare-accessoatti" || $sourceType == "gare-invitati") { |
|
$sqlRiferimento = "SELECT codice_gara FROM b_gare_round WHERE codice = :codice"; |
|
} |
|
if (!empty($sqlRiferimento)) { |
|
$riferimento = $pdo->go($sqlRiferimento,[":codice"=>$sourceID]); |
|
if ($riferimento->rowCount() > 0) { |
|
$idGara = $riferimento->fetch(PDO::FETCH_ASSOC)["codice_gara"]; |
|
if ($_SESSION["utente"]->gerarchia < 100) { |
|
$tmp = gara::init($idGara); |
|
if ($tmp !== false) { |
|
$return = true; |
|
if (isset($operation) && ($operation == "DELETE" || $operation == "SWITCH") && !empty($allegato)) { |
|
$tmp->addToLog($operation,__("Allegato") . " #{$allegato["codice"]}: {$allegato["name"]}"); |
|
} |
|
} |
|
} else if (isset($operation) && $operation == "LIST") { |
|
$tmp = publicGara::init($idGara); |
|
if ($tmp !== false) { |
|
if ($sourceType == "gare-invitati" && $tmp->hasInvito()) { |
|
$return = true; |
|
} else if (($sourceType == "gare-accessoatti" && $tmp->canAccessAccessoAttiAutomatico()) || ($sourceType == "gare-accessoatti-lotto" && $tmp->canAccessAccessoAttiAutomatico($sourceID))) { |
|
$return = true; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
?>
|
|
|