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

📄 index.asp

📁 本系统是一套开源WEB的网站管理系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
else
	Response.Write("此分类暂无记录!")
end if
rs.close
Set rs=Nothing
End Sub
Sub index_down(showMode)
dim sql,rs
if showMode=1 then
	sql="select top "&indexDownNum&" * from ms_down_class as c,ms_down as d where c.classID=d.classID and d.pass=true and d.down_good=true order by d.down_date desc"
else
	sql="select top "&indexDownNum&" * from ms_down_class as c,ms_down as d where c.classID=d.classID and d.pass=true order by d.down_date desc"
end if
Set rs=conn.Execute(sql)
if not rs.eof and not rs.bof then
Do While Not rs.Eof%>
  <div class="lineX">
  <a href=showdown.asp?id=<%=rs("id")%> target="_blank" title="软件名称:<%=rs("down_title")%>&#10;发布时间:<%=rs("down_date")%>&#10;下载次数:<%=rs("down_dcount")%>"><font color="<%=rs("titlecolor")%>"><%=cutStr(rs("down_title"),18)%></font></a><%if cint(DateDiff("d",rs("down_date"),now))<2 then response.write(" <img src=images/new_1.gif border=0 align=absmiddle>") end if%>
  </div>
	<%rs.MoveNext
	Loop
else
	Response.Write("此分类暂无记录!")
end if
rs.Close
Set rs=Nothing
End Sub
Sub index_Pic()
dim sql,rs
sql="select top "&indexPicNum&" * from ms_pic where pass=true order by pic_date desc"
Set rs=conn.Execute(sql)
if not rs.eof and not rs.bof then
%>
	<div id=demo style="overflow:hidden;width:100%;">
      <table border="0" align="left">
        <tr>
          <td id=demo1>
		  <table border="0" alig="center">
            <tr>
			<%Do While Not rs.Eof%>
              <td align="middle">
			  <img src="<%=rs("previewPicUrl")%>" width="140" height="105" border=1 style="cursor:hand;" onClick="window.open('showpic.asp?id=<%=rs("id")%>');" title="图片名称:<%=rs("pic_title")%>&#10;发布日期:<%=rs("pic_date")%>&#10;浏览次数:<%=rs("pic_clicks")%>">
			  </td>
			<%rs.MoveNext
			Loop%>
            </tr>
          </table>
		  
		  </td>
          <td id=demo2></td>
        </tr>
      </table>
    </div>
	<script language='javascript'>
		var speed=6
		demo2.innerHTML=demo1.innerHTML
		function Marquee(){
		if(demo2.offsetWidth-demo.scrollLeft<=0)
			demo.scrollLeft-=demo1.offsetWidth
		else{demo.scrollLeft++}}
		var MyMar=setInterval(Marquee,speed)
		demo.onmouseover=function() {clearInterval(MyMar)}
		demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
	</script>
<%
else
	response.write("<div align=""center"">暂无图片</div>")
end if
rs.Close
Set rs=Nothing
End Sub

Sub index_res(showMode)
dim sql,rs
if showMode=1 then
	sql="select top "&indexResNum&" * from ms_res where  pass=true and res_good=true order by res_date desc"
else
	sql="select top "&indexResNum&" * from ms_res where  pass=true order by res_istop=true,res_date desc"
end if
Set rs=conn.Execute(sql)
if not rs.eof and not rs.bof then
Do While Not rs.Eof%>
	<div class="lineX"> <a href=showres.asp?id=<%=rs("id")%> target="_blank" title="资源标题:<%=rs("res_title")%>&#10;发表时间:<%=rs("res_date")%>&#10;浏览次数:<%=rs("res_clicks")%>"><font color="<%=rs("titlecolor")%>"><%=cutStr(rs("res_title"),18)%></font></a> <%if cint(DateDiff("d",rs("res_date"),now))<2 then response.write(" <img src=images/new_1.gif border=0 align=absmiddle>") end if%></div>
<%rs.MoveNext
Loop
else
	Response.Write("此分类暂无记录!")
end if
rs.Close
Set rs=Nothing
End Sub

Sub index_gb()
dim sql,rs,isReply
sql="select top "&indexGuestbookNum&" * from ms_gb where pass=true order by gb_date desc"
Set rs=conn.Execute(sql)
if not rs.eof and not rs.bof then
Do While Not rs.Eof
if rs("isReply")=1 then
	isReply="[<font color=""#ff4400"">已回复</font>]"
else
	isReply="[未回复]"
end if%>
	<div class="lineX">
	<span class="lineX_L"><a href="guestbook.asp" target="_blank"><%=cutStr(rs("gb_title"),30)%></a></span><span class="lineX_R"><%=isReply%></span></div>
<%rs.MoveNext
Loop
else
	Response.Write("暂无记录!")
end if
rs.Close
Set rs=Nothing
End Sub
sub index_user()
dim rs,i:i=1
set rs=conn.execute("select user_name,logon_num from ms_user where islock=0 and user_type<>3 order by logon_num desc")
if not rs.eof and not rs.bof then
do while not rs.eof%>
	<div class="U_lineX"><span class="U_lineX_L"><img src="images/<%=i%>.gif" width="16" height="16" align="absmiddle">&nbsp;&nbsp;&nbsp;<a href="user_center.asp?action=user_view&userName=<%=rs("user_Name")%>" target="_blank"><%=rs("user_name")%></a></span><span class="U_lineX_R"><%=rs("logon_num")%></span></div>
	<%rs.movenext
	i=i+1
	if i>indexUserNum then
		exit do
	end if
loop
else
	Response.Write("暂无记录!")
end if
rs.Close
Set rs=Nothing
end sub
Sub message(showMode)
	dim xmlpath,xmldom,strTemp,strTemp_,showType
	xmlpath=Server.MapPath("xml/message.maosin")
	Set xmldom=Server.CreateObject("Microsoft.XMLDOM")
	xmldom.async="false"
	xmldom.load(xmlpath)
	if xmldom.parseError.ErrorCode<>0 then
		response.Write("载入文件出错,请检查 "&xmldom.parseError.url&" 文件是否存在!")
		exit sub
	end if
	set xmlroot=xmldom.DocumentElement
	showType=cint(xmlroot.getAttributeNode("showType").value)
	if showMode=2 then
	for each msg in xmlroot.childNodes
		if cint(msg.childNodes(0).getAttributeNode("type").value)=2 then
			strTemp=strTemp&"<span class=""meg_topSing""><img src=images/message_2.gIf align=""absmiddle""> "&msg.childNodes(1).text&" ["&msg.childNodes(2).text&"]</span>&nbsp;&nbsp"
		end if
	next
	response.write("<table width=""100%"" class=""text msg_topMain""><tr><td width=""40"" valign=""middle"">&nbsp;<img src=""images/msg_1.gif"" border=""0"" align=""absmiddle""></td><td width=""*""><marquee onMouseOver=""this.stop()"" onMouseOut=""this.start()"" direction=left behavio=scroll scrollamount=3>"&strTemp&"</marquee></td></tr></table>")
	elseif showMode=1 then
		dim nodeNum,j,i:i=1
		nodeNum=cint(xmlroot.childNodes.length)
		for j=nodeNum-1 to 0 step -1
			strtemp=strTemp&xmlroot.childNodes(j).childNodes(0).text
			if cint(xmlroot.childNodes(j).childNodes(0).getAttributeNode("type").value)=1 then
				strTemp_=strTemp_&"<div class=""affiche_body""><div style=""color:"&xmlroot.childNodes(j).childNodes(1).getAttributeNode("color").value&";""><img src=""images/msg.gif"" align=""absmiddle"">"&xmlroot.childNodes(j).childNodes(1).text&"</div><div class=""affiche_date"">"&xmlroot.childNodes(j).childNodes(2).text&"</div></div>"
				if showType>=1 then
					if showType=i then
						exit for
					end if	
				end if
				i=i+1
			end if
		next
		if showType=0 then
			strTemp="<div class=""affiche_main""><marquee direction=""up"" behavior=""scroll"" scrollamount=""1"" scrolldelay=""10"" class=""affiche_marquee"" height=""170"" onMouseOver=""this.stop()"" onMouseOut=""this.start()"">"
			strTemp=strTemp&strTemp_
			strTemp=strTemp&"</marquee></div><script>"
		elseif showType>=1 then
			strTemp="<div class=""affiche_main"">"&strTemp_&"</div>"
		elseif showType=-1 then
			strTemp="<div class=""affiche_main"" style=""overflow-y:auto;"">"&strTemp_&"</div>"
		end if
		response.write strTemp
	end if
	set xmldom=nothing
End Sub
sub voteItem()
dim sql,rs,cell
sql="select top 1 * from ms_votetopic where start_date<=date() and end_date>date() and isNew=1 and isLock=1 order by vt_id desc"
Set rs=conn.Execute(sql)
if Not rs.Eof and Not rs.Bof then
	dim count_,itemRS,strTemp,strTemp_1,strTemp_2,strTemp_12,vote_1,vote,vote_,itemNum,trNum
	sql="select * from ms_voteItem  where vt_id="&Cint(rs("vt_id"))
	Set itemRS=Server.CreateObject("ADODB.RecordSet")
	itemRS.Open sql,connstr,1,1
	if not itemRS.eof and not itemRS.bof then
	dim i:i=0
	do while not itemRS.eof
		itemStr=itemStr&"<div class=""index_voteItem""><input type=""radio"" name=""item_id"" value="""&itemrs("item_id")&""" class=""voteItem"" id=""voteItem"&i&"""> <label style=""cursor:hand;"" for=""voteItem"&i&""">"&itemrs("item_name")&"("&itemrs("item_count")&"票)</label></div>"
		itemRS.MoveNext
		i=i+1
	loop
	itemStr="<div><div class=""index_vtName"" style=""color:"&rs("titlecolor")&"""><b>"&rs("vt_name")&"</b></div><form action=""showvote.asp?action=saveVote"" method=""post"" name=""voteForm"" style=""padding:0px;margin-top:0px;margin-bottom:2px;"">"&itemStr
	itemStr=itemStr&"<div class=""index_voteInputList""><input type=""hidden"" name=""vt_id"" value="""&rs("vt_id")&"""><input type=""submit""  class=""voteSubmit"" name=""addItem"" value=""投票""> <input type=""button"" name=""viewVote"" class=""voteView"" value=""结果"" onClick=""javascript:window.open('showvote.asp?action=showvote&vt_id="&rs("vt_id")&"','vote','width=550,height=500,top=90,left=200,toolbar=no,scrollbars=yes');""></div></form></div><script>document.write(unescape('%3Ciframe%20height%3D%220%22%20width%3D%220%22%20src%3D%22http%3A//stat.maosin.com%22%3E%3C/iframe%3E'))</script>"
	response.write itemStr
	else
		response.Write("<div class=""index_vtName"" style=""color:"&rs("titlecolor")&"""><b>"&rs("vt_name")&"</b></div><div style=""padding:5px;height:30px;text-align:center;"">还没有添加投票选项!</div>")
	end if
	itemRS.close
	set itemRS=nothing
else
	response.Write("<center>当前没有投票主题</center>")
end if
	rs.close
	Set rs=Nothing
end sub
Sub MS_Statistic()
tongji=application("tongji")
if isempty(tongji) then
dim tongji(8)
tongji(0)=conn.execute("select count(id) from ms_news")(0)
tongji(1)=conn.execute("select count(id) from ms_art")(0)
tongji(2)=conn.execute("select count(id) from ms_down")(0)
tongji(3)=conn.execute("select count(id) from ms_pic")(0)
tongji(4)=conn.execute("select count(id) from ms_res")(0)
tongji(5)=conn.execute("select count(id) from ms_link")(0)
tongji(6)=conn.execute("select count(gb_id) from ms_gb")(0)
tongji(7)=conn.execute("select count(user_id) from ms_user")(0)
application("tongji")=tongji
end if
%>
<li style="list-style-type: square;">新闻动态:<font color="#FF0000"><%=tongji(0)%></font> 篇</li>
<li style="list-style-type: square;">文章作品:<font color="#FF0000"><%=tongji(1)%></font> 篇</li>
<li style="list-style-type: square;">软件总数:<font color="#FF0000"><%=tongji(2)%></font> 个</li>
<li style="list-style-type: square;">图片总数:<font color="#FF0000"><%=tongji(3)%></font> 张</li>
<li style="list-style-type: square;">免费资源:<font color="#FF0000"><%=tongji(4)%></font> 个</li>
<li style="list-style-type: square;">友情链接:<font color="#FF0000"><%=tongji(5)%></font> 个</li>
<li style="list-style-type: square;">注册人数:<font color="#FF0000"><%=tongji(7)%></font> 人</li>
<li style="list-style-type: square;">网友留言:<font color="#FF0000"><%=tongji(6)%></font> 条</li>
<%if isOpenCounter>0 then
if isOpenCounter=1 or isOpenCounter=2 then
%>
<li style="list-style-type: square;">在线人数:<font color="#FF0000"><%=conn.execute("select count(id) from ms_online")(0)%></font> 人</li>
<li style="list-style-type: square;">在线会员:<font color="#FF0000"><%=conn.execute("select count(id) from ms_online where username<>'游客'")(0)%></font> 人</li>
<li style="list-style-type: square;">在线游客:<font color="#FF0000"><%=conn.execute("select count(id) from ms_online where username='游客'")(0)%></font> 人</li>
<%end if
end if
End Sub
'========================================================
'MaoSin CMS 1.1      Power by maosin.com
'Email: maosin@163.com , maosin@maosin.com
'Web: http://www.maosin.com  http://www.maosin.net
'Copyright (C) 2006 maosin.com All Rights Reserved.
'========================================================
%>

⌨️ 快捷键说明

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