紧急求助:asp程序后台管理密码无法修改!
数据表名:Bs_user管理员序号、姓名、密码的字段名分别是id、username、password故障现象:管理员无法通过后台修改自己的密码以下是后台文件Bs_Admi...
数据表名:Bs_user
管理员序号、姓名、密码的字段名分别是id、username、password
故障现象:管理员无法通过后台修改自己的密码
以下是后台文件Bs_Admin_Pass_edit.asp全文:
(听说是少了一段写入新密码的程序,但不知道具体如何写、及放在哪里。恳轻高手详细回复,非常感谢!)
——————————————————————————
<!--#include file="bsconfig.asp"-->
<%
id=request("id")
set rs=server.createobject("adodb.recordset")
sqltext="select * from Bs_User where Id=" & id
rs.open sqltext,conn,1,1
%>
<!-- #include file="Inc/Head.asp" -->
<SCRIPT language=javascript id=clientEventHandlersJS>
<!--
function form1_onsubmit()
{
if (document.FORM1.pwd1.value!=document.FORM1.pwd2.value)
{
alert ("请确认您的密码。");
document.FORM1.pwd1.value='';
document.FORM1.pwd2.value='';
document.FORM1.pwd1.focus();
return false;
}
}
//-->
</SCRIPT>
<BR>
<table cellpadding="2" cellspacing="1" border="0" width="560" align="center" class="a2">
<tr>
<td class="a1" height="25" align="center"><strong>管理员密码修改</strong></td>
</tr>
<tr class="a4">
<td align="center">
<FORM language=javascript name=FORM1 onsubmit="return form1_onsubmit()"
action=Bs_Admin_Pass_edit.asp?uid=<%=rs("Id")%> method=post>
<INPUT type=hidden value=<%=rs("UserName")%> name=uid>
<table width="50%" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td height="20" colspan="2"> </td>
</tr>
<tr>
<td width="29%" height="22"> <div align="right">管理员帐号:</div></td>
<td width="71%"><%=rs("UserName")%></td>
</tr>
<tr>
<td height="22"> <div align="right">新密码:</div></td>
<td><input name="pwd1" type="text" size="16" maxlength="20"></td>
</tr>
<tr>
<td height="22"> <div align="right">密码确认:</div></td>
<td><input name="pwd2" type="text" size="16" maxlength="20"></td>
</tr>
<tr>
<td height="22" colspan="2"><div align="center"><INPUT type=submit value='确
认修改' name=Submit2></div></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<BR>
<%htmlend%> 展开
管理员序号、姓名、密码的字段名分别是id、username、password
故障现象:管理员无法通过后台修改自己的密码
以下是后台文件Bs_Admin_Pass_edit.asp全文:
(听说是少了一段写入新密码的程序,但不知道具体如何写、及放在哪里。恳轻高手详细回复,非常感谢!)
——————————————————————————
<!--#include file="bsconfig.asp"-->
<%
id=request("id")
set rs=server.createobject("adodb.recordset")
sqltext="select * from Bs_User where Id=" & id
rs.open sqltext,conn,1,1
%>
<!-- #include file="Inc/Head.asp" -->
<SCRIPT language=javascript id=clientEventHandlersJS>
<!--
function form1_onsubmit()
{
if (document.FORM1.pwd1.value!=document.FORM1.pwd2.value)
{
alert ("请确认您的密码。");
document.FORM1.pwd1.value='';
document.FORM1.pwd2.value='';
document.FORM1.pwd1.focus();
return false;
}
}
//-->
</SCRIPT>
<BR>
<table cellpadding="2" cellspacing="1" border="0" width="560" align="center" class="a2">
<tr>
<td class="a1" height="25" align="center"><strong>管理员密码修改</strong></td>
</tr>
<tr class="a4">
<td align="center">
<FORM language=javascript name=FORM1 onsubmit="return form1_onsubmit()"
action=Bs_Admin_Pass_edit.asp?uid=<%=rs("Id")%> method=post>
<INPUT type=hidden value=<%=rs("UserName")%> name=uid>
<table width="50%" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td height="20" colspan="2"> </td>
</tr>
<tr>
<td width="29%" height="22"> <div align="right">管理员帐号:</div></td>
<td width="71%"><%=rs("UserName")%></td>
</tr>
<tr>
<td height="22"> <div align="right">新密码:</div></td>
<td><input name="pwd1" type="text" size="16" maxlength="20"></td>
</tr>
<tr>
<td height="22"> <div align="right">密码确认:</div></td>
<td><input name="pwd2" type="text" size="16" maxlength="20"></td>
</tr>
<tr>
<td height="22" colspan="2"><div align="center"><INPUT type=submit value='确
认修改' name=Submit2></div></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<BR>
<%htmlend%> 展开
3个回答
展开全部
新建一个页面:Bs_Admin_Pass_edit.asp,如果页面 存在就删除到回收站,需要再还原回来。
代码如下:
<!--#include file="bsconfig.asp"-->
<%
dim uid
uid=trim(replace(request.form("cscat_name"),"'",""))
pass1=trim(replace(request.form("pwd1"),"'",""))
pass2=trim(replace(request.form("pwd2"),"'",""))
founderr = false
if pass1 <> pass2 then
founderr = true
response.Write("<script>alert('二次密码不一样,请重新输入!');history.back();</script>")
end if
if Instr(pass1,"=")>0 or Instr(pass1,"%")>0 or Instr(pass1,chr(32))>0 or Instr(pass1,"?")>0 or Instr(pass1,"&")>0 or Instr(pass1,";")>0 or Instr(pass1,",")>0 or Instr(pass1,"'")>0 or Instr(pass1,",")>0 or Instr(pass1,chr(34))>0 or Instr(pass1,chr(9))>0 or Instr(pass1," ")>0 or Instr(pass1,"$")>0 then
founderr = true
response.Write("<script>alert('密码中含有非法字符,请重新输入!');history.back();</script>")
end if
if founderr <> true then
set rs=server.createobject("adodb.recordset")
sqltext="select * from Bs_user where Id=" & uid
rs.open sqltext,conn,1,3
if rs1.eof and rs1.bof then
response.write("管理员中没有这条信息")
else
rs("password")=pass2
rs.update
end if
rs.close
set rs=nothing
end if
if founderr <> true then
response.Write("<script>alert('密码修改成功,感谢你的多年来的管理!');history.back();</script>")
end if
%>
不对就Q我:84084809
代码如下:
<!--#include file="bsconfig.asp"-->
<%
dim uid
uid=trim(replace(request.form("cscat_name"),"'",""))
pass1=trim(replace(request.form("pwd1"),"'",""))
pass2=trim(replace(request.form("pwd2"),"'",""))
founderr = false
if pass1 <> pass2 then
founderr = true
response.Write("<script>alert('二次密码不一样,请重新输入!');history.back();</script>")
end if
if Instr(pass1,"=")>0 or Instr(pass1,"%")>0 or Instr(pass1,chr(32))>0 or Instr(pass1,"?")>0 or Instr(pass1,"&")>0 or Instr(pass1,";")>0 or Instr(pass1,",")>0 or Instr(pass1,"'")>0 or Instr(pass1,",")>0 or Instr(pass1,chr(34))>0 or Instr(pass1,chr(9))>0 or Instr(pass1," ")>0 or Instr(pass1,"$")>0 then
founderr = true
response.Write("<script>alert('密码中含有非法字符,请重新输入!');history.back();</script>")
end if
if founderr <> true then
set rs=server.createobject("adodb.recordset")
sqltext="select * from Bs_user where Id=" & uid
rs.open sqltext,conn,1,3
if rs1.eof and rs1.bof then
response.write("管理员中没有这条信息")
else
rs("password")=pass2
rs.update
end if
rs.close
set rs=nothing
end if
if founderr <> true then
response.Write("<script>alert('密码修改成功,感谢你的多年来的管理!');history.back();</script>")
end if
%>
不对就Q我:84084809
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<%
id=request("id")
set rs=server.createobject("adodb.recordset")
sqltext="select * from Bs_User where Id=" & id
rs.open sqltext,conn,1,3
if request("pwd1")=request("pwd2") then
rs("password")=request("pwd1")
else
response.Write "<script language='javascript'>alert('两次密码不对应,请重新输入');history.go(-1);</script>"
response.End
end if
rs.update
%>
id=request("id")
set rs=server.createobject("adodb.recordset")
sqltext="select * from Bs_User where Id=" & id
rs.open sqltext,conn,1,3
if request("pwd1")=request("pwd2") then
rs("password")=request("pwd1")
else
response.Write "<script language='javascript'>alert('两次密码不对应,请重新输入');history.go(-1);</script>"
response.End
end if
rs.update
%>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
The western conference finals -- at first, the lakers next town, 128-107 victory over phoenix, total score 1-0 lead.
Kobe Bryant hit 35 minutes, 23 13, 40, five rebounds and five assists, and Lamar odom 19 points and 19 rebounds, pau gasol had 21 points and RON artest 14 points.
For the sun amare stoudemire scored 23 points, and Steve Nash 13:13 assists, Jason Richardson 15 points and six rebounds, robin - 14. Grant hill advocate defend kobe Bryant clearly not successful, he not only to guard Bryant, his offense also affected, five shots, but only one in seven points.
Both teams rested for about a week. Bryant didn't hit basketball almost a week to the injured finger and ankle have a good rest. The sun with the SAN Antonio spurs guard Steve Nash, the game right eye injury also got beyond the time, without the tape again today.
,wholesale jerseys;
In the playoffs, the lakers pedestria again with a vengeance in the heart. The 2006-07 season, the lakers in a 3-1 lead, lead back to the sun. "I'll never forget," odom said.
The sun has motivation. Nash 12 times in the playoffs, but never played finals, this time and came to the door. After opening, amare stoudemire and kieran Richardson takes in succession, the 7-0 start. The lakers played in the first 2 minutes to score,NBA Jersey, but they then strengthen the defense, let the sun shooting down. This section in the last five minutes, the lakers made a ball after a wave of 18-4, with 35 - and beyond. Odom arranged the former seven points.
In the second quarter after the lakers some sun, with fast rhythm on both sides. The lakers fell slightly, Bryant hit five shots just 1 times, but they still predominates. Substitute odom, frequently, this basket into half, the lakers Lamar odom for a layup,cheap hat red, 50-40 lead after 10 minutes,Bryant cheap NBA jerseys show one-two, the sun to be narrowed to 7 points in this section, behind after 55-62.
Bryant in the third quarter. This section played two minutes later, he shot 3 degrees, including a three points. Bryant then continue to drop, the fire suppression hit the overall. This section with 2:45 seconds, pau gasol had any fadeaway shot hit, Bryant scored five points, both together a 9-0, 91-72 lakers scored 19 points. After the lakers failed in this section, the sun shot again during a 7-2 lead into after 79-93.
Kobe Bryant scored a third person with 21 points. Shortly after the start of the fourth quarter, he shot twice. This section have nine points, kobe Bryant, 35 seconds after the lakers shot with a 103-85 lead, he has reached 40 points.
The lakers YueZhanYueYong, other players also hit, with 7:58, Jordan farmar and brown successively 3-pointer after the lakers ahead 113-87. In the lakers' offense under the sun, crazy firepower. Both gap at 28 points, kobe has no suspense, such person with.
Kobe Bryant hit 35 minutes, 23 13, 40, five rebounds and five assists, and Lamar odom 19 points and 19 rebounds, pau gasol had 21 points and RON artest 14 points.
For the sun amare stoudemire scored 23 points, and Steve Nash 13:13 assists, Jason Richardson 15 points and six rebounds, robin - 14. Grant hill advocate defend kobe Bryant clearly not successful, he not only to guard Bryant, his offense also affected, five shots, but only one in seven points.
Both teams rested for about a week. Bryant didn't hit basketball almost a week to the injured finger and ankle have a good rest. The sun with the SAN Antonio spurs guard Steve Nash, the game right eye injury also got beyond the time, without the tape again today.
,wholesale jerseys;
In the playoffs, the lakers pedestria again with a vengeance in the heart. The 2006-07 season, the lakers in a 3-1 lead, lead back to the sun. "I'll never forget," odom said.
The sun has motivation. Nash 12 times in the playoffs, but never played finals, this time and came to the door. After opening, amare stoudemire and kieran Richardson takes in succession, the 7-0 start. The lakers played in the first 2 minutes to score,NBA Jersey, but they then strengthen the defense, let the sun shooting down. This section in the last five minutes, the lakers made a ball after a wave of 18-4, with 35 - and beyond. Odom arranged the former seven points.
In the second quarter after the lakers some sun, with fast rhythm on both sides. The lakers fell slightly, Bryant hit five shots just 1 times, but they still predominates. Substitute odom, frequently, this basket into half, the lakers Lamar odom for a layup,cheap hat red, 50-40 lead after 10 minutes,Bryant cheap NBA jerseys show one-two, the sun to be narrowed to 7 points in this section, behind after 55-62.
Bryant in the third quarter. This section played two minutes later, he shot 3 degrees, including a three points. Bryant then continue to drop, the fire suppression hit the overall. This section with 2:45 seconds, pau gasol had any fadeaway shot hit, Bryant scored five points, both together a 9-0, 91-72 lakers scored 19 points. After the lakers failed in this section, the sun shot again during a 7-2 lead into after 79-93.
Kobe Bryant scored a third person with 21 points. Shortly after the start of the fourth quarter, he shot twice. This section have nine points, kobe Bryant, 35 seconds after the lakers shot with a 103-85 lead, he has reached 40 points.
The lakers YueZhanYueYong, other players also hit, with 7:58, Jordan farmar and brown successively 3-pointer after the lakers ahead 113-87. In the lakers' offense under the sun, crazy firepower. Both gap at 28 points, kobe has no suspense, such person with.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询