⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gonggaodisp.asp

📁 本源代码为终点小说连载系统 v1.15 Build 0430 SQL清风修改版,欢迎大家下载,学习与交流
💻 ASP
字号:
<%
id=CheckSql(request("id"))
CheckSqlnum(id)
if id="" then
response.Redirect "index.asp"
response.End
end if
id=int(id)
set rs=server.CreateObject("ADODB.recordset")
sql="select * from news where id="&id
rs.open sql,conn,1,3
if rs.eof and rs.bof then
	Response.Write ("<script>alert('   操作错误!\n\n 公告不存在。');javascript:window.close();</script>")
	Response.end
End If
rs("hits")=rs("hits")+1
rs.update
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td class="head">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>浏览公告</b></td>
	</tr>
	<tr>
		<td height="25" align="center" class="t_two"><font color="#FF0000"><%=rs("txttitle")%></font></td>
	</tr>
	<tr>
		<td>&nbsp;&nbsp;&nbsp; <%=rs("txtcontent")%></td>
	</tr>
	<tr>
		<td height="20" align="center" class="t_two">发表时间:<%=rs("txttime")%>&nbsp;&nbsp;&nbsp;&nbsp; 
		发表人:<%=rs("username")%></td>
	</tr>
</table>
<%
rs.close
set rs=nothing
%> <br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td class="head">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>浏览全部公告</b></td>
		<%
		  set rs1=server.CreateObject("adodb.recordset")
		  sql1="select id,txttitle,txtcontent,txttime,Islink,hits from [news] where Iscontent=0 order by id desc"
		  rs1.open sql1,conn,1,1
		  if rs1.eof and rs1.bof then
		  %>
	</tr>
	<tr>
		<td class="t_two">
		<img height="11" src="images/arrow_news.gif" width="18"><span class="style1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		暂无任何公告,请添加!</span></td>
	</tr>
	<%end if%><%do while not rs1.eof%>
	<tr>
		<td height="15" class="t_two">
		<%if rs1("Islink")=1 then%>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="20">
				<img height="11" src="images/arrow_news.gif" width="18"></td>
				<td height="15" style="cursor:hand">
				<a href="<%=rs1("txtcontent")%>">
				<span class="deepglay12px"><font color="#FF0000"><%=rs1("txttitle")%></font></span></a></td>
				<td width="120" align="right"><span class="glay10px"><%=rs1("txttime")%></span></td>
				<td width="80" align="right"><span class="style1" style1>浏览 <%=rs1("hits")%> 
				次</span></td>
			</tr>
		</table><%else%>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="20">
				<img height="11" src="images/arrow_news.gif" width="18"></td>
				<td height="15" style="cursor:hand">
				<a href="gonggaodisp.asp?id=<%=rs1("id")%>">
				<span class="deepglay12px"><font color="#FF0000"><%=rs1("txttitle")%></font></span></a></td>
				<td width="120" align="right"><span class="glay10px"><%=rs1("txttime")%></span></td>
				<td width="80" align="right"><span class="style1" style1>浏览 <%=rs1("hits")%> 
				次</span></td>
			</tr>
		</table><%end if%>
		</td>
	</tr>
	<%
		rs1.movenext
		loop
		rs1.close
		set rs1=nothing
		%>
	<%
		  set rs2=server.CreateObject("adodb.recordset")
		  sql2="select txtcontent from [news] where Iscontent=1 order by id desc"
		  rs2.open sql2,conn,1,1
		  if rs2.eof and rs2.bof then
		  %>
	<%end if%><%do while not rs2.eof%>
	<tr>
		<td height="15" class="t_two">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td height="15" ><%=rs2("txtcontent")%></td>
			</tr>
		</table>
		</td>
	</tr>
	<%
		rs2.movenext
		loop
		rs2.close
		set rs2=nothing
		%>
</table>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -