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

📄 admin_itemloadnovel.asp

📁 本人仅业余学习一些基础的ASP知识以供系统设计之用,并非专业人员,相关服务器设置、MSSQL/MySQL数据库方面的专业问题请自行解决。 本人仅提供本系统相关的一些技术问题的解释、解答。
💻 ASP
📖 第 1 页 / 共 5 页
字号:
											CookArray(Testi)=GetBody(CookArray(Testi),rHsString1,rHoString1,rHsType1,rHoType1)
											If CookArray(Testi)="$False$" Then
												FoundErr=True
												ErrMsg=ErrMsg & "<br><li>在修正分卷连接/分卷ID时出错。</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)
									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><font color='red'>在获取分卷页面时出错:<a target=_blank href=" & CookPageUrl & "><font color='red'>" & CookPageUrl & "</font></a></font></li><br>"
										Else
											CookCode=GetBody(CookCode,cooksString,cookoString,True,True)
											If CookCode="$False$" Then 
												FoundErr=True
												ErrMsg=ErrMsg & "<br><li>在截取目录页面时发生错误。</li>"
											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 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
		 												Cook=GetBody(Cook,cosString1,cooString1,cosType1,cooType1)
		 											end if
		 										Else
		 											Cook=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><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

'-----------------------------------------------------------------------------------------
'分卷页面截取到的是章节ID开始
'-----------------------------------------------------------------------------------------
												If readType1=0 then
													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
											            FoundErr=True
											            ErrMsg=ErrMsg & "<br><li>在获取章节连接/章节ID时出错。</li>"
													Else
														NewsArray=Split(NewsArrayCode,"$Array$")
														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),CookArray(Cooki))
															End If
														Next
														If FoundErr=True Then
															Call WriteErrMsg(ErrMsg)
														Else
'-----------------------------------------------------------------------------------------
'章节内容页面获取开始
'-----------------------------------------------------------------------------------------
						 								response.Write "<p>本分卷共有 <font color='red'>"&Ubound(NewsArray)+1&"</font> 个章节</p>"
						 								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'>在获取源码时发生错误:<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 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 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
																		Title=GetBody(Title,TsString1,ToString1,TsType1,ToType1)
																	end if
																	If Title="$False$" Then
																		FoundErr=True
																		ErrMsg=ErrMsg & "<br><li>在截取标题的时候发生错误:" & NewsArray(Viewi) & "</li>"
																	End If

			 														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
			 																		CoType2=False
			 																	end if
			 																	ViewUrl=Content
							 													ContentCode=GetHttpPage(ViewUrl,EquivType)
			 																	Content=GetBody(ContentCode,CsString2,CoString2,CsType2,CoType2)
			 																	If Content="$False$" Then
			 																		response.Write		"<br><li>在截取正文的时候发生错误:<a href=" & ViewUrl & " target=_blank><font color='red'>" & ViewUrl & "</font></a><br>"
							 													End If
			 																End If
																		    If ContType2=3 Then
																		    	Content="<IMG src="&Content&">"
																		    End If
			 																Set Rs=server.CreateObject("adodb.recordset")
			 																Sql="Select JDTHType1,JDTHType2,JDTHType3,JDTH1sStr,JDTH2sStr,JDTH3sStr,JDTH1oStr,JDTH2oStr,JDTH3oStr,GJTHType1,GJTHType2,GJTHType3,GJTH1sStr,GJTH2sStr,GJTH3sStr,GJTH1oStr,GJTH2oStr,GJTH3oStr,GJTH1cStr,GJTH2cStr,GJTH3cStr from [Item] Where ItemID=" & ItemID
			 																Rs.Open Sql,ConnItem,1,1
			 																If Rs.Eof And Rs.Bof  Then
			 																Else
			 																	JDTHType1=Rs("JDTHType1")
			 																	JDTHType2=Rs("JDTHType2")
			 																	JDTHType3=Rs("JDTHType3")
			 																	JDTH1sStr=Rs("JDTH1sStr")
			 																	JDTH1oStr=Rs("JDTH1oStr")
			 																	JDTH2sStr=Rs("JDTH2sStr")
			 																	JDTH2oStr=Rs("JDTH2oStr")
			 																	JDTH3sStr=Rs("JDTH3sStr")
			 																	JDTH3oStr=Rs("JDTH3oStr")

			 																	GJTHType1=Rs("GJTHType1")
			 																	GJTHType2=Rs("GJTHType2")
			 																	GJTHType3=Rs("GJTHType3")
			 																	GJTH1sStr=Rs("GJTH1sStr")
			 																	GJTH1oStr=Rs("GJTH1oStr")
			 																	GJTH1cStr=Rs("GJTH1cStr")
			 																	GJTH2sStr=Rs("GJTH2sStr")
			 																	GJTH2oStr=Rs("GJTH2oStr")
			 																	GJTH2cStr=Rs("GJTH2cStr")
			 																	GJTH3sStr=Rs("GJTH3sStr")
			 																	GJTH3oStr=Rs("GJTH3oStr")
			 																	GJTH3cStr=Rs("GJTH3cStr")
			 																	If JDTHType1=1 Then
			 																		Content=Replace(Content,JDTH1sStr,JDTH1oStr)
			 																	End If
			 																	If JDTHType2=1 Then
			 																		Content=Replace(Content,JDTH2sStr,JDTH2oStr)
			 																	End If
			 																	If JDTHType3=1 Then
			 																		Content=Replace(Content,JDTH3sStr,JDTH3oStr)
			 																	End If
			 																	If GJTHType1=1 Then
			 																		ContentCode1=GetArray(Content,GJTH1sStr,GJTH1oStr,true,true)
			 																		ContentArray1=Split(ContentCode1,"$Array$")
			 																		For i1=0 To Ubound(ContentArray1)
			 																			Content=Replace(Content,ContentArray1(i1),GJTH1cStr)
			 																		Next
			 																	End If
			 																	If GJTHType2=1 Then
			 																		ContentCode2=GetArray(Content,GJTH2sStr,GJTH2oStr,true,true)
			 																		ContentArray2=Split(ContentCode2,"$Array$")
			 																		For i2=0 To Ubound(ContentArray2)
			 																			Content=Replace(Content,ContentArray2(i2),GJTH2cStr)
			 																		Next
			 																	End If
			 																	If GJTHType3=1 Then
			 																		ContentCode3=GetArray(Content,GJTH3sStr,GJTH3oStr,true,true)
			 																		ContentArray3=Split(ContentCode3,"$Array$")
			 																		For i3=0 To Ubound(ContentArray3)
			 																			Content=Replace(Content,ContentArray3(i3),GJTH3cStr)
			 																		Next
			 																	End If
			 																End If
			 																Rs.close
			 																Set Rs=Nothing
							 											End If
																	Else
			 															If ContType2=2 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
			 																ReadBook_Path=DefiniteUrl(Content,NewsArray(Viewi))
							 											End If
			 														End If

'-----------------------------------------------------------------------------------------
'章节内容入库开始
'------------------------------------------------------------------

⌨️ 快捷键说明

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