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

📄 index_mb.asp

📁 很好的企业网站管理系统!可以适应各种不同的小型企业!
💻 ASP
📖 第 1 页 / 共 5 页
字号:
<!--#include file="mdb_path_info.asp"-->
<%'==========================================
'
'  晓宇听幽网站内容管理系统 2004
'
'  主页地址:http://www.xoYu.com
'
'==========================================
'程序名称:晓宇听幽网站内容管理系统
'英文名称:xoYu News 2004 Professional
'程序创建时间:2003-7-10
'程序完成时间:2003-9-11
'最后修改时间:2003-10-10
'==========================================
newshu=6 '每个分类显示最新文章数
toplen=8
chalen=14
search=search&"<form method=""post"" action=""search.asp"">"
search=search&"<p align=""center"">"          
search=search&"<input name=""k"" size=""24"" style=""border: 1px dotted #42A5F7; "">"
search=search&"<select name=""kt"">"
search=search&"<option value=""search.asp?type=title&k="""">按照标题搜索</option>"
search=search&"<option value=""search.asp?type=info&k="""">按照内容搜索</option>"
search=search&"</select>"
search=search&"<input name=""Submit"" src=""images/d_search.gif"" type=""image"" value=""Submit"" align=""absmiddle"" border=""0"">"
set rs=server.CreateObject("ADODB.RecordSet")
set rs_info=server.CreateObject("ADODB.RecordSet")
set rs_yl=server.CreateObject("ADODB.RecordSet")
set rs_t=server.CreateObject("ADODB.RecordSet")

function xoYuTitle(content)
    if content<>"" then
    xoYuTitle=content
  	xoYuTitle=replace(xoYuTitle,"[加粗]","<b>")
  	xoYuTitle=replace(xoYuTitle,"[倾斜]","<i>")
  	xoYuTitle=replace(xoYuTitle,"[下划线]","<u>")
  	xoYuTitle=replace(xoYuTitle,"[删除线]","<s>")
	if instr(1,xoYuTitle,"<b>",1)<>0 then xoYuTitle=xoYuTitle+"</b>"
	if instr(1,xoYuTitle,"<i>",1)<>0 then xoYuTitle=xoYuTitle+"</i>"
	if instr(1,xoYuTitle,"<u>",1)<>0 then xoYuTitle=xoYuTitle+"</u>"
	if instr(1,xoYuTitle,"<s>",1)<>0 then xoYuTitle=xoYuTitle+"</s>"
	xoYuTitle=replace(xoYuTitle,"[红色]","<font color=ff0000>")
	xoYuTitle=replace(xoYuTitle,"[蓝色]","<font color=blue>")
	xoYuTitle=replace(xoYuTitle,"[绿色]","<font color=green>")
	xoYuTitle=replace(xoYuTitle,"[紫色]","<font color=990099>")
	xoYuTitle=replace(xoYuTitle,"[酱色]","<font color=790000>")
	xoYuTitle=replace(xoYuTitle,"[橙色]","<font color=FF6600>")
	if instr(1,xoYuTitle,"<font",1)<>0 then xoYuTitle=xoYuTitle+"</font>"
	xoYuTitle=replace(xoYuTitle,"[建议]","<font color=red>[建议]</font>")
	xoYuTitle=replace(xoYuTitle,"[注意]","<font color=red>[注意]</font>")
	xoYuTitle=replace(xoYuTitle,"[下载]","<font color=red>[下载]</font>")
	xoYuTitle=replace(xoYuTitle,"[公告]","<font color=red>[公告]</font>")
	xoYuTitle=replace(xoYuTitle,"[转载]","<font color=red>[转载]</font>")
	xoYuTitle=replace(xoYuTitle,"[焦点]","<font color=red>[焦点]</font>")
	xoYuTitle=replace(xoYuTitle,"[社会]","<font color=red>[社会]</font>")
	xoYuTitle=replace(xoYuTitle,"[推荐]","<font color=red>[推荐]</font>")
	xoYuTitle=replace(xoYuTitle,"[原创]","<font color=red>[原创]</font>")
	  end if
End function


i=0
sql="select top 10 title,id,dj,date from info where date>Now()-7 order by hits desc"
rs.open sql,conn,1,1
if rs.eof then
  top="还没有文章"
else
do while not rs.eof
filetop=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date"))
if instr(rs("Title"),"<font")>0 then
toplen1=toplen+20
if len(rs("Title"))>toplen1 then
titley=left(rs("Title"),toplen1)&"</font>"&"..."
else
titley=rs("Title")&"</font>"
end if
else
if len(rs("Title"))>toplen then
titley=left(rs("Title"),toplen)&"..."
else
titley=rs("Title")
end if
end if
if rs("dj")=6 then
Txtop=Txtop&"·<a title="""&rs("Title")&""" target=""_blank"" href=""Html/"&filetop&"-1.Html"">"&xoyuTitle(titley)&"</a><br>"
else
Txtop=Txtop&"·<a title="""&rs("Title")&""" target=""_blank"" href=""Html/shownews.asp?id="&rs("id")&""">"&xoyuTitle(titley)&"</a><br>"
end if
i=i+1
if i>=10 then exit do
rs.movenext
loop
end if
rs.close
'今日导读开始
i=0
sql="select top 15 id,title,tid,date from info order by date desc"
rs.open sql,conn,1,1
if rs.eof then
  infolist="·还没有文章"
else
for i=1 to 15
if rs.eof then exit for
 rs_t.open "select * from infotype where id="&rs("tid"),conn,1,1
 if not rs_t.EOF then
 TN=split(rs_t("tname"),"|")
 end if
 rs_t.close
filetop=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date"))
  datetime=year(rs("date"))&"_"&month(rs("date"))&"_"&day(rs("date"))'时间格式:年/月/日
  datetime1=month(rs("date"))&"/"&day(rs("date"))'时间格式:月/日
  LM="[<a href=List/List_"&rs("tid")&"_1.html>"&TN(ubound(TN)-1)&"</a>]"
'今日导读标题断行开始
if len(rs("Title"))>16 then
titley=left(rs("Title"),16)&"..."
else
titley=rs("Title")
end if
'今日导读标题断行结束
  infolist=infolist&"<font color=""#C0C0C0"">"&lm&"</font><a href=""Html/"&filetop&"-1.Html"" target=_blank son=hint style=""behavior:url(0007.htc)"" alt="&rs("Title")&">"&xoyuTitle(titley)&"</a><br>"
rs.movenext
next
end if
rs.close
'今日导读结束
rs2=conn.execute("select count(*) from info where year(date)&month(date)&day(date)=year(date())&month(date())&day(date())")
shuinfo=rs2(0)

Dim list_4(20)
Dim list_5(20)
Dim list_6(20)
sql="select * from specialx where tj=1 and spics<>''"
rs.open sql,conn,1,1
if NOT rs.EOF then
do while not rs.eof
kk=kk+1
SN=split(rs("sname"),"|")
for i = 0 to ubound(SN)-1
next
SSY_name=SN(0)
list_4(kk)="<a href=""special/List_"&rs("id")&"_1.Html"">"&SSY_name&"</a><br>"&rs("introduce")&""
list_5(kk)="<a href=""special/List_"&rs("id")&"_1.Html""><img border=""0"" src="""&rs("spics")&"""></a>"
rs.MoveNext
loop
end if
rs.close

sql="select * from specialx where tj=1 and spics=''"
rs.open sql,conn,1,1
if NOT rs.EOF then
do while not rs.eof
tt=tt+1
SN=split(rs("sname"),"|")
for i = 0 to ubound(SN)-1
next
SSY_name=SN(0)
list_6(tt)="<a href=""special/List_"&rs("id")&"_1.Html"">"&SSY_name&"</a>"
rs.MoveNext
loop
end if
rs.close

rs.open "select * from infotype ",conn,1,1
if not rs.eof then
    ts=rs("ts")   
        TN=split(rs("tname"),"|")
        TI=split(rs("ts"), ",")
          for i = 0 to ubound(TN)-1
               if i=ubound(TN)-2 and ubound(TN)>1 then
                 TTY_id=TI(i)
                 TTY_name=TN(i)
               end if
                 all_type_top_id=TI(i)
                 all_type_name=TN(i)
             thistype=thistype & "-> <a href=""List/List_"&TI(i)&"_1.Html"">"&TN(i)&"</a>"
             thistitle=thistitle & " - "&TN(i)&""
          next
  end if
  rs.close

       i=0
       sql="select * from info where pic<>'' and commend='1' order by date desc"
       rs.open sql,conn,1,1
       if rs.eof then
       image="还没有图片文章"
       else
       do while not rs.eof
       
       if instr(rs("Title"),"<font")>0 then
toplen1=toplen+20
if len(rs("Title"))>toplen1 then
titley=left(rs("Title"),toplen1)&"</font>"&"..."
else
titley=rs("Title")&"</font>"
end if
else
if len(rs("Title"))>toplen then
titley=left(rs("Title"),toplen)&"..."
else
titley=rs("Title")
end if
end if

       fileimg=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date"))
       noid=noid&" and id<>"&rs("id")&""
       i=i+1
       if rs("dj")=6 then
       image=image&"<a target=""_blank"" href=""Html/"&fileimg&"-1.Html"">"
       else
       image=image&"<a target=""_blank"" href=""Html/shownews.asp?id="&rs("id")&""">"
       end if
       pic=rs("pic")
       pic=Replace(pic, "../", "")
       image=image&"<img src="""&pic&""" border=""0"" width=""120"" height=""90""><br><img src=""about:blank"" border=""0"" width=""0"" height=""3""><br>"&titley&"</a></td><td>"
       if i>=5 then exit do
       rs.movenext
       loop
       end if
       rs.close
       
 '图文混排开始
             i=0
       sql="select * from info where pic<>'' and commend='1' order by date desc"
       rs.open sql,conn,1,1
       if rs.eof then
       DefaultPic="还没有图片文章"
       else
       do while not rs.eof
       
infoy=left(rs("info"),85)&"..."
if instr(rs("Title"),"<font")>0 then

if len(rs("Title"))>28 then
titley=left(rs("Title"),toplen1)&"</font>"&"..."
else
titley=rs("Title")&"</font>"
end if
else
if len(rs("Title"))>38 then
titley=left(rs("Title"),28)&"..."
else
titley=rs("Title")
end if
end if


       fileimg=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date"))
       noid=noid&" and id<>"&rs("id")&""
       i=i+1
       if rs("dj")=6 then
       DefaultPic=DefaultPic&"<a target=""_blank"" title=""点击查看详情"" href=""Html/"&fileimg&"-1.Html"">"
       else
       DefaultPic=DefaultPic&"<a target=""_blank"" href=""Html/shownews.asp?id="&rs("id")&""">"
       end if
       pic=rs("pic")
       pic=Replace(pic, "../", "")
       DefaultPic=DefaultPic&"<img Align=""left"" src="""&pic&""" border=""0"" width=""130"" height=""95""><b><font color=#FF0000>"&Titley&"</font></b>"&infoy&"</a></td><td>"
       if i>=1 then exit do
       rs.movenext
       loop
       end if
       rs.close
       '图文混排结束

list=list&"| "
rs.open "select * from infotype where tj=1 order by id",conn,1,1
if NOT rs.EOF then
allshu=rs.recordcount
Dim list_1(20)
Dim list_2(20)
Dim list_3(20)
do while NOT rs.EOF
ii=ii+1
list=list&"<a href=""List/List_"&rs("id")&"_1.Html""><font color=""#000000"">"&split(rs("tname"),"|")(rs("tj")-1)&"</font></a> | "
list_1(ii)="<b><a href=""List/List_"&rs("id")&"_1.Html""><font color=""#000000"">"&split(rs("tname"),"|")(rs("tj")-1)&"</font></a></b>"
list_2(ii)="<div align=right><a href=""List/List_"&rs("id")&"_1.Html""><b>更多内容 ...</b></a></div>"
                  i=0
                  sqqq_yl=""
                  sql_yl="select * from infotype where ts like '"&rs("ts")&"%'"
                  rs_yl.open sql_yl,conn,1,1
                  if not rs_yl.eof then
                  do while not rs_yl.eof
                  sqqq_yl=sqqq_yl& " or tid="&rs_yl("id")&""
                  rs_yl.MoveNext
                  loop
                  end if
                  rs_yl.close
                           rs_info.open "select id,title,dj,date from info where tid="&rs("id")&""&sqqq_yl&" order by id desc",conn,1,1
                           if NOT rs_info.EOF then
                           do while not rs_info.eof
                           fileming=year(rs_info("date"))&month(rs_info("date"))&day(rs_info("date"))&hour(rs_info("date"))&minute(rs_info("date"))&second(rs_info("date"))
                           if instr(rs_info("Title"),"<font")>0 then
                           chalen1=chalen+20
                           if len(rs_info("Title"))>chalen1 then
	                       titlex=left(rs_info("Title"),chalen1)&"</font>"&"..."
	                       else
                           titlex=rs_info("Title")&"</font>"
                           end if
                           else
                           if len(rs_info("Title"))>chalen then
	                       titlex=left(rs_info("Title"),chalen)&"..."
	                       else
                           titlex=rs_info("Title")
                           end if
                           end if
                           if rs_info("dj")=6 then
                            list_3(ii)=list_3(ii)&"[<a href=""List/List_"&rs("id")&"_1.Html""><font color=""#000000"">"&split(rs("tname"),"|")(rs("tj")-1)&"</font></a>]<a title="""&rs_info("Title")&""" target=""_blank"" href=""Html/"&fileming&"-1.Html"">"&xoyuTitle(titlex)&"</a><font color=""#C0C0C0"">"&datetime1&"</font><br>"
                           else
                            list_3(ii)=list_3(ii)&"[<a href=""List/List_"&rs("id")&"_1.Html""><font color=""#000000"">"&split(rs("tname"),"|")(rs("tj")-1)&"</font></a>]<a title="""&rs_info("Title")&""" target=""_blank"" href=""Html/shownews.asp?id="&rs_info("id")&""">"&xoyuTitle(titlex)&"</a><font color=""#C0C0C0"">"&datetime1&"</font><br>"
                           end if
                           i=i+1
                           if i>=newshu then exit do
                           rs_info.movenext
                           loop
                           end if
                            rs_info.close
                            
                           
rs.MoveNext
loop
end if
rs.close
set rs=nothing
set rs_yl=nothing
set rs_info=nothing
conn.close
set conn=nothing%>
<!--#include file="mdb_path_down.asp"-->
<%'下载调用开始==========================================
toplen=24
set rs_down=server.CreateObject("ADODB.RecordSet")
i=0
sql="select top 6 cxn,id from down order by hits desc"
rs_down.open sql,conn,1,1

⌨️ 快捷键说明

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