📄 news.asp
字号:
<!--#include file="top.asp"-->
<%
set rstmp=conn.execute("select skin_other from myweb_myweb where default=true")
show=rstmp(0)
set rstmp=nothing
call myweb()
response.Write show
%>
<%
'==================================================
'过程名:showother
'作 用:显示新闻列表
'参 数:无
'==================================================
sub showother
show_other=" <table cellpadding=0 cellspacing=0 border='1' bordercolor='"&table&"' style='border-collapse:collapse; width:100%' align='center'>"
show_other=show_other&" <tr >"
show_other=show_other&" <td width='100%' height='25' colspan='3' > 您现在的位置:<a href='default.asp'>网站首页</a>>><a href='news.asp'>新闻动态</a></td>"
show_other=show_other&" </tr>"
set rs=server.CreateObject("adodb.recordset")
sql="select id,newsname,newswrite,newsdate from [myweb_news] order by ID desc"
rs.open sql,conn,1,1
if rs.bof then
show_other=show_other&" <tr >"
show_other=show_other&" <td width='100%' height='25' colspan='3' >"
show_other=show_other&" <p align='center'>暂时没有资料</td>"
show_other=show_other&" </tr>"
else
rs.pagesize=20
currentpage=Clng(request("page"))
if currentpage<1 then currentpage=1
if currentpage>rs.pagecount then currentpage=rs.pagecount
rs.absolutepage=currentpage
Do While Not rs.Eof
show_other=show_other&" <tr >"
show_other=show_other&" <td width='60%' height='25' > <a href='shownews.asp?newsid="&rs("ID")&"' target=_blank>"&rs("newsname")&"</a> </td>"
show_other=show_other&" <td width='20%' height='25' > "
show_other=show_other&" <p align='center'>"&rs("newswrite")&" </td>"
show_other=show_other&" <td width='20%' height='25' > "
show_other=show_other&" <p align='center'>"&rs("newsdate")&" </td>"
show_other=show_other&" </tr>"
i=i+1
rs.MoveNext
If i>=rs.pagesize Then Exit Do
Loop
end if
show_other=show_other&" <tr >"
show_other=show_other&" <td width='100%' height='25' colspan='3' ><form name='form1' method='post' action='news.asp'>"
show_other=show_other&" <p align=center>共有:<font color=red>"&rs.recordcount&"</font>新闻 <a href=news.asp>首页</a> "
show_other=show_other&" <a href=news.asp?page="¤tpage-1&"> 上一页</a> <a href=news.asp?page="¤tpage+1&"> "
show_other=show_other&" 下一页</a> <a href=news.asp?page="&rs.pagecount&">尾页</a> 转到 "
show_other=show_other&" <input name='page' type='text' id='page' value='"¤tpage&"' size='4'> "
show_other=show_other&" <input type='submit' name='Submit' value='GO'> <input name='search' type='hidden' id='search' value='"&search&"'> "
show_other=show_other&" <input name='key' type='hidden' id='key' value='"&key&"'> "
show_other=show_other&" </td>"
show_other=show_other&" </tr> </form>"
show_other=show_other&" </table>"
rs.close
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -