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.
52 righe
2.6 KiB
52 righe
2.6 KiB
<? |
|
$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") { |
|
?> |
|
<h1><span class="fa fa-user"></span> <?= $record["cognome"] ?> <?= $record["nome"] ?></h1> |
|
<h3><span class="fa fa-envelope"></span> <?= $record["email"] ?> <span class="fa fa-id-card"></span> <?= $record["cf"] ?></h3> |
|
<? |
|
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"])) { |
|
?> |
|
<form rel="validate" method="post" action="/backend/utenti/certificazione/save.php" autocomplete="false" id="certificazione-form"> |
|
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>"> |
|
<input id="codice" type="hidden" name="codice" value="<?= $record["codice"] ?>"> |
|
<div class="form-group"> |
|
<label for="note_certificazione"><?= __("Annotazioni") ?></label> |
|
<textarea class="ckeditor_simple" id="note_certificazione" name="note_certificazione" rel="S;0;0;A" title="Annotazioni"> |
|
|
|
</textarea> |
|
</div> |
|
<? filesManager::printForm() ?> |
|
<button type="button" class="btn btn-block btn-success" onclick="confirmBeforeSubmitForm('Procedendo certificherai l\'identità dell\'utente, vuoi continuare?','certificazione-form');"> |
|
<?= __("Certifica") ?> |
|
</button> |
|
</form> |
|
<? |
|
} 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(); |
|
?>
|
|
|