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

📄 readnews.asp

📁 一个功能强大
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%@ Language=VBScript%>

<!--#include file=include/conn.asp -->
<!--#include file=include/config.asp -->
<%'该文件需要进行调整和设置
dim typename
NewsID=Request.QueryString("NewsID")
Page=Request.QueryString("page")
if page="" then
 page=1
 elseif not IsNumeric(page) then
 response.write "<script>alert('非法参数');history.back()</script>"
 response.end
end if
page=int(page)
if newsid="" then
 response.write "<script>alert('未指定参数');history.back()</script>"
 response.end
elseif not IsNumeric(newsid) then
 response.write "<script>alert('非法参数');history.back()</script>"
 response.end
else
conn.execute("update News Set Click=click+1 where NewsID=" & NewsID )

set rs=server.CreateObject("ADODB.RecordSet")
if uselevel=1 then
if Request.cookies("key")="" then
rs.Source="select * from News where checkked=1 and newslevel=0 and newsid="&newsid
end if
if Request.cookies("key")="selfreg" then
	if Request.cookies("reglevel")=3 then
	rs.Source="select * from News where checkked=1 and newslevel<=3 and newsid="&newsid
	end if
	if Request.cookies("reglevel")=2 then
	rs.Source="select * from News where checkked=1 and newslevel<=2 and newsid="&newsid
	end if
	if Request.cookies("reglevel")=1 then
	rs.Source="select * from News where checkked=1 and newslevel<=1 and newsid="&newsid
	end if
end if
if Request.cookies("key")="super" or Request.cookies("key")="typemaster" or Request.cookies("key")="bigmaster" or Request.cookies("key")="smallmaster" or Request.cookies("key")="check" then
rs.Source="select * from News where newsid="&newsid
end if
else
rs.Source="select * from News where newsid="&newsid
end if
rs.Open rs.Source,conn,1,1
	if rs.bof and rs.eof then 
		response.write "无权限访问或此文章未经审核,请注册登陆或联系管理员!" 
	else
bigclassid=rs("bigclassid")
smallclassid=rs("smallclassid")
title=trim(rs("title"))
title=replace(title,"<br>","")
title1=trim(rs("title"))
about=trim(rs("about"))
Author=trim(rs("Author"))
editor=trim(rs("editor"))
Original=trim(rs("Original"))
image=rs("image")
UpdateTime=trim(rs("UpdateTime"))
News_Content=rs("Content")
SpecialID=rs("SpecialID")
SpecialID2=rs("SpecialID2")
click=rs("click")
EnCode=trim(rs("EnCode"))
typeid=rs("typeid")
titletype=rs("titletype")
titlesize=rs("titlesize")
titlecolor=rs("titlecolor")
titleface=rs("titleface")
editor=rs("editor")
if titlesize=0 then
size="18px"
else
if titlesize=1 then
size="8px"
else
if titlesize=2 then
size="10px"
else
if titlesize=3 then
size="12px"
else
if titlesize=4 then
size="14px"
else
if titlesize=5 then
size="18px"
else
if titlesize=6 then
size="24px"
else
if titlesize=7 then
size="36px"
end if
end if
end if
end if
end if
end if
end if
end if

rs.Close
set rs=nothing

set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from type where typeID=" & typeID
rs.Open rs.Source,conn,1,1
typename=rs("typename")
rs.Close
set rs=nothing
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from bigclass Where BigClassid=" & BigClassid
rs.Open rs.Source,conn,1,1
bigclassname=rs("bigclassname")
rs.close
set rs=nothing
if smallclassid<>"" then
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from smallclass Where smallClassid=" & smallClassid
rs.Open rs.Source,conn,1,1
smallclassname=rs("smallclassname")
rs.close
set rs=nothing
end if
%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=title%><%if smallclassid<>"" then%>_<%=SmallClassName%><%end if%>_<%=BigClassName%>_<%=typename%>_<%=jjgn%></title>
<LINK href=news.css rel=stylesheet>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<style type="text/css">
<!--
.zbk1 {
	border: 1px solid #CCCCCC;
}
.zbk2 {
	border-top: 1px none #CCCCCC;
	border-right: 1px solid #CCCCCC;
	border-bottom: 1px solid #CCCCCC;
	border-left: 1px solid #CCCCCC;
}
body {
	background-image: url(zqcindex.files/bgz.gif);
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.newstitle  {COLOR: #000000; FONT-FAMILY:"宋体"; FONT-SIZE: 14px;line-height:1.5}
.style2 {font-size: 16}
.style5 {
	color: #666666;
	font-weight: bold;
}
.style6 {color: #FF0000}
.style7 {
	color: #FF6600;
	font-weight: bold;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">

function fontZoom(size){
 document.getElementById('fontZoom').style.fontSize=size+'px'
}
</SCRIPT>

</script>
</head>
<SCRIPT language=JavaScript>
var currentpos,timer;

function initialize()
{
timer=setInterval("scrollwindow()",50);
}
function sc(){
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos != document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize
</script>
<body>
<!--#include file=include/top.asp -->
<!--#include file=include/top2.asp -->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" class="zbk2">
  <tr bgcolor="#FFFFFF">
    <td height="2" bgcolor="#FFFFFF"><img src="IMAGES/kb.gif" width="9" height="2"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="100%" height="30" background="zqcindex.files/menu_bg.gif" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="style7">栏目导航 </span><a class=daohang href="./" ><strong>网站首页</strong></a><span class="style5">&gt;&gt;<a href="type.asp?typeid=<%=typeid%>"><%=typename%></a>&gt;&gt;<a href="BigClass.asp?typeid=<%=typeid%>&BigClassid=<%=BigClassid%>" ><%=BigClassName%></a>
        
          <%if smallclassid<>"" then%>
&gt;&gt;<a href='SmallClass.asp?typeid=<%=typeid%>&BigClassID=<%=BigClassID%>&SmallClassID=<%=SmallClassID%>'><%=SmallClassName%></a>
      <%end if%>
      <%title1=replace(title1,"<br>","")%>
    </span></td>
  </tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="zbk2">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="zbk2">
  <tr>
    <td><div align="center"><span class="style2"><font color="#cc0000" ><br>
      <%=title1%>    </font></span></div></td>
  </tr>
  <tr>
    <td height="20"><div align="center"><span class="style2"><font color="#cc0000" ><img src="zqcindex.files/titlebg.gif" width="500" height="1" align="top"></font></span></div></td>
  </tr>
  <tr>
    <td height="24"><div align="center">日期:<%=year(updateTime)%>年<%=month(updateTime)%>月<%=day(updateTime)%>日&nbsp;&nbsp;
        <%if Original<>"" then%>
出处:<%=Original%>
<%end if%>
<%if Author<>"" then%>
&nbsp;作者:<%=Author%>
<%end if%>
&nbsp;&nbsp;编辑:<%=editor%> &nbsp;&nbsp;阅读:<span class="style6"><%=click%></span>次</div></td>
  </tr>
</table>
<table width="778" height="267" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="zbk2">
  <tr>
    <td><table border="0" cellpadding="0" cellspacing="0" width="86%" align="center">
      <%
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from News where NewsID=" & NewsID
rs.Open rs.source,conn,1,1
typeid=rs("typeid")
Title=trim(rs("Title"))
image=rs("image")

⌨️ 快捷键说明

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