📄 house_update.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="pass.asp"-->
<%
if request("gn")<>"" then
gn=request("gn")
mytype=request("mytype")
fw_uid=request("fw_uid")
fw_city=request("fw_city")
fw_quyu=request("fw_quyu")
fw_dizhi=request("fw_dizhi")
fw_jiaotong=request("fw_jiaotong")
fw_leixing=request("fw_leixing")
fw_jiegou=request("fw_jiegou")
fw_louceng=request("fw_louceng")
fw_mianji=request("fw_mianji")
fw_zhuangxiu=request("fw_zhuangxiu")
fw_peitao=request("fw_peitao")
fw_jiage=request("fw_jiage")
fw_lxdh=request("fw_lxdh")
fw_lxname=request("fw_lxname")
fw_fbri=request("fw_fbri")
fw_guoqi=request("fw_guoqi")
fw_qtsm=request("fw_qtsm")
fw_lls=request("fw_lls")
set rs2=server.CreateObject("adodb.recordset")
sql2="select * from house where id="&gn
rs2.open sql2,conn,1,3
rs2("mytype")=mytype
rs2("fw_uid")=fw_uid
rs2("fw_city")=fw_city
rs2("fw_quyu")=fw_quyu
rs2("fw_dizhi")=fw_dizhi
rs2("fw_jiaotong")=fw_jiaotong
rs2("fw_leixing")=fw_leixing
rs2("fw_jiegou")=fw_jiegou
rs2("fw_louceng")=fw_louceng
rs2("fw_mianji")=fw_mianji
rs2("fw_zhuangxiu")=fw_zhuangxiu
rs2("fw_peitao")=fw_peitao
rs2("fw_jiage")=fw_jiage
rs2("fw_lxdh")=fw_lxdh
rs2("fw_lxname")=fw_lxname
rs2("fw_fbri")=fw_fbri
rs2("fw_guoqi")=fw_guoqi
rs2("fw_qtsm")=fw_qtsm
rs2("fw_lls")=fw_lls
rs2.update
Response.Write"<script language=JavaScript>"
Response.Write"alert(""恭喜!修改成功"");"
Response.Write"window.location='house.asp'"
Response.Write"</script>"
else
response.Write""
end if
%>
<%
if request("xiugai")<>"" then
xiugai=request("xiugai")
set rs=server.CreateObject("adodb.recordset")
sql="select * from house where id="&xiugai
rs.open sql,conn,1,3
%>
<SCRIPT language="javascript">
<!--
function del_space(s)
{
for(i=0;i<s.length;++i)
{
if(s.charAt(i)!=" ")
break;
}
for(j=s.length-1;j>=0;--j)
{
if(s.charAt(j)!=" ")
break;
}
return s.substring(i,++j);
}
function VerifySubmit()
{
fw_dizhi = del_space(document.all("fw_dizhi").value);
if (fw_dizhi == 0)
{
alert("注意:房屋地址不能为空!");
return false;
}
fw_louceng = del_space(document.all("fw_louceng").value);
if (fw_louceng.length == 0)
{
alert("注意:房屋楼层不能为空!");
return false;
}
fw_mianji = del_space(document.all("fw_mianji").value);
if (fw_mianji == 0)
{
alert("注意:房屋面积不能为空!");
return false;
}
fw_jiage = del_space(document.all("fw_jiage").value);
if (fw_jiage.length == 0)
{
alert("注意:房屋价格不能为空!");
return false;
}
fw_lxdh = del_space(document.all("fw_lxdh").value);
if (fw_lxdh.length == 0)
{
alert("注意:联系电话不能为空!");
return false;
}
fw_lxname = del_space(document.all("fw_lxname").value);
if (fw_lxname.length == 0)
{
alert("注意:联系人姓名不能为空!");
return false;
}
return true;
}
//-->
</SCRIPT>
<form name="form2" onSubmit="return VerifySubmit()" method="post" action="house_update.asp?gn=<% =rs("id") %>">
<TABLE width="80%" border=1 align="center" cellPadding=2 cellSpacing=1 borderColor=#ffffff bgColor=#00659c>
<TR borderColor=#007db5 bgColor=#007db5>
<TD vAlign=bottom bgcolor="#007db5"><font color="#FFFFFF">修改、删除操作:</font></TD>
</TR>
<TR borderColor=#ffffff bgColor=#ffffff>
<TD><table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="12%"><font color="#007db5">发布类型:</font></td>
<td> <input name="mytype" type="radio" value="出售" <% if rs("mytype")="出售" then
response.Write"checked"
end if %>>
出售
<input name="mytype" type="radio" value="求购" <% if rs("mytype")="求购" then
response.Write"checked"
end if %>>
求购
<input name="mytype" type="radio" value="出租" <% if rs("mytype")="出租" then
response.Write"checked"
end if %>>
出租
<input name="mytype" type="radio" value="求租" <% if rs("mytype")="求租" then
response.Write"checked"
end if %>>
求租
<input name="mytype" type="radio" value="合租" <% if rs("mytype")="合租" then
response.Write"checked"
end if %>>
合租 <font color="#FF0000">*</font></td>
</tr>
<tr>
<td><font color="#007db5">发 布 人:</font></td>
<td><input name="fw_uid" type="text" id="fw_uid" value="<% =rs("fw_uid") %>">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td><font color="#007db5">所属城市:</font></td>
<td><input name="fw_city" type="text" id="fw_city" value="<% =rs("fw_city") %>"></td>
</tr>
<tr>
<td><font color="#007db5">所属区域:</font></td>
<td><input name="fw_quyu" type="text" id="fw_quyu" value="<% =rs("fw_quyu") %>"></td>
</tr>
<tr>
<td valign="middle"><font color="#007db5">房屋地址:</font></td>
<td><input name="fw_dizhi" type="text" id="fw_dizhi" value="<% =rs("fw_dizhi") %>" size="70">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td><font color="#007db5">交通路线:</font></td>
<td><input name="fw_jiaotong" type="text" id="fw_jiaotong" value="<% =rs("fw_jiaotong") %>" size="70"></td>
</tr>
<tr>
<td><font color="#007db5">房屋类型:</font></td>
<td><font size="2">
<select name="fw_leixing" id="select26">
<option value="住宅" <% if rs("fw_leixing")="住宅" then
response.Write"selected"
end if %>>住宅</option>
<option value="公寓" <% if rs("fw_leixing")="公寓" then
response.Write"selected"
end if %>>公寓</option>
<option value="别墅" <% if rs("fw_leixing")="别墅" then
response.Write"selected"
end if %>>别墅</option>
<option value="厂房" <% if rs("fw_leixing")="厂房" then
response.Write"selected"
end if %>>厂房</option>
<option value="仓库" <% if rs("fw_leixing")="仓库" then
response.Write"selected"
end if %>>仓库</option>
<option value="农民房" <% if rs("fw_leixing")="农民房" then
response.Write"selected"
end if %>>农民房</option>
<option value="商品房" <% if rs("fw_leixing")="商品房" then
response.Write"selected"
end if %>>商品房</option>
<option value="写字楼" <% if rs("fw_leixing")="写字楼" then
response.Write"selected"
end if %>>写字楼</option>
<option value="其他" <% if rs("fw_leixing")="其他" then
response.Write"selected"
end if %>>其他</option>
</select>
</font></td>
</tr>
<tr>
<td><font color="#007db5">房屋结构:</font></td>
<td><font size="2">
<select name="fw_jiegou" id="select27">
<option value="一室户" <% if rs("fw_jiegou")="一室户" then
response.Write"selected"
end if %>>一室户</option>
<option value="一室一厅" <% if rs("fw_jiegou")="一室一厅" then
response.Write"selected"
end if %>>一室一厅</option>
<option value="二室一厅" <% if rs("fw_jiegou")="二室一厅" then
response.Write"selected"
end if %>>二室一厅</option>
<option value="二室二厅" <% if rs("fw_jiegou")="二室二厅" then
response.Write"selected"
end if %>>二室二厅</option>
<option value="三室一厅" <% if rs("fw_jiegou")="三室一厅" then
response.Write"selected"
end if %>>三室一厅</option>
<option value="三室二厅" <% if rs("fw_jiegou")="三室二厅" then
response.Write"selected"
end if %>>三室二厅</option>
<option value="四室一厅" <% if rs("fw_jiegou")="四室一厅" then
response.Write"selected"
end if %>>四室一厅</option>
<option value="四室二厅" <% if rs("fw_jiegou")="四室二厅" then
response.Write"selected"
end if %>>四室二厅</option>
<option value="其他结构" <% if rs("fw_jiegou")="其他结构" then
response.Write"selected"
end if %>>其他结构</option>
</select>
</font></td>
</tr>
<tr>
<td><font color="#007db5">所在楼层:</font></td>
<td><input name="fw_louceng" type="text" id="fw_louceng" value="<% =rs("fw_louceng") %>">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td><font color="#007db5">房屋面积:</font></td>
<td><input name="fw_mianji" type="text" id="fw_mianji" value="<% =rs("fw_mianji") %>">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td><font color="#007db5">装修情况:</font></td>
<td><font size="2">
<select name="fw_zhuangxiu" id="select30">
<option value="无装修" <% if rs("fw_zhuangxiu")="无装修" then
response.Write"selected"
end if%>>无装修</option>
<option value="一般装修" <% if rs("fw_zhuangxiu")="一般装修" then
response.Write"selected"
end if%>>一般装修</option>
<option value="中档装修" <% if rs("fw_zhuangxiu")="中档装修" then
response.Write"selected"
end if%>>中档装修</option>
<option value="高档装修" <% if rs("fw_zhuangxiu")="高档装修" then
response.Write"selected"
end if%>>高档装修</option>
<option value="顶级装修" <% if rs("fw_zhuangxiu")="顶级装修" then
response.Write"selected"
end if%>>顶级装修</option>
</select>
</font></td>
</tr>
<tr>
<td><font color="#007db5">配套设施:</font></td>
<td><input name="fw_peitao" type="text" id="fw_peitao" value="<% =rs("fw_peitao") %>" size="70"></td>
</tr>
<tr>
<td><font color="#007db5">房屋价格:</font></td>
<td><input name="fw_jiage" type="text" id="fw_jiage" value="<% =rs("fw_jiage") %>">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td><font color="#007db5">联系电话:</font></td>
<td><input name="fw_lxdh" type="text" id="fw_lxdh" value="<% =rs("fw_lxdh") %>">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td><font color="#007db5">联 系 人:</font></td>
<td><input name="fw_lxname" type="text" id="fw_lxname" value="<% =rs("fw_lxname") %>">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td><font color="#007db5">发布日期:</font></td>
<td><input name="fw_fbri" type="text" id="fw_fbri" value="<% =rs("fw_fbri") %>"></td>
</tr>
<tr>
<td><font color="#007db5">过期日期:</font></td>
<td><input name="fw_guoqi" type="text" id="fw_guoqi" value="<% =rs("fw_guoqi") %>"></td>
</tr>
<tr>
<td><font color="#007db5">其他说明:</font></td>
<td><textarea name="fw_qtsm" cols="80" rows="6" id="fw_qtsm"><% =rs("fw_qtsm") %></textarea></td>
</tr>
<tr>
<td><font color="#007db5">人气指数:</font></td>
<td><input name="fw_lls" type="text" id="fw_lls" value="<% =rs("fw_lls") %>" size="8"></td>
</tr>
<tr>
<td> </td>
<td> <div align="center">
<input type="submit" name="Submit" value="提 交 本 次 修 改">
<font size="2">
<input onClick="window.location='shop_update.asp?id=<% =rs("id") %>'" type="button" value="删 除 此 信 息" name="Button22">
</font>
</div></td>
</tr>
</table></TD>
</TR>
</TABLE>
</form>
<% else
response.Write""
end if
if request("id")<>"" then
id=request.QueryString("id")
conn.execute ("delete from house where id="&id)
Response.Write"<script language=JavaScript>"
Response.Write"alert(""恭喜!删除成功"");"
Response.Write"window.location='house.asp'"
Response.Write"</script>"
else
response.Write""
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -