📄 yonghugai.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=data/conn.asp-->
<!--#include file=connfig.asp-->
<%
if request("post")<>"" then
call write1
end if
function write1
if request("userpwd1")<>"" and request("userpwd2")<>"" then
if request("userpwd1")<>request("userpwd2") then
response.Write("<script language=javascript>alert('两次输入密码不一致!!')</script>")
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from users where username='"&session("admin_name")&"'"
rs.open sql,conn,1,3
rs("userpwd")=request("userpwd1")
rs.update
end if
else
response.Write("<script language=javascript>alert('密码不能为空!')</script>")
end if
if request("qq")<>"" then
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from renshi where name='"&rs("name")&"'"
rs1.open sql1,conn,1,3
rs1("tel")=request("tel")
rs1("age")=request("age")
rs1("email")=request("email")
rs1("address")=request("address")
rs1.update
rs1.close
end if
response.Redirect("chenggong.htm")
end function
set rs3=server.CreateObject("adodb.recordset")
sql3="select * from users where username='"&session("admin_name")&"'"
rs3.open sql3,conn,1,3
set rs4=server.CreateObject("adodb.recordset")
sql4="select * from renshi where name='"&rs3("name")&"'"
rs4.open sql4,conn,1,3
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style1 {
font-size: 16px;
font-weight: bold;
color: #0000FF;
}
body,td,th {
font-size: 12px;
}
body {
background-color: #ffffff;
}
.style3 {color: #000000}
.style4 {
font-size: 16px;
font-weight: bold;
}
-->
</style>
<link href="biaodan.css" rel="stylesheet" type="text/css">
</head>
<body>
<form name="form1" method="post" action="">
<table width="361" border="0" align="center" cellspacing="1" bgcolor="#336699">
<tr>
<td height="44" colspan="2" background="images/tile_sub.gif"><div align="center" class="style1 style3">修改密码</div></td>
</tr>
<tr>
<td width="115" height="29" bgcolor="#FFFFFF"><div align="right">用户名:</div></td>
<td width="236" bgcolor="#FFFFFF">
<input name="username" type="text" class="unnamed1" id="username" value="<%=session("admin_name")%>" readonly="true">
<input name="post" type="hidden" id="post" value="true"></td>
</tr>
<tr>
<td height="29" bgcolor="#FFFFFF"><div align="right">密码:</div></td>
<td bgcolor="#FFFFFF">
<input name="userpwd1" type="password" class="unnamed1" id="userpwd1" value="<%=rs3("userpwd")%>"></td>
</tr>
<tr>
<td height="28" bgcolor="#FFFFFF"><div align="right">确认密码:</div></td>
<td bgcolor="#FFFFFF">
<input name="userpwd2" type="password" class="unnamed1" id="userpwd2" value="<%=rs3("userpwd")%>"></td>
</tr>
<%if not rs4.eof then%>
<tr bgcolor="#E6E6E6">
<td height="35" colspan="2"><div align="center" class="style4">联系方式</div></td>
</tr>
<tr>
<td height="28" bgcolor="#FFFFFF"><div align="right">年龄:</div></td>
<td bgcolor="#FFFFFF">
<input name="qq" type="text" class="unnamed1" id="qq2" value="<%=rs4("age")%>"></td>
</tr>
<tr>
<td height="28" bgcolor="#FFFFFF"><div align="right">电话:</div></td>
<td bgcolor="#FFFFFF">
<input name="tel" type="text" class="unnamed1" id="tel" value="<%=rs4("tel")%>"></td>
</tr>
<tr>
<td height="28" bgcolor="#FFFFFF"><div align="right">email:</div></td>
<td bgcolor="#FFFFFF">
<input name="email" type="text" class="unnamed1" id="email" value="<%=rs4("email")%>"></td>
</tr>
<tr>
<td height="28" bgcolor="#FFFFFF"><div align="right">家庭住址:</div></td>
<td bgcolor="#FFFFFF">
<input name="address" type="text" class="unnamed1" id="address" value="<%=rs4("address")%>"></td>
</tr>
<%end if%>
<tr bgcolor="#F3F3F3">
<td height="35" colspan="2"><div align="center">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
</div></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -