newhouse_del.asp

来自「房地产管理系统 vb写的,很不错!!!!!!!!!!!」· ASP 代码 · 共 248 行

ASP
248
字号
<!--#include file="../inc/conn.asp"-->
<%
'┌─  风云ASP在线  ────────────────────────┐
'│                                                                 │
'│  作者:赵振波.	http://www.fyasp.com	    				    │
'│                                                                 │
'│   Q Q:176189168  										   	    │
'│                                                                 │
'│ Email:fy96@163.com                                             │
'│                                                                 │
'│ 程序定做,系统开发,网站制作,提供高质量的网络产品、技术和服务!│
'│                                                                 │
'│                                                                 │
'└───────────────────  http://www.fyasp.com ──┘
%>

<%
If session("manager")="" Then
  Response.Redirect("../manage.asp")
  Response.End
 End If
action=Trim(Request("action"))
If Action="del" Then
opendataconn
  ids=split(request("hid"),",") 
  for i=0 to ubound(ids)
    tt=trim(ids(i))
    conn.execute"delete from newhouse where hid="&tt&""
        next
closedataconn
End If
%>
<html>
<!-- DW6 -->
<head>
<title>后台管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../ht.css" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>

<body bgcolor="#666666" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (index.psd) -->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><img src="../images/ht_01.gif" width=778 height=62 usemap="#Map" border="0"></td>
  </tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" background="../images/htbj.gif">
  <tr> 
    <td valign="top" align="left" width="145" height="395">
      <!--#include file="List.asp" -->
    </td>
    <td height="395" align="center" valign="top"> <br> <table width="621" border="0" cellspacing="0" cellpadding="0" height="98">
        <tr> 
          <td align="center" valign="top"> <table width="606" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><img src="../images/httable_01.gif" width=606 height=17></td>
              </tr>
              <tr> 
                <td height="268" align="center" valign="top" background="../images/httable_02.gif"><table width="559" height="39" border="0" cellpadding="0" cellspacing="0">
                    <form name="form1" method="post" action="newhouse_del.asp">
                      <tr> 
                        <td> <img src="../images/icon_search.gif" width="15" height="15"><FONT color="#FFCC00" 
            size=2>区域</FONT> <FONT color=#FFCC00> <SPAN class=P9><FONT color=red> 
                          <%
						  OpenDataConn
						  set rscyte=server.CreateObject("adodb.recordset")
						  sqlcyte = "select * from cyte"
						  rscyte.Open sqlcyte,conn,1,1
						  %>
                          <select name="area" id="id"  class="inp">
                            <option value="">请选择</option>
                            <%do while not rscyte.eof%>
                            <option value="<%=rscyte("cyte")%>"><%=rscyte("cyte")%></option>
                            <%
								rscyte.movenext
								loop
								rscyte.close
								set rscyte=nothing
								%>
                          </select>
                          </FONT></SPAN></FONT><font color="#FFCC00" size="2">价格</font> 
                          <input name="price1" type="text" id="price1" size="3">-<input name="price2" type="text" id="price2" size="3"><font color="#FFCC00" size="2">元/m<sup>2 </sup>楼盘</font><font color="#FFCC00"><input name="houseName" type="text" id="houseName" size="8">
                          </font> <font color="#FFCC00"> 开发商 
                          <input name="developer" type="text" id="developer" size="8">
                          <input type="submit" name="Submit" value="搜">
                          </font> <font color="#FFCC00">&nbsp;</font></td>
                      </tr>
                    </form>
                  </table>
                  <table width="62%" height="23" border="0" cellpadding="0" cellspacing="0">
                    <tr align="center"> 
                      <td>[<a href="newhouse_add.asp">添加</a>]</td>
                      <td>[<a href="newhouse_del.asp">修改 删除</a>]</td>
                    </tr>
                  </table>
                  <table border="0" width="95%" cellspacing="1" cellpadding="0">
                    <form name="form2" method="post" action="newhouse_del.asp?action=del">
                      <tr bgcolor="#999999" class="p13"> 
                        <td width="4%" align="center"> </td>
                        <td width="17%" align="center" bgcolor="#999999">楼盘名称</td>
                        <td width="12%" align="center" bgcolor="#999999"><font color="#FFFFFF">区域</font></td>
                        <td width="13%" align="center" bgcolor="#999999">均价(元/m<sup>2</sup>)</td>
                        <td width="28%" align="center" bgcolor="#999999"><font color="#FFFFFF">开发商</font></td>
                        <td width="12%" align="center" bgcolor="#999999"><font color="#FFFFFF">登记时间</font></td>
                        <td width="8%" align="center" bgcolor="#999999"> </td>
                        <td width="5%" align="center" bgcolor="#999999"> </td>
                      </tr>
                      <%
		userid=session("loginid")
              dim curpage
              if request("curpage")="" then
                 curpage=1
              else
                 curpage=request("curpage")
              end if
              const numperpage=15
              area=trim(request("area"))
			  developer=trim(request("developer"))
			  HouseName=trim(request("HouseName"))
			  price1=trim(request("price1"))
			  price2=Trim(Request("price2"))
			 
              set rs=server.createobject("adodb.recordset")
              sql="select * from NewHouse where hid is not null"
			  if price1<>""  then
			  sql=sql & " and beginprice>="&price1&" or avgprice>="&price1&""
			  end if
			  if price2<>""  then
			  sql=sql & " and beginprice>="&price2&" or avgprice<="&price2&""
			  end if
			  if developer<>"" then
			  sql=sql & " and developer like '%"&developer&"%'"
			  end if
			  if HouseName<>"" then
			  sql=sql & " and HouseName like '%"&HouseName&"%'"
			  end if
			  if area<>"" then
			  sql=sql & " and area like '%"&area&"%'"
			  end if
			  sql=sql & " order by  dateandtime desc "
              rs.open sql,conn,1,1
              if rs.eof then
              response.write "<table><tr><td><br></br><center>现在还没有记录!</center><br></br></td></tr></table>"
                     response.end
              end if
            if not rs.eof then
            rs.pagesize=numperpage
            dim totalpages
            totalpages=rs.pagecount
            rs.absolutepage=curpage
            end if        
           dim count
           count=0
           do while not rs.eof and count<numperpage
              %>
                      <tr bgcolor="#666666" class="p13"> 
                        <td align="center"> <input name="hid" type="checkbox" class="mul2" id="hid" value="<%=trim(rs("hid"))%>"> 
                        </td>
                        <td align="center" bgcolor="#666666"> <a href="../house/newhouse_detail2.asp?HID=<%=Trim(rs("HID"))%>" target="_blank"><%=Trim(rs("HouseName"))%></a></td>
                        <td align="center"><%=left(trim(rs("area")),4)%></td>
                        <td align="center"><%=Trim(rs("avgprice"))%></td>
                        <td align="center"><%=left(rs("developer"),6)%></td>
                        <td align="center"> <%response.write year(rs("dateandtime")) & "-" & month(rs("dateandtime")) & "-" & day(rs("dateandtime"))%> </td>
                        <td align="center">
						<%If rs("Tj")="1" then%>
                          <font color="#FF0000">已推荐</font>
						  <%else%>
						  <a href="Newhouse_Tj.Asp?ID=<%=rs("HID")%>">
						  推荐
						  </a>
						  <%end if%>
						  </td>
                        <td align="center"><a href="NewHouse_modi.asp?Hid=<%=Trim(rs("HID"))%>">修改</a></td>
                      </tr>
                      <%
              rs.movenext       
                count=count+1
                loop
               rs.close
               set rs=nothing
               closedataconn    
              %>
                      <tr class="p13"> 
                        <td height="50" colspan="8" align="center"> &nbsp;&nbsp;&nbsp;&nbsp; 
                          <div align="center"> 
                            <% if cint(curpage)<>1 then %>
                            <a href="newhouse_del.asp?curpage=1&area=<%=area%>&developer=<%=developer%>&HouseName=<%=HouseName%>&price1=<%=price1%>">首页&nbsp;</a> 
                            <% else %>
                            首页&nbsp; 
                            <% end if %>
                            <% if cint(curpage)>1 then %>
                            <a href="newhouse_del.asp?curpage=<%=curpage-1%>&area=<%=area%>&developer=<%=developer%>&HouseName=<%=HouseName%>&price1=<%=price1%>">上一页&nbsp;</a> 
                            <% else %>
                            &nbsp;上一页 
                            <% end if %>
                            <% if cint(curpage)<>cint(totalpages) then %>
                            <a href="newhouse_del.asp?curpage=<%=curpage+1%>&area=<%=area%>&developer=<%=developer%>&HouseName=<%=HouseName%>&price1=<%=price1%>">&nbsp;下一页 
                            <% else %>
                            &nbsp;下一页 
                            <% end if %>
                            <% if cint(curpage)<>cint(totalpages) then %>
                            </a><a href="newhouse_del.asp?curpage=<%=totalpages%>&area=<%=area%>&developer=<%=developer%>&HouseName=<%=HouseName%>&price1=<%=price1%>">&nbsp;末页 
                            <% else %>
                            &nbsp;末页 
                            <% end if %>
                            </a>   第<font color="#FF0000"><%=curpage%></font>页/共<%=totalpages%>页  
                            <input type="submit" value=" 删 除 " name="B12" onclick="return doDelete()">
                                </div></td>
                      </tr>
                    </form>
                  </table>
                  <SCRIPT language=javascript>
function doDelete()
{
	if(confirm("确定要删除吗?删除后不可恢复!"))
	{
		return true;
	}
	else
	{
		return false;
	}
}
</SCRIPT> </td>
              </tr>
              <tr> 
                <td><img src="../images/httable_04.gif" width=606 height=19></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<!-- End ImageReady Slices -->
<map name="Map">
  <area shape="rect" coords="630,36,775,56" href="http://www.fyasp.com" target="_blank">
</map>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?