Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
什么 原因呢?以下 是default的代码:
Dim e As RequestEventArgs = args(0)
Dim wb As New weui
If e.Cookies.ContainsKey("用户姓名") And e.Cookies.ContainsKey("用户密码") Then
Dim dr As DataRow = DataTables("登录用户").sqlfind("用户姓名='" & e.Cookies("用户姓名") & "'")
If dr Is Nothing OrElse dr("用户密码") <> e.Cookies("用户密码") Then '''如果无此用户,或密码不正确.
wb.InsertHTML("<meta http-equiv='Refresh' c>")
e.WriteString(wb.Build)
Functions.Execute("LogText", "default中间1")
Return""
End If
Else
wb.InsertHTML("<meta http-equiv='Refresh' c>")
e.WriteString(wb.Build)
Return""
End If
wb.AddPageTitle("", "pageheader", "云享平台", "欢迎" & e.Cookies("用户姓名") & "登录")
wb.InsertHTML("<style>.fox_page_header{background-color: SteelBlue;}</style>") '设置页面颜色
wb.InsertHTML("<style>.fox_page_subtitle{color:white;}</style>") '设置项目信息化管理系统字体颜色
With wb.AddGrid("", "g1")
'.Add("c2","登 录", "./images/cell.png", "logon.htm")
If e.Cookies.ContainsKey("用户类别") And e.Cookies("用户类别") = "企业" Then
.Add("c3", "新增船舶", "./images/toast.png", "addnew.htm")
End If
.Add("c4", "查询船舶", "./images/dialog.png", "renamecx.htm")
.Add("c6", "修改密码", "./images/key_alt.png", "changepassword.htm")
.Add("c5", "退出登录", "./images/exit.png", "exit.htm")
' .Add("c8", "百度", "./images/exit.png", "http://api.map.baidu.com/marker?location=122.107814,40.230636&title=我的&content=百度地图测试&output=html")
End With
End With
e.WriteString(wb.Build)
Select Case e.Path
Case "logon.htm"
Functions.Execute("logon", e)
Case "check.htm"
Functions.Execute("check", e)
Case "exit.htm" '退出登录
Functions.Execute("exit", e)
Case "default.htm", "" '首页
Functions.Execute("default", e)
Case "addnew.htm"
Functions.Execute("addnew", e) '分页显示
Case "renamecx.htm"
Functions.Execute("renamecx", e) '分页显示
Case "getsr.htm"
Functions.Execute("getsr", e) '分页显示
Case "renamecx_name.htm"
Functions.Execute("renamecx_name", e) '分页显示
Case "del.htm"
Functions.Execute("del", e)
Case "zdzs.htm"
Functions.Execute("zdzs", e)
Case "ksfilter.htm"
Functions.Execute("ksfilter", e)
Case "kslist.htm"
Functions.Execute("kslist", e)
Case "fzfilter.htm"
Functions.Execute("fzfilter", e)
Case "fzlist.htm"
Functions.Execute("fzlist", e)
Case "receive.htm"
Functions.Execute("receive", e)
Case "changepassword.htm"
Functions.Execute("changepassword", e)
Case "zd_qiye.htm"
Functions.Execute("zd_qiye", e)
Case "zd_guanyuan.htm"
Functions.Execute("zd_guanyuan", e)
Case "zd_denglunyaoqiu.htm"
Functions.Execute("zd_denglunyaoqiu", e)
Case "submit.htm"
Functions.Execute("submit", e)
Case "fagui.htm" '法规展示用 与原系统无关
Functions.Execute("fagui", e)
Case "tongji.htm"
Functions.Execute("tongji", e)
Case "renamecx_name_out.htm"
Functions.Execute("renamecx_name_out", e)
End Select
以下是logon函数:
Dim e As RequestEventArgs = args(0)
Dim wb As New weui
wb.AddPageTitle("", "pageheader", "入出境船舶卫生检疫智能云享平台")
wb.InsertHTML("<style>.fox_page_header{background-color: SteelBlue;}</style>") '设置页面颜色
wb.InsertHTML("<style>.fox_page_subtitle{color:white;}</style>") '设置项目信息化管理系统字体颜色
'wb.InsertHTML("<style>.fox_page_subtitle{font-size:16px;}</style>") '设置项目信息化管理系统字体大小
wb.InsertHTML("<h3 align='center' style='margin-top:5px'>用户登录</h3>") '增加用户登录Lable
wb.AddForm("", "form1", "check.htm")
With wb.AddInputGroup("form1", "ipg1")
.Attribute = "style='margin-top:0.3em'" '调整顶端距离
.AddInput("用户账号", "用户账号", "text")
.AddInput("用户密码", "用户密码", "password")
End With
With wb.AddButtonGroup("form1", "btg1", False) 'True) 'False为水平排列
.Add("btn1", "登录", "submit")
End With
e.WriteString(wb.Build)
check函数:
Dim e As RequestEventArgs = args(0)
Dim wb As New weui
'身份验证
If e.PostValues.Count = 0 Then
'''如果用户名密码没有录入就返回错误信息
With wb.AddMsgPage("", "msgpage", "登录失败", "请填写用户名和密码")
.icon = "Warn" '改变图标
.AddButton("btn1", "返回").Attribute = ""
End With
e.WriteString(wb.Build)
Return "" '必须返回
Else
'''判断手机号和密码是否都填写了
Dim nms() As String = {"用户账号", "用户密码"} '不能为空的列名数组
For Each nm As String In nms
If e.PostValues.ContainsKey(nm) = False Then '生成错误提示页
With wb.AddMsgPage("", "msgpage", "填写失败", nm & "不能为空!")
.icon = "Warn" '改变图标
.AddButton("btn1", "返回").Attribute = ""
End With
e.WriteString(wb.Build)
Return "" '必须返回
End If
Next
Dim dr As DataRow = DataTables("登录用户").sqlFind("用户账号 = '" & e.postvalues("用户账号") & "'")
If dr IsNot Nothing Then
If e.postvalues("用户密码") = dr("用户密码") Then '实际使用的时候,请改为从数据库读取用户名和密码进行比较
wb.AppendCookie("用户姓名", dr("用户姓名")) '将用户名和密码写入cookie
wb.AppendCookie("用户密码", dr("用户密码"))
wb.AppendCookie("用户类别", dr("用户类别"))
wb.AppendCookie("用户单位", dr("用户单位"))
wb.AppendCookie("用户账号", dr("用户账号"))
wb.AppendCookie("用户级别", dr("用户级别"))
wb.AppendCookie("手机号", dr("手机号"))
wb.AppendCookie("邮箱地址", dr("邮箱地址"))
wb.InsertHTML("<meta http-equiv='Refresh' c>") '直接跳转到首页
e.WriteString(wb.Build) '生成网页
Return ""'必须的
Else
With wb.AddMsgPage("", "msgpage1", "登录失败", "密码输入错误")
.icon = "Warn" '改变图标
.AddButton("btn76", "返回", "logon.htm")
End With
e.WriteString(wb.Build) '生成网页
Return "" '必须的
End If
Else
With wb.AddMsgPage("", "msgpage2", "登录失败", "用户名未找到")
.icon = "Warn" '改变图标
.AddButton("btn1", "返回","logon.htm")
End With
e.WriteString(wb.Build) '生成网页
Return "" '必须的
End If
End If
控制台提示:
GET http://127.0.0.1:8009/ 404 (foxtable web server has started(error 404))
msgport.js:70 {"notify":"init_tab"}
Dim e As RequestEventArgs = args(0)
Dim wb As New weui
If e.Cookies.ContainsKey("用户姓名") And e.Cookies.ContainsKey("用户密码") Then
……
找到原因 了,把这段屏蔽就可以了,不知道什么原理 ?
'With wb.AddPageFooter("", "pf1", "工信部备案:辽ICP备2021223714号-2")
' .AddLink("备案链接", "https://beian.miit.gov.cn/")
'End With