⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 house.asp

📁 本房地产网站功能强大
💻 ASP
📖 第 1 页 / 共 2 页
字号:
			  fangwei=trim(request("fangwei"))
			  fclx=trim(request("fclx"))
			  area=trim(request("area"))
			  opendataconn
              set rs=server.createobject("adodb.recordset")
              sql="select * from house where id<>0  "
			  if xxlb<>""  then
			  sql=sql & " and xxlb='"&xxlb&"'"
			  end if
			  if fangwei<>"" then
			  sql=sql & " and fangwei='"&fangwei&"'"
			  end if
			  if fclx<>"" then
			  sql=sql & " and fclx='"&fclx&"'"
			  end if
			  if area<>"" then
			  sql=sql & " and area like '%"&area&"%'"
			  end if
			  sql=sql & "  order by  dateandtime desc "
			 ' response.write sql
			 ' response.end
              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="#F3F3F3"> 
                        <td width="27" align="center" height="26"><input name="id" type="checkbox" class="mul2" id="id" value="<%=trim(rs("id"))%>"></td>
                        <td width="45" align="center"> <div align="center"> 
                            <%
						if rs("xxlb")="1" then
						response.write "<font color=#CC0000>出租</font>"
						elseif rs("xxlb")="2" then
						response.write "<font color=#006699>求租</font>"
						elseif rs("xxlb")="3" then
						response.write "<font color=#333333>求购</font>"
						elseif rs("xxlb")="4" then
						response.write "<font color=#0000FF>出售</font>"
						elseif rs("xxlb")="5" then
						response.write "<font color=#FF9900>合租</font>"
						elseif rs("xxlb")="6" then
						response.write "<font color=#0483BF>置换</font>"
						else
						response.write"空"
						end if
						id=trim(rs("id"))
							%>
                          </div></td>
                        <td width="62" align="center"><font color="#FF9900">&nbsp; 
                          </font><%=left(rs("fangwei"),15)%> </td>
                        <td width="73" align="center"><%=left(rs("fclx"),15)%></td>
                        <td width="68" align="center"><%=left(rs("area"),15)%></td>
                        <td width="103" align="center"> <%response.write year(rs("dateandtime")) & "-" & month(rs("dateandtime")) & "-" & day(rs("dateandtime"))%> </td>
                        <td width="42" align="center"><%if rs("sh") = 1 then%><a href='?fyaction=sh1&id=<%=id%>' title=取消审核 onclick="{if(confirm('确定取消审核吗?')){return true;}return false;}"><font color="#FF0000">已审</font></a>
			    <%else%>
			    <a href='?fyaction=sh&id=<%=id%>' onclick="{if(confirm('确定审核此信息吗?')){return true;}return false;}" title=审核信息>
						<font color="#0000FF">未审</font></a><font color="#0000FF"><%end if%></font></td>
                        <td align="center">
						<%If rs("tj")="1" then%>
                         <a href="?tj=0&ID=<%=id%>"> <font color="#FF0000">已推荐</font></a>
						  <%else%>
						  <a href="?tj=1&ID=<%=id%>">
						  推荐
						  </a>
						  <%end if%>
						  </td>
                        <td width="43" align="center">修改</td>
                        <td width="43" align="center">
						<a href="../house/hs_open.asp?id=<%=id%>">浏览</a></td>
                      </tr>
                      <%
              rs.movenext       
                count=count+1
                loop
               rs.close
               set rs=nothing
                  
              %><tr bgcolor="#DEF0FA"> 
                                  <td width="100%" colspan="18">&nbsp;&nbsp; <input type="checkbox" name="chkall" value="on" onClick="CheckAll()" class="mul"> 
                                    &nbsp; 选取以上全部记录&nbsp;&nbsp;&nbsp;&nbsp; 
									<input type="submit" value="删除" name="B2" onclick="return doDelete()"></td>
                                </tr>
                      <tr class="p13"> 
                        <td height="50" colspan="10" align="center"> &nbsp;&nbsp;&nbsp;&nbsp; 
                          <div align="center"> 
                            <% if cint(curpage)<>1 then %>
                            <a href="house.asp?curpage=1&xxlb=<%=xxlb%>&fangwei=<%=fangwei%>&fclx=<%=fclx%>&area=<%=area%>">首页&nbsp;</a> 
                            <% else %>
                            首页&nbsp; 
                            <% end if %>
                            <% if cint(curpage)>1 then %>
                            <a href="house.asp?curpage=<%=curpage-1%>&xxlb=<%=xxlb%>&fangwei=<%=fangwei%>&fclx=<%=fclx%>&area=<%=area%>">上一页&nbsp;</a> 
                            <% else %>
                            &nbsp;上一页 
                            <% end if %>
                            <% if cint(curpage)<>cint(totalpages) then %>
                            <a href="house.asp?curpage=<%=curpage+1%>&xxlb=<%=xxlb%>&fangwei=<%=fangwei%>&fclx=<%=fclx%>&area=<%=area%>">&nbsp;下一页 
                            <% else %>
                            &nbsp;下一页 
                            <% end if %>
                            <% if cint(curpage)<>cint(totalpages) then %>
                            </a><a href="house.asp?curpage=<%=totalpages%>&xxlb=<%=xxlb%>&fangwei=<%=fangwei%>&fclx=<%=fclx%>&area=<%=area%>">&nbsp;末页 
                            <% else %>
                            &nbsp;末页 
                            <% end if %>
                            </a> 
                            <input name="xxlb2" type="hidden" id="xxlb22" value="<%=xxlb%>">
                              第<font color="#FF0000"><%=curpage%></font>页/共<%=totalpages%>页    
                            <input name="xxlb3" type="hidden" id="xxlb3" value="<%=xxlb%>">
                              </div></td>
                      </tr>
                    </table>
                    </div>
                    <SCRIPT language=javascript>
function doDelete()
{
	if(confirm("确定要删除吗?删除后不可恢复!"))
	{
		return true;
	}
	else
	{
		return false;
	}
}
</SCRIPT>
                  </form>
	<%end sub
function douhao(kk)
douhao="'" & replace(kk,"'","''") & "'"
end function
sub del()

rcID= request.Form("id")
if rcID="" then
	response.write"<script>alert('选择要删除的文件!');history.go(-1)</script>"
	response.end
end if
	if instr(rcID,",")>0 then
		dim idArr,i
		idArr=split(rcID,",")
		for i = 0 to ubound(idArr)
			call Delinfo(clng(idArr(i)))
			'删除结束
		next
	else
	call Delinfo(clng(rcID))
	end if
	Response.write("<script>alert(""删除成功"");location.href=""house.asp"";</script>")
Response.end
end sub
sub Delinfo(ID)
	sqlDel="select * from house where id=" &ID
	Set rsDel= Server.CreateObject("ADODB.Recordset")
	rsDel.open sqlDel,conn,1,3
	
	
'开始删除信息上传的图片
ssD_SavePathFileName=rsDel("uploadfiles")
if ssD_SavePathFileName<>"" then
ssD_SavePathFileName=replace(ssD_SavePathFileName,"||","|")
		if ssD_SavePathFileName<>"" then
			' 把带"|"的字符串转为数组
	aSavePathFileName = Split(ssD_SavePathFileName, "|")
	' 删除新闻相关的文件,从文件夹中
	For i = 0 To UBound(aSavePathFileName)
		' 按路径文件名删除文件
		Call fy_DelFiles(aSavePathFileName(i))
	Next
	end if 
	 
'删除结束
end if

		rsDel.delete
		rsDel.update
		rsDel.close
		set rsDel=nothing
end sub
	conn.close
	set conn=nothing%>
<!--#include file="end.asp" -->
</body>
</html>

⌨️ 快捷键说明

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