$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; ?>