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

📄 news_html.asp

📁 asp
💻 ASP
字号:
<%response.expires=0%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/code.asp"-->
<%
id=strFilter(request("id"),10)
if id="" then
  call msgbox("请正确指定浏览文章!",1)
end if
if not isnumeric(id) then
  call msgbox("请正确指定浏览文章!",1)
end if
id=CCur(id)
sql="select top 1 title,pic,content,author,source,otime,path,filenum,skey,categoryid from news where id="&id
rs.open sql,conn,1,1
if not rs.eof then
  title		=rs(0)
  pic		=rs(1)
  content	=rs(2)
  author	=rs(3)
  source	=rs(4)
  otime		=rs(5)
  filepath	=rs(6)
  filenum	=rs(7)
  skey		=rs(8)
  categoryid	=split(rs(9),".")
else
  rs.close
  call msgbox("该新闻不存在!",1)
end if
rs.close

sql="select top 1 categoryname,categoryindex,categorymode from category where categoryid="&categoryid(1)
rs.open sql,conn,1,1
if not rs.eof then
  cname=rs(0)
  cindex=split(rs(1),".")
  cmode=rs(2)
else
  rs.close
  call msgbox("该分类不存在!",1)
end if
rs.close

if isarray(cindex) then
  for i=0 to ubound(cindex,1)
    if nindex="" then
      nindex=cindex(0)
    else
      nindex=nindex&"."&cindex(i)
    end if
    sql="select top 1 categoryid,categoryname,categorypath from category where categoryindex like '"&nindex&"'"
    rs.open sql,conn,1,1
    if not rs.eof then
      if i=1 then htmldir=rs(2)
      tophtml=tophtml&rs(1)&" >> "
    else
      rs.close
      call msgbox("该分类上级不存在!",1)
    end if
    rs.close
  next
  sql="select categoryname,categorypath,categoryindex from category where categoryindex like '"&cindex(0)&".%'"
  rs.open sql,conn,1,1
  if not rs.eof then
    categoryselect=rs.getrows
  end if
  rs.close
end if

if isarray(categoryselect) then
  for i=0 to ubound(categoryselect,2)
    cselect=split(categoryselect(2,i),".")
    if ubound(cselect,1)=1 then categoryitem=categoryitem&"<option value="""&categoryselect(1,i)&""">"&categoryselect(0,i)
  next
end if

sql=""
if (skey="" or isNull(skey)) and ubound(cindex)=2 then
  sql="select top 10 title,pic,otime,path,filenum from news where categoryid like '%."&categoryid(1)&".%'"
end if
if skey><"" then
  sql="select top 10 title,pic,otime,path,filenum from news where title like '%"&skey&"%'"
end if
if sql><"" then
  sql=sql&" order by otime DESC, hits DESC"
  rs.open sql,conn,1,1
  if not rs.eof then
    aboutlist=rs.getrows()
  end if
  rs.close
end if

Set rs=nothing
Set conn=nothing
%>
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>中文城市</title>
<link rel="stylesheet" href="css/default.css">
<script src="js/js.js"></script>
<body bgcolor=000000>
<table border=0 cellPadding=0 cellSpacing=0 width="700" align=center>
  <tbody>
  <tr><td align=middle bgcolor=#F0F0F0 valign=top>
<br>
<br>
<table border=0 cellPadding=1 cellSpacing=0 width=90% align=center style="border:1 solid #888888"><tbody>
<form name="form" method="post" action="/news/search.asp">
  <tr><th style="background:aaaaaa;color:ffffff"><b>新闻查询</b></td></tr>
  <tr><td>栏 目<select name="category"><%=categoryitem%></select> <input type="checkbox" name=pic value=1>图文</td></tr>
  <tr><td>关键字<input class="text" type="text" name=skey></td></tr>
  <tr><td align=right nowrap>可以使用<font color=blue><b>,</b></font>分隔查询 <input class="button" type="submit" name="Submit" value="提 交"></td></tr>
</form>
</table>
<br>
<br>
<table border=0 cellPadding=1 cellSpacing=0 width=90% align=center style="border:1 solid #888888"><tbody>
  <tr><th style="background:aaaaaa;color:ffffff"><b>
<%if isarray(cindex) then
  if ubound(cindex)<2 then%>最新新闻<%else%>本专题新闻浏览排行<%end if
end if%></b>
  </th></tr>
  <tr><td>
<%if isarray(cindex) then
  if ubound(cindex)<2 then%>
<script language="javascript" src="/news/html.asp?id=<%=categoryid(1)%>&height=15"></script>
<%else%>
<script language="javascript" src="/news/html.asp?id=<%=categoryid(1)%>&order=hits&height=15"></script>
<%end if
end if%>
  </td></tr>
</table>
<br>
<br>
  </td><td width="500" bgcolor=#ffffff>


<table border=0 cellPadding=2 cellSpacing=0 width=500 align=center style="border:2 solid #eaeaea"><tbody>
  <tr><td bgcolor=#eaeaea><%=tophtml&title%></td></tr>
  <tr><td><br>
<center><font style="font:11pt;"><b><%=title%></b></font></center><br>
<div align=right>时间:<%=otime%>    作者:<%=author%>    来源:<%=source%></div><br>
<font style="font:10pt;line-height:18pt">
<%=UBBCode(content)%>
</font>
  </td></tr>
  <tr><td height=50 valign=bottom><b> ----- 
<%if isarray(cindex) then
  if ubound(cindex)<2 then%>相关新闻<%else%>专题新闻<%end if
end if%></b> -----
  </td></tr>
  <tr><td style="line-height:15pt">
<%if isarray(aboutlist) then
  for i=0 to ubound(aboutlist,2)
response.write " ·<a href=""/"&aboutlist(3,i)&aboutlist(4,i)&".htm"">"&aboutlist(0,i)&"</a>"
if aboutlist(1,i)=true then response.write "[<font color=D669A5>图</font>]"
response.write " <font color=888888>("&aboutlist(2,i)&")</font><br>"&vbcrlf
  next
end if%>
  </td></tr>
  <tr><td align=right><a href="javascript:window.print();">打印本页</a></td></tr>
</table>

  </td></tr>
  <tr><td colspan="2" align="center" height="50">
<font style="font:9pt;color:FFFFFF;line-height:12pt">
Copyright &copy;2002 ZWCITY.COM LIMITED. All rights reserved.
</font>
  </td></tr>
</table>

⌨️ 快捷键说明

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