admin_itemsloadsbooks.asp

来自「本人仅业余学习一些基础的ASP知识以供系统设计之用,并非专业人员,相关服务器设置」· ASP 代码 · 共 1,474 行 · 第 1/5 页

ASP
1,474
字号
'作品信息读取开始
'-----------------------------------------------------------------------------------------
	set rsb=server.createobject("adodb.recordset")
	if  ShowType=0 then
		sqlb="select id,vip_bookid,list_pic,list_lei,list_class,list_tai,list_id,list_Url,list_name,list_user,list_size,ItemId from list_book where list_id="&bl_id&" and ItemId="&ItemId&""
	Elseif  ShowType=1 then
		sqlb="select id,vip_bookid,list_pic,list_lei,list_class,list_tai,list_id,list_Url,list_name,list_user,list_size,ItemId from list_book where list_Url='"&bl_id&"' and ItemId="&ItemId&""
	Else
		if IsNumeric(str)=true then
			sqlb="select id,vip_bookid,list_pic,list_lei,list_class,list_tai,list_id,list_Url,list_name,list_user,list_size,ItemId from list_book where list_id="&bl_id&" and ItemId="&ItemId&""
		Else
			sqlb="select id,vip_bookid,list_pic,list_lei,list_class,list_tai,list_id,list_Url,list_name,list_user,list_size,ItemId from list_book where list_Url='"&bl_id&"' and ItemId="&ItemId&""
		end if
	end if
	rsb.open sqlb,conn,1,1
	if rsb.eof then
		response.Write "源采集站的作品没有采集到本地→操作已跳过"
	else
			book_id=rsb("id")
			b_pic=rsb("list_pic")
			last_viewid=rsb("vip_bookid")
			b_Name=rsb("list_Name")
			b_lei=rsb("list_lei")
			classid=rsb("list_class")
			b_Author=rsb("list_user")
			b_size=rsb("list_size")
			ItemId=rsb("ItemId")
			if rsb("list_tai")="1" then
				b_tai="转载中..."
			elseif rsb("list_tai")="2" then
				b_tai="连载中..."
			elseif rsb("list_tai")="3" then
				b_tai="出版中..."
			elseif rsb("list_tai")="4" then
				b_tai="已暂停..."
			elseif rsb("list_tai")="5" then
				b_tai="已停止..."
			elseif rsb("list_tai")="6" then
				b_tai="已完成..."
			else
				b_tai="连载中..."
			end if
			rsb.close
			Set Rsb=Nothing
	
'-----------------------------------------------------------------------------------------
'作品信息读取结束
'输出作品信息页面采集信息
'-----------------------------------------------------------------------------------------
		ListUrl=Replace(ShowStr,"{$Bl_id$}",bl_id)

		response.Write "<table>"
		response.Write "<tr><td width='50%'>本地作品ID:<a href="&Siteurl&SiteSystemPath&"look_book.asp?id="&book_id&" target=_blank>"&book_id&"</a><br>"
		response.Write ""&WebName&"站作品ID:<a href="&ListUrl&" target=_blank>"&bl_id&"</a></td>"
		response.Write "<td width='50%'>作品名称:"&B_Name&"</td></tr>"
		response.Write "<tr><td width='50%'>作品作者:"&B_Author&"</td>"
		response.Write "<td width='50%'>作品类别:"&B_Lei&"</td></tr>"
		response.Write "<tr><td width='50%'>作品进程:"&B_Tai&"</td>"
		response.Write "<td width='50%' colspan='2'>作品封面:"&B_Pic&"</td></tr>"
		response.Write "</table>"&chr(13)


'-----------------------------------------------------------------------------------------
'输出作品信息页面采集信息结束
'-----------------------------------------------------------------------------------------
'读取作品信息页获取开始
'-----------------------------------------------------------------------------------------
		ListinfoCode=GetHttpPage(ListUrl,EquivType)
		If ListinfoCode="$False$" Then
			response.Write  "<br><li>在获取:<a target=_blank href=" & ListUrl & "><font color='red'>" & ListUrl & "</font></a>网页源码时发生错误</li><br>"
		Else
			ListlookCode=GetBody(ListinfoCode,SBsString,SBoString,True,True)
			If ListlookCode="$False$" Then
				response.Write		"<br><li>在截取:<a href=" & ListUrl & " target=_blank><font color='red'>" & ListUrl & "</font></a>作品信息页时发生错误</li><br>"
			Else
'----------------------------------------------------------------------------------------
				If FolderType=0 Then
					If B_readsType="" or B_readoType="" or B_readsString="" or B_readoString="" or FolderType1="" Then
						FoundErr=True
						ErrMsg=ErrMsg & "<br><li>作品目录连接参数错误</li>" 
					Else
						if B_readsType=1 then
							B_readsType=true
						elseif B_readsType=0 then
							B_readsType=False
						end if
						if B_readoType=1 then
							B_readoType=true
						elseif B_readoType=0 then
							B_readoType=False
						end if
						ListsUrl=GetBody(ListlookCode,B_readsString,B_readoString,B_readsType,B_readoType)
						if FolderType1=1 then
						 	if B_readsType1=1 then
						 		B_readsType1=true
						 	elseif B_readsType1=0 then
						 		B_readsType1=False
						 	end if
						 	if B_readoType1=1 then
						 		B_readoType1=true
						 	elseif B_readoType1=0 then
						 		B_readoType1=False
						 	end if
							ListsUrl=GetBody(ListsUrl,B_readsString1,B_readoString1,B_readsType1,B_readoType1)
						End If
						ListsUrl=DefiniteUrl(ListsUrl,ListUrl)
					End If
				ElseIf FolderType=1 then
					ListsUrl=Replace(ListStr,"{$Bl_id$}",bl_id)
				ElseIf FolderType=2 Then
					ListsUrl=ListUrl
				Else
					FoundErr=True
					ErrMsg=ErrMsg & "<br><li>作品目录连接参数错误</li>" 
				End If
'----------------------------------------------------------------------------------------
'作品目录页面获取开始
'-----------------------------------------------------------------------------------------
				ListlookCode=""
				ListUrl=ListsUrl
				if  FolderType=2 Then
					ListCode=ListinfoCode
					ListinfoCode=""
				else
					ListCode=GetHttpPage(ListUrl,EquivType)
					ListinfoCode=""
				end if
				If ListCode="$False$" Then
					response.Write  "<br><li>在获取:<a target=_blank href=" & ListUrl & "><font color='red'>" & ListUrl & "</font></a>网页源码时发生错误。</li><br>"
				Else
					ListCode=GetBody(ListCode,LsString,LoString,True,True)
					If ListCode="$False$" Then
						response.Write "<br><li><font color='red'>在截取目录页面内容时发生错误:<a target=_blank href=" & ListUrl & "><font color='red'>" & ListUrl & "</font></a></font></li><br>"
					Else
'-----------------------------------------------------------------------------------------
'目录页面截取到的是章节ID开始
'-----------------------------------------------------------------------------------------
						If readType=0 then
							if TitleTypes=1 then
								if TsType=1 then
						     		TsType=true
						     	elseif TsType=0 then
						     		TsType=False
						     	end if
						    	if ToType=1 then
						     		ToType=true
						      	elseif ToType=0 then
						      		ToType=False
						      	end if
								TitleCode=GetArray(ListCode,TsString,ToString,TsType,ToType)
								if TitleCode<>"$False$" Then
									TitleTest=Split(TitleCode,"$Array$")
									For Testi=0 To Ubound(TitleTest)
										If TitleType1=1 Then
									      if TsType1=1 then
									    	TsType1=true
									      elseif TsType1=0 then
									    	TsType1=False
									      end if
									      if ToType1=1 then
									    	ToType1=true
									      elseif ToType1=0 then
									    	ToType1=False
									      end if
											TitleTest(Testi)=GetBody(TitleTest(Testi),TsString1,ToString1,TsType1,ToType1)
											If TitleTest(Testi)="$False$" Then
												FoundErr=True
												ErrMsg=ErrMsg & "<br><li>在修正章节标题时出错。</li>"
											End if
										End if
									Next
								Else
									FoundErr=True
									ErrMsg=ErrMsg & "<br><li>在获取章节标题时出错。</li>"
								end if
							End If
							if HsType=1 then
								HsType=true
							elseif HsType=0 then
								HsType=False
							end if
							if HoType=1 then
								HoType=true
							elseif HoType=0 then
								HoType=False
							end if
							NewsArrayCode=GetArray(ListCode,HsString,HoString,HsType,HoType)
							If NewsArrayCode="$False$" Then
								response.Write "<br><li><font color='red'>在获取目录页面连接时出错:<a target=_blank href=" & ListUrl & "><font color='red'>" & ListUrl & "</font></a></font></li><br>"
							Else
								NewsArray=Split(NewsArrayCode,"$Array$")
								NewsArrayCode=""
								For Testi=0 To Ubound(NewsArray)
									If HUrlType1=1 Then
										if HsType1=1 then
											HsType1=true
										elseif HsType1=0 then
											HsType1=False
										end if
										if HoType1=1 then
											HoType1=true
										elseif HoType1=0 then
											HoType1=False
										end if
										NewsArray(Testi)=GetBody(NewsArray(Testi),HsString1,HoString1,HsType1,HoType1)
										If NewsArray(Testi)="$False$" Then
											FoundErr=True
											ErrMsg=ErrMsg & "<br><li>在修正章节连接/章节ID时出错。</li>"
										End if
									End if
									If HttpUrlType=1 Then
										NewsArray(Testi)=Replace(HttpUrlStr,"{$ID$}",NewsArray(Testi))
										NewsArray(Testi)=Replace(NewsArray(Testi),"{$Bl_id$}",bl_id)
									Else
										NewsArray(Testi)=DefiniteUrl(NewsArray(Testi),ListUrl)
									End If
								Next
								If FoundErr=True Then
									Call WriteErrMsg(ErrMsg)
								Else
'-----------------------------------------------------------------------------------------
'章节内容页面获取开始
'-----------------------------------------------------------------------------------------
	 							response.Write "共有 <font color='red'>"&Ubound(NewsArray)+1&"</font> 个章节<br>"
								if lostbook = 1 Then
									if last_viewid="" or last_viewid = Null Then
										last_viewid=0
									end if
									if last_viewid <> 0 and last_viewid-2 < Ubound(NewsArray) then
										If flushbook = 1 Then
											response.write "<table width=100% border=1 align=center cellpadding=0 cellspacing=0 bordercolor=#0650D2 bordercolordark=#FFFFFF>"
											response.Write "<tr><td height=25 align=center>本作品保留有最后采集参数但你选择了强制更新章节内容,故从头开始采集章节.</td></tr></table>"
											last=0
										Else
											response.write "<table width=100% border=1 align=center cellpadding=0 cellspacing=0 bordercolor=#0650D2 bordercolordark=#FFFFFF>"
											response.Write "<tr><td height=25 align=center>本作品保留有最后采集参数且你并没有选择强制更新章节内容,故从本参数开始向后采集更新后的章节.</td></tr></table>"
											last=last_viewid+1
										end if
									else
										response.write "<table width=100% border=1 align=center cellpadding=0 cellspacing=0 bordercolor=#0650D2 bordercolordark=#FFFFFF>"
										response.Write "<tr><td height=25 align=center>本作品没有保留有最后采集参数或参数丢失,故从头开始采集章节.</td></tr></table>"
										last=0
									end if
								else
									last=0
								end if
	 							For Viewi=last To Ubound(NewsArray)
	 							ReadBook_Path=NewsArray(Viewi)
	 							NewsCode=GetHttpPage(NewsArray(Viewi),EquivType)
	 								If NewsCode="$False$" Then
	 									response.Write "<br><li><font color='red'>在获取源码时发生错误:<a target=_blank href="& NewsArray(Viewi) &"><font color='red'>"& NewsArray(Viewi) &"</font></a></li><br>"
	 								Else
	 									NewsCode=GetBody(NewsCode,VsString,VoString,True,True)
	 									If NewsCode="$False$" Then
	 										response.Write "<br><li>在截取:<a target=_blank href=" & NewsArray(Viewi) & "><font color='red'>"& NewsArray(Viewi) &"</font></a>章节内容页时发生错误</li><br>"
	 									Else
	 										If Fastbook<>1 then
	 											if CsType=1 then
	 											 	CsType=true
	 											elseif CsType=0 then
	 												CsType=False
	 											end if
	 											if CoType=1 then
	 												CoType=true
	 											elseif CoType=0 then
	 												CoType=False
	 											end if
	 											Content=GetBody(NewsCode,CsString,CoString,CsType,CoType)
	 											If ContType1=1 Then
	 												if CsType1=1 then
	 													CsType1=true
	 												elseif CsType1=0 then
	 													CsType1=False
	 												end if
	 											  	if CoType1=1 then
	 													CoType1=true
	 												elseif CoType1=0 then
	 													CoType1=False
	 												end if
	 												Content=GetBody(Content,CsString1,CoString1,CsType1,CoType1)
	 											End If
	 											If Content="$False$" Then
	 												response.Write		"<br><li>在截取正文的时候发生错误:<a href=" & NewsArray(Viewi) & " target=_blank><font color='red'>" & NewsArray(Viewi) & "</font></a><br>"
	 											Else
	 												If ContType2=2 Then
	 													Content=DefiniteUrl(Content,NewsArray(Viewi))
	 													ReadBook_Path=Content
	 													if CsType2=1 then
	 														CsType2=true
	 													elseif CsType2=0 then
	 														CsType2=False
	 													end if
	 													if CoType2=1 then
	 														CoType2=true
	 													elseif CoType2=0 then

⌨️ 快捷键说明

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