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

📄 templet2html.asp

📁 gmaple软件下载系统1.0Beta 具有一下功能: 1.模板功能,前台的呈现更加灵活. 2.支持静态生成,可在动态与静态间随时切换. 3.在静态模式下,可自定义生成目录,生成方式灵活.
💻 ASP
📖 第 1 页 / 共 2 页
字号:
		page_count=rs.pagecount
		rs.absolutepage=page_now
		i=1
		while not rs.eof and i<page_size+1
    	SD_Soft_List_Text=SD_Soft_List_Text&"<dl><dt><a href="""& SiteUrl & Directory & Dir_Soft & DateValue(rs("SD_Soft_Update")) &"/Soft_"& rs("SD_Soft_Id") &".html"" target=_blank>"& rs("SD_Soft_Name") &"</a> ... <span class=""remark""><a href="""& SiteUrl & Directory & Dir_Class &"Class_"& rs("S_Class.SD_S_Class_Id")&"_1.html"">"& rs("S_Class.SD_S_Class_Name") &"</a></span> ... </dt><dd>"& Replacehtml(rs("SD_Soft_Info")) &"</dd></dl><abbr>大小:<span class=""remark"">"& rs("SD_Soft_Size") &"</span> ... 语言:<span class=""remark"">"& rs("SD_Soft_Language") &"</span>... 授权:<span class=""remark"">"& rs("SD_Soft_Right") &"</span>... 添加日期: <span class=""remark"">"& rs("SD_Soft_Update") &"</span>... 推荐: "& SD_Img_Star(rs("SD_Soft_Level")) &"</abbr>"&vbCrlf
		rs.movenext
		i=i+1
		wend
	else
		SD_Soft_List_Text=SD_Soft_List_Text&"<dl><dt>没有相关软件</dt></dl>"&vbCrlf
	end if
	rs.close
    SD_Soft_List_Text=SD_Soft_List_Text&"</div>"
		SD_Soft_List_Text=SD_Soft_List_Text&"	<div class=""rblank""></div>"&vbCrlf
    SD_Soft_List_Text=SD_Soft_List_Text&"  <div class=""pagenav"">"&vbCrlf
    SD_Soft_List_Text=SD_Soft_List_Text&"  	<span style=""position:relative;top:-2px;"">"& HTML2Class_page(page_size,Cyc_page_max,Cyc_page,SiteUrl & Directory & Dir_Class &"Class_"&P_class_id,10,"#FF0000") &"</span>共有 <strong>"&SoftsNum&"</strong> 个软件. 页次: <strong>"&page_now&"</strong>/"&page_count&""&vbCrlf
    SD_Soft_List_Text=SD_Soft_List_Text&"  </div>"&vbCrlf
end function



function SD_Class_List_Page(num)
if num=1 then
	sql="select top 10 * from [Classs] where SD_S_Class_Parent=0 order by SD_S_Class_Order desc"
	rs.open sql,conn,1,1
	i=1
	if not rs.eof then
		while not rs.eof and i<=10
			SD_Class_List_Page=SD_Class_List_Page&"<li><a href="""& SiteUrl & Directory & Dir_Class &"Class_"& rs("S_Class.SD_S_Class_Id") &"_1.html"">"& rs("S_Class.SD_S_Class_Name") &"</a></li>"&vbCrlf
		rs.movenext
		i=i+1
		wend
	end if
	rs.close
elseif num=2 then
	sql="select * from [Classs] where SD_S_Class_Parent=0 order by SD_S_Class_Order desc"
	rs.open sql,conn,1,1
	if not rs.eof then
		while not rs.eof
    SD_Class_List_Page=SD_Class_List_Page&"<h2><a href="""& SiteUrl & Directory & Dir_Class &"Class_"& rs("S_Class.SD_S_Class_Id") &"_1.html"">"& rs("S_Class.SD_S_Class_Name") &"</a></h2>"&vbCrlf
    SD_Class_List_Page=SD_Class_List_Page&"<ul>"&vbCrlf
			set rst=conn.execute("select * from [Classs] where SD_S_Class_Parent="&rs("S_Class.SD_S_Class_Id")&" order by SD_S_Class_Order desc")
			if not rst.eof then
				while not rst.eof
				SD_Class_List_Page=SD_Class_List_Page&"<li><a href="""& SiteUrl & Directory & Dir_Class &"Class_"& rst("S_Class.SD_S_Class_Id") &"_1.html"">"& rst("S_Class.SD_S_Class_Name") &"</a></li>"&vbCrlf
				rst.movenext
				wend
			end if
			rst.close
    SD_Class_List_Page=SD_Class_List_Page&"</ul>"&vbCrlf
		rs.movenext
		wend
	end if
	rs.close
end if
end function

Function SD_Img_Star(lv)
	SD_Img_Star="<img src="""& SiteUrl &"images/"&lv&"star.gif"" />"
End function

Function SD_S_plugin(lv)
	SD_S_plugin="<img style=""position:relative;top:2px;"" src="""& SiteUrl &"images/plugin"&lv&".gif""/>"
End Function

Function SD_Down_Url(Url,SoftId,order)
'	if order<>"" then
'		debug("order="&order&"<BR>")
'	end if 
	Url = split(Url,"$$$$$")
	Url_name = split(Url(0),"; ")
	Url_Server = split(Url(1),"; ")
	Url_add = split(Url(2),"; ")
	if order="" or isnull(order) then
		for i = 0 to ubound(Url_name)
			if Url_Server(i)="-1" then
				SD_Down_Url=SD_Down_Url&"<li><a href='"&SiteUrl&"DownLoad.asp?id="&SoftId&"&n="&i&"' target='_blank'>"& Url_name(i) &"</a></li>"&vbCrlf
			else
				set rs=conn.execute("select SD_Server_Url from [Server] where SD_Server_Id="&Url_Server(i))
				
				SD_Down_Url=SD_Down_Url&"<li><a href='"&SiteUrl&"DownLoad.asp?id="&SoftId&"&n="&i&"' target='_blank'>"& Url_name(i) &"</a></li>"&vbCrlf
				rs.close
			end if
		next
	elseif order<>"" then
		
		SD_Down_Url=""
		if order = -1 then
			for i = 0 to ubound(Url_name)
				if Url_Server(i)="-1" then
					SD_Down_Url=SD_Down_Url&Url_add(i)
				else
					set rs=conn.execute("select SD_Server_Url from [Server] where SD_Server_Id="&Url_Server(i))
					SD_Down_Url=rs(0) & Url_add(i)&"|||"&SD_Down_Url
					rs.close
				end if
			next
		elseif order > -1 then
			if cint(order) > ubound(Url_name) then
				order=0
			end if
			if Url_Server(order)="-1" then
				SD_Down_Url=Url_add(i)
			else
				set rs=conn.execute("select SD_Server_Url from [Server] where SD_Server_Id="&Url_Server(order))
				SD_Down_Url=rs(0) & Url_add(order)
				rs.close
			end if
		end if
	else
		SD_Down_Url="参数错误!"
	end if
End Function


Function SD_Key_Search(keyWord,Cyc_page,Cyc_page_max,P_class_id)
	sql="select * from [Softs] where"
	keyWordList2 = split(keyWord)
	for i = 0 to Ubound(KeyWordList2)
		sql=sql&" SD_Soft_Name like '%"&keyWordList2(i)&"%' or SD_Soft_Info like '%"&keyWordList2(i)&"%' or"
	next
	sql=left(sql,len(sql)-3)
	sql=sql&" order by SD_Soft_Times desc"
	'debug(sql)
	rs.open sql,conn,1,1
	if not rs.eof then
		page_size=Page_Size_All
		rs.pagesize=page_size
		page_now=1
		if trim(request.QueryString("page"))<>"" then
			page_now=cint(trim(request.QueryString("page")))
		end if
		if page_now>rs.pagecount or page_now<0 then
			page_now=1
		end if
		
		page_count=rs.pagecount
		rs.absolutepage=page_now
		j=1
		while not rs.eof and j<page_size+1
			Soft_Name=Replacehtml(rs("SD_Soft_Name"))
			Soft_Info=CutStr(rs("SD_Soft_Info"),70,"")
			for i = 0 to Ubound(KeyWordList2)
				Soft_Name=replace(Soft_Name,KeyWordList2(i),"<span style='color:red'>"&KeyWordList2(i)&"</span>")
				Soft_Info=replace(Soft_Info,KeyWordList2(i),"<span style='color:red'>"&KeyWordList2(i)&"</span>")
			next
			SD_Key_Search=SD_Key_Search&"<div><dl>"&vbCrlf
  		SD_Key_Search=SD_Key_Search&"	<dt><a href='"& SiteUrl & Directory & Dir_Soft & DateValue(rs("SD_Soft_Update")) &"/Soft_"& rs("SD_Soft_Id") &".html' target=_blank>"& Soft_Name &"</a></dt>"&vbCrlf
    	SD_Key_Search=SD_Key_Search&"	<dd>"& Soft_Info &"</dd>"&vbCrlf
      SD_Key_Search=SD_Key_Search&"	<dd><i class='soft_date'>"& rs("SD_Soft_Update") &"</i></dd>"&vbCrlf
    	SD_Key_Search=SD_Key_Search&"	</dl></div>"&vbCrlf
		rs.movenext
		j=j+1
		wend
   		SD_Key_Search=SD_Key_Search&"<div>"&HTML2Class_page(page_size,Cyc_page_max,Cyc_page,SiteUrl & Directory & Dir_Search &"Search_"& KeyWord,15,"#FF0000") &"转到:<input type='text' size=3 id='gotopage'> <input type=button value=' Go ' onclick=""if (!isNaN(parseInt(document.getElementById('gotopage').value))){if(parseInt(document.getElementById('gotopage').value) <= "&Cyc_page_max&"){location.href='Search_"& KeyWord &"_'+document.all.gotopage.value+'.html';}else{alert('最大页数为"&Cyc_page_max&"');document.getElementById('gotopage').value='';}}""></div>"&vbCrlf
	else
		SD_Key_Search=SD_Key_Search&"<div>没有相关软件!</div>"&vbCrlf
	end if
	rs.close
End Function


function HTML2Class_page(maxpage,thepages,viewpage,pageurl,pp,font_color)
  if int(thepages)=0 then
    HTML2Class_page="<font color=" & font_color & "> "&btn_first&" <b>1</b> "&btn_last&" </font>"
    exit function
  end if
  dim pi,ppp,pl,pr
  pi=1
  ppp=pp\2
  if pp mod 2 = 0 then ppp=ppp-1
  pl=viewpage-ppp
  pr=pl+pp-1
  if pl<1 then
    pr=pr-pl+1
    pl=1
    if pr>thepages then pr=thepages
  end if
  if pr>int(thepages) then
    pl=pl+thepages-pr
    pr=thepages
    if pl<1 then pl=1
  end if
  if int(viewpage)=1 then
     HTML2Class_page=HTML2Class_page&" <font color=" & font_color & "> "&btn_first&" </font> "
  else
     HTML2Class_page=HTML2Class_page&" <a href='"& pageurl &"_1.html' title='第一页'>"&btn_first&"</a> " 
  end if
  if int(viewpage)>1 then
	 HTML2Class_page=HTML2Class_page&" <a href='"& pageurl &"_"&viewpage-1&".html' title='上一页'>"&btn_prev&"</a> "
  end if
  for pi=pl to pr
    if cint(viewpage)=cint(pi) then
      HTML2Class_page=HTML2Class_page&" <font color=" & font_color & " face=黑体><b>" & pi & "</b></font> "
    else
      HTML2Class_page=HTML2Class_page&" <a href='"& pageurl &"_"& pi &".html' title='第 " & pi & " 页' clases=0 style=""font-family:黑体""><b>" & pi & "</b></a> "
    end if
  next
    if cint(viewpage)<cint(thepages) then 	  
	  HTML2Class_page=HTML2Class_page&" <a href='"& pageurl &"_"&viewpage+1&".html' clases=0 title='后一页'>"&btn_next&"</a> "
    end if
	if cint(viewpage)=cint(thepages) then
      HTML2Class_page=HTML2Class_page&" <font color=" & font_color & "> "&btn_last&" </font> "
	else
	  HTML2Class_page=HTML2Class_page&" <a href='"& pageurl &"_"& thepages &".html' title='最后一页'>"&btn_last&"</a> "
	end if
		HTML2Class_page=HTML2Class_page&"<input name='page_now' value="& viewpage &" type='hidden'>"
end function

function Jquery2Search()
	Jquery2Search=""
end function

function SD_link_more(ClassName,ShowName,goUrl)
	if ClassName<>"" then
		sql="select SD_S_Class_Id from [S_Class] where SD_S_Class_Name='"&ClassName&"'"
		rs.open sql,conn,1,1
			ClassId = rs(0)
		rs.close
		SD_link_more="<a href='"& SiteUrl & Directory & Dir_Class & "Class_"& ClassId &"_1.html'>"&ShowName&"</a>"
	elseif ClassName="" then
		SD_link_more="<a href='"& goUrl &"'>"&ShowName&"</a>"
	end if
end function
%>

⌨️ 快捷键说明

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