$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
$bind = array();
$bind[":codice"] = $_GET["codice"];
$sql = "SELECT b_utenti.* FROM b_utenti WHERE b_utenti.codice = :codice ";
$ris_utenti = $pdo->go($sql,$bind);
if (isset($ris_utenti) && $ris_utenti->rowCount() === 1) {
$record = $ris_utenti->fetch(PDO::FETCH_ASSOC);
if ($_SESSION["utente"]->canCertify($_GET["codice"]) || $record["certificato"] == "S") {
?>
= $record["cognome"] ?> = $record["nome"] ?>
= $record["email"] ?> = $record["cf"] ?>
if ($record["certificato"] == "S") {
if (!empty($record["utente_certificante"])) {
$certificatore = $pdo->go($sql,[":codice"=>$record["utente_certificante"]])->fetch(PDO::FETCH_ASSOC);
$certificatore = "{$certificatore["cognome"]} {$certificatore["nome"]}";
} else {
$certificatore = "Automatica";
}
alertManager::printSuccessBox(__("Certificato"),"{$certificatore}: {$record["timestamp_certificazione"]}");
} else {
alertManager::printWarningBox(__("Non Certificato"));
if (!empty($record["cf"])) {
?>
} else {
alertManager::printAlertCompact(_("Inserire il codice fiscale dell'utente prima di procedere"));
}
}
filesManager::printList($record["codice"],"utenti-certificazione","A",0,FALSE);
die();
}
}
header('HTTP/1.0 403 Forbidden');
die();
?>