📄 admin_itemgxnovel.asp
字号:
<!-- #include file="../conn.asp" -->
<!--#include file="../inc/config.asp"-->
<!-- #include file="session.asp" -->
<%
act = Request("act")
if act = "getbook" then
makebookHTML = Request("makebookHTML")
If makebookHTML="" or makebookHTML=null Then
makebookHTML=0
end if
Fastbook = Request("Fastbook")
If Fastbook="" or Fastbook=null Then
Fastbook=0
end if
flushbook = Request("flushbook")
If flushbook="" or flushbook=null Then
flushbook=0
end if
ItemID = Request("ItemID")
If ItemID="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>ItemID参数错误,请从有效链接进入</li>"
Else
ItemID=Clng(ItemID)
End If
loadtype = Request("loadtype")
If loadtype="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请填写完整信息</li>"
end if
If FoundErr=True Then
call WriteErrMsg(ErrMsg)
Else
Select Case loadtype
Case "0"
Call set0()
Case "1"
Call set1()
Case "2"
Call set2()
end select
Sub set0()
startid = request("startid")
endid = request("endid")
If startid="" or endid="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请填写完整信息</li>"
else
if endid-startid<0 then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>未指定有效的作品编号!</li>"
else
for i = startid to endid
if listedID<>"" then
listedID=listedID&"|"&i
else
listedID=i
end if
Next
idTotal=endid-startid+1
end if
end if
If FoundErr=True Then
call WriteErrMsg(ErrMsg)
Else
response.write "<SCRIPT language=JavaScript>if(!confirm('"
response.write "\n你选择的是按照ID范围采集 \n"
response.write "\n根据填写范围,接下来将要采集"&idTotal&"部作品 \n"
if idTotal>99 and idTotal<500 then
response.write "\n你填写的范围大,采集"&idTotal&"部作品需要的时间比较长 \n"
response.write "\n且容易造成采集系统停止响应,你确定继续吗? \n"
elseif idTotal>500 and idTotal<1000 then
response.write "\n你填写的范围稍大,采集"&idTotal&"部作品需要的时间很长 \n"
response.write "\n且很易造成采集系统停止响应,建议返回重新设置,你确定继续吗? \n"
elseif idTotal>1000 and idTotal<10000 then
response.write "\n你填写的范围很大,采集"&idTotal&"部作品需要的时间非常长 \n"
response.write "\n且极易造成采集系统停止响应,建议返回重新设置,你确定继续吗? \n"
elseif idTotal>10000 then
response.write "\n你填写的范围过大,采集"&idTotal&"部作品需要的时间无法估量 \n"
response.write "\n且必然造成采集系统停止响应,建议返回重新设置,你确定继续吗? \n"
end if
response.write "\n点击 [ 确定 ] 继续,点击 [ 取消 ] 返回 \n"
response.write "')){history.back(-1);}else{}</SCRIPT>"
response.Write "<meta http-equiv='refresh' content='1;URL=Admin_ItemGXBook.asp?listedID="&listedID&"&loadtype="&loadtype&"&ListPaingNext="&ListPaingNext&"&ListPaings="&ListPaings&"&ListPaing="&ListPaing&"&ListPaingend="&ListPaingend&"&makebookHTML="&makebookHTML&"&Fastbook="&Fastbook&"&flushbook="&flushbook&"&ItemID="&ItemID&"'>"
response.End
end if
End Sub
Sub set1()
listedID = Request("listedID")
If listedID="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请填写完整信息</li>"
else
listedID=replace(replace(listedID,chr(10),""),chr(13),"|")
arrBookList = Split(listedID,"|")
idTotal=UBound(arrBookList)+1
End If
If FoundErr=True Then
call WriteErrMsg(ErrMsg)
Else
response.write "<SCRIPT language=JavaScript>if(!confirm('"
response.write "\n你选择的是手工输入ID列表采集 \n"
response.write "\n根据填写内容,接下来将要采集"&idTotal&"部作品 \n"
if idTotal>99 and idTotal<500 then
response.write "\n你填写的作品ID多,采集"&idTotal&"部作品需要的时间比较长 \n"
response.write "\n且容易造成采集系统停止响应,你确定继续吗? \n"
elseif idTotal>500 and idTotal<1000 then
response.write "\n你填写的作品ID稍多,采集"&idTotal&"部作品需要的时间很长 \n"
response.write "\n且很容易造成采集系统停止响应,建议返回重新设置,你确定继续吗? \n"
elseif idTotal>1000 and idTotal<10000 then
response.write "\n你填写的作品ID很多,采集"&idTotal&"部作品需要的时间非常长 \n"
response.write "\n且极易造成采集系统停止响应,建议返回重新设置,你确定继续吗? \n"
elseif idTotal>10000 then
response.write "\n你填写的作品ID过多,采集"&idTotal&"部作品需要的时间无法估量 \n"
response.write "\n且必然造成采集系统停止响应,建议返回重新设置,你确定继续吗? \n"
end if
response.write "\n点击 [ 确定 ] 继续,点击 [ 取消 ] 返回 \n"
response.write "')){history.back(-1);}else{}</SCRIPT>"
response.Write "<meta http-equiv='refresh' content='1;URL=Admin_ItemGXBook.asp?listedID="&listedID&"&loadtype="&loadtype&"&ListPaingNext="&ListPaingNext&"&ListPaings="&ListPaings&"&ListPaing="&ListPaing&"&ListPaingend="&ListPaingend&"&makebookHTML="&makebookHTML&"&Fastbook="&Fastbook&"&flushbook="&flushbook&"&ItemID="&ItemID&"'>"
response.End
end if
End Sub
Sub set2()
listedUrl = replace(Request("listedUrl"),"|&|","&")
zidingyi = Request("zidingyi")
ListPaing = Request("ListPaing")
ListPaings = Request("ListPaings")
If listedUrl="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请填写完整信息</li>"
else
Set Rs=server.CreateObject("adodb.recordset")
Sql="Select Islisted,Islisted1,ShowType,EquivType,listedUrl,ListPaingsString,ListPaingoString,ListedsType,ListedoType,listedsString,listedoString,ListedType1,ListedsType1,ListedoType1,listedsString1,listedoString1,ListPaingType,LPsType,LPoType,LPsString,LPoString,LPUrlType,ListPaingStr from [Item] Where ItemID=" & ItemID
Rs.Open Sql,ConnItem,1,1
If Rs.Eof And Rs.Bof Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>参数错误,数据未找到!</li>"
Else
Islisted=Rs("Islisted")
Islisted1=Rs("Islisted1")
ShowType=Rs("ShowType")
EquivType=Rs("EquivType")
' listedUrl=Rs("listedUrl")
ListPaingsString=Rs("ListPaingsString")
ListPaingoString=Rs("ListPaingoString")
listedsType=Rs("listedsType")
listedoType=Rs("listedoType")
listedsString=Rs("listedsString")
listedoString=Rs("listedoString")
listedType1=Rs("listedType1")
listedsType1=Rs("listedsType1")
listedoType1=Rs("listedoType1")
listedsString1=Rs("listedsString1")
listedoString1=Rs("listedoString1")
ListPaingType=Rs("ListPaingType")
LPsType=Rs("LPsType")
LPsString=Rs("LPsString")
LPoType=Rs("LPoType")
LPoString=Rs("LPoString")
LPUrlType=Rs("LPUrlType")
ListPaingStr=Rs("ListPaingStr")
End If
Rs.Close
Set Rs=Nothing
if Islisted=1 then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>Islisted参数错误!</li>"
else
if Islisted1<>1 then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>Islisted1参数错误!</li>"
else
if ListPaingType=2 then
if ListPaing="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>你需要填写起始页码!</li>"
Else
if ListPaings="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>你需要填写结束页码!</li>"
Else
if ListPaings<ListPaing then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>结束页码小于开始页码?!</li>"
Else
listedUrl=Replace(ListPaingStr,"{$ID$}",ListPaing)
ListCode=GetHttpPage(listedUrl,EquivType)
If ListCode<>"$False$" Then
ListCode=GetBody(ListCode,ListPaingsString,ListPaingoString,True,True)
If ListCode<>"$False$" Then
if listedsType=1 then
listedsType=true
elseif listedsType=0 then
listedsType=False
end if
if ListedoType=1 then
ListedoType=true
elseif ListedoType=0 then
ListedoType=False
end if
listedID=GetArray(ListCode,listedsString,listedoString,listedsType,ListedoType)
If listedID<>"$False$" Then
listedIDArray=Split(listedID,"$Array$")
For Testi=0 To Ubound(listedIDArray)
If listedType1=1 Then
if listedsType1=1 then
listedsType1=true
elseif listedsType1=0 then
listedsType1=False
end if
if ListedoType1=1 then
ListedoType1=true
elseif ListedoType1=0 then
ListedoType1=False
end if
listedIDArray(Testi)=GetBody(listedIDArray(Testi),listedsString1,listedoString1,listedsType1,ListedoType1)
If listedIDArray(Testi)="$False$" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在修正测试作品ID/Url时出错。</li>"
End if
End if
if ShowType=0 then
if IsNumeric(listedIDArray(Testi))=false then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>截取到的作品ID不是标准数字格式,请检查.</li>"
End If
End If
Next
listedID=replace(listedID,"$Array$","|")
arrBookList = Split(listedID,"|")
idTotal=UBound(arrBookList)
Else
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在获取测试作品ID/Url时出错。</li>"
End If
ListPaingNext=listedUrl
if ListPaings<>1 then
if ListPaings-ListPaing<=0 then
ListPaingend="end"
end if
Else
ListPaings=1
ListPaingend="end"
End If
Else
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在截取测试作品列表页面时出错。</li>"
End If
Else
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在获取测试作品列表页面时出错。</li>"
End If
End If
End If
End If
else
ListCode=GetHttpPage(listedUrl,EquivType)
If ListCode<>"$False$" Then
ListCode=GetBody(ListCode,ListPaingsString,ListPaingoString,True,True)
If ListCode<>"$False$" Then
if listedsType=1 then
listedsType=true
elseif listedsType=0 then
listedsType=False
end if
if ListedoType=1 then
ListedoType=true
elseif ListedoType=0 then
ListedoType=False
end if
listedID=GetArray(ListCode,listedsString,listedoString,listedsType,ListedoType)
If listedID<>"$False$" Then
listedIDArray=Split(listedID,"$Array$")
For Testi=0 To Ubound(listedIDArray)
If listedType1=1 Then
if listedsType1=1 then
listedsType1=true
elseif listedsType1=0 then
listedsType1=False
end if
if ListedoType1=1 then
ListedoType1=true
elseif ListedoType1=0 then
ListedoType1=False
end if
listedIDArray(Testi)=GetBody(listedIDArray(Testi),listedsString1,listedoString1,listedsType1,ListedoType1)
If listedIDArray(Testi)="$False$" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在修正测试作品ID/Url时出错。</li>"
End if
End if
if ShowType=0 then
if IsNumeric(listedIDArray(Testi))=false then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>截取到的作品ID不是标准数字格式,请检查.</li>"
End If
End If
Next
listedID=replace(listedID,"$Array$","|")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -