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

📄 newslist.asp

📁 视频源代码 视频源代码
💻 ASP
字号:
<%response.expires=0%>
<!--#include file="../admin/inc/conn.asp"-->
<!--#include file="../admin/inc/code.asp"-->
<%
id=strFilter(request("id"),10)
sql="select top 1 id,title,pic,content from news where pic=true order by otime DESC"
if id><"" then
  if isnumeric(id) then
    sql="select top 1 id,title,pic,content from news where pic=true and categoryid like '%."&id&".%' order by otime DESC"
  end if
end if
rs.open sql,conn,1,1
if not rs.eof then
  filenum	=CCur(rs(0))
  title		=rs(1)
  pic		=rs(2)
  content	=rs(3)
else
  rs.close
  Set rs=nothing
  Set conn=nothing
  response.end
end if
rs.close

sql="select top 1 id from newsphoto where filenum ="&filenum
rs.open sql,conn,1,1
if not rs.eof then
  picid=rs(0)
end if
rs.close
Set rs=nothing
Set conn=nothing


nsize=strFilter(request("size"),2)

if content><"" then
  content=ReplaceText(content,"\[img(.[^\]]*)\](.[^\[]*)\[\/img]","")
  content=ReplaceText(content,"\[(.[^\]]*)\]","")
  csize=100
  if nsize><"" then
    if isnumeric(nsize) then
      csize=nsize
    end if
  end if
  content=GetWord(UBBCode(content),135,"......")
end if

response.write "var pichtml='<table border=0 cellPadding=0 cellSpacing=5 width=100% align=center style=""word-wrap:break-word""><tbody>' +"
response.write "	'  <tr><td colspan=""2"" height=""30""><font style=""font:10.5pt""><b>" & title & "</b></font></td></tr>' +"
response.write "	'  <tr><td style=""background:#F7F7F7"" width=40% align=middle><img src=""http://" & Request.ServerVariables("HTTP_HOST") & ReplaceText(Request.ServerVariables("SCRIPT_NAME"),"newslist.asp","") & "pic.asp?id="&picid&""" width=120 height=120 title="""&title&"""></td>' +"
response.write "	'      <td style=""font:10pt;line-height:16pt"" title="""&title&""">' +"
response.write "	'"&replace(content,"'","\'")&"' +"
response.write "	'<div align=right><a href=""http://" & Request.ServerVariables("HTTP_HOST") & ReplaceText(Request.ServerVariables("SCRIPT_NAME"),"newslist.asp","") & "news.asp?id="&filenum&""" target=""_blank"" style=""line-height:18pt"">深入报道 >> </a>&nbsp;&nbsp;&nbsp;&nbsp;</div>' +"
response.write "	'  </td></tr>' +"
response.write "        '</table>';"
response.write "document.write(pichtml);"
%>

⌨️ 快捷键说明

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