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

📄 admin_createsoft.asp

📁 网络上经典的图片程序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	Response.Write "</a></li>"
End Sub
Sub Create_Soft_List()
	Dim totalnumber
	If CInt(Request("field")) = 1 Then
		SQL = " And TurnLink=0  And isUpdate=1"
	ElseIf CInt(Request("field")) = 2 Then
		If Trim(Request("classid")) = "" Then
			ErrMsg = "<li>请选择分类~!</li>"
			FoundErr = True 
			Exit Sub
		End If
		SQL = " And TurnLink=0 And ClassID in(" & Request("classid") & ")"
	Else
		SQL = " And TurnLink=0"
	End If
	totalnumber = Newasp.Execute("SELECT COUNT(ClassID) FROM NC_Classify WHERE ChannelID=" & ChannelID & SQL & "")(0)
	Set Rs = Newasp.Execute("SELECT ClassID FROM [NC_Classify] WHERE ChannelID=" & ChannelID & SQL & " ORDER BY classid ASC")
	If Rs.BOF And Rs.EOF Then
		Response.Write "<meta http-equiv=""refresh"" content=""2;url='Admin_CreateSoft.Asp?ChannelID=" & ChannelID & "&D=" & startime & "&stype=1'"">"
		Set Rs = Nothing
		Exit Sub
	End If
	Call ShowGuage
	SQL=Rs.GetRows(-1)
	NewCloud.ShowFlush = 0
	Response.Write "<ol>"
	For i=0 To Ubound(SQL,2)
		If Not Response.IsClientConnected Then ResponseEnd
		NewCloud.CreateSoftList SQL(0,i),1
		ShowInnerHTML totalnumber,i
		Newasp.Execute ("UPDATE NC_Classify SET isUpdate=0 WHERE Classid="& SQL(0,i))
		Response.Flush
	Next
	Response.Write "</ol>"
	If i=>totalnumber Then
		Response.Write "<script>table2.style.width=400;txt2.innerHTML=""完成:100"";</script>"
	End If
	Rs.Close:Set Rs = Nothing
	
	Response.Write "<meta http-equiv=""refresh"" content=""2;url='Admin_CreateSoft.Asp?ChannelID=" & ChannelID & "&D=" & startime & "&stype=1'"">"
End Sub
Sub Create_Soft_Info()
	Dim strDate,d,strLink,j
	Dim CurrentPage,page_count,totalnumber,Pcount,maxperpage
	If Trim(Request("type")) = "date" Then
		strDate = Request("datYear") & "-" & Request("datMonth") & "-" & Request("datDay")
		strLink = "type=date&datYear=" & Request("datYear") & "&datMonth=" & Request("datMonth") & "&datDay=" & Request("datDay")
		If isSqlDataBase = 1 Then
			SQL = "WHERE ChannelID=" & ChannelID & " And isAccept>0 And datediff(d,SoftTime,getdate())=" & DateDiff("d", strDate, Now()) & ""
		Else
			SQL = "WHERE ChannelID=" & ChannelID & " And isAccept>0 And SoftTime like '%" & strDate & "%'"
		End If
	End If
	If Trim(Request("type")) = "new" Then
		If Not IsNull(Session("PageCount")) Then Session("PageCount") = 0
		strLink = "type=new&newnum="& Request("newnum")
		If Request("newnum") > 0 And Len(Request("newnum")) <> 0 Then
			SQL = "WHERE ChannelID=" & ChannelID & " And isAccept>0 "
		Else
			Response.Write "<meta http-equiv=""refresh"" content=""0;url='" & Request.ServerVariables("HTTP_REFERER") & "'"">"
		End If
	End If
	If Trim(Request("type")) = "all" Then
		strLink = "type=all"
		SQL = "WHERE ChannelID=" & ChannelID & " And isAccept>0"
	End If
	If Trim(Request("type")) = "renew" Then
		strLink = "type=renew"
		SQL = "WHERE ChannelID=" & ChannelID & " And isAccept>0 And isUpdate=1"
	End If
	If Trim(Request("type")) = "seid" Then
		strLink = "type=seid&id=" & Request("id")
		SQL = "WHERE ChannelID=" & ChannelID & " And isAccept>0 And SoftID in (" & Request("id") & ")"
	End If
	If CInt(Request("field")) = 2 Then
		If Trim(Request("classid")) = "" Then
			ErrMsg = "<li>请选择分类~!</li>"
			FoundErr = True 
			Exit Sub
		End If
		strLink = "field=2&classid=" & Request("classid")
		SQL = "WHERE ChannelID=" & ChannelID & " And isAccept>0 And ClassID in (" & Request("classid") & ")"
	End If
	If Trim(Request("p")) <> "" Then
		CurrentPage = CLng(Request("p"))
		d = Trim(Request("D"))
	Else
		CurrentPage = 1
		d = startime
	End If
	maxperpage = 100   '每页显示列表数
	If CurrentPage = 0 Then CurrentPage = 1
	'得到总数
	If Trim(Request("type")) = "new" Then
		totalnumber = Request("newnum")
		SQL = "SELECT TOP " & CLng(Request("newnum")) & " SoftID FROM NC_SoftList "& SQL &" ORDER BY SoftID DESC"
	Else
		If Trim(Session("totalnumber")) = "" Then
			totalnumber = Newasp.Execute("SELECT COUNT(SoftID) FROM [NC_SoftList] "& SQL &"")(0)
			Session("totalnumber") = totalnumber
			Session("PageCount") = 0
		Else
			totalnumber = Session("totalnumber")
		End If
		SQL = "SELECT SoftID,content FROM NC_SoftList "& SQL &" ORDER BY SoftID DESC"
	End If
	Pcount = CLng(totalnumber / maxperpage)  '得到总页数
	If Pcount < totalnumber / maxperpage Then Pcount = Pcount + 1
	If CurrentPage < 1 Then CurrentPage = 1
	If CurrentPage > Pcount Then CurrentPage = Pcount
	Set Rs = Server.CreateObject("adodb.recordset")
	If IsSqlDataBase = 1 Then
		Set Rs = Conn.Execute(SQL)
	Else
		Rs.Open SQL, Conn, 1,1
	End If
	page_count = 0
	Call ShowGuage
	If Trim(Request("type")) = "renew" Then CurrentPage=1
	If Not (Rs.EOF And Rs.BOF) Then
		Rs.MoveFirst
		If Pcount > 1 then Rs.Move (CurrentPage - 1) * maxperpage
		j = (CurrentPage - 1) * maxperpage + 1
		If Rs.Eof Then Exit Sub
		SQL=Rs.GetRows(maxperpage)
		Set Rs = Nothing
		NewCloud.ShowFlush = 0
		Response.Write "<ol>"
		For i=0 To Ubound(SQL,2)
			If Not Response.IsClientConnected Then ResponseEnd
			Session("PageCount") = Session("PageCount") + 1
			NewCloud.ReadSoftIntro(CLng(SQL(0,i)))
			'Newasp.CreatedTextFile "tmp/" & SQL(0,i) & ".html",SQL(1,i)
			Response.Write "<script>table2.style.width=" & Fix((i / maxperpage) * 400) & ";"
			Response.Write "txt2.innerHTML=""完成:" & FormatNumber(i / maxperpage * 100, 2, -1) & """;"
			Response.Write "txt3.innerHTML=""  共有软件 <B><font color=RED>" & totalnumber & "</font></B> 个  正在生成第 " & Session("PageCount") & " 个 "";" & vbCrLf
			Response.Write "table2.title=""(" & i & ")"";</script>" & vbNewLine
			Newasp.Execute ("UPDATE NC_SoftList SET isUpdate=0 WHERE SoftID="& CLng(SQL(0,i)))
			Response.Flush
			j = j + 1
		Next
		Response.Write "</ol>"
		SQL=Null
	Else
		Response.Write "<script>table2.style.width=400;txt2.innerHTML=""完成:100"";</script>"
		Response.Write "<meta http-equiv=""refresh"" content=""0;url='Admin_CreateSoft.Asp?ChannelID=" & ChannelID & "&stype=2&num=" & totalnumber & "&D=" & d & "&p=" & CurrentPage & "'"">"
		Exit Sub
	End If
	If IsObject(Rs) Then Set Rs = Nothing
	If CurrentPage => Pcount Then
		Response.Write "<script>table2.style.width=400;txt2.innerHTML=""完成:100"";</script>"
		Response.Write "<meta http-equiv=""refresh"" content=""1;url='Admin_CreateSoft.Asp?ChannelID=" & ChannelID & "&stype=2&num=" & totalnumber & "&D=" & d & "&p=" & CurrentPage & "'"">"
	Else
		Response.Write "<script>table2.style.width=400;txt2.innerHTML=""完成:100"";</script>"
		Response.Write "<meta http-equiv=""refresh"" content=""2;url='Admin_CreateSoft.Asp?action=cont&ChannelID=" & ChannelID & "&" & strLink & "&D=" & d & "&p=" & CurrentPage + 1 & "'"">"
	End If
End Sub
Sub RenewAll_Article()
	Newasp.Execute ("UPDATE NC_SoftList SET isUpdate=1 WHERE ChannelID=" & ChannelID)
	Response.Redirect (Request.ServerVariables("HTTP_REFERER"))
End Sub
Sub Create_Soft_Infos()
	Dim totalnumber,SoftID
	dim a(),s,d,num
	If Trim(Request("num")) = "" Then
		d = startime
		If Trim(Request("type")) = "renew" Then
			SQL = "WHERE ChannelID=" & ChannelID & " And isAccept>0 And isUpdate=1"
		Else
			SQL = "WHERE ChannelID=" & ChannelID & " And isAccept>0 "
		End If
		totalnumber = Newasp.Execute("SELECT COUNT(SoftID) FROM [NC_SoftList] " & SQL & "")(0)
		SQL = "SELECT SoftID FROM NC_SoftList " & SQL & " ORDER BY SoftID"
		Set Rs = Newasp.Execute(SQL)
		If Rs.EOF And Rs.BOF Then
			Session("BuildSoftID")=""
			Set Rs = Nothing
			Response.Write "<meta http-equiv=""refresh"" content=""1;url='Admin_CreateArticle.Asp?ChannelID=" & ChannelID & "&stype=2&D=" & d & "&num=0'"">"
			Exit Sub
		End If
		SQL = Rs.GetRows(-1)
		For i=0 To Ubound(SQL,2)
			ReDim Preserve a(i)
			a(i)=SQL(0,i)
		Next
		Set Rs = Nothing
		s=Join(a,"|")
		Session("BuildSoftID") = Split(s, "|")
		Response.Write "<script language='JavaScript'>" & vbNewLine
		Response.Write "function build(){window.location.href='Admin_CreateSoft.Asp?action=info&ChannelID=" & ChannelID & "&total=" & totalnumber & "&D=" & d & "&num=0';}" & vbNewLine
		Response.Write "setTimeout('build()',1000);" & vbNewLine
		Response.Write "</script>" & vbNewLine
	Else
		totalnumber = CLng(Request("total"))
		num = CLng(Request("num"))
		d = Request("d")

		Response.Write "<br><br>" & vbNewLine
		Response.Write "<table width='400' border='0' align='center' cellpadding='0' cellspacing='0'>" & vbNewLine
		Response.Write "  <tr>" & vbNewLine
		Response.Write "    <td height='50'>总共需要生成 <font color='blue'><b>" & totalnumber & "</b></font> 个页面,正在生成第 <font color='red'><b>" & num & "</b></font>  个页面……</td>" & vbNewLine
		Response.Write "  </tr>" & vbNewLine
		Response.Write "  <tr>" & vbNewLine
		Response.Write "    <td><table width='100%' border='0' cellpadding='1' cellspacing='1'>" & vbNewLine
		Response.Write "      <tr>" & vbNewLine
		Response.Write "        <td style=""border: 1px #384780 solid ;background-color: #FFFFFF;""><table width='" & Fix((num / totalnumber) * 400) & "' height='12' border='0' cellpadding='0' cellspacing='0' bgcolor=#36D91A><tr><td></td></tr></table></td>" & vbNewLine
		Response.Write "      </tr>" & vbNewLine
		Response.Write "    </table></td>" & vbNewLine
		Response.Write "  </tr>" & vbNewLine
		Response.Write "  <tr>" & vbNewLine
		Response.Write "    <td align='center'>" & FormatNumber(num / totalnumber * 100, 2, -1) & " %</td>" & vbNewLine
		Response.Write "  </tr>" & vbNewLine
		Response.Write "</table>" & vbNewLine
		Response.Write "<table width='400' border='0' align='center' cellpadding='0' cellspacing='0'>" & vbNewLine
		Response.Write "   <tr><td height='30' align='center'><input type='button' name='stop' value=' 停止生成HTML ' onclick=""window.location.href='Admin_CreateSoft.asp?ChannelID=" & ChannelID & "&stype=2&D=" & d & "&num=" & num & "';"" class=button></td></tr>" & vbNewLine
		Response.Write "</table>" & vbNewLine

		If num >= totalnumber Or num >= CLng(UBound(Session("BuildSoftID"))) Then
			Session("BuildSoftID") = ""
			Response.Write "<meta http-equiv=""refresh"" content=""1;url='Admin_CreateSoft.Asp?ChannelID=" & ChannelID & "&stype=2&D=" & d & "&num=" & num & "'"">"
			Exit Sub
		Else
			SoftID = Session("BuildSoftID")(num)
			NewCloud.ReadSoftIntro(CLng(SoftID))
			Newasp.Execute ("UPDATE NC_SoftList SET isUpdate=0 WHERE SoftID="& CLng(SoftID))
			Response.Write "<script language='JavaScript'>" & vbNewLine
			Response.Write "function build(){window.location.href='Admin_CreateSoft.Asp?action=info&ChannelID=" & ChannelID & "&total=" & totalnumber & "&D=" & d & "&num=" & num+1 & "';}" & vbNewLine
			Response.Write "setTimeout('build()',1000);" & vbNewLine
			Response.Write "</script>" & vbNewLine
		End If
	End If
End Sub
Sub Create_Soft_Special()
	Set Rs = Newasp.Execute("SELECT SpecialID FROM [NC_Special] WHERE ChannelID="& ChannelID &"  And ChangeLink=0")
	If Rs.BOF And Rs.EOF Then
		ErrMsg = "对不起!没有找到相应的专题。"
		FoundErr = True
		Set Rs = Nothing
		Exit Sub
	End If
	SQL=Rs.GetRows(-1)
	NewCloud.ShowFlush = 1
	Response.Write "<ol>"
	For i=0 To Ubound(SQL,2)
		If Not Response.IsClientConnected Then ResponseEnd
		NewCloud.CreateSoftSpecial SQL(0,i),1
		Response.Flush
	Next
	Set Rs = Nothing
	Response.Write "</ol><p align=center><a href='" & LinkedStr("") & "'><b class=style2>恭喜您!生成HTML完成...总费时<font color=""#FF0000"">" & FormatNumber((Timer() - startime), 2,-1) & "</font>秒,完成时间" & Now() & " 请返回进行其它操作</b></a></p>"
End Sub

%>

⌨️ 快捷键说明

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