Buongiorno.

Mi sono impantanato in questo codice e non riesco ad uscirne:

codice:
<%

	strUser=request.form("user")
	strCode=request.form("codice")
	strReferer = Request.Form("referer")
	
SET objRS = Server.CreateObject("ADODB.Recordset")
objRS.ActiveConnection = cn

strSql = "SELECT * FROM tbl WHERE userName LIKE '"&strUser&"' AND userCode='"&strCode&"'"
objRS.Open strSQL

IF not objRS.EOF THEN

myDate = date()

DataOdierna = convertDate(myDate)
DataRegistrazione = convertDate(objRS("DataRegistrazione"))
DataScadenzaTrimestrale = convertDate(objRS("DataScadenzaTrimestrale")) 
DataScadenzaSemestrale = convertDate(objRS("DataScadenzaSemestrale"))
DataUltimoAccesso = convertDate(objRS("DataUltimoAccesso"))

'NUOVO CODICE
DataVariabile = (DateDiff("d",DataOdierna,DataScadenzaTrimestrale)) 
DataVariabileSem = (DateDiff("d",DataUltimoAccesso,DataOdierna)) 

if DataVariabile =< 0 OR DataVariabileSem > 180 then %>
 
<script language="javascript">
  alert("Attenzione! La password è scaduta.\nCambiare la password secondo i requisiti previsti.");
  </script>
  
<%

else 

  Response.Cookies("innovatel.it_accesso")("valido")="ok"
  Response.Cookies("innovatel.it_accesso").expires = DateAdd("n", 480, Now())
  
  if objRS("strLocked") = True then %>

 
 
  <script language="javascript">
  alert("Attenzione, account bloccato!");
  location.href='../index.asp';
  </script>
  
<%

Response.Cookies("innovatel.it_accesso")=""
strUserName = (objRS("userName"))
SQL3 = "UPDATE tbl set CodiceSbloccoAutomatico = '"&strfinal&"' where userName = '"&strUserName&"'"
cn.Execute(SQL3)
Response.End
end if

strUserName = (objRS("userName"))
SQL2 = "UPDATE tbl set DataUltimoAccesso = #"&DataOdierna&"# where userName = '"&strUserName&"'"
cn.Execute(SQL2)

else  <---- riga dell'errore   

SET RS = Server.CreateObject("ADODB.Recordset")
RS.ActiveConnection = cn
SQLSelect = "SELECT * FROM tbl WHERE userName = '"&strUser&"'"
RS.Open SQLSelect

strUserCode = RS("id_user")
strUserMail = RS("UserMail")

if IsNull(session("tentativi")) then
     session("tentativi") = 1
   else
     session("tentativi") = session("tentativi") + 1
end if
  
    if session("tentativi") = 3 then
    SQLUpdate = "UPDATE tbl set Locked = true where id_user = "&strUserCode
    cn.Execute(SQLUpdate)
    
   
   RS.Close
   Set RS = Nothing
end if
end if   
     
  ChiudiDB()
  Response.Redirect Request.Form("referer")
   
Sub ChiudiDB()
   objRS.Close
   Set objRS = Nothing
   cn.Close
   Set cn = Nothing
End Sub

End if
End if

%>
L'errore è questo ed è sulla riga rossa segnata in grassetto:

Error Type:
Microsoft VBScript compilation (0x800A03F6)
Expected 'End'
Non so più dove sbattere la testa