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

📄 function.asp

📁 官方最新的南方数据v12生成静态商业版。全站生成静态。
💻 ASP
📖 第 1 页 / 共 4 页
字号:
		response.write "<p>&nbsp;&nbsp;没有公告</p>" 
	else 
		AnnounceCount=rsAnnounce.recordcount		
			response.Write "本站公告:"
			do while not rsAnnounce.eof   
				response.Write "&nbsp;<a href='#' onclick=""javascript:window.open('Affiche.asp?ID=" & rsAnnounce("id") &"', 'newwindow', 'height=450, width=400, toolbar=no, menubar=no, scrollbars=auto, resizable=no, location=no, status=no')"" title='" & rsAnnounce("Content") & "'><font color='#FF0000'>" &rsAnnounce("title") & "</font></a>"
				rsAnnounce.movenext
				i=i+1				  
			loop       		
	end if  
	rsAnnounce.close
	set rsAnnounce=nothing
end sub

'==================================================
'过程名:ShowFriendLinks
'作  用:显示友情链接站点
'参  数:LinkType  ----链接方式,1为LOGO链接,2为文字链接
'       SiteNum   ----最多显示多少个站点
'       Cols      ----分几列显示
'       ShowType  ----显示方式。1为向上滚动,2为横向列表,3为下拉列表框
'==================================================
sub ShowFriendLinks(LinkType,SiteNum,Cols,ShowType)
	dim sqlLink,rsLink,SiteCount,i,strLink
	if LinkType<>1 and LinkType<>2 then
		LinkType=1
	else
		LinkType=Cint(LinkType)
	end if
	if SiteNum<=0 or SiteNum>100 then
		SiteNum=10
	end if
	if Cols<=0 or Cols>20 then
		Cols=10
	end if
	if ShowType=1 then'
        strLink=strLink & "<div id=rolllink style=overflow:hidden;height:130;width:100><div id=rolllink1>"    '新增加的代码
	elseif ShowType=3 then
		strLink=strLink & "<select name='FriendSite' onchange=""if(this.options[this.selectedIndex].value!=''){window.open(this.options[this.selectedIndex].value,'_blank');}""><option value=''>友情文字链接站点</option>"
	end if
	if ShowType=1 or ShowType=2 then
		strLink=strLink & "<table width='100%' cellSpacing='5'><tr align='center' >"
	end if
	
	sqlLink="select top " & SiteNum & " * from 0791idc_FriendLinks where IsOK="&TrueType&" and LinkType=" & LinkType & " order by IsGood,id desc"
	set rsLink=server.createobject("adodb.recordset")
	rsLink.open sqlLink,conn,1,1
	if rsLink.bof and rsLink.eof then
		if ShowType=1 or ShowType=2 then
	  		for i=1 to SiteNum
				strLink=strLink & "<td>"			
				strLink=strLink & "</td>"
				if i mod Cols=0 and i<SiteNum then
					strLink=strLink & "</tr><tr align='center' >"
				end if
			next
		end if
	else
		SiteCount=rsLink.recordcount
		for i=1 to SiteCount
			if ShowType=1 or ShowType=2 then
			  if LinkType=1 then
				strLink=strLink & "<td width='88'><a href='" & rsLink("SiteUrl") & "' target='_blank' title='网站名称:" & rsLink("SiteName") & vbcrlf & "网站地址:" & rsLink("SiteUrl") & vbcrlf & "网站简介:" & rsLink("SiteIntro") & "'>"
				if rsLink("LogoUrl")="" or rsLink("LogoUrl")="http://" then
					strLink=strLink & "<img src='images/nologo.gif' width='88' height='31' border='0'>"
				else
					strLink=strLink & "<img src='" & rsLink("LogoUrl") & "' width='88' height='31' border='0'>"
				end if
				strLink=strLink & "</a></td>"
			  else
				strLink=strLink & "<td width='88'><a href='" & rsLink("SiteUrl") & "' target='_blank' title='网站名称:" & rsLink("SiteName") & vbcrlf & "网站地址:" & rsLink("SiteUrl") & vbcrlf & "网站简介:" & rsLink("SiteIntro") & "'>" & rsLink("SiteName") & "</a></td>"
			  end if
			  if i mod Cols=0 and i<SiteNum then
				strLink=strLink & "</tr><tr align='center' >"
			  end if
			else
				strLink=strLink & "<option value='" & rsLink("SiteUrl") & "'>" & rsLink("SiteName") & "</option>"
			end if
			rsLink.moveNext
		next
		if SiteCount<SiteNum and (ShowType=1 or ShowType=2) then
			for i=SiteCount+1 to SiteNum
				if LinkType=1 then
					strLink=strLink & "<td width='88'></td>"
				else
					strLink=strLink & "<td width='88'></td>"
				end if
				if i mod Cols=0 and i<SiteNum then
					strLink=strLink & "</tr><tr align='center' >"
				end if
			next
		end if
	end if
	if ShowType=1 or ShowType=2 then
		strLink=strLink & "</tr></table>"
	end if
	if ShowType=1 then
        strLink=strLink & "</div><div id=rolllink2></div></div>"   '新增代码
	elseif ShowType=3 then
		strLink=strLink & "</select>"
	end if
	response.write strLink
	if ShowType=1 then call RollFriendLinks()    '新增代码
	rsLink.close
	set rsLink=nothing
end sub

'==================================================
'过程名:RollFriendLinks
'作  用:滚动显示友情链接站点
'参  数:无
'==================================================
sub RollFriendLinks()
%>
<script>
   var rollspeed=30
   rolllink2.innerHTML=rolllink1.innerHTML //克隆rolllink1为rolllink2
   function Marquee(){
   if(rolllink2.offsetTop-rolllink.scrollTop<=0) //当滚动至rolllink1与rolllink2交界时
   rolllink.scrollTop-=rolllink1.offsetHeight  //rolllink跳到最顶端
   else{
   rolllink.scrollTop++
   }
   }
   var MyMar=setInterval(Marquee,rollspeed) //设置定时器
   rolllink.onmouseover=function() {clearInterval(MyMar)}//鼠标移上时清除定时器达到滚动停止的目的
   rolllink.onmouseout=function() {MyMar=setInterval(Marquee,rollspeed)}//鼠标移开时重设定时器
</script>
<%
end sub
%>
<%
'==================================================
'过程名:ShowAD
'作  用:显示广告
'参  数:ADType ---广告类型
'         0  弹出广告
'         1  Banner广告 
'         2  浮动广告
 '        3  对联广告
'==================================================
sub ShowAD(ADType)
	dim sqlAD,rsAD,AD,arrSetting,popleft,poptop,floatleft,floattop,fixedleft,fixedtop
	sqlAD="select * from 0791idc_Advertisement where IsSelected="&TrueType&""	
	sqlAD=sqlAD & " and ADType=" & ADtype & " order by ID Desc"
	set rsAD=server.createobject("adodb.recordset")
	rsAD.open sqlAD,conn,1,1
	if not rsAd.bof and not rsAD.eof then
		do while not rsAD.eof
			if rsAD("isflash")=true then
				AD= "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0'"
				if rsAD("ImgWidth")>0 then AD = AD & " width='" & rsAD("ImgWidth") & "'"
				if rsAD("ImgHeight")>0 then AD = AD & " height='" & rsAD("ImgHeight") & "'"
				AD = AD & "><param name='movie' value='" & rsAD("ImgUrl") & "'><param name='quality' value='high'><param name='wmode' value='transparent'><embed src='" & rsAD("ImgUrl") & "' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' id=southidc"
				if rsAD("ImgWidth")>0 then AD = AD & " width='" & rsAD("ImgWidth") & "'"
				if rsAD("ImgHeight")>0 then AD = AD & " height='" & rsAD("ImgHeight") & "'"
				AD = AD & "></embed></object>"
			else
				AD ="<a href='" & rsAD("SiteUrl") & "' target='_blank' title='" & rsAD("SiteName") & ":" & rsAD("SiteUrl") & "'><img src='" & rsAD("ImgUrl") & "'"
				if rsAD("ImgWidth")>0 then AD = AD & " width='" & rsAD("ImgWidth") & "'"
				if rsAD("ImgHeight")>0 then AD = AD & " height='" & rsAD("ImgHeight") & "'"
				AD = AD & " border='0'></a>"
			end if
			if ADtype=0 then
				if  session("PopAD"&rsAD("ID"))<>True then
					if instr(rsAD("ADSetting"),"|")>0 then
						arrSetting=split(rsAD("ADSetting"),"|")
						popleft=arrsetting(0)
						poptop=arrsetting(1)
					end if
					response.write "<SCRIPT language=javascript>"
					response.write "window.open(""PopAD.asp?Id="& rsAD("ID")&""",""popad"&rsAD("ID")&""",""toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,width="&rsAD("ImgWidth")&",height="&rsAD("ImgHeight")&",top="&poptop&",left="&popleft&""");"
					response.write "</SCRIPT>"
					session("PopAD"&rsAD("ID"))=True
				end if
			elseif ADtype=1 then
				response.write AD
				exit do			
			elseif ADtype=2 then
				if instr(rsAD("ADSetting"),"|")>0 then
					arrSetting=split(rsAD("ADSetting"),"|")
					floatleft=arrsetting(0)
					floattop=arrsetting(1)
				end if
				response.write "<div id='FlAD' style='position:absolute; z-index:10;left: "&floatleft&"; top: "&floattop&"'>" & AD & "</div>"
				call FloatAD()
				exit do
			elseif ADtype=3 then
				if instr(rsAD("ADSetting"),"|")>0 then
					arrSetting=split(rsAD("ADSetting"),"|")
					fixedleft=arrsetting(0)
					fixedtop=arrsetting(1)
				end if				
				response.write "<div id=AdLayer1 style='position: absolute;visibility:hidden;z-index:1'><EMBED src="&rsAD("ImgUrl")&" quality=high  WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash' id=southidc></EMBED></div><div id=AdLayer2 style='position: absolute;visibility:hidden;z-index:1'><EMBED src="&rsAD("ImgUrl")&" quality=high  WIDTH=" & rsAD("ImgWidth") &" HEIGHT=" & rsAD("ImgHeight") & " TYPE='application/x-shockwave-flash' id=southidc></EMBED></div>"
				call FixedAD()
				exit do
			end if
			rsAD.movenext
		loop
	end if
	rsAD.close
	set rsAD=nothing
end sub


'==================================================
'过程名:ShowSearchForm
'作  用:显示文章搜索表单
'参  数:ShowType ----显示方式。1为简洁模式,2为标准模式,3为高级模式
'==================================================
sub ShowSearchForm(Action,ShowType)
	if ShowType<>1 and ShowType<>2 and ShowType<>3 then
		ShowType=1
	end if
	response.write "<table border='0' cellpadding='0' cellspacing='0'>"
	response.write "<form method='Get' name='SearchForm' action='" & Action & "'>"
	response.write "<tr><td height='28' align='center'>"
	if ShowType=1 then
		response.write "<input type='text' name='keyword'  size='15' value='关键字' maxlength='50' onFocus='this.select();'>&nbsp;"
		response.write "<input type='hidden' name='field' value='Title'>"
		response.write "<input type='submit' name='Submit'  value='搜索'>"
		'response.write "<br><br>高级搜索"
	elseif Showtype=2 then
		response.write "<div align='left'><select name='Field' size='1'>"
    	if ChannelID=2 then
			response.write "<option value='Title' selected>产品名称</option>"
			response.write "<option value='Content'>产品内容</option>"		
		elseif ChannelID=3 then	
			response.write "<option value='SoftName' selected>软件名称</option>"
			response.write "<option value='SoftIntro'>软件简介</option>"
			response.write "<option value='Author'>软件作者</option>"
			response.write "<option value='Editor'>编辑姓名</option>"
		elseif ChannelID=4 then	
			response.write "<option value='PhotoName' selected>图片名称</option>"
			response.write "<option value='PhotoIntro'>图片简介</option>"
			response.write "<option value='Author'>图片作者</option>"
			response.write "<option value='Editor'>编辑姓名</option>"
		else
			response.write "<option value='Title' selected>产品名称</option>"
			response.write "<option value='Content'>产品内容</option>"
		end if
		response.write "</select>&nbsp;<br>"
		response.write "<select name='ClassID'><option value=''>所有分类</option>"
		call Admin_ShowClass_Option(5,0)
		response.write "</select>&nbsp;<br><input type='text' name='keyword'  size='20' value='' maxlength='50' onFocus='this.select();'>&nbsp;<br>"
		response.write "<input type='submit' name='Submit'  value=' 搜索 '></div>"	
	end if
	response.write "</td></tr></form></table>"
end sub


sub Admin_ShowClass_Option(ShowType,CurrentID)
	if ShowType=0 then
	    response.write "<option value='0'"
		if CurrentID=0 then response.write " selected"
		response.write ">无(作为一级栏目)</option>"
	end if
	dim rsClass,sqlClass,strTemp,tmpDepth,i
	dim arrShowLine(20)
	for i=0 to ubound(arrShowLine)
		arrShowLine(i)=False
	next
	sqlClass="Select * From 0791idc_ProductClass order by RootID,OrderID"
	set rsClass=server.CreateObject("adodb.recordset")
	rsClass.open sqlClass,conn,1,1
	if rsClass.bof and rsClass.bof then
		response.write "<option value=''>请先添加栏目</option>"
	else
		do while not rsClass.eof
			tmpDepth=rsClass("Depth")
			if rsClass("NextID")>0 then
				arrShowLine(tmpDepth)=True
			else
				arrShowLine(tmpDepth)=False
			end if			
			strTemp="<option value='" & rsClass("ClassID") & "'"			
			if CurrentID>0 and rsClass("ClassID")=CurrentID then
				 strTemp=strTemp & " selected"
				 SkinID=rsClass("SkinID")
			end if
			strTemp=strTemp & ">"
			
			if tmpDepth>0 then
				for i=1 to tmpDepth
					strTemp=strTemp & "&nbsp;&nbsp;"
					if i=tmpDepth then
						if rsClass("NextID")>0 then
							strTemp=strTemp & "├&nbsp;"
						else
							strTemp=strTemp & "└&nbsp;"
						end if
					else
						if arrShowLine(i)=True then
							strTemp=strTemp & "│"
						else
							strTemp=strTemp & "&nbsp;"
						end if
					end if
				next
			end if			
			strTemp=strTemp & rsClass("ClassName")
			strTemp=strTemp & "</option>"
			response.write strTemp
			rsClass.movenext
		loop
	end if
	rsClass.close
	set rsClass=nothing
end sub

'==================================================
'过程名:FloatAD
'作  用:浮动广告
'参  数:无
'==================================================
sub FloatAD()
%>
<SCRIPT language=javascript>
<!--moving logo-->
window.onload=FlAD;
var brOK=false;
var mie=false;
var aver=parseInt(navigator.appVersion.substring(0,1));
var aname=navigator.appName;
var mystop=0;

function checkbrOK()
{if(aname.indexOf("Internet Explorer")!=-1)
{if(aver>=4) brOK=navigator.javaEnabled();
mie=true;

⌨️ 快捷键说明

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