?? allpro.asp
字號:
<!--#include file="cn.asp"-->
<%if session("admin")="" or request.cookies("timesshop")("admin")="" then
response.Write "<script language='javascript'>alert('請先登錄!');window.location.replace('login.asp');</script>"
response.End
end if
%><style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style>
<table width="650" border="0" cellpadding="0" cellspacing="0" align="center">
<!--DWLayoutTable-->
<tr>
<td width="500" height="68" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="500" height="13" valign="top"><table width="650" border="0" cellpadding="0" cellspacing="0" bgcolor="#B1C3D9">
<tr>
<td width="97" height="20" align="center">產品id</td>
<td width="97" height="20" align="center">產品名</td>
<td width="79" align="center">發布公司id</td>
<td width="54" align="center">類別</td>
<td width="104" align="center">發布時間</td>
<td width="76" align="center">點擊次數</td>
<td width="90" align="center">詳細信息</td>
</tr>
</table></td>
</tr>
<tr>
<td height="21" valign="top"><table width="650" border="0" cellpadding="0" cellspacing="1" bgcolor="#BBCEFD">
<%set rs=server.CreateObject("adodb.recordset")
sql="select * from product order by id desc"
rs.open sql,cn,1,1
if rs.eof then
response.Write "<script language='javascript'>alert('無記錄!');window.location.replace('index.asp');</script>"
end if
'分頁
jil=rs.recordcount
page=cint(request.QueryString("page"))
rs.pagesize=30
tpage=cint(rs.pagecount)
if page="" or page=0 then
page=1
end if
if page>rs.pagecount then
page=rs.pagecount
end if
rs.Absolutepage=page
do while not rs.eof
%>
<tr>
<td width="97" height="20" align="center" bgcolor="#FFFFFF"><%=rs("id")%></td>
<td width="97" height="20" align="center" bgcolor="#FFFFFF"><%=rs("pname")%></td>
<td width="79" align="center" bgcolor="#FFFFFF"><a href="comxx.asp?id=<%=rs("cid")%>"><%=rs("cid")%></a></td>
<td width="54" align="center" bgcolor="#FFFFFF"><%=rs("leibie")%></td>
<td width="104" align="center" bgcolor="#FFFFFF"><%=left(rs("addtime"),10)%></td>
<td width="76" align="center" bgcolor="#FFFFFF"><%=rs("hit")%></td>
<td width="90" align="center" bgcolor="#FFFFFF"><a href="proxx.asp?id=<%=rs("id")%>&name=<%=rs("pname")%>">詳細信息</a></td>
</tr>
<%
rs.movenext
loop
%>
</table></td>
</tr>
<tr>
<td height="27" align="center" valign="bottom" bgcolor="#B1C3D9"><form id="form1" name="form1" method="post" action="allpro.asp?page=<%=cint(request.Form("newspage"))%>">
共<%=jil%>條記錄 每頁顯30示條 共<%=tpage%>頁 第<%=page%>頁 <a href="allpro.asp?page=1">第一頁</a> <a href="allpro.asp?page=<%=page+1%>">下一頁</a> <a href="allpro.asp?page=<%=page-1%>">上一頁</a> <a href="allpro.asp?page=<%=tpage%>">最后一頁</a> 跳到
<input name="newspage" type="text" id="newspage" size="4" />
頁
<input type="submit" name="Submit3" value="GO" />
</form>
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="300"> </td>
</tr>
</table>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -