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

📄 news.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,content,skey,author,source,csize,otime,path,categoryid from news where id="&id
rs.open sql,conn,1,1
if not rs.eof then
  title		=rs(0)
  content	=rs(1)
  skey		=rs(2)
  author	=rs(3)
  source	=rs(4)
  csize		=rs(5)
  otime		=rs(6)
  filepath	=rs(7)
  category	=split(rs(8),".")
else
  rs.close
  call msgbox("该修改新闻不存在!",1)
end if
rs.close
categoryid=category(1)
%>
<!--#include file="inc/category.asp"-->
<!--#include file="news/category.asp"-->
<!--#include file="news/path.asp"-->
<%
sql=""
if (skey="" or isNull(skey)) and ubound(cindex)=2 then
  sql="select top 10 id,title,pic,otime,path from news where categoryid like '%."&categoryid&".%'"
end if
if skey><"" then
  sql="select top 10 id,title,pic,otime,path 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


if isarray(cindex) then
  if ubound(cindex)<2 then
    toptitle="最新新闻"
    tophtml="<script language=""javascript"" src=""/"&newsdir&"/html.asp?id="&categoryid&"&height=15""></script>"
    abouttitle="相关新闻"
  else
    toptitle="本专题新闻浏览排行"
    tophtml="<script language=""javascript"" src=""/"&newsdir&"/html.asp?id="&categoryid&"&height=15""></script>"
    abouttitle="专题新闻"
  end if
end if

if isarray(aboutlist) then
  for i=0 to ubound(aboutlist,2)
    abouthtml	=abouthtml&" ·<a href=""/"&replace(aboutlist(4,i),"\","/")&aboutlist(0,i)&".htm"">"&aboutlist(1,i)&"</a>"
    if aboutlist(2,i)=true then
      abouthtml	=abouthtml&"[<font color=D669A5>图</font>]"
    end if
    abouthtml	=abouthtml&" <font color=888888>("&aboutlist(3,i)&")</font><br>"&vbcrlf
  next
  Set aboutlist=nothing
end if


%><!--#include file="inc/code.asp"--><%
content=ReplaceText(UBBCode(content),"pic.asp\?id=","/"&newsdir&"/pic.asp?id=")

cmode=replace(cmode,"[HOMEPAGE]",homepage)
cmode=replace(cmode,"[URL]",url)
cmode=replace(cmode,"[NEWS]",newsdir)
cmode=replace(cmode,"[TOPTITLE]",toptitle)
cmode=replace(cmode,"[TOPHTML]",tophtml)
cmode=replace(cmode,"[TOPPATH]",toppath)
cmode=replace(cmode,"[CATEGORY]",categorydir)
cmode=replace(cmode,"[CATEGORYITEM]",categoryitem)

cmode=replace(cmode,"[TITLE]",title)
cmode=replace(cmode,"[TIME]","发稿:"&otime)
if author><"" then
  cmode=replace(cmode,"[AUTHOR]","作者:"&author)
else
  cmode=replace(cmode,"[AUTHOR]","")
end if
if source><"" then
  cmode=replace(cmode,"[SOURCE]","来源:"&source)
else
  cmode=replace(cmode,"[SOURCE]","")
end if
cmode=replace(cmode,"[CONTENT]",content)

cmode=replace(cmode,"[ABOUT]",abouttitle)
cmode=replace(cmode,"[ABOUTHTML]",abouthtml)

response.write cmode
response.end
%>

⌨️ 快捷键说明

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