If e.Path <> "zc.htm" AndAlso e.path<> "czmm.htm" Then '身份验证
If e.Path = "logon.htm"
If e.Cookies("dnok")="js" Or e.Cookies("dnok")="xs"
wb.InsertHTML("<meta http-equiv='Refresh' c>")' '直接跳转到首页
e.WriteString(wb.Build)
Return '
Else
If e.PostValues("btn1")="btn1"
Dim cmd As new SQLCommand
cmd.C
cmd.CommandText = "SELECT 身份证号,password,_identify FROM {用户} WHERE 身份证号 = '" & e.PostValues("username") & "' and password ='" & e.PostValues("password") & "'"
Dim dt As DataTable = cmd.ExecuteReader
If dt.DataRows.count>0
wb.InsertHTML("<meta http-equiv='Refresh' c>")'
wb.AppendCookie("username",e.postvalues("username"))
wb.appendcookie("userjs","学生")
wb.appendcookie("dnok","xs")
e.WriteString(wb.Build)
Return '
'Else 去掉这2句
'wb.InsertHTML("<meta http-equiv='Refresh' content='0'; url='logon.htm'>") '那么直接跳转到登录页面
End If
End If
If e.PostValues("btn5")="btn5"
Dim cmd1 As new SQLCommand
cmd1.C
cmd1.CommandText ="Select DISTINCT 单位,部门,角色,修改权限,增加权限,密码 from {单位用户} "
Dim dt1 As DataTable = cmd1.ExecuteReader
Dim dr As DataRow = dt1.find("单位='" & e.PostValues("单位") & "' And 部门= '" & e.PostValues("部门") & "' And 密码= '" & e.PostValues("密码") &"'")
If dr IsNot Nothing
wb.InsertHTML("<meta http-equiv='Refresh' c>")'
wb.AppendCookie("userdw",dr("单位"))
wb.AppendCookie("userbm",dr("部门"))
If dr("部门").Contains("班")
wb.AppendCookie("bj",dr("部门"))
End If
wb.appendcookie("userjs",dr("角色"))
wb.appendcookie("xgqx",dr("修改权限"))
wb.appendcookie("zjqx",dr("增加权限"))
wb.appendcookie("dnok","js")
e.WriteString(wb.Build)
Return '
'Else去掉这2句
'wb.InsertHTML("<meta http-equiv='Refresh' content='0'; url='logon.htm'>") '那么直接跳转到登录页面
End If
End If
End If
End If
End If