Dim e As RequestEventArgs = args(0)
Dim dr As DataRow=DataTables("报关员").sqlfind("手机号='" & e.Cookies("username") & "'")
If dr IsNot Nothing AndAlso dr("密码")=e.Cookies("password") Then '''如果有此用户,且密码正确.
Dim wb As New WeUI
With wb.AddGrid("","g1")
.Add("c2","登 录", "./images/cell.png", "login.htm")
End With
e.WriteString(wb.Build)
Else
wb1.AppendHTML("<meta http-equiv='Refresh' c>")
End If
以上代码为index.htm,cookies登录信息已在登录页面生成并保存。现在想未登录过的手机打开当前页面后,判断没有登录信息后自动跳转到登录页面,可以实现吗?wb.AppendCookie("username",e.postvalues("手机号"))
wb.AppendCookie("password",e.postvalues("密码"))
这两行代码在登录页面保存登录信息。