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

📄 create_shoping.asp

📁 大型黄页系统,精美黄页flash演示,10m
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#include file="setup.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
	Dim SoftType,ii
	SoftType = Split(DownsysClass.Setting(35), ",")
	 ii = Trim(Request("ado"))

Dim DownloadClass
Set DownloadClass = New Create_Shoping_Cls
DownloadClass.ShopingHtml
Set DownloadClass = Nothing
CloseConn

Class Create_Shoping_Cls
	Private DownloadClass_Ads,K
	Private softid, sortid, rootid, depth, SortName, ParentID,SoftNum, strParent, Child
	Private CurrentPage, maxperpage, totalnumber, bookmark, Pcount
	Private order_name, strOrder, ShowPageHtml, HtmlTemplate
	Private action, d
	Private TotalPageNum,WhereSQL
	Private SQL, Rs, Rs1, SQL1, CreateHtml, FSO, total, NewFolderPath, objFSO
	Private temphtml, NowStats,NowStats1, HtmlTitle
	Private TempTopStr, TempFootStr, Style_CSS


	Private Sub Class_Initialize()
		DownsysClass.LoadTemplates ("Shoping")
		Set DownloadClass_Ads = New Adcolumn_Cls
		maxperpage = CInt(DownsysClass.TempSet(0)) '###每页显示数
	End Sub

	Private Sub Class_Terminate()
		If IsObject(Conn) Then
			Conn.Close
			Set Conn = Nothing
		End If
		If IsObject(DownloadClass_Ads) Then
			Set DownloadClass_Ads = Nothing
		End If
	End Sub

	Public Sub ShopingHtml()
		On Error Resume Next
		Server.ScriptTimeout = 99999
		Set NC_Admin = New Check
		NC_Admin.AdminChk = "64"
		NC_Admin.Check
		DownsysClass.admin_header
		If Not(DownsysClass.IsObjectFSO(DownsysClass.Script_FSO) And CInt(DownsysClass.Setting(5)) = 0 ) Then
			NC_Admin.Error_Msg ("<b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)或你后台没有选择为html方式</font></b>")
			DownsysClass.admin_footer
			Response.End
		End If
		Response.Write "<table width=""400"" border=""0"" cellspacing=""1"" cellpadding=""1"">" & vbCrLf
		Response.Write "<tr> " & vbCrLf
		Response.Write "<td bgcolor=000000>" & vbCrLf
		Response.Write " <table width=""400"" border=""0"" cellspacing=""0"" cellpadding=""1"">" & vbCrLf
		Response.Write "<tr> " & vbCrLf
		Response.Write "<td bgcolor=ffffff height=9><img src=""" & DownsysClass.SetupDir & "images/bar9.gif"" width=0 height=16 id=img2 name=img2 align=absmiddle></td></tr></table>" & vbCrLf
		Response.Write "</td></tr></table></td></tr><tr> " & vbCrLf
		Response.Write "<td align=center bgcolor=000000> <span id=txt2 name=txt2 style=""font-size:9pt"">0</span><span style=""font-size:9pt"">%</span>  <span id=txt3 name=txt3 style=""font-size:9pt"">0</span></td></tr>" & vbCrLf
		Response.Write "</table>" & vbCrLf
		Response.Flush
		Set Rs1 = Server.CreateObject("adodb.recordset")
		SQL1 = "select * from [NC_shopsort]"
		Rs1.Open SQL1, Conn, 1, 1
		total = Rs1.recordcount
		Rs1.MoveFiRst
		sortid =Rs1(0)
		K = 1
		Set Rs = Server.CreateObject("adodb.recordset")
		Do While Not Rs1.EOF
			SQL = "select sortid,sortname,rootid,depth,ParentID,strParent,Child,SoftNum from [NC_shopsort] where sortid = " & sortid & ""
			Rs.Open SQL, Conn, 1, 1
			If Rs.bof And Rs.EOF Then
				Response.Write "Sorry!没有找到任何信息信息。或者您选择了错误的系统参数!"
				'Response.End
			Else
				SortName = Rs("sortname")
				sortid = Rs("sortid")
				rootid = Rs("rootid")
				depth = Rs("depth")
				ParentID = Rs("ParentID")
				SoftNum = Rs("SoftNum")
				strParent = Rs("strParent")
				Child = Rs("Child")
			End If
			Rs.Close
		'###################################################
		TotalPageNum = CInt(TotalNumber / maxperpage)  '得到总页数
		If TotalPageNum < TotalNumber / maxperpage Then TotalPageNum = TotalPageNum + 1
		CurrentPage = 1
		'#####################################################################
		Dim keyword
		order_name = "SoftTime"
		strOrder = "Indate"
		Do
		ArticleIndex = "<A HREF='" & DownsysClass.SetupDir & "Article/index.html'>" & DownsysClass.TempSet(10) & "</A>→"
		If Len(classid) = 0 Then
			NowStats = ArticleIndex & ClassName
		Else
			NowStats = ArticleIndex & NowStation(classid, ClassName, ParentID, strParent)
		End If
		HtmlTitle = ClassName
		If Len(DownsysClass.temphtml(0)) < 50 Then
			TempTopStr = DownsysClass.mainhtml(0) & DownsysClass.mainhtml(1) & DownsysClass.mainhtml(2) & DownsysClass.mainhtml(3)
		Else
			TempTopStr = DownsysClass.temphtml(0)
		End If
		If Len(DownsysClass.temphtml(4)) = 0 Then
			TempFootStr = DownsysClass.mainhtml(4)
		Else
			TempFootStr = DownsysClass.temphtml(5)
		End If
		temphtml = TempTopStr & DownsysClass.temphtml(1) & DownsysClass.temphtml(2) & DownsysClass.temphtml(3) & TempFootStr
		temphtml = Replace(temphtml, "{$NavMenu}", DownsysClass.ShopingMenu)
		temphtml = Replace(temphtml, "{$Width}", DownsysClass.mainset(0))
		temphtml = Replace(temphtml, "{$Style_CSS}", Style_CSS)
		temphtml = Replace(temphtml, "{$TopMeun}", DownsysClass.mainset(9))
		temphtml = Replace(temphtml, "{$FootMeun}", DownsysClass.mainset(44))
		temphtml = Replace(temphtml, "{$NowStats}", NowStats)
		temphtml = Replace(temphtml, "{$NowStats1}", NowStats1)
		temphtml = Replace(temphtml, "{$Title}", HtmlTitle)
		temphtml = Replace(temphtml, "{$SortID}", sortid)
		temphtml = Replace(temphtml, "{$Shoping}", SoftShoping(sortid, ParentID, Child))
		temphtml = Replace(temphtml, "{$Shoping1}", SoftShoping1(sortid, ParentID, Child))
		temphtml = Replace(temphtml, "{$Shopings}", Shopings)
		temphtml = Replace(temphtml, "{$ShowPage1}", ShowPage1(sortid, rootid, depth, SortName, order_name, maxperpage, CurrentPage, strOrder))
		temphtml = Replace(temphtml, "{$KeyWord}", SortName)
		temphtml = Replace(temphtml, "{$hangye}", hangye)
		temphtml = Replace(temphtml, "{$sousuo}", sousuo)
		temphtml = Replace(temphtml, "{$liebiao}", liebiao)
		temphtml = Replace(temphtml, "{$sousuolei}", sousuolei)
		temphtml = Replace(temphtml, "{$liebiaoname}", liebiaoname)
		temphtml = Replace(temphtml, "{$ShopingList}", SoftShopingList(sortid, rootid, depth, SortName, order_name, maxperpage, CurrentPage, strOrder))
		temphtml = Replace(temphtml, "{$Adcolumn(0)}", DownloadClass_Ads.ScriptFixedAds(7))
		NewFolderPath = Server.MapPath(DownsysClass.SetupDir & "Shoping"& ii &"/Catalog" & sortid)
		Set objFSO = Server.CreateObject(DownsysClass.Script_FSO)
		If Not objFSO.FolderExists(NewFolderPath) Then
			objFSO.CreateFolder (NewFolderPath)
		End If
		objFSO.Close
		Set objFSO = Nothing

		If CurrentPage < 1 Then
			CreateHtml = Server.MapPath(DownsysClass.SetupDir & "Shoping"& ii &"/Catalog" & sortid & "/Shoping_Indate_Desc_1.html")
		Else
			CreateHtml = Server.MapPath(DownsysClass.SetupDir & "Shoping"& ii &"/Catalog" & sortid & "/Shoping_Indate_Desc_" & CurrentPage & ".html")
		End If
		Set FSO = Server.CreateObject("ADODB.STREAM")
		With FSO
			.Open
			.Charset = "GB2312"
			.WriteText temphtml
			.SaveToFile CreateHtml,2
			.Close
		End With
		Set FSO = Nothing
		CurrentPage = CurrentPage + 1
		Loop While CurrentPage <= TotalPageNum
		Response.Write "<script>img2.width=" & Fix((K / total) * 400) & ";" & vbCrLf
		Response.Write "txt2.innerHTML=""生成进度:" & FormatNumber(K / total * 100, 4, -1) & """;" & vbCrLf
		Response.Write "txt3.innerHTML=""共有 <B><font color=RED>" & total & "</font></B> 个 正在生成第 " & K & " 个"";" & vbCrLf
		Response.Write "img2.title=""(" & K & ")"";</script>" & vbCrLf
		Response.Flush
		Rs1.movenext
		sortid  = Rs1(0)
		K = K + 1
		Loop
		Rs1.Close
		Set Rs1 = Nothing
		Response.Write "<script>img2.width=400;txt2.innerHTML=""100"";</script>"
		NC_Admin.Succeed_Msg ("生成信息列表页完成!")
		DownsysClass.admin_footer
	End Sub
	'*************************************************************
	'函数作用:信息列表
	'*************************************************************
	Private Function SoftShopingList(sortid, rootid, depth, SortName, order_name, maxperpage, CurrentPage, strOrder)
		Dim Rs, SQL, HtmlString, i, TopImg, isCommend, SoftImg,Rs1, SQL1
		Dim SoftName, SoftReadme, SoftTime, SoftSize
		Dim thiscolor, PriceSH, DingGou

		Set Rs = Server.CreateObject("adodb.recordset")
		Set Rs1 = Server.CreateObject("adodb.recordset")
		If Len(sortid) = 0 Then
			WhereSQL = "where isLock=0 "
		Else
			If depth = 0 Then
				WhereSQL = "where isLock=0 and rootid = " & rootid & ""
			Else
				Dim Rss, AllSortID, ParentStr
				Set Rss = DownsysClass.Execute("select * from NC_shopsort 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 sortid in (" & AllSortID & ")"
			End If
		End If
		TotalNumber = Conn.Execute("Select count(softid) from [NC_ShopInfo] "& WhereSQL &"")(0)
		TotalPageNum = CInt(TotalNumber / maxperpage)  '得到总页数
		If TotalPageNum < TotalNumber / maxperpage Then TotalPageNum = TotalPageNum + 1
		If CurrentPage < 1 Then CurrentPage = 1
		If CurrentPage > TotalPageNum Then CurrentPage = TotalPageNum
		SQL = "select * from NC_ShopInfo "& WhereSQL &" order by isTop Desc, " & order_name & " Desc, softid Desc"
		Rs.Open SQL, Conn, 1
		HtmlString = DownsysClass.TempSet(8)
		HtmlString = Replace(HtmlString, "{$SortID}", sortid)

		
		If Rs.bof And Rs.EOF Then

⌨️ 快捷键说明

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