<%
if instr(request("name"),"'")<>0 then
response.write "<script language=JavaScript>" & chr(13) & "alert('非法数据提交!');" & "history.back()" & "</script>"
Response.End
else
pwd=md5(request("pwd"))
if request("user")="1" then
sql="select id,name,ac,pwd,lock,vip,rdate from in_user where ac='"&request("name")&"'"
sql1="update in_user set ltime='"&now()&"',ip='"&request.servervariables("remote_host")&"' where ac='"&request("name")&"'"
end if
if request("user")="2" then
sql="select id,name,ac,pwd,lock,vip,rdate from en_user where ac='"&request("name")&"'"
sql1="update en_user set ltime='"&now()&"',ip='"&request.servervariables("remote_host")&"' where ac='"&request("name")&"'"
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<script language=JavaScript>" & chr(13) & "alert('用户名错误或用户类型选择错误!');" & "history.back()" & "</script>"
rs.close
set rs=nothing
set conn=nothing
response.end
else
if pwd<>rs("pwd") then
response.write "<script language=JavaScript>" & chr(13) & "alert('密码错误!');" & "history.back()" & "</script>"
rs.close
set rs=nothing
set conn=nothing
response.end
else
if rs("lock")=true then
rs.close
set rs=nothing
set conn=nothing
response.write "<script language=JavaScript>" & chr(13) & "alert('此帐号已被锁定,请与管理员联系!');"&"window.location.href = 'index.asp'"&" </script>"
response.end
end if
set rs1=server.createobject("adodb.recordset")
rs1.open sql1,conn,1,1
set rs1=nothing
if rs("name")<>"" then Response.Cookies("name")=rs("name")
Response.Cookies("vip")=LCase(rs("vip"))
Response.Cookies("id")=rs("id")
Response.Cookies("ac")=rs("ac")
Response.Cookies("user")=request("user")
Response.Cookies("ggval")="81528686528"
Response.Cookies("rdate")=rs("rdate")
Response.Cookies("name").expires=(now+1/6) '保存4小时
Response.Cookies("vip").expires=(now+1/6) '保存4小时
Response.Cookies("id").expires=(now+1/6) '保存4小时
Response.Cookies("ac").expires=(now+1/6) '保存4小时
Response.Cookies("user").expires=(now+1/6) '保存4小时
Response.Cookies("ggval").expires=(now+1/6) '保存4小时
Response.Cookies("rdate").expires=(now+1/6) '保存4小时
rs.close
if request("user")="1" then
sql="select job1 from in_user where id="&clng(Request.Cookies("id"))
rs.open sql,conn,1,1
if isnull(rs("job1")) then
Response.Cookies("sjob")=""
rs.close
else
Response.Cookies("sjob")="ok"
Response.Cookies("sjob").expires=(now+1/6) '保存4小时
rs.close
end if
end if
if request("user")="2" then
sql="select id from job where enid="&Request.Cookies("id")
rs.open sql,conn,1,1
if rs.recordcount>0 then
Response.Cookies("newjob")="ok"
Response.Cookies("newjob").expires=(now+1/6) '保存4小时
rs.close
else
Response.Cookies("newjob")=""
rs.close
end if
end if
set rs=nothing
set conn=nothing
response.redirect "control.asp"
end if
end if
rs.close
set rs=nothing
set conn=nothing
end if
%>
找不出哪错了
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
答案:1 悬赏:60 手机版
解决时间 2021-04-28 22:09
- 提问者网友:做自己de王妃
- 2021-04-28 13:03
最佳答案
- 五星知识达人网友:行路难
- 2021-04-28 13:59
代码看不到语法问题,但是没看到数据库定义的字段哦
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯