---------------------------------------------------------------------
Código:
set cn= server.createobject("ADODB.Connection") cn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & "DBQ=" & server.mappath("\database\"+"userevm.mdb") & ";" & "PWD=" set rs= server.createobject("ADODB.Recordset") sQuery = "Select * From userevm where username = '" & sUser & "'" rs.Open sQuery,cn If rs.BOF and rs.EOF then Application("ValidUser") = 1 Response.Redirect("login.htm") Else if trim(sPwd) = trim(rs.fields("password").value) then Application("ValidUser") = 0 Session("User")=sUser Session("Pwd")=sPwd 'Response.Redirect("bdevm.htm") %> <SCRIPT language="JavaScript"> window.close(); if (Session("User") == 'abc_evm'){ window.open("/exvm/bdevm.htm",null,"left=0 ,top=0,height=520,width=560,toolbar=no," "menubar=no,location=no,resizable=no,scrollbars =yes"); } else{ window.open("/exvm/list/listacasa.asp",null,"left=0,top=0,height=520,width=560,toolbar=no," + "menubar=no,location=no,resizable=no,scrollbars=yes"); } </SCRIPT> <% else Application("ValidUser") = 1 Response.Redirect("login.htm") end if End If