?? adminold.asp
字號:
<!--#include file=conn.asp -->
<% if request.cookies("okadmin")="" and request.cookies("rank")="" then
response.redirect "login.asp"
end if %>
<SCRIPT language=Javascript>
function confirmdel(id,table)
{
if(confirm("你確實要刪除ID為"+id+"的記錄嗎?")==true)
{
window.location = "?tt="+table+"&del=true&id="+id;
}
}
</script>
<%
if request.querystring("del")="true" then
id=Request.QueryString("id")
sql="delete * from "&trim(request.querystring("tt"))&" where id="&id
conn.execute(sql)
response.write "<h3>該記錄刪除成功!</h3>"
response.end()
end if %>
<TABLE width=760 border=0 align=center cellPadding=0 cellSpacing=0 bgcolor="#FFFFFF" class=bk>
<TBODY>
<TR>
<TD vAlign=top align=middle width=1
background=images/index_00.gif
height=500>
<br> </TD>
<TD vAlign=top align=middle height=300 rowSpan=12>
<TABLE cellSpacing=0 cellPadding=0 width="672" border=0>
<TBODY>
<TR>
<TD align=middle> <table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/sj_dhtp.jpg" >
<tr>
<td width="4%"> </td>
<td width="71%"> </td>
<td width="25%"> </td>
</tr>
</table></TD>
</TR>
<TR>
<TD align=left valign="top">
<% old2=request("old1")
old1=request("old2")
if old1="s_" then
e1="出售"
else
e1="出租"
end if
if old2="zhu_zai" then
e2="住宅"
else if old2="xie_zi" then
e2="寫字樓"
else if old2="shang_pu" then
e2="商鋪"
else
e2="廠房"
end if
end if
end if
e3=trim(request("old3"))
response.Write "<div align=center><b><br>二手房 — "&e2&" — "&e1&" — "&e3&"信息</div></b><br>"
%>
</div>
<% table=old1&old2
set rs=server.createobject("adodb.recordset")
sql ="select * from "&table&" order by id desc "
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.Write("<br><div align=center>數據庫中暫無任何記錄!</div>")
else%>
<TABLE style="BORDER-COLLAPSE: collapse"
borderColor=#dedede cellSpacing=0 cellPadding=4
width="98%" align=center border=0>
<TR vAlign=bottom bgColor=#00ccff>
<TD width="24%"
bgColor=#99ccff
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid"><div align="center"> 物業名稱 </div></TD>
<TD width="29%"
bgColor=#99ccff
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid">地段</TD>
<TD width="18%"
bgColor=#99ccff
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid"> 物業類型</TD>
<% if table="s_zhu_zai" then %>
<TD width="8%"
bgColor=#99ccff
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid">樓層</TD>
<TD width="13%"
bgColor=#99ccff
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid"> 戶型</TD>
<% end if%>
<TD width="8%"
bgColor=#99ccff
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid">刪除</TD>
</TR>
<%if request.querystring("page")="" then
curpage = 1
else
curpage = cint(request.querystring("page"))
end if
'================================修改2處:顯示的記錄數===============
rs.pagesize=20 '每頁顯示15條新聞
rs.absolutepage = curpage
pagecount=curpage
n=1
do while not rs.eof%>
<TR bgColor=#f8f8f8>
<TD
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid"
align=middle><a target="_blank" href="../old_show.asp?id=<%=rs("id")%>&old1=<%=old1%>&old2=<%=old2%>"><font color="#CC3300"><%=rs("name2")%></font></a></TD>
<TD
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid">
<%
add=rs("address")
if len(add)>10 then
add=left(rs("address"),10)&"..."
end if
response.write add
%></TD>
<TD
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid"><%=rs("ttype")%></TD>
<% if table="s_zhu_zai" then %>
<TD
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid"><%=rs("floor")%>/<%=rs("total_floor")%></TD>
<TD
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid"><%=rs("room_type")%></TD>
<% end if%>
<TD
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid"><a href="javascript:confirmdel('<%=rs("id")%>','<%=table%>')"><font color="#CC3300">刪除</font></a> </TD>
</TR>
<%rs.movenext
n=n+1
if n>rs.pagesize then exit do
loop
%>
</table>
<% response.Write("<br><div align=center> ")
filename="?old1="&old2&"&old2="&old1&"&old3="&e3&"&info_type="&info_type&"&company="&company&"&"
if PageCount=1 then
response.write "<font color='#000064'>首頁 上頁</font> "
else
response.write "<a href="&filename&"page=1><font color='0000BE'>首頁</font></a> "
response.write "<a href="&filename&"page="&(pagecount-1)&"><font color='0000BE'>上頁</font></a> "
end if
if rs.PageCount-pagecount<1 then
response.write "<font color='#000064'>下頁 尾頁</font>"
else
response.write "<a href="&filename&"page="&(pagecount+1)&"><font color='0000BE'>下頁</font></a> "
response.write "<a href="&filename&"page="&rs.PageCount&"><font color='0000BE'>尾頁</font></a>"
end if
response.write "<font color='000064'> 頁次:<font color=blue>"&pagecount&"</font>/"&rs.PageCount&"頁</font></div><br> "
'end end*********************
end if
rs.close
set rs=nothing
%>
</TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD align=middle vAlign=top> <IMG
height=3
src="images/index_li2.gif"></TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR></TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR></TR>
</TBODY>
</TABLE>
</TD>
</TR>
<TR></TR>
<TR></TR>
<TR></TR>
<TR>
</TR>
</TBODY>
</TABLE>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -