% If Request.Form("login").Count > 0 Then If cInt(Request.Form("hidContinue"))=1 Then Db.Execute("DELETE FROM TempShoppingCart WHERE IdSession = " & Session.SessionID) End If Login = Request.Form("login") Password = Request.Form("password") sQuery = "SELECT COUNT(*) Cant FROM TempShoppingCart WHERE IdSession = " & Session.SessionID Ds.Open sQuery, Db nCantShoppCart = cInt(Ds("Cant")) Ds.Close MyQuery = "SELECT U.IdUser, U.Login, U.Password, U.Firstname, U.Lastname, U.IdUserType, U.CorporateName FROM [User] U WHERE U.Login = '"& Login &"'" Ds.Open MyQuery, Db If Login <> "" then If Ds.EOF Then strError = "User not found." Else If Ds("Password") = Password Then If cLng(Ds("IdUserType")) <> cMayorista Or nCantShoppCart = 0 Then Session("IdUsuario") = cLng(Ds("IdUser")) Session("Firstname") = Ds("Firstname") Session("Lastname") = Ds("Lastname") Session("IdUserType") = cLng(Ds("IdUserType")) Session("Corporate") = Ds("CorporateName") 'Actualizo el IdUser del ShoppingCart Db.Execute("UPDATE TempShoppingCart SET IdUser=" & Session("IdUsuario") & " WHERE IdSession = " & Session.SessionID) Response.Redirect "ShoppingRoom_Catalog.asp" Else strError = "Your Shopping Cart Will Be Erased..." & "" End If Else strError = "The password is incorrect" End If End If End If Ds.Close End If %>
|
||||||||||||||||||||||||||||||||
|