📄 xinxi_edit1.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file=cookies.asp-->
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>信息修改</title>
<link rel="stylesheet" type="text/css" href="../1.CSS">
</head>
<body topmargin="0" leftmargin="0">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="490" height="428">
<tr>
<td width="104" height="356" valign="top"><div align="center">
<center>
<table width="489" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<form action="xinxi_editchk1.asp" name="myform" method="POST">
<tr>
<td width="456">
</td>
</tr>
<tr>
<td width="456">
<table width="513" border="0" cellspacing="0" cellpadding="0" height="126" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td height="21" colspan="2" width="456">
<p align="center">修改信息</td>
</tr>
<tr>
<td height="25" width="103" bgcolor="#CCCCCC" >
<p> </td>
<td height="25" width="410" bgcolor="#CCCCCC" >
</td>
</tr>
<tr>
<td height="25" width="103" align="right" style="border-left-style: solid; border-left-width: 1" bordercolor="#999999" >
信息类别:</td>
<td height="25" width="410" style="border-right-style: solid; border-right-width: 1" bordercolor="#999999" >
<%
dim rs
dim sql,i
dim count,username
dim id,class1,class2,biaoti,leixing,jiage,diqu,memo,name,email,dianhua,tupian
id=trim(request("id"))
set rs=server.createobject("adodb.recordset")
sql = "select username,class1,class2,biaoti,leixing,jiage,diqu,memo,tupian,name,email,dianhua from myxinxi where id="&cstr(id)
rs.open sql,conn,1,1
if rs.eof then
response.write "参数错误!"
response.end
end if
username=rs("username")
class1=rs("class1")
class2=rs("class2")
biaoti=rs("biaoti")
leixing=rs("leixing")
jiage=rs("jiage")
diqu=rs("diqu")
memo=rs("memo")
tupian=rs("tupian")
name=rs("name")
email=rs("email")
dianhua=rs("dianhua")
rs.close
sql = "select * from class2 order by paixu desc"
rs.open sql,conn,1,1
%><SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("class2"))%>","<%= trim(rs("class1"))%>","<%= trim(rs("id"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.class2.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.class2.options[document.myform.class2.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</SCRIPT>
<%
sql = "select * from class1 order by paixu desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加分类。"
response.end
else
%>
<SELECT name="class1" onChange="changelocation(document.myform.class1.options[document.myform.class1.selectedIndex].value)" size="1">
<OPTION value="0">==分类==</OPTION>
<%do while not rs.eof%>
<OPTION <%if trim(class1)=cstr(rs("id")) then%>selected<%end if%> value="<%=trim(rs("id"))%>"><%=trim(rs("class1"))%></OPTION>
<%
rs.movenext
loop
end if
rs.close
%>
</SELECT>
<SELECT name="class2">
<%
sql = "select id,class2 from class2 where id="&cstr(class2)
rs.open sql,conn,1,1
%>
<OPTION <%if trim(class2)=cstr(rs("id")) then%>selected<%end if%> value="<%=trim(rs("id"))%>"><%=trim(rs("class2"))%></OPTION>
<%rs.close%>
</SELECT><input type="hidden" name="id" size="7" maxlength="6" value="<%=id%>"></td>
</tr>
<tr>
<td height="25" width="103" align="right" style="border-left-style: solid; border-left-width: 1" bordercolor="#999999" >
信息标题:</td>
<td height="25" width="410" style="border-right-style: solid; border-right-width: 1" bordercolor="#999999" >
<input type="text" maxlength="40" name="biaoti" size="47" value="<%=biaoti%>">(<font color="#CC5200">40字以内</font>)</td>
</tr>
<tr>
<td height="25" width="103" align="right" style="border-left-style: solid; border-left-width: 1" bordercolor="#999999" >
交易类型:</td>
<td height="25" width="410" style="border-right-style: solid; border-right-width: 1" bordercolor="#999999" >
<select name="leixing">
<option <%if leixing="1" then%>selected<%end if%> value="1">出售</option>
<option <%if leixing="2" then%>selected<%end if%> value="2">求购</option>
<option <%if leixing="3" then%>selected<%end if%> value="3">出租</option>
<option <%if leixing="4" then%>selected<%end if%> value="4">求租</option>
<option <%if leixing="5" then%>selected<%end if%> value="5">求职</option>
</select></td>
</tr>
<tr>
<td height="25" width="103" align="right" style="border-left-style: solid; border-left-width: 1" bordercolor="#999999" >
价 格:</td>
<td height="25" width="410" style="border-right-style: solid; border-right-width: 1" bordercolor="#999999" >
<input type="text" name="jiage" size="7" maxlength="6" value="<%=jiage%>">
元 (<font color="#CC5200">建议写清楚有关价格方面的信息,</font>0<font color="#CC5200">元表示面议</font>)</td>
</tr>
<tr>
<td height="25" width="103" align="right" style="border-left-style: solid; border-left-width: 1" bordercolor="#999999" >
交易地区:</td>
<td height="25" width="410" style="border-right-style: solid; border-right-width: 1" bordercolor="#999999" >
<input type="text" name="diqu" size="21" maxlength="10" value="<%=diqu%>">(<font color="#CC5200">10字以内</font>)</td>
</tr>
<tr>
<td height="25" width="103" align="right" style="border-left-style: solid; border-left-width: 1" bordercolor="#999999" >
<p>信息说明:</td>
<td height="25" width="410" style="border-right-style: solid; border-right-width: 1" bordercolor="#999999" >
<textarea rows="11" name="memo" cols="62"><%=memo%></textarea></td>
</tr>
<%
sql = "select name,email,dianhua,a,b,c,d from [user] where username='"&username&"'"
rs.open sql,conn,1,1
if rs.eof then
response.write "找不到用户资料!"
response.end
end if
%>
<tr>
<td height="25" width="103" align="right" style="border-left-style: solid; border-left-width: 1" bordercolor="#999999" >
联系人:</td>
<td height="25" width="410" style="border-right-style: solid; border-right-width: 1" bordercolor="#999999" >
<input type="text" name="name" size="23" maxlength="15" value="<%=name%>"></td>
</tr>
<tr>
<td height="25" width="103" align="right" style="border-left-style: solid; border-left-width: 1" bordercolor="#999999" >
email:</td>
<td height="25" width="410" style="border-right-style: solid; border-right-width: 1" bordercolor="#999999" >
<input type="text" name="email" size="23" maxlength="40" value="<%=email%>"></td>
</tr>
<tr>
<td height="25" width="103" align="right" style="border-left-style: solid; border-left-width: 1" bordercolor="#999999" >
联系电话:</td>
<td height="25" width="410" style="border-right-style: solid; border-right-width: 1" bordercolor="#999999" >
<input type="text" name="dianhua" size="23" maxlength="40" value="<%=dianhua%>"></td>
</tr>
<tr>
<td height="25" width="103" style="border-left-style: solid; border-left-width: 1" bordercolor="#999999" >
</td>
<td height="25" width="410" style="border-right-style: solid; border-right-width: 1" bordercolor="#999999" >
</td>
</tr>
<tr>
<td height="25" colspan="2" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1" bordercolor="#999999">
<p align="center">
<input type="submit" value="提交" name="B1"></td>
</tr>
<tr>
<td height="20" colspan="2" width="456" bgcolor="#CCCCCC">
<p align="left"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="456">
</td>
</tr>
</form>
</table>
</center>
</div>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
<%
rs.close
set rs=nothing
closedb
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -