代码如下:
<%
if (request("but_login")="登 录") then
username=trim(request("username"))
pwsword=trim(request("pwsword"))
login_type=request("login_type")
if username="" or pwsword="" then
response.redirect("login_m.asp")
response.end
end if
errormsg=""
sql="select * from dict_user where userid='"&username&"'"
set rs=cn.execute(sql)
if trim(rs("password"))=pwsword then
response.cookies("username_m")=""
session("tel_number_m") = username
session("user_type_m") = rs("user_type")
'session.timeout=180 控制session的时间
errormsg="登录成功!"
call Ilog("管理用户登录","login")
'response.redirect("../tel_model/tel_tree.asp")
response.write "<meta http-equiv='refresh' content=0;URL='../tel_manage/tel_mtree.asp'>"
else
response.cookies("username_m")=""
session("tel_number_m") = ""
session("user_type_m") = ""
errormsg="用户名或密码错误!"
response.write"<script>alert('"&errormsg&"');</script>"
response.redirect("login_m.asp")
response.end
end if
if rs.eof then
response.cookies("username_m")=""
session("tel_number_m") = ""
session("user_type_m") = ""
errormsg="用户名或密码错误!"
response.write"<script>alert('"&errormsg&"');</script>"
else
if trim(rs("password"))<>pwsword then
response.cookies("username_m")=""
session("tel_number_m") = ""
session("user_type_m") = ""
errormsg="用户名或密码错误!"
response.write"<script>alert('"&errormsg&"');</script>"
response.write "<meta http-equiv='refresh' content=0;URL='login_m.asp'>"
response.end
end if
'应该加号码状态,如局方保留,空闲,占用等
if trim(rs("password"))=pwsword then
response.cookies("username_m")=""
session("tel_number_m") = username
session("user_type_m") = rs("user_type")
'session.timeout=180 控制session的时间
errormsg="登录成功!"
call Ilog("管理用户登录","login")
'response.redirect("../tel_model/tel_tree.asp")
response.write "<meta http-equiv='refresh' content=0;URL='../tel_manage/tel_mtree.asp'>"
else
response.cookies("username_m")=""
session("tel_number_m") = ""
session("user_type_m") = ""
errormsg="用户名或密码错误!"
response.write"<script>alert('"&errormsg&"');</script>"
response.redirect("login_m.asp")
response.end
end if
end if
rs.close
cn.close
end if
%>
在打开的时候出现下面这个错误
错误 '80020009'
/login_m.asp,行 19
就是这一句话: if trim(rs("password"))=pwsword then
各位大哥,我实在看不出这句话错在哪里,麻烦各位帮忙看一下或修改一下,谢谢!
在线等答案!!!!!!!!!!!!