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

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, 输入用户名和密码,然后通过post方式提交表单到/login, 后台判断用户和密码是否正确,如果正确, 则把用户信息放入session,并返回主页/home。在主页显示用户名 3.需要权限判断,如果未登陆,只能访问注册和登陆。如果已登陆 只能访问主页/home.如果不符合要求,则提示没有授权。 4.(可选)发表文章和显示文章的功能

王萌昊

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

这个是初做安卓开发自己做的一个小工程,用到了线性布局相对布局,toast,button,textview,editview等最基本的控件,主界面有点空,同是小白的就自己随意发挥吧

kkk____kkk

c# winfrom 登陆跳转主窗体

c# winfrom 登陆 根据资料自己总结的

栓栓汝

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

首先记录一下发布element-admin前端框架至服务器遇到的一个坑 最近打包发布element-admin前端框架至服务器,发现打包后,服务器上无法跳转到主页的问题,网上大部分都说是跨域的问题,跨域也会有这种问题,不过笔者这次不是跨域的问题,因为后台已经对跨域做了处理,最终排查发现是由于此框架内mock的数据地址和自己后台地址冲突了,导致线上调用了本地mock数据的地址,(后台地址和本地mock数据的地址一样了),当然如果地址不一样就不会存在这样的问题,也怪自己台懒了。。。 所以在二次开发element-admin框架,数据换成真实后台数据后一定要把mock的相关代码url地址注释掉,或者

weixin_38528180

软件密码登陆跳转主界面

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

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