以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  使用内置窗口登陆 默认输入  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=114543)

--  作者:有点色
--  发布时间:2018/2/8 20:33:00
--  

参考代码

 

dim UserName as string = "管理员"
For Each u As UserInfo In users
    output.show(u.name)
    If u.name = username Then
        msgbox(u.group)
        msgbox(u.Roles)
    End If
Next


--  作者:有点甜
--  发布时间:2018/2/9 14:20:00
--  

登陆的时候,根据username获取

 

dim UserName as string = "管理员"
For Each u As UserInfo In users
    output.show(u.name)
    If u.name = username Then
        msgbox(u.group)
        msgbox(u.Roles)
    End If
Next

 

用cookie存放group、roles等信息 http://www.foxtable.com/mobilehelp/scr/0042.htm

 


--  作者:有点甜
--  发布时间:2018/2/9 14:52:00
--  
dr = DataTables("用户表").Find("name = \'" & UserName & "\'")
If dr IsNot Nothing AndAlso dr("config").contains(MD5Encrypt(password)) Then
    Verified  = True
 
For Each u As UserInfo In users
    output.show(u.name)
    If u.name = username Then
        msgbox(u.group)
        msgbox(u.Roles)
    End If
Next
 
End If

--  作者:有点甜
--  发布时间:2018/2/9 15:18:00
--  

1、部门和岗位的信息,你保存在哪里?

 

2、读读出信息后,要用cookie保存起来 http://www.foxtable.com/mobilehelp/scr/0042.htm

 


--  作者:有点甜
--  发布时间:2018/2/9 15:38:00
--  
    wb.AppendCookie("username",UserName) \'将用户名和密码写入cookie
    wb.AppendCookie("password",Password)
    wb.AppendCookie("部门",aaaaaa) 
    wb.AppendCookie("岗位",bbbbbb)

 


--  作者:有点甜
--  发布时间:2018/2/9 15:52:00
--  
dr = DataTables("用户表").Find("name = \'" & UserName & "\'")
If dr IsNot Nothing AndAlso dr("config").contains(MD5Encrypt(password)) Then
    Verified  = True
 
For Each u As UserInfo In users
    output.show(u.name)
    If u.name = username Then
        msgbox(u.group)
        msgbox(u.Roles)
    End If
Next
 
End If

--  作者:有点甜
--  发布时间:2018/2/9 16:08:00
--  
If dr IsNot Nothing AndAlso dr("config").contains(MD5Encrypt(password)) Then
    Verified  = True
 
For Each u As UserInfo In users
    output.show(u.name)
    If u.name = username Then
        msgbox(u.group)
        msgbox(u.Roles)
        wb.AppendCookie("部门",u.group
        wb.AppendCookie("岗位",u.Roles)
    End If
Next
 End If

--  作者:有点甜
--  发布时间:2018/2/9 16:17:00
--  

直接读取cookie数据

 

dim s as string = e.cookies("部门")

msgbox(s)