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

📄 admin_load_cookcode.asp

📁 小说站源代码文件
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%						If Instr(ListCode,cooksString)>0 then
							cooksArray=Split(ListCode,cooksString)
							response.Write "<br><B><font color='blue'>共截取到</font> <font color='red'>"&Ubound(cooksArray)&"</font> <font color='blue'>个分卷</font></B><br>"
							For cooki=1 To Ubound(cooksArray)
								CookCode=cooksString&cooksArray(cooki)
								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
									cook=GetBody(CookCode,cosString,cooString,cosType,cooType)
									if cook="$False$" Then
										response.Write "<br><li>在获取分卷标题时出错。</li>"
										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
												response.Write "<br><li>在修正分卷标题时出错。</li>"
												cook1=""
											else
												cook=cook1
												cook1=""
											End if
										End if
									End If
									cook=GetTextFromHtml(cook)
									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
 										rsc.close
 										rsc.open sqlc,conn,1,1
 											list_cookid=rsc("list_cookid")
 										rsc.close
 										response.Write "<br><font color='blue'><B>新卷集"&cooki&":</B></font> "&cook&" → <font color='blue'>添加成功</font><br>"
										if newcook<>"" then
											newcook=newcook&"||"&list_cookid
										else
											newcook=list_cookid
										end if
 									else
 										list_cookid=rsc("list_cookid")
 										response.Write "<br><font color='blue'><B>已有卷集"&cooki&":</B></font> "&cook&" ↓<br>"
 										rsc.close
 									end if
 									set rsc=nothing
								end if
								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(CookCode,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 FoundErr=True Then
								   Call WriteErrMsg(ErrMsg)
								   FoundErr=False
								   ErrMsg=""
								Else
									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)
									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)
											FoundErr=False
											ErrMsg=""
										Else
'-----------------------------------------------------------------------------------------
'章节内容页面获取开始
'-----------------------------------------------------------------------------------------
	 										response.Write "共有 <font color='red'>"&Ubound(NewsArray)+1&"</font> 个章节<br>"
	 										For Viewi=0 To Ubound(NewsArray)
	 											ReadBook_Path=NewsArray(Viewi)
	 											NewsCode=GetHttpPage(NewsArray(Viewi),EquivType)
	 											If NewsCode="$False$" Then
	 												response.Write "<br><li><font color='red'>在获取源码时发生错误:</font><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 CookTypes=0 then
		 													If cookType=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
		 														cook=GetBody(NewsCode,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
		 													ElseIf cookType=2 Then
		 														cook=cookStr
		 													ElseIf cookType=0 Then
		 														cook="正文"
		 													End If
		 													If cook="$False$" or cook="" Then
		 														cook="正文"
		 													else
		 														cook=GetTextFrHtml(cook)
		 													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>新卷集:</B></font> "&cook&" → <font color='blue'>添加成功</font><br>"
		 														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
		 												End If
				 										If TitleTypes=0 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
				 											Title=GetBody(NewsCode,TsString,ToString,TsType,ToType)
				 											If Title="$False$" Then
				 												FoundErr=True
				 												ErrMsg=ErrMsg & "<br><li>从章节页获取章节标题 - 在截取章节标题的时候发生错误:<a href=" & NewsArray(Viewi) & " target=_blank><font color='red'>" & NewsArray(Viewi) & "</font></a></li>"
				 											Else
					 											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
					 												Title1=GetBody(Title,TsString1,ToString1,TsType1,ToType1)
						 											If Title1="$False$" Then
						 												FoundErr=True
						 												ErrMsg=ErrMsg & "<br><li>从章节页获取章节标题 - 在修正章节标题的时候发生错误:<a href=" & NewsArray(Viewi) & " target=_blank><font color='red'>" & NewsArray(Viewi) & "</font></a></li>"
						 												Title1=""
						 											Else
						 												Title=Title1

⌨️ 快捷键说明

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