?? allpro.asp
字號:
<!--#include file="cn.asp"-->
<%if session("company")="" or session("user")="" 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">產(chǎn)品名</td>
<td width="79" align="center">發(fā)布公司</td>
<td width="54" align="center">類別</td>
<td width="104" align="center">發(fā)布時間</td>
<td width="76" align="center">點擊次數(shù)</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">
<%cid=trim(request.QueryString("cid"))
set rs=server.CreateObject("adodb.recordset")
sql="select * from product where cid="&cid & " 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=tpage
end if
rs.Absolutepage=page
do while not rs.eof
%>
<tr>
<td width="97" height="20" align="center" bgcolor="#FFFFFF"><%=rs("pname")%></td>
<td width="79" align="center" bgcolor="#FFFFFF"><%=rs("pname")%></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"><form id="form1" name="form1" method="post" action="allpro.asp?page=<%=cint(request.Form("newspage"))%>&cid=<%=cid%>">
共<%=resize%>條 共<%=tpage%>頁 第<%=page%>頁 每頁<%=psize%>條 <a href="allpro.asp?thepage=1&cid=<%=cid%>">第一頁</a> <a href="allpro.asp?thepage=<%=thepage-1%>&cid=<%=cid%>">上一頁 </a><a href="allpro.asp?thepage=<%=thepage+1%>&cid=<%=cid%>">下一頁</a> <a href="allpro.asp?thepage=<%=tpage%>&cid=<%=cid%>">最后一頁</a> 跳至
<select name="newspage" id="newspage">
<%for i= 1 to tpage%>
<option value="<%=i%>" onclick="checked"><%=i%></option>
<%next%>
</select>
頁
<input type="submit" name="Submit" 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 + -