📄 user_dir.asp
字号:
<!--#include file="conn.asp" -->
<!--#include file="user_pass.asp" -->
<%
uid=session("uid")
set rs=server.createobject("adodb.recordset")
sql="select * from puser where uid='"&uid&"'order by ID desc"
rs.open sql,conn,1,1
%>
<% dim typeto
typeto=trim(request("type")) %>
<%
keyword=request("type")
%>
<html>
<title>房源信息查询</title>
<%
dim MaxPerPage
dim sql
dim rs
dim gstBookID
dim totalPut
dim CurrentPage
dim TotalPages
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<link href="css/css.css" rel="stylesheet" type="text/css">
<head>
<script language= "javascript">
function newpage(htmlurl) {
var newwin=window.open(htmlurl,"newWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=2,left=2,width=600,height=350");
newwin.focus();
return false;
}
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<tr>
<br><b>
<font class="12h"><%if keyword="sale" then%> 我的出售信息</font>
<%else%><font class="12h"> 我的出租信息</font><%end if%>
</b>
</tr>
<TBODY>
<tr>
<td height="6" width="567" style="border-left-style: none; border-left-width: medium" valign="bottom">
<%
set rs=server.createobject("adodb.recordset")
sql= "SELECT zid,Num,Diduan, Fangx, Taox, Mianj, M, Lc,Jiag, J, Xiaoqm, Tele, Content,Dat,fangshi,dj, "& typeto &".Dat FROM "& typeto &" where uid='"&uid&"'order by dat Desc "
rs.open sql,conn,1,1
if rs.eof and rs.bof then %>
<p align="center"> <font color="#FF0000">还没有房源!</font></p>
<p>
<% else
rs.pagesize=15
totalPut=rs.recordcount '记录总数
totalPage=rs.pagecount
MaxPerPage=rs.pagesize
if currentpage<1 then
currentpage=1
end if
if currentpage>totalPage then
currentpage=totalPage
end if
if currentPage=1 then
showpages
showContent
showpages1
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark '移动到开始显示的记录位置
showpages
showContent
showpages1
else
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
sub showContent
dim i,j
%>
</td>
</tr>
<tr>
<td width="567" valign="top" > <table width="96%" border="0" align="center" >
<tr align="center" valign="middle" bgcolor="#99CCFF">
<td width="10%" height="25">编 号</td>
<td width="14%">所属区域</td>
<td width="22%"> 地 点</td>
<td width="13%">套 型 </td>
<td width="6%">楼层</td>
<td width="13%">面积(M<sup>2</sup>)</td>
<td width="13%">
<% If typeto="sale" Then
response.Write("价格")
else
response.Write("租金")
end if %>
</td>
<td >管理</td>
</tr>
<% i=1
do while not (rs.eof or err)%>
<tr align="center">
<td width="10%" bgcolor="<%If (i Mod 2) Then%>#F8F8F8<%Else%>#efefef<%End If%>" >
<% If rs("num")="" Then %>
<%=rs("zid")%>
<% Else %>
<%= rs("num") %>
<% End If %>
</td>
<td width="14%" bgcolor="<%If (i Mod 2) Then%>#F8F8F8<%Else%>#efefef<%End If%>" ><%=(rs.Fields.Item("Diduan").Value)%></td>
<td width="22%" bgcolor="<%If (i Mod 2) Then%>#F8F8F8<%Else%>#efefef<%End If%>" >
<a target="_blank" onClick="return newpage(this.href);" href="show.asp?zid=<%= rs.Fields.Item("zid").Value %>&typeto=<%= typeto %>"><font color="#000080"><%=(rs.Fields.Item("Xiaoqm").Value)%></font></a></td>
<td width="13%" bgcolor="<%If (i Mod 2) Then%>#F8F8F8<%Else%>#efefef<%End If%>"><%=(rs.Fields.Item("Taox").Value)%></td>
<td width="6%" bgcolor="<%If (i Mod 2) Then%>#F8F8F8<%Else%>#efefef<%End If%>"><%=(rs.Fields.Item("Lc").Value)%></td>
<td width="13%" bgcolor="<%If (i Mod 2) Then%>#F8F8F8<%Else%>#efefef<%End If%>" >
<%=(rs.Fields.Item("Mianj").Value)%></div></td>
<td width="13%" bgcolor="<%If (i Mod 2) Then%>#F8F8F8<%Else%>#efefef<%End If%>" >
<%=(rs.Fields.Item("Jiag").Value)%><%=(rs.Fields.Item("fangshi").Value)%></div></td>
<td width="9%" bgcolor="<%If (i Mod 2) Then%>#F8F8F8<%Else%>#efefef<%End If%>" ><a href="delete.asp?<%= "zid=" & rs.Fields.Item("zid").Value &"&typeto="&typeto&"&page="¤tPage %>">
删除</a></td>
</tr>
<%
if i>=MaxPerPage then exit do '循环时如果到尾部则先退出,如果记录达到页最大显示数,也退出
i=i+1
rs.movenext
loop
%>
</table>
<%end sub %>
<%sub showpages() %>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="right"><div align="right"> 符合条件的房源共<font color="#FF0000"><%=totalPage%></font>页/<font color="red"><%=totalPut%></font>条</div></td>
</tr>
</table>
<%
end sub
dim n
n=totalPage
%>
<form action="user_dir.asp" method="GET" align="right">
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%"> 共<font color="#FF0000"><%=totalPage%></font>页/<font color="red"><%=totalPut%></font>条房源
<% If currentPage <> 1 Then %>
<A href=user_dir.asp?type=<%= request("type") %>><font color="#FF6600">
[首页]</font></A> <A href=user_dir.asp?type=<%= request("type") %>&Page=<%= (currentPage-1) %> ><font color="#FF6600">
[上一页]</font></A>
<% End If %>
<% If currentPage <> rs.PageCount Then %>
<A href=user_dir.asp?type=<%= request("type") %>&Page=<%= (currentPage+1) %> ><font color="#FF6600">
[下一页]</font></A> <A href=user_dir.asp?type=<%= request("type") %>&Page=<%= totalPage %>><font color="#FF6600">
[尾页]</font></A>
<% End If %>
第<font color="#FF0000"><%=currentPage%></font>页/共<font color="#FF0000"><%=totalPage%></font>页
<% response.write " 转到:<select name='page' size=1 class=smallselsect style='font-family: 宋体; font-size: 9pt;'>"
for i=1 to n
response.write "<option value="& i
if currentpage=i then
response.write " selected"
end if
response.write ">"& i &"</option>"
next
response.write "</select>"
response.write "<input type='hidden' name='type' value="&typeto&">"
response.write " <input class=buttonface type='submit' value='go' style='font-family: 宋体; font-size: 9pt;'>"
%>
</table>
</form></td>
<TD bgcolor="#F8F8F8"> </table>
<tr> </table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -