📄 digg_list.asp
字号:
<%
mdb="../../"
%>
<!--#include file = ../../admin_conn.asp -->
<!--#include file = ../../admin/titleb.asp -->
<%
root_path2=config("path")
top=replace(config("top"),"$$网站目录$$",root_path2)
down=replace(config("down"),"$$网站目录$$",root_path2)
%>
<HEAD>
<TITLE><%=setting("sitename")%>_新闻中心</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="<%=root_path2%>Css.css">
<LINK href="<%=root_path2%>images/Digg/paihang.css" type=text/css rel=stylesheet>
<SCRIPT src="<%=root_path2%>images/ViewPic/Title.js" type=text/javascript></SCRIPT>
<SCRIPT src="<%=root_path2%>Include/digg/ArtDigg.js" type=text/javascript></SCRIPT>
<SCRIPT src="<%=root_path2%>Include/digg/prototype.js" type=text/javascript></SCRIPT>
</HEAD>
<SCRIPT type=text/javascript>
function newspl(url) {
var
look=window.open(url,"","width=805,height=400,top=70,left=100,scrollbars=yes");
return (false);
}
function copyToClipBoard(url,title) {
var clipBoardContent='';
clipBoardContent+=url;
clipBoardContent+='\r\n'+title;
if(window.clipboardData)
{
window.clipboardData.clearData();
window.clipboardData.setData("Text", clipBoardContent);
}
else if(navigator.userAgent.indexOf("Opera") != -1)
{
window.location = clipBoardContent;
}
else if (window.netscape)
{
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
}
catch (e)
{
alert("此操作被浏览器拒绝!\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'");
}
var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
if (!clip)
return;
var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
if (!trans)
return;
trans.addDataFlavor('text/unicode');
var str = new Object();
var len = new Object();
var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
var copytext = clipBoardContent;
str.data = copytext;
trans.setTransferData("text/unicode",str,copytext.length*2);
var clipid = Components.interfaces.nsIClipboard;
if (!clip)
return false;
clip.setData(trans,null,clipid.kGlobalClipboard);
}
alert("你已复制链接及标题,请粘贴到泡泡/MSN等发给好友!");
}
</SCRIPT>
<%
URL="http://"&Request.ServerVariables("SERVER_NAME")
sql = "select top 15 * from news where sh=1 "
sql1= sql&" order by digg desc,id desc "
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql1,conn,1,1
%>
<BODY>
<div align="center">
<%Response.Write top%>
<table cellpadding="0" cellspacing="0" border="0"><tr><td align="center">
<DIV class=area >
<DIV class=col1>
<DIV class=blank12></DIV>
<DIV class=leftTitle>
<H2>关注度最高的新闻</H2><SPAN> </SPAN>
</DIV>
<%
if rs.recordcount<>0 then
while not rs.eof
lm2=trim(rs("lm3"))
if lm2="0" or lm2="" then lm2=trim(rs("lm2"))
if lm2="0" or lm2="" then lm2=trim(rs("lm"))
if lm2="" then lm2=0
sql2 = "select * from lm where id="&clng(lm2)
Set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open sql2,conn,1,1
lmid=rs2("id")
lm=rs2("lm")&rs2("lm2")&rs2("lm3")
pic=rs2("pic")
id=rs("id")
title=rs("title")
content=rs("content")
newshit=rs("hit")
title=glhtml(titleb(rs("title"),50))
if trim(rs("pic"))<>"" and pic="1" then
title=title&"[图]"
end if
content=glhtml(titleb(content,150))
set rspl = Server.CreateObject("ADODB.RecordSet")
rspl.Open "select * from [NewsPL] where NewsID="&id&" order by id desc",conn,1,1
NewsPLS=rspl.recordcount
rspl.close:set rspl=nothing
%>
<DIV class=leftList>
<DIV class=coL>
<DIV class=box>
<DIV class=num>
<H2 id=Art_ding<%=id%>><SCRIPT language=javascript src="<%=root_path2%>Include/digg/digg.asp?id=<%=id%>&post=diggshow"></SCRIPT></H2>
</DIV>
<DIV class=text>
<H3 id=diggact<%=id%>><a onClick="javascript:Digg(<%=id%>,'<%=root_path2%>');" href="javascript:void(0);">顶一下</a></H3>
</DIV>
</DIV>
</DIV>
<DIV class=coR>
<H2><a href=<%=fun_html_url(id)%> target=_blank title="所属栏目:[<%=lm%>]"><%=title%></a></H2>
<P><%=content%><SPAN><A href=<%=fun_html_url(id)%>>详细</A></SPAN></P>
<DIV class=blank12></DIV>
<DIV class=more>
<H3><a href= <%=root_path2%>newspl.asp?id=<%=id%> onclick='return newspl(this.href);' target=_blank>评论(<%=NewsPLS%>)条</A></H3>
<H4><A href="javascript:copyToClipBoard('<%=url&fun_html_url(id)%>','<%=title%>')" target=_self>推荐给朋友</A></H4></DIV></DIV>
<DIV class=clear></DIV>
</DIV>
<%
rs.movenext
wend
else
response.write "<BR> 对不起!没有相关内容<BR><BR><BR><BR>"
end if
rs.close:set rs=nothing
%>
<DIV class=blank12></DIV>
</DIV>
<DIV class=col3>
<DIV class=blank12></DIV>
<DIV class=rightTitle>
<H2>点击率最高的新闻</H2><SPAN> </SPAN>
</DIV>
<%
Set rs2 = Server.CreateObject("ADODB.RecordSet")
sql2 = "select top 16 * from news where sh=1 "
sql2= sql2&" order by hit desc,id desc "
rs2.Open sql2,conn,1,1
if rs2.recordcount<>0 then
while not rs2.eof
title2=glhtml(titleb(rs2("title"),50))
hit2=rs2("hit")
id2=rs2("id")
%>
<DIV class=rightList>
<UL>
<LI>
<DIV class=num>
<H5><%=hit2%></H5></DIV>
<DIV class=con>
<H5><a href=<%=fun_html_url(id2)%> target=_blank ><%=title2%></a></H5>
</DIV>
</LI>
</UL>
</DIV>
<%
rs2.movenext
wend
else
response.write "<BR> 对不起!没有相关内容<BR><BR><BR><BR>"
end if
rs2.close:set rs2=nothing
%>
<DIV class=blank6></DIV>
<DIV class=rightTitle>
<H2>评论最多的新闻</H2><SPAN> </SPAN>
</DIV>
<%
Set rs3 = Server.CreateObject("ADODB.RecordSet")
rs3.Open "SELECT TOP 16 newspl.newsid, (select title from news where news.id=newspl.newsid) AS hotitle, count(*) AS counts FROM newspl GROUP BY newsid ORDER BY count(*) DESC , newsid DESC;",conn,1,1
if rs3.recordcount<>0 then
while not rs3.eof
%>
<DIV class=rightList>
<UL>
<LI>
<DIV class=num>
<H5><%=rs3("counts")%></H5></DIV>
<DIV class=con>
<H5><a href=<%=fun_html_url(rs3("newsid"))%> target=_blank ><%=titleb(rs3("hotitle"),40)%></a></H5>
</DIV>
</LI>
</UL>
</DIV>
<%
rs3.movenext
wend
else
response.write "<BR> 对不起!没有相关内容<BR><BR><BR><BR>"
end if
rs3.close:set rs3=nothing
%>
<DIV class=blank12></DIV>
</DIV>
</DIV>
</td></tr></table>
<%
Response.Write down
conn.close:set conn=nothing
%>
</div>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -