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

📄 admin_load_cookid.asp

📁 小说站源代码文件
💻 ASP
📖 第 1 页 / 共 4 页
字号:
<%				If CookTypes=1 then
					if cosType=1 then
						cosType=true
				   	elseif cosType=0 then
						cosType=False
				   	end if
				   	if cooType=1 then
						cooType=true
				   	elseif cooType=0 then
						cooType=False
				   	end if
					CooknameCode=GetArray(ListCode,cosString,cooString,cosType,cooType)
					if CookNameCode<>"$False$" Then
						CookName=Split(CookNameCode,"$Array$")
						CooknameCode=""
						For Testi=0 to Ubound(CookName)
							If cookType1=1 Then
								if cosType1=1 then
									cosType1=true
								elseif cosType1=0 then
									cosType1=False
								end if
								if cooType1=1 then
									cooType1=true
								elseif cooType1=0 then
									cooType1=False
								end if
								CookName(Testi)=GetBody(CookName(Testi),cosString1,cooString1,cosType1,cooType1)
								If CookName(Testi)="$False$" Then
									FoundErr=True
									ErrMsg=ErrMsg & "<br><li>从目录页获取分卷连接/分卷ID - 在修正分卷标题时出错:<a target=_blank href=" & ListUrl & "><font color='red'>" & ListUrl & "</font></a></li>"
								End if
							End if
						Next
					Else
						FoundErr=True
						ErrMsg=ErrMsg & "<br><li>从目录页获取分卷连接/分卷ID - 在截取分卷标题时出错:<a target=_blank href=" & ListUrl & "><font color='red'>" & ListUrl & "</font></a></li>"
					end if
				End If
				If FoundErr=True Then
					Call WriteErrMsg(ErrMsg)
					FoundErr=False
					ErrMsg=""
				Else
					if rHsType=1 then
						rHsType=true
					elseif rHsType=0 then
						rHsType=False
					end if
					if rHoType=1 then
						rHoType=true
					elseif rHoType=0 then
						rHoType=False
					end if
					CookArrayCode=GetArray(ListCode,rHsString,rHoString,rHsType,rHoType)
					If CookArrayCode="$False$" Then
						response.Write "<br><li>从目录页获取分卷连接/分卷ID - 在截取分卷连接/分卷ID时出错:<a target=_blank href=" & ListUrl & "><font color='red'>" & ListUrl & "</font></a></li><br>"
					Else
						CookArray=Split(CookArrayCode,"$Array$")
						CookArrayCode=""
						For Testi=0 To Ubound(CookArray)
							If rHUrlType1=1 Then
								if rHsType1=1 then
									rHsType1=true
								elseif rHsType1=0 then
									rHsType1=False
								end if
								if rHoType1=1 then
									rHoType1=true
								elseif rHoType1=0 then
									rHoType1=False
								end if
								CookArray(Testi)=GetBody(CookArray(Testi),rHsString1,rHoString1,rHsType1,rHoType1)
								If CookArray(Testi)="$False$" Then
									FoundErr=True
									ErrMsg=ErrMsg & "<br><li>从目录页获取分卷连接/分卷ID - 在修正分卷连接/分卷ID时出错:<a target=_blank href=" & ListUrl & "><font color='red'>" & ListUrl & "</font></a></li>"
								End if
							End if
							If rHttpUrlType=1 Then
								CookArray(Testi)=Replace(rHttpUrlStr,"{$ID$}",CookArray(Testi))
								CookArray(Testi)=Replace(CookArray(Testi),"{$Bl_id$}",bl_id)
							Else
								CookArray(Testi)=DefiniteUrl(CookArray(Testi),ListUrl)
							End If
						Next
						If FoundErr=True Then
							Call WriteErrMsg(ErrMsg)
							FoundErr=False
							ErrMsg=""
						Else
							response.Write "<p>共有 <font color='red'>"&Ubound(CookArray)+1&"</font> 个分卷</p>"
							For Cooki=0 To Ubound(CookArray)
								CookPageUrl=CookArray(Cooki)
								CookCode=GetHttpPage(CookPageUrl,EquivType)
								If CookCode="$False$" Then
									response.Write "<br><li>在获取分卷页面源码时出错:<a target=_blank href=" & CookPageUrl & "><font color='red'>" & CookPageUrl & "</font></a></li><br>"
								Else
									CookCode=GetBody(CookCode,cooksString,cookoString,True,True)
									If CookCode="$False$" Then 
										response.Write "<br><li>在截取分卷页面时出错:<a target=_blank href=" & CookPageUrl & "><font color='red'>" & CookPageUrl & "</font></a></li><br>"
									Else
										if CookTypes=0 then
 											if cosType=1 then
 												cosType=true
 											elseif cosType=0 then
 												cosType=False
 											end if
 											if cooType=1 then
 												cooType=true
 											elseif cooType=0 then
 												cooType=False
 											end if
 											Cook=GetBody(CookCode,cosString,cooString,cosType,cooType)
				 							If cook="$False$" then
					 							cook="正文"
				 							Else
												If cookType1=1 Then
 													if cosType1=1 then
 														cosType1=true
 													elseif cosType1=0 then
 														cosType1=False
 													end if
 													if cooType1=1 then
 														cooType1=true
 													elseif cooType1=0 then
 														cooType1=False
 													end if
 													Cook1=GetBody(Cook,cosString1,cooString1,cosType1,cooType1)
		 											If cook1="$False$" then
		 												cook="正文"
		 												cook1=""
		 											else
		 												cook=cook1
		 												cook1=""
		 											End If
												end if
 											End If
 											Cook=GetTextFromHtml(Cook)
 										Else
 											Cook=GetTextFromHtml(CookName(Cooki))
 										End If
										set rsc1=server.createobject("adodb.recordset")
										if IsSqlDataBase = 2 then
											sqlc1="select cook_viewid from list_cook where list_bookid="&book_id&" order by cook_viewid desc limit 1"
										else
											sqlc1="select top 1 cook_viewid from [list_cook] where list_bookid="&book_id&" order by cook_viewid desc"
										end if
										rsc1.open sqlc1,conn,1,1
											if rsc1.bof and rsc1.eof then
												c_viewid=1
											else
												c_viewid=rsc1("cook_viewid") + 1
											end if
										rsc1.close
										set rsc1=nothing
										set rsc=server.createobject("adodb.recordset")
										if IsSqlDataBase = 2 then
											sqlc="select list_cookid,list_cookname,classid,list_bookid,cook_viewid from list_cook where list_bookid="&book_id&" and list_cookname='"&Cook&"' limit 1"
										else
											sqlc="select top 1 list_cookid,list_cookname,classid,list_bookid,cook_viewid from [list_cook] where list_bookid="&book_id&" and list_cookname='"&Cook&"'"
										end if
										rsc.open sqlc,conn,1,3
										if rsc.bof and rsc.eof then
											rsc.addnew
											rsc("list_cookname")=Cook
											rsc("classid") = classid
											rsc("list_bookid")=book_id
											rsc("cook_viewid") = c_viewid
											rsc.update
											response.Write "<br><font color='blue'><B>新卷 "&Cooki+1&":</B></font> "&cook&" → <font color='blue'>添加成功</font>"
											rsc.close
											rsc.open sqlc,conn,1,1
												list_cookid=rsc("list_cookid")
											rsc.close
										else
											list_cookid=rsc("list_cookid")
											rsc.close
										end if
										set rsc=nothing

										If readType1=0 then
'-----------------------------------------------------------------------------------------
'分卷页面截取到的是章节ID开始
'-----------------------------------------------------------------------------------------
											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(CookCode,HsString,HoString,HsType,HoType)
											CookCode=""
											If NewsArrayCode="$False$" Then
									            FoundErr=True
									            ErrMsg=ErrMsg & "<br><li>从分卷页获取章节连接/章节ID - 截取章节连接/章节ID出错:<a target=_blank href=" & CookPageUrl & "><font color='red'>" & CookPageUrl & "</font></a></li>"
											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 - 修正章节连接/章节ID时出错:<a target=_blank href=" & CookPageUrl & "><font color='red'>" & CookPageUrl & "</font></a></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),CookArray(Cooki))
													End If
												Next
												If FoundErr=True Then
													Call WriteErrMsg(ErrMsg)
													FoundErr=False
													ErrMsg=""
												Else
'-----------------------------------------------------------------------------------------
'章节内容页面获取开始
'-----------------------------------------------------------------------------------------
					 								response.Write "<p>本分卷共有 <font color='red'>"&Ubound(NewsArray)+1&"</font> 个章节</p>"
					 								For Viewi=0 To Ubound(NewsArray)

⌨️ 快捷键说明

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