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

📄 makeindex.asp

📁 新闻发布系统
💻 ASP
字号:
<!--#include file = "conn.asp"-->
<!--#include file = "Fsmanage/admin_checkmana.asp"-->
<!--#include file = "Fsmanage/inc/function.asp"-->
<!--#include file = "Fsmanage/inc/ReplaceMake.asp"-->
<!--#include file = "Fsmanage/inc/Child.asp"-->
<%
'=========================================================
'产品目录:风讯产品N系列
'软件名称:风讯站点管理系统
'当前版本:2004.I.0225
'最新更新:2004.2.10
'=========================================================
'Copyright (C) 2002-2004 cooin.com. All rights reserved.
'网站: http://www.cooin.com  Foosun.net
'程序制作:轻风云(QQ:655071)
'Email:skeen@cooin.com,skeen@Foosun.net
'论坛支持:风讯在线论坛(http://bbs.cooin.com   http://bbs.foosun.net)
'=========================================================
if EnoughPopedom("makeindex")=1 then
Response.write"<script>alert(""[操作失败]\n\n你的权限不足!\n\n请与系统管理员联系获得足够的权限!"");location.href=""javascript:history.back()"";</script>"
Response.end
end if

function todays()
dim tmprs
tmprs=conn.execute("Select count(NewsID) from News Where year(date)=year(date()) and month(date)=month(date()) and day(date)=day(date())")
todays=tmprs(0)
set tmprs=nothing
if isnull(todays) then todays=0
end function

function gettipnum()
dim tmprs
tmprs=conn.execute("Select Count(NewsID) from News ")
gettipnum=tmprs(0)
set tmprs=nothing
if isnull(gettipnum) then gettipnum=0
end function
tj="新闻数量:"&gettipnum()&"&nbsp;&nbsp;&nbsp;"
tj=tj&"今日新闻:"&todays()&""
%>
<head>
<title>www.cooin.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href=FsManage/css/css.css rel=stylesheet>
</head>
<%
  '获取绝对路径开始
   Copyright="\n\n Copyrights Foosun Computer System studios"
   Domain=Request.ServerVariables("SERVER_NAME")
   soFilePath=Request.ServerVariables("PATH_INFO")
   soFilePath=lcase(left(soFilePath,instrRev(soFilePath,"/")))
   totoln=len(soFilePath)
   soFilePath=lcase(left(soFilePath,totoln-1))
   soFilePath=lcase(left(soFilePath,instrRev(soFilePath,"/")))
   sowinpath=Domain&soFilePath  
  '获取绝对路径结束
  	Set rsnc=Server.CreateObject("adodb.recordset")
	sqlnc="select * from config"
    rsnc.open sqlnc,conn,1,1
	
    set rs=server.CreateObject("adodb.recordset")
	sql="Select * from News order by date desc"
	rs.open sql,conn,1,1
	
    set rsc=server.CreateObject("adodb.recordset")
	sqlc="Select * from Newsclass order by id desc"
	rsc.open sqlc,conn,1,1
	
	set rss=server.CreateObject("adodb.recordset")
	sqls="Select * from Speical order by id desc"
	rss.open sqls,conn,1,1
	
  	set rs3=Server.CreateObject("adodb.recordset")
    sql3="Select * from Templet Where TempletType='indext'"
   	rs3.open sql3,conn,1,1
    
	spb="<font color=red><b>热点专题</b></font><br>"
	if not rss.eof then
	    while not rss.eof
	    spb=spb&"<a href=special/"&rss("Speicalen")&".html target=_blank>"&rss("SpeicalCn")&"</a><br>"
	    rss.movenext
        wend
	else
	spb=spb&"还没有专题"
	end if
	
	    set rscn = server.createobject("adodb.recordset")
        sqlcn = "select PicNum from config"
        rscn.open sqlcn,conn,1,1
		set rsp = server.createobject("adodb.recordset")
        sqlp = "select top "&CInt(rscn("PicNum"))&" * from news where PicNews=true order by newsid desc "
        rsp.open sqlp,conn,1,1
		if not rsp.eof then
		spbp="<table width=100% border=0 cellspacing=0 cellpadding=0><tr>"
		i_temp=0
		while not rsp.eof
		spbp=spbp&"<td></td><td valign=top><table width='1' border='0' cellpadding='0' cellspacing='1' bgcolor='#4B4B4B' align='center'><tr><td height='24' bgcolor='#FFFFFF'><a href="&rsp("lpath")&rsp("Filename")&".html target=_blank><img src="&rsp("PicNewsa")&" width=63 height=63 border=0></a></td></tr></table><div align=center>·<A href="&rsp("lpath")&rsp("Filename")&".html target=_blank>"&CovtTitle(gotTopic(rsp("title"),22))&".</A></div></td>"'更改标题显示条数请修改gottopic参数
		rsp.movenext
		i_temp=i_temp+1
        if i_temp mod rscn("PicNum") = 0  then
		spbp=spbp&"</tr>"
		end if
        wend
		spbp=spbp&"</table>"
		else
		spbp=spbp&"尚无图片新闻"
		end if
        rsp.close
''########读取点击打top
	Set rstop=Server.CreateObject("adodb.recordset")
    sqltop="select * from News order by click desc"
    rstop.open sqltop,conn,1,1
    if rstop.eof then
    blst="·还没有TOP新闻"
    else
    do while not rstop.eof
    h=h+1
	if rstop("BiaotiNews")=true then
	blst=blst&"<img src="&rsnc("RNTitle")&" border=0></img><a href="&rstop("UBiaotiNews")&" target=_blank>"&CovtTitle(gotTopic(rstop("title"),22))&"</a><br>"
	else
    blst=blst&"<img src="&rsnc("RNTitle")&" border=0></img><a href="&rstop("lpath")&rstop("FileName")&".html target=_blank>"&CovtTitle(gotTopic(rstop("title"),22))&"</a><br>"
    end if
	if h>=10 then exit do
    rstop.movenext
    loop
    h=0
    end if
    rstop.close
''########最新新闻
	
	Set rsn=Server.CreateObject("adodb.recordset")
	sqln="select top 10  * from News order by newsid desc"
    rsn.open sqln,conn,1,1
    if rsn.eof then
    blsn="·还没有最新新闻"
    else
    do while not rsn.eof
    h=h+1
	if rsn("BiaotiNews")=true then
	blsn=blsn&"<img src="&rsnc("LNTitle")&" border=0></img><a href="&rsn("UBiaotiNews")&" target=_blank>"&rsn("title")&"</a><br>"
	else
    blsn=blsn&"<img src="&rsnc("LNTitle")&" border=0></img><a href="&rsn("lpath")&rsn("FileName")&".html target=_blank>"&CovtTitle(gotTopic(rsn("title"),40))&"</a><br>"
    end if
	if h>=10 then exit do
    rsn.movenext
    loop
    h=0
    end if
    rsn.close
  ''########新闻导读标题
  	Set rsd=Server.CreateObject("adodb.recordset")
	sqld="select top 1  * from News where Recommend=true and BiaotiNews=false order by newsid desc"
    rsd.open sqld,conn,1,1
    if rsd.eof then
    blsd="·还没有导读新闻"
    else
    while not rsd.EOF
	depict=gotTopic(replace(rsd("Content"),"'","''"),150)
    if instr(depict,chr(13))>0 then depict=replace(depict,chr(13),"")'去回车
    if instr(depict,chr(10))>0 then depict=replace(depict,chr(10),"")'去满行
    depict=replace(depict,chr(34),"″")
    blsd=blsd&"·<a style=""color:red;font-weight:bold;font-size:15px"" href="&rsd("lpath")&rsd("FileName")&".html target=_blank>"&rsd("title")&"</a><a href="&rsd("lpath")&rsd("FileName")&".asp target=_blank>[评]</a><br>"
	blsd=blsd&"&nbsp;&nbsp;&nbsp;&nbsp;"&depict&"...&nbsp;&nbsp;<A href="&rsd("lpath")&rsd("Filename")&".html target=_blank>详细内容></A><br>"
	rsd.MoveNext
    wend
    end if
    rsd.close
  ''########新闻导读并排
	Set rscoo=Server.CreateObject("adodb.recordset")
	sqlcoo="select * from config"
    rscoo.open sqlcoo,conn,1,1
	Set rsd=Server.CreateObject("adodb.recordset")
	sqld="select top "&CInt(rscoo("iBp"))&" * from News where Recommend=true order by newsid desc"
    rsd.open sqld,conn,1,1
	i_temp=0
	blsd=blsd&"<hr size=1 noshade width=95% align=center>"
    for i=1 to CInt(rscoo("iBp"))
      if rsd.eof then exit for
		  blsd=blsd&"<a href="&rsd("lpath")&rsd("filename")&".html target=_blank>"&CovtTitle(gotTopic(rsd("title"),CInt(rscoo("iBpNt"))))&"</a>&nbsp;"
          rsd.movenext
		   i_temp=i_temp+1
		   if i_temp mod CInt(rscoo("iBpN")) = 0  then
	    blsd=blsd&"<table width=98% border=0 cellspacing=0 cellpadding=0><tr><td height=4></td></tr></table>"
		end if
   next
   rsd.close 
  ''########读取本类推荐TOP10
    Set rstr=Server.CreateObject("adodb.recordset")
    sqltr="select * from News where Recommend=true order by Newsid desc"
    rstr.open sqltr,conn,1,1
    if rstr.eof then
    blsr="·还没有推荐新闻"
    else
    do while not rstr.eof
    h=h+1
	if rstr("BiaotiNews")=true then
	blsr=blsr&"<img src="&rsnc("RNTitle")&" border=0></img><a href="&rstr("UBiaotiNews")&" target=_blank>"&CovtTitle(gotTopic(rstr("title"),22))&"</a><br>"
	else
    blsr=blsr&"<img src="&rsnc("RNTitle")&" border=0></img><a href="&rstr("lpath")&rstr("FileName")&".html target=_blank>"&CovtTitle(gotTopic(rstr("title"),22))&"</a><br>"
    end if
	if h>=10 then exit do
    rstr.movenext
    loop
    h=0
    end if
    rstr.close
	
        sfso=rs3("TempletContent")
		sfso=replace(sfso,"[Lastnews]",blsn)
		sfso=replace(sfso,"[recommendnews]",blsr)
        sfso=replace(sfso,"[newssearch]","<script src=JS/search.js></script>")
		sfso=replace(sfso,"[marquee]","<script src=otherjs/marquee.js></script>")
	    sfso=replace(sfso,"[special]",spb)
		sfso=replace(sfso,"[topnews]",blst)
		sfso=replace(sfso,"[Dnews]",blsd)
		sfso=replace(sfso,"[DHangPic]",spbp)
		sfso=replace(sfso,"[tongji]",tj)
        Set rsnc=Server.CreateObject("adodb.recordset")
        sqlnc="select * from Newsclass where Child=0 order by id desc"
        rsnc.open sqlnc,conn,1,1

        while not rsnc.eof
        set rsmall = server.createobject("adodb.recordset")
        rsmallsql = "select * from news where classen='"&rsnc("classen")&"' order by newsid desc"
        rsmall.open rsmallsql,conn,1,1
        slcc="<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td height=1></td></tr></table>"
        for i=1 to rsnc("iNews")
        if rsmall.eof then exit for
		if rsnc("TitleDate")=false then
		if rsmall("BiaotiNews")=true then
		slcc=slcc&""&rsnc("TitlePic")&"&nbsp;<A href="&rsmall("UBiaotiNews")&" target=_blank>"&CovtTitle(gotTopic(rsmall("title"),rsnc("TitleNumber")))&"</A><br>"
		else
        slcc=slcc&""&rsnc("TitlePic")&"&nbsp;<A href="&rsmall("lpath")&rsmall("Filename")&".html target=_blank>"&CovtTitle(gotTopic(rsmall("title"),rsnc("TitleNumber")))&"</A><br>"
		end if
		end if
		if rsnc("TitleDate")=true then
		if rsnc("GDate")=2 then
		   if rsmall("BiaotiNews")=true then
		   slcc=slcc&""&rsnc("TitlePic")&"&nbsp;<A href="&rsmall("UBiaotiNews")&" target=_blank>"&CovtTitle(gotTopic(rsmall("title"),rsnc("TitleNumber")))&"</A><font color=blue>[标]</font><font color="&rsnc("DateColor")&" size="&rsnc("DateSize")&">["&Month(rsmall("date"))&"/"&Day(rsmall("date"))&"]</font><br>"
		   else
           slcc=slcc&""&rsnc("TitlePic")&"&nbsp;<A href="&rsmall("lpath")&rsmall("Filename")&".html target=_blank>"&CovtTitle(gotTopic(rsmall("title"),rsnc("TitleNumber")))&"</A><font color="&rsnc("DateColor")&" size="&rsnc("DateSize")&">["&Month(rsmall("date"))&"/"&Day(rsmall("date"))&"]</font><br>"
		   end if
		else
		if rsmall("BiaotiNews")=true then
			 slcc=slcc&""&rsnc("TitlePic")&"&nbsp;<a href="&rsmall("UBiaotiNews")&" target=_blank>"&CovtTitle(gotTopic(rsmall("title"),rsnc("TitleNumber")))&"</a><font color=blue>[标]</font><font color="&rsnc("DateColor")&" size="&rsnc("DateSize")&">["&rsmall("date")&"]</font><br>"
			 else
             slcc=slcc&""&rsnc("TitlePic")&"&nbsp;<a href="&rsmall("lpath")&rsmall("FileName")&".html target=_blank>"&CovtTitle(gotTopic(rsmall("title"),rsnc("TitleNumber")))&"</a><font color="&rsnc("DateColor")&" size="&rsnc("DateSize")&">["&rsmall("date")&"]</font><br>"
		     end if
		end if
		end if
		if trim(rsnc("NewsBg"))<>"" then
		slcc=slcc&"<table width=100% border=0 cellspacing=0 cellpadding=0 background="&rsnc("NewsBg")&"><tr><td height=2></td></tr></table>"
		else
		slcc=slcc&"<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td height=1></td></tr></table>"
		end if
        rsmall.movenext
        next
        sfso=replace(sfso,"["&rsnc("classen")&"]",slcc)
        rsnc.movenext
        wend
	'大类标签开始
	Set rsb=Server.CreateObject("adodb.recordset")
    sqlb="Select * from newsClass where ParentID=0"
    rsb.open sqlb,conn,1,1
	do while not rsb.eof
    set rsb1=Server.CreateObject("adodb.recordset")
    childtemp=getchild(rsb("id"))
    sqlb1="Select * from news Where ClassCN in ("&childtemp&") order by Newsid Desc"
    rsb1.open sqlb1,conn,1,1     
	slcb="<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td height=1></td></tr></table>"
    for i=1 to rsb("iNews")
      if rsb1.eof then exit for
	    if rsb("Tdate")=2 then
		    if rsb1("BiaotiNews")=true then
			slcb=slcb&""&rsb("TitlePic")&"[<a href=Class/"&rsb1("ClassEN")&" target=_blank>"&rsb1("ClassCN")&"</a>]<a href="&rsb1("UBiaotiNews")&" target=_blank>"&CovtTitle(gotTopic(rsb1("title"),rsb("Ttitle")))&"</a><br>"
		    else
            slcb=slcb&""&rsb("TitlePic")&"[<a href=Class/"&rsb1("ClassEN")&" target=_blank>"&rsb1("ClassCN")&"</a>]<a href="&rsb1("lpath")&rsb1("FileName")&".html target=_blank>"&CovtTitle(gotTopic(rsb1("title"),rsb("Ttitle")))&"</a><br>"
		    end if
		 end if
		 if rsb("Tdate")=1 then
		 if rsb("GDate")=2 then
		    if rsb1("BiaotiNews")=true then
			  slcb=slcb&""&rsb("TitlePic")&"[<a href=Class/"&rsb1("ClassEN")&" target=_blank>"&rsb1("ClassCN")&"</a>]<a href="&rsb1("UBiaotiNews")&" target=_blank>"&CovtTitle(gotTopic(rsb1("title"),rsb("Ttitle")))&"</a><font color="&rsb("DateColor")&" size="&rsb("DateSize")&">["&Month(rsb1("date"))&"/"&Day(rsb1("date"))&"]</font><br>"
			else
		      slcb=slcb&""&rsb("TitlePic")&"[<a href=Class/"&rsb1("ClassEN")&" target=_blank>"&rsb1("ClassCN")&"</a>]<a href="&rsb1("lpath")&rsb1("FileName")&".html target=_blank>"&CovtTitle(gotTopic(rsb1("title"),rsb("Ttitle")))&"</a><font color="&rsb("DateColor")&" size="&rsb("DateSize")&">["&Month(rsb1("date"))&"/"&Day(rsb1("date"))&"]</font><br>"
			end if  
		 else
		     if rsb1("BiaotiNews")=true then
			  slcb=slcb&""&rsb("TitlePic")&"[<a href=Class/"&rsb1("ClassEN")&" target=_blank>"&rsb1("ClassCN")&"</a>]<a href="&rsb1("UBiaotiNews")&" target=_blank>"&CovtTitle(gotTopic(rsb1("title"),rsb("Ttitle")))&"</a><font color="&rsb("DateColor")&" size="&rsb("DateSize")&">["&rsb1("date")&"]</font><br>"
			 else
             slcb=slcb&""&rsb("TitlePic")&"[<a href=Class/"&rsb1("ClassEN")&" target=_blank>"&rsb1("ClassCN")&"</a>]<a href="&rsb1("lpath")&rsb1("FileName")&".html target=_blank>"&CovtTitle(gotTopic(rsb1("title"),rsb("Ttitle")))&"</a><font color="&rsb("DateColor")&" size="&rsb("DateSize")&">["&rsb1("date")&"]</font><br>"
		     end if
	     end if
		 end if
		 if trim(rsb("NewsBg"))<>"" then
		slcb=slcb&"<table width=100% border=0 cellspacing=0 cellpadding=0 background="&rsb("NewsBg")&"><tr><td height=2></td></tr></table>"
		else
		slcb=slcb&"<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td height=1></td></tr></table>"
		end if
      rsb1.movenext
    next
	    sfso=replace(sfso,"["&rsb("classen")&"]",slcb)
    rsb.movenext
    loop
    rsb.close
    rsb1.close
    set rsb=nothing
    set rsb1=nothing
	'大类标签结束
		sfso=replace(sfso,"[navigation]","<script src=codejs/Navigation.js></script>")
		Set fso = Server.CreateObject("Scripting.FileSystemObject")
        Set fout = fso.CreateTextFile(Server.MapPath(".")&"/Index.htm")
        fout.Write sfso
        fout.close
    rs.close
	set rs=nothing
	set rss=nothing
	set rsc=nothing
	set rsp=nothing    
   Response.write"<script>alert(""生成首页成功!\n\n文件名为:Index.htm"");location.href=""javascript:history.back()"";</script>"
   Response.end
%>

⌨️ 快捷键说明

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