📄 edit.asp
字号:
<!--#include file=../conn/conn1.asp -->
<% if request.cookies("okadmin")="" and request.cookies("rank")="" then
response.redirect "login.asp"
end if %>
<% dim typeto
typeto=trim(request("typeto")) %>
<title>房源信息查询</title>
<script language="JavaScript">
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
</script>
<%
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
%>
<html>
<head>
<style type="text/css">{ }
.9size { font-family: "宋体"; font-size: 9pt; color: #000000; text-decoration: none}
.txt { font-family: "宋体"; font-size: 9pt; color: #000000; text-decoration: none; background-color: #FFFFFF}
.link { font-family: "宋体"; font-size: 9pt; color: #000000; text-decoration: underline; cursor: hand; page-break-before: auto; page-break-after: auto?, OffX=20, OffY=30, Positive=50); page-break-before: auto; page-break-after: auto}
a:hover { font-family: "宋体"; font-size: 9pt; color: #FFFFFF}
.10size { font-family: "宋体"; font-size: 8pt; color: #000000; text-decoration: none }
-->
</style>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000000" vlink="#000000">
<center>
<table width="157" height="377" border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" bgcolor="#FFFFFF" style="border-collapse: collapse">
<tr>
<td height="38" width="567" style="border-left-style: none; border-left-width: medium" valign="bottom">
<b><font size="4"> <u>房源信息删除、推荐</u></font></b></td>
</tr>
<tr valign="top">
<td width="625" valign="top" style="border-left-style: none; border-left-width: medium" height="339">
<%
set rs=server.createobject("adodb.recordset")
sql= "SELECT zid,Num,Diduan, Fangx, Taox, Mianj, M, Jiag, J, Xiaoqm, Tele, Content,Dat,vip,fangshi,dj,"& typeto &".Dat FROM "& typeto &" order by dat Desc "
rs.open sql,conn,1,1
if rs.eof and rs.bof then %> <p align="center">还没有房源!</p>
<% else
rs.pagesize=25
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
%> <br>
<table width="580" style="border-collapse: collapse" bordercolor="#C0C0C0" cellpadding="2" border="1" bordercolorlight="#C0C0C0" bordercolordark="#C0C0C0">
<tr bgcolor="#00CCFF" class="9size" valign="bottom">
<td width="48" bgcolor="#D0D09D" style="border-style: solid; border-width: 1"> <div align="center">编 号</div></td>
<td width="53" bgcolor="#D0D09D" style="border-style: solid; border-width: 1"><div align="center">所属区域</div></td>
<td width="139" bgcolor="#D0D09D" style="border-style: solid; border-width: 1"> <div align="center">地 点</div></td>
<td width="54" bgcolor="#D0D09D" style="border-style: solid; border-width: 1"> <div align="center"><font size="2"><span style="font-size: 9pt">面积(M<sup>2</sup>)</span></font></div></td>
<td width="68" bgcolor="#D0D09D" style="border-style: solid; border-width: 1"> <div align="center">
<% If typeto="sale" Then
response.Write("价 格")
else
response.Write("租 金")
end if %>
</div></td>
<td width="72" bgcolor="#D0D09D" style="border-style: solid; border-width: 1"> <div align="center">详细内容</div></td>
<td width="43" bgcolor="#D0D09D" align="center" style="border-style: solid; border-width: 1"> 删除</td>
<td width="61" bgcolor="#D0D09D" align="center" style="border-style: solid; border-width: 1"> 推荐</td>
</tr>
<% i=1
do while not (rs.eof or err)%>
<tr class="9size" bgcolor="<%If (Repeat1__numRows Mod 2) Then%>#EAEAEA<%Else%>#FFFFFF<%End If%>">
<td width="48" style="border-style: solid; border-width: 1">
<div align="center">
<p align="center"><font color="#000000"><b><font color="#FF0000">
<% If rs("num")="" Then %> <%=rs("zid")%>
<% Else %>
<%= rs("num") %>
<% End If %>
</font></b></font></div></td>
<td width="53" style="border-style: solid; border-width: 1"><div align="center"><%=(rs.Fields.Item("Diduan").Value)%></div></td>
<td width="139" style="border-style: solid; border-width: 1"> <div align="left"> <%=(rs.Fields.Item("Xiaoqm").Value)%></div></td>
<td width="54" style="border-style: solid; border-width: 1">
<div align="center"><%=(rs.Fields.Item("Mianj").Value)%></div></td>
<td width="68" style="border-style: solid; border-width: 1">
<div align="center"><%=(rs.Fields.Item("Jiag").Value)%><font size="2"><%=(rs.Fields.Item("fangshi").Value)%></font></div></td>
<td width="72" style="border-style: solid; border-width: 1">
<div align="center">
<a target="_blank" href="../list.asp?zid=<%= rs.Fields.Item("zid").Value %>&typeto=<%= typeto %>"><font color="#0000FF">查阅详情</font></a></div></td>
<td width="43" align="center" style="border-style: solid; border-width: 1"> <a target="main" href="delete.asp?<%= "zid=" & rs.Fields.Item("zid").Value &"&typeto="&typeto&"&page="¤tPage %>"><font color="#0000FF">删除</font></a></td>
<td width="61" align="center" style="border-style: solid; border-width: 1">
<% if rs("vip")="是" then %>
<a href="vipset.asp?<%= "zid=" & rs.Fields.Item("zid").Value &"&typeto="&typeto&"&page="¤tPage %>"><font color="#0000FF">取消推荐</font></a>
<% Else %>
<a href="vipset.asp?<%= "zid=" & rs.Fields.Item("zid").Value &"&typeto="&typeto&"&page="¤tPage %>"><font color="#0000FF">推荐</font></a>
<% End If %></td>
</tr>
<%
if i>=MaxPerPage then exit do '循环时如果到尾部则先退出,如果记录达到页最大显示数,也退出
i=i+1
rs.movenext
loop
%>
</table>
<%end sub %> <%sub showpages() %> <table width="98%">
<tr>
<td align="right"><div align="right"><span style="font-size:9pt">符合条件的房源共<font color="#FF0000"><%=totalPage%></font>页/<font color="red"><%=totalPut%></font>条</span></div></td>
</tr>
</table>
<%
end sub
sub showpages1()
dim n
n=totalPage
%> <form action="edit.asp" method="GET" align="right">
<div align="left">
<table width="108%" height="30" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width="100%" height="30"> <div align="left"><span style="font-size:9pt">
共<font color="#FF0000"><%=totalPage%></font>页/<font color="red"><%=totalPut%></font>条房源</span>
<% If currentPage <> 1 Then %>
<A href=edit.asp?typeto=<%= request("typeto") %>><font color="#FF6600"><span style="font-size:9pt">[首页]</span></font></A>
<A href=edit.asp?typeto=<%= request("typeto") %>&Page= <%= (currentPage-1) %> ><font color="#FF6600"><span style="font-size:9pt">[上一页]</span></font></A>
<% End If %>
<% If currentPage <> rs.PageCount Then %>
<A href=edit.asp?typeto=<%= request("typeto") %>&Page=<%= (currentPage+1) %> ><font color="#FF6600"><span style="font-size:9pt">[下一页]</span></font></A>
<A href=edit.asp?typeto=<%= request("typeto") %>&Page=<%= totalPage %>><font color="#FF6600"><span style="font-size:9pt">[尾页]</span></font></A>
<% End If %>
<span style="font-size:9pt">第<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;'>"
%>
</span> </div></td>
</tr>
</table>
</div>
</form>
<%end sub%> </td>
</tr>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -