$configPath = substr(__DIR__, 0, strpos(__DIR__, "public_html")) . "/config.php"; include_once($configPath); if (!empty($_SESSION["utente"]) && !empty($_SESSION["utente"]->oe)) { $codice_round = $_GET["codice_round"] ?? NULL; $concorso = publicConcorso::init($_GET["codice"], $codice_round); if (!empty($concorso) && $concorso->potentialAction) { $record = $concorso->info; $round = $concorso->round; $lotti = $concorso->getLotti(); $breadcrumb = array(); $breadcrumb["/" . $radice . "/"] = Modulo::getInfo($radice)["titolo"]; $breadcrumb["/" . $radice . "/dettaglio.php?codice={$record["codice"]}&codice_round={$round["codice"]}"] = __("Dettaglio"); if (!empty($_GET["codice_lotto"]) && count($lotti) > 1) { $breadcrumb["/". $radice . "/partecipa/partecipa.php?codice={$record["codice"]}&codice_round={$round["codice"]}"] = __("Scelta lotto"); } $breadcrumb[""] = __("Pannello"); include_once($root . "/layout/top.php"); if (empty($_GET["codice_lotto"]) && count($lotti) > 1) { $checkStato = $pdo->prepare("SELECT conferma FROM r_partecipanti_concorsi WHERE codice_round = :codice_round AND codice_lotto = :lotto AND codice_operatore = :operatore "); $checkStato->bindValue(":operatore",$_SESSION["utente"]->oe["codice"]); $checkStato->bindValue(":codice_round",$round["codice"]); $stati = []; foreach($lotti AS $lotto) { $stati[$lotto["codice"]] = ["label"=>"","class"=>"btn-primary"]; $checkStato->bindValue(":lotto",$lotto["codice"]); $checkStato->execute(); if ($checkStato->rowCount() > 0) { if ($checkStato->fetch(PDO::FETCH_COLUMN) == "S") { $stati[$lotto["codice"]] = ["label"=>" " . __("Partecipazione inviata"),"class"=>"btn-success"]; } else { $stati[$lotto["codice"]] = ["label"=>" " . __("Partecipazione iniziata"),"class"=>"btn-warning"]; } } } $concorso->printSelectLottiConditions = ["hasInvito"]; ?>