Foxtable(狐表)用户栏目专家坐堂 → 使用内置窗口登陆 默认输入


  共有2912人关注过本帖树形打印复制链接

主题:使用内置窗口登陆 默认输入

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By: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

 


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By: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

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/2/9 15:18:00 [显示全部帖子]

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

 

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

 


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/2/9 15:38:00 [显示全部帖子]

    wb.AppendCookie("username",UserName) '将用户名和密码写入cookie
    wb.AppendCookie("password",Password)
    wb.AppendCookie("部门",aaaaaa) 
    wb.AppendCookie("岗位",bbbbbb)

 


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By: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

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By: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

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/2/9 16:17:00 [显示全部帖子]

直接读取cookie数据

 

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

msgbox(s)


 回到顶部