www.gusucode.com > 盐城分类信息网asp源码程序 > gonggao.asp
<!--#include file="inc/conn.asp"--> <!--#include file="inc/inc.asp"--> <% id=trim(request("id")) if id="" then call list() response.end end if set rs=server.createobject("adodb.recordset") sql="select * from [gonggao] where id="&cstr(id) rs.open sql,conn,1,1 if rs.eof and rs.bof then response.write "没有新闻" response.end end if function HTMLEncode(fString) fString = replace(fString, ">", ">") fString = replace(fString, "<", "<") fString = Replace(fString, CHR(13), "") fString = Replace(fString, CHR(10) & CHR(10), "</P><P>") fString = Replace(fString, CHR(10), "<BR>") HTMLEncode = fString end function %> <html> <HEAD> <title>新闻内容</title> <script language="JavaScript"> function closewindow() { window.close(); } </script> <LINK href="images/at_news.css" type=text/css rel=stylesheet> </HEAD> <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> <%call t()%> <DIV id=content> <DIV id=left> <DIV class=leftborder> <DIV class=ltitle><SPAN class=font> >> 最新回复/浏览信息</SPAN></DIV> <DIV class=lcontent> <SPAN class=tableleft> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <%call nx()%> </TBODY></TABLE></SPAN></DIV></DIV> <!--leftborder end--> <!--左边第一个广告开始--> <DIV class=leftborder> <DIV class=lcontent> <center><%=ad2%></center> </div></div> <!--左边第一个广告结束--> <!--推荐信息开始--> <DIV class=leftborder> <DIV class=ltitle><SPAN class=font> >> vip推荐信息</SPAN></DIV> <DIV class=lcontent> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <%call nxvip()%> </TBODY></TABLE></DIV></DIV> <!--推荐信息结束--> </DIV> <!--left--> <DIV id=right> <DIV class=navigation> <table border="0" width="100%" id="table1" style="border-collapse: collapse"> <tr> <td width="100%" colspan="0" class="td1" background="Images/menu_r.gif"> 位置导航:<a href="/">首页</a>→<a href="gonggao.asp">新闻内容</a></td> </tr></table></DIV> <DIV class=rightbody> <DIV class=tags_calss> <!--新闻内容开始--> <div align="center"> <table border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" width="98%" height="100%"> <tr> <td colspan="3" align="center" style="font-weight: bold"> <span style="border-bottom:1px solid #CCCCCC; font-size: 14pt; height:40; padding-top:10px; width:90%; text-align:center; border-left-width:1px; border-right-width:1px; border-top-width:1px"><%=rs("biaoti")%></span></td> </tr> <tr> <td width="98%" height="28" align="center" colspan="3"> <font color="#999999" font-size: 12pt;><%=rs("data")%> 来自:[<%=title%>]</font></td> </tr> <tr> <td width="36"> </td> <td width="524"><%=rs("neirong")%></td> <td width="37"> </td> </tr> <tr> <td colspan="3" align="center"><hr size="1" width="90%" color="#CCCCCC"><a href="javascript:closewindow();" target="_self" style="text-decoration: none"> <font color="#999999">【关闭窗口】</font></a> <a href="index.asp"> <font color="#999999">【返回首页】</font></a><p> </td> </tr> </table> </center> </div> </DIV> </DIV> <!--公告内容结束--> <!--公告标题开始--> <% rs.close set rs=nothing conn.close set conn=nothing %> <%sub list() dim sql,rs,biaoti,neirong,Allrecord,Pagesize,Allpage,ThisPage,k if request("page")="" then ThisPage=1 else ThisPage=request("page") end if set rs=server.createobject("adodb.recordset") sql="select * from [gonggao] order by id desc" rs.open sql,conn,1,1 if rs.eof and rs.bof then response.write "没有新闻" response.end end if rs.Pagesize=18 Pagesize=rs.Pagesize Allrecord=rs.Recordcount Allpage=rs.Pagecount if ThisPage<1 then ThisPage=1 end if On Error Resume Next rs.move (ThisPage-1)*Pagesize k=0 %> <title>最新公告标题</title> <LINK href="images/at_news.css" type=text/css rel=stylesheet> </HEAD> <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> <%call t()%> <DIV id=content> <DIV id=left> <DIV class=leftborder> <DIV class=ltitle><SPAN class=font> >> 最新回复/浏览信息</SPAN></DIV> <DIV class=lcontent> <SPAN class=tableleft> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <%call nx()%> </TBODY></TABLE></SPAN></DIV></DIV> <!--leftborder end--> <!--左边第一个广告开始--> <DIV class=leftborder> <DIV class=lcontent> <center>广告设置处</center> </div></div> <!--左边第一个广告结束--> <!--推荐信息开始--> <DIV class=leftborder> <DIV class=ltitle><SPAN class=font> >> vip推荐信息</SPAN></DIV> <DIV class=lcontent> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <%call nxvip()%> </TBODY></TABLE></DIV></DIV> <!--推荐信息结束--> </DIV> <!--left--> <DIV id=right> <DIV class=navigation> <table border="0" width="100%" id="table1" style="border-collapse: collapse"> <tr> <td width="100%" colspan="0" class="td1" background="Images/menu_r.gif"> 位置导航:<a href="/">首页</a>→<a href="gonggao.asp">新闻内容</a></td> </tr></table></DIV> <DIV class=rightbody> <DIV class=tags_calss> <!--新闻内容开始--> <div align="center"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="99%"> <tr> <td width="100%" colspan="4"></td> </tr> <tr> <td width="2%"></td> <td width="12%" height="20"> <p align="center"><font font-size: 12pt;>编号</font></td> <td width="64%" height="20"><font font-size: 12pt;>标题</font></td> <td width="28%" height="20"><font font-size: 12pt;>发布时间</font></td> </tr> <%do while not rs.eof%><span style="font-size: 12px"> <tr> <td width="2%"> </td> <td width="6%" height="20" style="font-size:12px;border-bottom:1px dotted #E1E1E1;" > </span> <p align="center"> <font font-size: 12pt;><%=k+1%></font></td> <td style="font-size:12px;border-bottom:1px dotted #E1E1E1;" width="64%"><a class=left href="?id=<%=rs("id")%>" target="_blank"> <font font-size: 12pt;><%=rs("biaoti")%></font></a></td> <td style="font-size:12px;border-bottom:1px dotted #E1E1E1;" width="28%"><font font-size: 12pt; color="#C0C0C0"><%=rs("data")%></font></td> </tr> <% k=k+1 rs.movenext if k>=Pagesize then exit do loop %> <tr> <td width="100%" colspan="4"> <p align="center"> </td> </tr> </table> <table width="98%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#ffffff" style="font-size:12px; letter-spacing:1px;"> <tr bgcolor="#ffffff"> <td height="27" width="151" align="center" bgcolor="#DCEEFA"> 共有 <font color="#CC5200"><%=Allrecord%></font> 条记录</td> <td width="181" align="center" bgcolor="#DCEEFA"> 共 <font color="#CC5200"><%=Allpage%></font> 页</td> <td width="237" align="center" bgcolor="#DCEEFA"> 现在是第 <font color="#CC5200"><%=ThisPage%></font> 页</td> <td width="200" align="center" bgcolor="#DCEEFA"> <% if ThisPage<2 then response.write "<font color=""#808080"">首页</font> " response.write "<font color=""#808080"">上一页</font> " else response.write "<a href=?page=1>首页</a> " response.write "<a href=?page="&ThisPage-1&">上一页</a> " end if if Allpage-ThisPage<1 then response.write "<font color=""#808080"">下一页</font> " response.write "<font color=""#808080"">尾页</font> " else response.write "<a href=?page="&(ThisPage+1)&">下一页</a> " response.write "<a href=?page="&Allpage&">尾页</a> " end if %></td></tr></table></td> </center> </div> <% rs.close conn.close set rs=nothing set conn=nothing %> </DIV> </DIV> <!--底部--> </td> </tr> </table> </div> <!--#include file="foot.asp"--> <%end sub%> </td> </tr> </table> </div><!--#include file="foot.asp"--> </body> </html>