后台登陆后一片空白不能跳转

xzf888 xzf888 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">这行去掉后正常,
如果编码为gb2312 显示为空白,改成UTF-8出现错误,报未结束的字符串常量
这不知道是什么原因?
希望老师们指点, 万分感谢!

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="../inc/Fzwlt_AdminConn.asp"-->
<!--#include file="images/login/md5/md5.asp" -->
<!--#include file="images/login/md5/CFS.asp" -->
<%
if trim(request("OK"))="1" then
Response.Cookies("Fzwlt")("strUsername") = Trim(request("username"))
Response.Cookies("Fzwlt")("strPassword") = trim(request("password"))
Response.Cookies("Fzwlt")("OKCookie")=trim(request("OK"))
'Response.cookies("Fzwlt").expires=date+365
Response.Cookies("Fzwlt").Expires=DateAdd("y",30,Now())
%>
<%
Dim DBC,RsLoginObj,RsLogObj
Dim UserName,UserPass,VerifyCode,System,SqlLog,SqlLogin,Url
Url = Request("UrlAddress")
if Url = "" then
Url = "Fzwlt_MainFrame.asp"
end if
'Response.Write(Url)
'Response.End

UserName = Replace(Trim(Request.Form("UserName")),"'","''")
UserPass1 = CfsEnCode(Replace(Trim(Request.Form("Password")),"'","''"))
VerifyCode = Replace(Trim(Request("verifycode")),"'","")
UserPass=md5(UserPass1)
if UserName = "" or UserPass = "" then
Response.Redirect("Fzwlt_Errorp.asp?ErrDescription=用户名和密码不能为空!")
Response.End
end if

if Instr(request.form("UserName"),"=")>0 or Instr(request.form("UserName"),"%")>0 or Instr(request.form("UserName"),chr(32))>0 or Instr(request.form("UserName"),"?")>0 or Instr(request.form("UserName"),"&")>0 or Instr(request.form("UserName"),";")>0 or Instr(request.form("UserName"),",")>0 or Instr(request.form("UserName"),"'")>0 or Instr(request.form("UserName"),",")>0 or Instr(request.form("UserName"),chr(34))>0 or Instr(request.form("UserName"),chr(9))>0 or Instr(request.form("UserName"),"")>0 or Instr(request.form("UserName"),"$")>0 then
response.write"<script>alert('错误提示信息!\n\n用户名或密码不能在非法字符!点击确定返回重新输入!');javascript:history.go(-1);</script>"
response.End()
end if

if VerifyCode <> CStr(Session("GetCode")) then
response.write"<script>alert('错误提示信息!\n\n验证码错误!点击确定返回重新输入!');javascript:history.go(-1);</script>"
Response.End
end if
if request("verifycode")="" then
response.write"<script>alert('错误提示信息!\n\n请输入验证码!点击确定返回重新输入!');javascript:history.go(-1);</script>"
Response.End
elseif Session("GetCode")="9999" then
Session("GetCode")=""
elseif Session("GetCode")="" then
response.write"<script>alert('错误提示信息!\n\n请不要重复提交!点击确定返回重新输入!');javascript:history.go(-1);</script>"
Response.End
elseif cstr(Session("GetCode"))<>cstr(trim(request("verifycode"))) then
response.write"<script>alert('错误提示信息!\n\n你输入的验证码和系统产生的不一致!点击确定返回重新输入!');javascript:history.go(-1);</script>"
Response.End
end if
Session("GetCode")=""
set RsLoginObj = server.CreateObject ("ADODB.RecordSet")
SqlLogin = "select * from Fzwlt_Admin where UserName='"&UserName&"' and password='"&UserPass&"'"
RsLoginObj.Open SqlLogin,Conn,1,1
Session("Fzwlt_flag")=RsLoginObj("Fzwlt_flag")
Session("loginnos")=RsLoginObj("loginnos")
Session("loginip")=RsLoginObj("loginip")
Session("Csny")=RsLoginObj("Csny")
Conn.Execute("Update [Fzwlt_Admin] Set Csny='"&now()&"',loginnos=loginnos+1,loginip='"&Request.ServerVariables("REMOTE_ADDR")&"' Where UserName='"&UserName&"'")

System = Request.ServerVariables("HTTP_USER_AGENT")
if Instr(System,"Windows NT 5.0") then
System = "Win2000"
elseif Instr(System,"Windows NT 5.2") then
System="Win2003"
elseif Instr(System,"Windows NT 5.1") then
System = "WinXP"
elseif Instr(System,"Windows NT") then
System = "WinNT"
elseif Instr(System,"Windows 9") then
System = "Win9x"
elseif Instr(System,"unix") or instr(System,"linux") or instr(System,"SunOS") or instr(System,"BSD") then
System = "类Unix"
elseif Instr(System,"Mac") then
System = "Mac"
else
System = "Other"
end if

if Not RsLoginObj.EOF then
if RsLoginObj("Lock")=1 then
response.write"<script>alert('错误提示信息!\n\n你的帐号已锁定或无权进入!\n\n点击确定返回!');javascript:history.go(-1);</script>"
Response.End
end if
Session("UserName") = UserName
Session("PassWord") = UserPass
Session("AdminID") = RsLoginObj("AdminID")
Response.Cookies("Foosun")("UserName") = UserName
Response.Cookies("Foosun")("Password") = UserPass
Set RsLogObj = Server.Createobject("adodb.recordset")
SqlLog = "select * from Fzwlt_Log"
RsLogObj.open SqlLog,Conn,3,3
RsLogObj.addnew
RsLogObj("LogUser")=UserName
RsLogObj("LogIP")=request.ServerVariables("Remote_Addr")
RsLogObj("OS")=System
RsLogObj("Result") = 1
RsLogObj("Csny") = now()
RsLogObj.update
RsLogObj.close
set RsLogObj = Nothing
Response.Redirect(Url)
Response.End
else
set RsLogObj = Server.Createobject("adodb.recordset")
SqlLog = "select * from Fzwlt_Log"
RsLogObj.open SqlLog,Conn,3,3
RsLogObj.AddNew
RsLogObj("LogUser") = Request.Form("UserName")
RsLogObj("LogIP") = request.ServerVariables("Remote_Addr")
RsLogObj("OS") = System
RsLogObj("Errorpas") = Request.Form("Password")
RsLogObj("Result") = false
RsLogObj("Csny") = now()
RsLogObj.update
RsLogObj.close
set RsLogObj = Nothing
response.write"<script>alert('错误提示信息!\n\n非法登录, 请检查用户名和密码的是否正确!\n\n点击确定返回重新输入!');javascript:history.go(-1);</script>"
Response.End
end if
%>
...全文

相关推荐

Login-register:#登录-注册页 1.访问reg 显示注册页面, 输入用户和密码.通过post的方式提交表单到reg,后台可以注册用户。 然后跳转到登陆页面login。 2.get请求访问登陆页面login, 输入用户名和密码,然后通过post方式提交表单到login, 后台判断用户和密码是否正确,如果正确, 则把用户信息放入session,并返回主页home。在主页显示用户名 3.需要权限判断,如果未登陆,只能访问注册和登陆。如果已登陆 只能访问主页home.如果不符合要求,则提示没有

#登录-注册页1.访问/reg 显示注册页面, 输入用户和密码.通过post的方式提交表单到/reg,后台可以注册用户。然后跳转到登陆页面/login。2.get请求访问登陆页面/login, 输入用

王萌昊

实现注册登陆的简单页面设计以及页面跳转

注册登陆"流程涉及用户信息的收集和验证。在注册过程中,用户需要提供有效的用户名和密码,可能还需要邮箱或手机号进行验证。开发时要考虑到输入验证,防止空值或格式错误,并处理可能出现的网络问题。

kkk____kkk

c# winfrom 登陆跳转主窗体

实现“c# winform 登陆跳转主窗体”的具体步骤如下:1. **创建登录窗体**:在Visual Studio中添加新的WinForm控件,放置用户名和密码输入框,以及登录按钮。2.

栓栓汝

element-admin 登陆,路由跳转,权限逻辑

在部署`element-admin`到服务器时,作者遇到了一个问题:打包后无法跳转到主页。尽管许多人认为这可能是因为跨域问题,但作者发现实际问题是框架内部使用的Mock数据与实际后台API地址冲突。

weixin_38528180

软件密码登陆跳转主界面

软件功能:软件密码登陆跳转主界面,使用pyqt5开发,qss使用一种暗黑风格渲染

沉迷单车的追风少年
评论 2
收藏 已收藏
分享
返回顶部
xzf888
ASP 28,401 成员 356,940 内容