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

xzf888 2021-03-22 12:47:15
<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
%>
...全文
157 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Lin_bai_ 2021-03-22
  • 打赏
  • 举报
回复
可以去网上看下UTF-8 gb2312的区别
Lin_bai_ 2021-03-22
  • 打赏
  • 举报
回复
UTF-8 字多,有各种国家的语言,但是保存尺寸大,文件臃肿; gb2312字少,只用中文和少数外语和符号,但是尺寸小,文件小巧。 希望对你有帮助
有些主机不支持一些函数可能造成程序无法采集和无法安装,这个时候不要说程序不能用啊什么的,多找找自己的原因,如果需要安装的环境支持,请购买锦尚中国的主机数据产品,完美支持!! 【程序安装】 1.解压程序——上传程序——请一气呵成,以显示您对网站搭建的熟练程度以及对互联网工具使用的轻车驾熟,操作完之后甩一甩头发,不带走一片头皮屑! 2.直接运行http://您的域名/ 一般情况会自己跳转到安装界面,如果不行,下面几点是我总结的原因和解决方法: ①安装界面显示404错误或者找不到安装界面,这里就把index.php设置为您主机的默认首页即可; ②安装空白,可以清理掉 \install\Runtime\~runtime.php 这个缓存文件就可以正常安装! ③主机不支持curl造成安装中断,设置此函数可以参照下列教程:http://www.17558.net/post/679.html ④设置了默认首页,打开安装的时候也会出现无法找到界面,这个时候可以找主机商确认一下,很有可能是主机不支持PHP造成的; 3.安装的时候会提示连接数据库,这里就直接用数据库的信息对应起来操作就可以,完成安装 4.网站后台:http://您的域名/admin.php 或者直接访问admin,还是不行就访问http://您的域名/index.php?g=admin&m=index&a=login 注意:如果网页出现By ZendGuard等字样,请安装zend这个软件 【程序使用】 1.进入后台,先配置一下自己的域名,网站标题,网站关键词等等,这些我就不多说了,自己在后台操作! 2.配置PID,这个在系统配置里面,并且还标注了我们做的教程! 3.主要讲一下采集的使用! 首先自己创建一个栏目,打开数据管理——商品分类——设置一个自己要做的栏目,比如羽绒服这个栏目,设置好之后保存一下!要不要在导航显示这个取决于你,还可以在羽绒服下面设置更详细的栏目(整个站只做一种商品比如羽绒服的可以选择多建立一些详细的子栏目~!) 创建好之后,在数据采集里面——添加采集器——根据提示设置成自己相应的羽绒服栏目,ID这些都不用说了,有API的选择API,没有的选淘宝网采集(如果有会员不懂,那这类屌丝就选择淘宝网,呵呵),尤其是下面采集的范围,这个地方注意的是折扣1000才是1%,不要填写错了!最好不要写0,稍微设置一下,如果后期采集不到数据可以适当调整这里! 配置完之后多试试可以采集到数据没!

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧