📄 news_sort.asp
字号:
<table border="1" width="770" id="table1" cellspacing="1" style="border-collapse: collapse" bordercolor="#C0C0C0">
<tr>
<td>
<table border="0" width="100%" id="table2" cellspacing="0" cellpadding="0">
<tr>
<td height="20" width="6%" bgcolor="#D8D8D8">序号</td>
<td height="20" width="55%" bgcolor="#D8D8D8">标题</td>
<td height="20" width="19%" bgcolor="#D8D8D8">
<select size="1" onchange="if (this.options[this.selectedIndex].value==3) {void(null)} else {location=this.options[this.selectedIndex].value;}" onChange="openCopartner(copartner)" name="id0" style="background-color: #D8D8D8">
<option value="3" selected>选择类别</option>
<option value="3">--------</option>
<option value="news.asp?action=2">网站公告</option>
<option value="news.asp?action=1">网站动态</option>
<option value="news.asp">显示全部</option></select></td>
<td height="20" width="20%" bgcolor="#D8D8D8">发布时间</td>
</tr>
<%
action=my_request("action",1)
if action=2 then
sql="select id,title,flag,addtime from info_list where flag=2 order by addtime desc"
elseif action=1 then
sql="select id,title,flag,addtime from info_list where flag=1 order by addtime desc"
else
sql="select id,title,flag,addtime from info_list order by addtime desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if (rs.eof and rs.bof) then
response.write "<tr>"
response.write "<td width=100% colspan=4><font color=#FF0000>没有相应的数据</font></td>"
response.write "</tr>"
else
rs.PageSize =20 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
end if
i=1
while not rs.eof and i<=rs.pagesize
set id=rs("id")
set title=rs("title")
set flag=rs("flag")
set addtime=rs("addtime")
%>
<tr>
<td height="20" width="6%"><%=(page-1)*19+i%></td>
<td height="20" width="55%"><a href="info_list.asp?id=<%=id%>"><%=title%></a></td>
<td height="20" width="19%"><%
if flag=1 then
response.write "<font color=#0000FF>网站动态</font>"
elseif flag=2 then
response.write "<font color=#0000FF>网站公告</font>"
else
response.write "<font color=#FF0000>未知类别</font>"
end if%></td>
<td height="20"><%=addtime%></td>
</tr>
<%
rs.movenext
i=i+1
wend
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<tr>
<td height="20" colspan="4"><%call PageControl(iCount,maxpage,page,"border=0 align=left","<p align=center>")%></td>
</tr>
</table>
</td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -