以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  网页参数传递确认  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=160982)

--  作者:ycs5801
--  发布时间:2021/2/28 21:55:00
--  网页参数传递确认
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("密码"))
这两行代码在登录页面保存登录信息。

--  作者:有点蓝
--  发布时间:2021/2/28 21:59:00
--  
参考:http://www.foxtable.com/mobilehelp/topics/0138.htm