gestione gare pubbliche
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.
 
 
 
 
 

59 righe
1.9 KiB

<?
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php";
include_once($configPath);
if (!empty($_GET["email"]) && !empty($_GET["token"])) {
$error = true;
include_once ($root."/layout/topLogin.php");
$email = $_GET["email"];
$email = base64_decode($email);
$token = $_GET["token"];
$token = base64_decode($token);
$bind=array(":token"=>$token,":email"=>$email);
$sql = "SELECT codice
FROM b_utenti
WHERE (tentativi > 4 OR scaduto = 'S') AND email = :email AND unlock_token = :token AND DATE_ADD(unlock_request, INTERVAL 2 DAY) > curdate()";
$ris = $pdo->go($sql,$bind);
if ($ris->rowCount() === 1) {
$record = $ris->fetch(PDO::FETCH_ASSOC);
$array = array();
$array["codice"] = $record["codice"];
$array["tentativi"] = 0;
$array["attivo"] = "S";
$array["scaduto"] = "N";
$array["bot_verify"] = "N";
$salva = new salva();
$salva->debug = false;
$salva->nome_tabella = "b_utenti";
$salva->operazione = "UPDATE";
$salva->oggetto = $array;
?>
<div class="mt-auto mb-auto px-sm-5 scrollable">
<?
if ($salva->save()) {
$error = false;
?>
<div class="text-center text-success">
<h1>
<span class="fa fa-check fa-5x"></span><br>
<?= __("Operazione effettuata con successo") ?><br><br>
<a class="btn btn-success" href="/" title="<?= __("accedi") ?>"> <?= __("accedi") ?> <i class="fa fa-chevron-right ml-2"></i></a>
</h1>
</div>
<?
} else {
alertManager::printAlertBox(__("Richiesta scaduta"));
}
?>
</div>
<?
include_once ($root."/layout/bottomLogin.php");
}
}
if ($error) {
header('HTTP/1.0 403 Forbidden');
die();
}
?>