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

📄 create_pagesort.asp

📁 大型黄页系统,精美黄页flash演示,10m
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	 page=CurrentPage-5
	else
	page=1
	end if
	if CurrentPage<5 then
	page1=10
	else
		if CurrentPage+5>n then
		page1=n
		else
		page1=CurrentPage+5
		end if
	end if
else
	page=1
	page1=n
end if
	For ii = page To page1
	HtmlShowPage = HtmlShowPage & "&nbsp;<a href=PageSort_Indate_Desc_" & ii & ".html>"
		If CurrentPage = CInt(ii) Then
			HtmlShowPage = HtmlShowPage & "<font color='#FF0000'><strong>"
		End If
		HtmlShowPage = HtmlShowPage & "" & ii & "</font></strong></a>"
	Next
		HtmlShowPage = HtmlShowPage & "&nbsp;……"
	If n - CurrentPage < 1 Then
		HtmlShowPage = HtmlShowPage & "&nbsp;&nbsp;下一页&nbsp;&nbsp;尾 页 </td></FORM></tr>" & vbCrLf
	Else
		HtmlShowPage = HtmlShowPage & "&nbsp;&nbsp;<a href=PageSort_Indate_Desc_" & (CurrentPage + 1) & ".html>下一页</a>"
		HtmlShowPage = HtmlShowPage & "&nbsp;&nbsp;<a href=PageSort_Indate_Desc_" & n & ".html>尾 页</a></td></FORM></tr>" & vbCrLf
	End If
		HtmlShowPage = HtmlShowPage & "<tr><FORM name=beginPagefrm onsubmit='return onCheckPage()' action=''><td class=C align=center>共 <font COLOR=#FF0000>" & totalnumber & "</font> 条信息&nbsp;&nbsp;当前页数:<strong><font color=red>" & CurrentPage & "</font>/" & n & "</strong>页&nbsp;每页<b>" & maxperpage & "</b>条信息" & vbCrLf
		HtmlShowPage = HtmlShowPage & "&nbsp;&nbsp;直接到第 <INPUT size=5  name=beginPage>&nbsp;页 <INPUT type=image src='../../images/button_small2_qw.gif' align=absMiddle value='确 定' name=submit2 >" & vbCrLf
		HtmlShowPage = HtmlShowPage & "</FORM></tr></table>" & vbCrLf
		HtmlShowPage = HtmlShowPage & "<SCRIPT language=javascript>" & vbCrLf
		HtmlShowPage = HtmlShowPage & "<!--" & vbCrLf
		HtmlShowPage = HtmlShowPage & "function onCheckPage(){" & vbCrLf
		HtmlShowPage = HtmlShowPage & "    var beginPage = parseInt(document.beginPagefrm.beginPage.value);" & vbCrLf
		HtmlShowPage = HtmlShowPage & "    if(isNaN(beginPage)){" & vbCrLf
		HtmlShowPage = HtmlShowPage & "        alert(""请输入数字!(0到" & n & ")"")" & vbCrLf
		HtmlShowPage = HtmlShowPage & "        return false;" & vbCrLf
		HtmlShowPage = HtmlShowPage & "    }" & vbCrLf
		HtmlShowPage = HtmlShowPage & "    if(beginPage < 0 ) {" & vbCrLf
		HtmlShowPage = HtmlShowPage & "        beginPage = 1;" & vbCrLf
		HtmlShowPage = HtmlShowPage & "    }" & vbCrLf
		HtmlShowPage = HtmlShowPage & "    if(beginPage > " & n & "){" & vbCrLf
		HtmlShowPage = HtmlShowPage & "        beginPage = " & n & ";" & vbCrLf
		HtmlShowPage = HtmlShowPage & "    }" & vbCrLf
		HtmlShowPage = HtmlShowPage & "            document.beginPagefrm.action = ""PageSort_Indate_Desc_"" + beginPage + "".html"";" & vbCrLf
		HtmlShowPage = HtmlShowPage & "        return true;" & vbCrLf
		HtmlShowPage = HtmlShowPage & "}" & vbCrLf
		HtmlShowPage = HtmlShowPage & "-->" & vbCrLf
		HtmlShowPage = HtmlShowPage & "</SCRIPT>" & vbCrLf
	AspShowPage = HtmlShowPage
End Function	
	'*************************************************************
	'函数作用:当前位置
	'*************************************************************
	Private Function NowStation(sortid, SortName, ParentID, strParent)
		Dim Rs, SQL, HtmlString
		Set Rs = Server.CreateObject("adodb.recordset")
		If ParentID <> 0 And Len(strParent) <> 0 Then
			SQL = "select sortid,sortname from [NC_SoftSort] where sortid in(" & strParent & ")"
			Rs.Open SQL, Conn, 1, 1
			If Not (Rs.EOF And Rs.bof) Then
				Do While Not Rs.EOF
					HtmlString = HtmlString & "<a href='" & DownsysClass.SetupDir & "PageSort"& ii &"/Catalog" & Rs(0) & "/PageSort_Indate_Desc_1.html'>" & Rs(1) & "</a>→"
					Rs.movenext
				Loop
			End If
			Rs.Close
			 Set Rs = Nothing
		End If
		HtmlString = HtmlString & "<a href='" & DownsysClass.SetupDir & "PageSort"& ii &"/Catalog" & sortid & "/PageSort_Indate_Desc_1.html'>" & SortName & "</a>"
		NowStation = HtmlString
	End Function
		'*************************************************************
	'函数作用:搜索栏目的信息统计
	'*************************************************************
	Private Function NowStation1(sortid, SortName, SoftNum, strParent)
		Dim Rs, SQL, HtmlString
		Set Rs = Server.CreateObject("adodb.recordset")
		If  Len(strParent) <> 0 Then
			SQL = "select sortid,sortname,SoftNum from [NC_SoftSort] where sortid in(" & strParent & ")"
			Rs.Open SQL, Conn, 1, 1
			
		End If
		HtmlString = HtmlString & "<B>&nbsp;“<FONT color=red>" & SortName & "</FONT>”的供应信息共 " & SoftNum & " 条&nbsp; </B>"
		NowStation1 = HtmlString
		Rs.Close
		Set Rs = Nothing
	End Function
	'*************************************************************
	'函数作用:信息分类
	'*************************************************************
	Private Function SoftPageSort(sortid, ParentID, Child)
		Dim Rs, SQL, HtmlString, SortName, PageSortName, i
		Set Rs = Server.CreateObject("adodb.recordset")
		HtmlString = DownsysClass.TempSet(1)
		If sortid = "" Then
			SQL = "SELECT sortid,sortname,rootid,Child,SoftNum,Readme FROM NC_SoftSort where depth=0 order by rootid"
		Else
			If Child = 0 Then
				SQL = "SELECT sortid,sortname,rootid,Child,SoftNum,Readme FROM NC_SoftSort where Parentid=" & ParentID & " order by orders"
			Else
				SQL = "SELECT sortid,sortname,rootid,Child,SoftNum,Readme FROM NC_SoftSort where Parentid=" & sortid & " order by orders"
			End If
		End If
		Rs.Open SQL, Conn, 1, 1
		If Rs.EOF And Rs.bof Then
			HtmlString = HtmlString & "<p align=center>还没有任何分类!</p>"
		Else
			Do While Not Rs.EOF
			for i = 1 to 4
			if not Rs.eof then

				HtmlString = HtmlString & DownsysClass.TempSet(2)


				If CStr(Rs("sortid")) = CStr(sortid) Then
					PageSortName = "<td><A href='" & DownsysClass.SetupDir & "PageSort"& ii &"/Catalog" & Rs("sortid") & "/PageSort_indate_Desc_1.html' class=ShowLink><B><FONT color=red>" & Rs("sortname") & "</font></B></a></td>"
					SortName = "<td><A href='" & DownsysClass.SetupDir & "PageSort"& ii &"/Catalog" & Rs("sortid") & "/PageSort_indate_Desc_1.html'' class=ShowLink><B><FONT color=red>" & Rs("sortname") & "</font></B></a></td>"
				Else
					PageSortName = "<td><A href='" & DownsysClass.SetupDir & "PageSort"& ii &"/Catalog" & Rs("sortid") & "/PageSort_indate_Desc_1.html'  title='" & Rs("Readme") & "'>" & Rs("sortname") & "</a></td>"
					SortName = "<td><A href='" & DownsysClass.SetupDir & "PageSort"& ii &"/Catalog" & Rs("sortid") & "/PageSort_indate_Desc_1.html'  title='" & Rs("Readme") & "'>" & Rs("sortname") & "</a></td>"
				End If
				HtmlString = Replace(HtmlString, "{$SortName}", SortName)
				HtmlString = Replace(HtmlString, "{$SoftNum}", Rs("SoftNum"))
				Rs.movenext
				else
				HtmlString = HtmlString & DownsysClass.TempSet(2)
				PageSortName = "<br>"
				SortName = "<br>"
				HtmlString = Replace(HtmlString, "{$SortName}", SortName)

				end if
			next
				HtmlString = HtmlString & DownsysClass.TempSet(2)
				PageSortName = "</tr><tr><td height=1  align=center ></td></tr><tr >"
				SortName = "</tr><tr><td height=1  align=center ></td></tr><tr >"
				HtmlString = Replace(HtmlString, "{$SortName}", SortName)
			Loop
		End If
		HtmlString = HtmlString & "</table>"
		Rs.Close
		 Set Rs = Nothing
		SoftPageSort = HtmlString
	End Function
	'*************************************************************
	'函数作用:分类大类列表
	'*************************************************************
Private Function PageSorts()
	Dim Rs
	Dim Rs_c
	Dim HtmlString
	Dim TotalNumber
	Dim TotalNum
	Dim i,m
	Set Rs = CreateObject("adodb.recordset")
	Set Rs_c = CreateObject("adodb.recordset")
	HtmlString = HtmlString & "<tr><td width=""50%""  valign=""top"">" & vbCrLf

	Rs.Open "select * from NC_softSort Where Parentid=" & sortid & " order by sortid asc", conn, 1, 1
	If Not (Rs.bof And Rs.EOF) Then
		Do While Not Rs.EOF
		for m = 1 to DownsysClass.TempSet(3)
		if not Rs.eof then
			HtmlString = HtmlString & " <table><TR>" & vbCrLf
			HtmlString = HtmlString & "    <TD width=""50%"" class=paddlefthome>"
			If CInt(DownsysClass.Setting(5)) = 0 Then
				HtmlString = HtmlString & "<a href='" & DownsysClass.SetupDir & "PageSort"& ii &"/Catalog" & Rs("sortid") & "/PageSort_Indate_Desc_1.html' title='" & Rs("readme") & "'><b>" & Rs("sortName") & "</b></a> "
			Else
				HtmlString = HtmlString & "<a href='" & DownsysClass.SetupDir & "PageSort.Asp?sortid=" & Rs("sortid") & "' title='" & Rs("readme") & "'>" & Rs("sortName") & "</a> "
			End If
			HtmlString = HtmlString & "</TD></tr><tr><TD width=""100%"" class=paddhome>" & vbCrLf
			'二级目录循环开始
			Rs_c.Open "select * from NC_softSort where depth = 2 and Parentid=" & Rs("sortid") & " order by sortid asc", conn, 1, 1
			If Rs_c.bof And Rs_c.EOF Then
				HtmlString = HtmlString & "没有添加分类"
			Else
				TotalNumber = Rs_c.recordcount
				i = 1
				Do While Not Rs_c.EOF
					If CInt(DownsysClass.Setting(5)) = 0 Then
						HtmlString = HtmlString & "<a href='" & DownsysClass.SetupDir & "PageSort"& ii &"/Catalog" & Rs_c("sortid") & "/PageSort_Indate_Desc_1.html' title='" & Rs_c("readme") & "'>" & Rs_c("sortName") & "</a> &nbsp; " & vbCrLf
					Else
						HtmlString = HtmlString & "<a href='" & DownsysClass.SetupDir & "PageSort.Asp?sortid=" & Rs_c("sortid") & "' title='" & Rs_c("readme") & "'>" & Rs_c("sortName") & "</a> &nbsp; " & vbCrLf
					End If
					If (i Mod CInt(DownsysClass.mainset(28))) = 0 And i <> TotalNumber Then
						HtmlString = HtmlString & " <br></tr>"
					End If
					i = i + 1
					Rs_c.movenext
				Loop
			End If
			Rs_c.Close
'二级目录循环结束
			
			HtmlString = HtmlString & " </TR></table><br>"
			Rs.movenext
'分列排序,开始
		else
				HtmlString = HtmlString & "" 
		end if
		next
				HtmlString = HtmlString & " </TD><td width=""50%""  valign=""top"">" 

		Loop
	End If
	Rs.Close
	Set Rs_c = Nothing
	Set Rs = Nothing
	PageSorts = HtmlString
End Function

'显示搜索的内容和搜索数量的结果
Private Function ShowPage1(sortid, rootid, depth, SortName, order_name, maxperpage, CurrentPage, strOrder)
	Dim Rs, SQL, HtmlString, i, TopImg, isCommend, usertel,Rs1, SQL1
	Dim truename, SoftReadme, regtime, SoftSize
	Dim thiscolor
	Dim HtmlShowPage
	
		Set Rs = Server.CreateObject("adodb.recordset")
		Set Rs1 = Server.CreateObject("adodb.recordset")
		If Len(sortid) = 0 Then
			WhereSQL = "where isLock=0 "
		Else
				Dim Rss, AllSortID, ParentStr
				Set Rss = DownsysClass.Execute("select * from NC_SoftSort where strParent like '%"& sortid &"%'")
				If Rss.EOF And Rss.bof Then
					AllSortID = sortid
				Else
					Do While Not Rss.EOF
						ParentStr = Split(Rss("strParent"), ",")
						For i = 0 To UBound(ParentStr)
							If CLng(ParentStr(i)) = sortid Then
								AllSortID = AllSortID & Rss("sortid") &","
								Exit For
							End If
						Next
						Rss.movenext
					Loop
					AllSortID = AllSortID & sortid
				End If
				Rss.Close
				Set Rss = Nothing
				WhereSQL = "where isLock=0 and CategoryId in (" & AllSortID & ")"
		End If
		TotalNumber = Conn.Execute("Select count(userid) from [NC_user] "& WhereSQL &"")(0)
	
	HtmlShowPage = HtmlShowPage & "" & totalnumber & "" 
	ShowPage1 = HtmlShowPage
End Function
'行业下拉框选择项目
Private Function hangye()
Dim rs2,sql2,HtmlShowPage
			HtmlShowPage = HtmlShowPage &" <SELECT name=CategoryId id=""CategoryId""> "
            HtmlShowPage = HtmlShowPage &" <OPTION value='0' selected>=选择行业=</OPTION>"
					set rs2=server.createobject("adodb.recordset")
					sql2="select * from NC_SoftSort where depth=0 order by sortid "
					rs2.open sql2,conn,1,3
					do while not rs2.EOF
			HtmlShowPage = HtmlShowPage & "<option value='"& rs2("rootid") &"'>"& trim(rs2("SortName")) &"</option>"
					rs2.MoveNext
					loop
					Rs2.Close
			HtmlShowPage = HtmlShowPage & "</SELECT>"
	hangye = HtmlShowPage
End Function
'搜索下拉框选择项目(整体分类部分:供应、求购)
Private Function sousuo()
Dim SoftType
Dim HtmlShowPage
Dim ii
			HtmlShowPage = HtmlShowPage &" <select name=""action""> "
            HtmlShowPage = HtmlShowPage &" <option value=""soft"" selected>全部信息</option>"
			SoftType = Split(DownsysClass.Setting(35), ",")
			For ii = 0 To UBound(SoftType)
			HtmlShowPage = HtmlShowPage & "<option value=""soft"& ii &""">" & Trim(SoftType(ii)) & "</option>"
			Next
			HtmlShowPage = HtmlShowPage & "<option value=""info"">文章搜索</option></SELECT>"
	sousuo = HtmlShowPage
End Function
'搜索下拉框选择项目(整体分类部分:供应、求购)
Private Function sousuolei()
Dim HtmlShowPage
			HtmlShowPage = HtmlShowPage & "<input type=hidden  name=""Action"" value=""Hy"">"
	sousuolei = HtmlShowPage
End Function

'整体分类大引导:供应、求购、合作)
Private Function liebiao()
Dim SoftType
Dim HtmlShowPage
Dim ii
	HtmlShowPage = HtmlShowPage &"<TABLE width=""100%"" border=0 align=""center"" cellPadding=0 cellSpacing=0 class=downborder>"
    HtmlShowPage = HtmlShowPage &"<TBODY>"
    HtmlShowPage = HtmlShowPage &"<TR>"
	SoftType = Split(DownsysClass.Setting(35), ",")
	For ii = 0 To UBound(SoftType)
    HtmlShowPage = HtmlShowPage &"<TD "
	if Trim(ii)=Trim(Request("ado")) then
	HtmlShowPage = HtmlShowPage &"class=buttonbar "
	else
	HtmlShowPage = HtmlShowPage &"class=companybar "
	end if
	HtmlShowPage = HtmlShowPage &"onmouseover=""this.style.cursor='hand'"" "
    HtmlShowPage = HtmlShowPage &"onclick=""location.href='/Sorting"& ii &"/Catalog" & sortid & "/Sorting_Indate_Desc_1.html'"" width=97> "
	if Trim(ii)=Trim(Request("ado")) then
    HtmlShowPage = HtmlShowPage &"<IMG height=20 src=""/images/icon_black_45down.gif"" width=20 align=absMiddle border=0>"
    HtmlShowPage = HtmlShowPage &"<SPAN class=head1>" & Trim(SoftType(ii)) & "</SPAN></TD>"
	else
    HtmlShowPage = HtmlShowPage &"<SPAN class=head>" & Trim(SoftType(ii)) & "</SPAN></TD>"
	end if
    HtmlShowPage = HtmlShowPage &"<TD class=midbar width=7>&nbsp;</TD>"
	Next
	HtmlShowPage = HtmlShowPage &"<TD width=""400"" class=midbar>&nbsp;</TD></TR></TBODY></TABLE>"
	
	liebiao = HtmlShowPage
End Function
'共找到:供应、求购、合作  的信息多少条部分)
Private Function liebiaoname()

Dim HtmlShowPage

    HtmlShowPage = HtmlShowPage &"" & Trim(SoftType(ii)) & ""
	
	liebiaoname = HtmlShowPage
End Function
End Class
%>

⌨️ 快捷键说明

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