cj_cls.asp

来自「1.支持文章」· ASP 代码 · 共 1,928 行 · 第 1/5 页

ASP
1,928
字号
            FoundErr=True
            ErrMsg=ErrMsg & "<br><li>批量生成范围设置不正确</li>"
         End If
      End If
   Case 2
      If ListPaingStr3="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>列表索引分页不能为空,请手动添加</li>"
      Else
         ListPaingStr3=Replace(ListPaingStr3,CHR(13),"|") 
      End If
   Case Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>请选择列表索引分页类型</li>" 
   End Select
End if
If Stars="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请选择文章评分等级!</li>"
Else
   Stars=Clng(Stars)
End If
If ReadPoint="" Then
   ReadPoint=0
Else
   ReadPoint=Clng(ReadPoint)
End if
If Hits="" Then
   Hits=0
Else
   Hits=Clng(Hits)
End if
case 2
if Action1="" and Action="s2" then
Set RsItem=ConnItem.execute("select * from Item where ItemID=" & ItemID)
	  LsString=RsItem("LsString")
   	  LoString=RsItem("LoString")
	  HsString=RsItem("HsString")
  	  HoString=RsItem("HoString")
  	  ListUrl=RsItem("ListStr")
	  imhstr=RsItem("imhstr")
      imostr=RsItem("imostr")
	  x_tp=RsItem("x_tp")
	  RsItem.close
	  set RsItem=nothing
	  action1="edit"
else
LsString=Request.Form("LsString")
LoString=Request.Form("LoString")
HsString=Request.Form("HsString")
HoString=Request.Form("HoString")
imhstr=Request.Form("imhstr")
imostr=Request.Form("imostr")
x_tp=Request.Form("x_tp")  
end if
If ItemID="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>参数错误,请从有效链接进入</li>"
Else
   ItemID=Clng(ItemID)
End If
If LsString="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>列表开始代码不能为空</li>"
End If
If LoString="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>列表结束代码不能为空</li>" 
End If
If HsString="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>链接开始代码不能为空</li>"
End If
If HoString="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>链接结束代码不能为空</li>" 
End If
if FoundErr<>True Then
   SqlItem="Select * from Item Where ItemID=" & ItemID 
   Set RsItem=server.CreateObject("adodb.recordset")
   RsItem.Open SqlItem,ConnItem,1,3
  	  RsItem("LsString")=LsString
   	  RsItem("LoString")=LoString
	  RsItem("HsString")=HsString
  	  RsItem("HoString")=HoString
  	  ListUrl=RsItem("ListStr")
	  RsItem("x_tp")=x_tp
	  if x_tp=1 then
	  RsItem("imhstr")=imhstr
      RsItem("imostr")=imostr
	  
	  end if
   RsItem.UpDate
   RsItem.Close
   Set RsItem=Nothing
end if   
case 3
if Action1="add" or Action1="edit"  then
call SaveEdit
end if
If FoundErr<>True And Request.Form("ShowCode")="checkbox" Then
call GetTest()
End if
end select
end sub 
Public sub CollPhoto_Show()
If ItemEnd<>True Then
   If (ItemNum-1)>Ubound(Arr_Item,2) then
      ItemEnd=True
   Else
      Call SetItems()
   End If
End If
If ItemEnd<>True Then
   If ListPaingType=0 Then
      If ListNum=1 Then
        ListUrl=ListStr
      Else
         ListEnd=True
      End If
   ElseIf ListPaingType=1 Then
    if listnum=1 and ListPaingID1<>1 and  ListPaingID2<>1 then 
		ListUrl=ListStr
	   else
		  If ListPaingID1>ListPaingID2 then
			 If (ListPaingID1-ListNum+1)<ListPaingID2 or (ListPaingID1-ListNum+1)<0 Then
				Listend=True
			 Else
				ListUrl=Replace(ListPaingStr2,"{$ID}",Cstr(ListpaingID1-ListNum+1))
			 End if
		  Else
			 If (ListPaingID1+ListNum-1)>ListPaingID2 Then
				ListEnd=True
			 Else
				ListUrl=Replace(ListPaingStr2,"{$ID}",CStr(ListPaingID1+ListNum-1))
			 End If
		  End If   
	 end if   
   ElseIf ListPaingType=2 Then
      ListArray=Split(ListPaingStr3,"|")
      If (ListNum-1)>Ubound(ListArray) Then
         ListEnd=True
      Else
         ListUrl=ListArray(ListNum-1)
      End If       
   End If
   If ListNum>CollecListNum And CollecListNum<>0 Then
      ListEnd=True
   End if
End If

If ItemEnd=True Then
   ErrMsg= "<br>采集任务全部完成"
   ErrMsg=ErrMsg & "<br>成功采集: "  &  NewsSuccesNum  &  "  条,失败: "    &  NewsFalseNum  &  "  条,图片:" & ImagesNumAll & "  张"
   Call DelCache()
   If Colleclx=1 Then ErrMsg=ErrMsg & "<meta http-equiv=""refresh"" content=""4;url=Sk_ArticleCollection.asp"">"
   If Colleclx=2 Then ErrMsg=ErrMsg & "<meta http-equiv=""refresh"" content=""4;url=Sk_GETphoto.asp"">"
   If Colleclx=3 Then ErrMsg=ErrMsg & "<meta http-equiv=""refresh"" content=""4;url=Sk_GETphoto.asp"">"
Else
   If ListEnd=True Then
      ItemNum=ItemNum+1
      ListNum=1
      ErrMsg="<br>" & ItemName & "  项目所有列表采集完成,正在整理数据请稍后..."
      ErrMsg=ErrMsg & "<meta http-equiv=""refresh"" content=""4;url=Sk_GETphoto.asp"">"
   End If
End If

Call TopItem()
  If ItemEnd=True Or ListEnd=True Then
    If ItemEnd<>True Then
	  Call SetCache_His()
    End If
    Call WriteSucced(ErrMsg)
Else
   FoundErr=False
   ErrMsg=""
   Call StartCollection()
   Call FootItem2()
End  If
end sub
Public Sub SaveEdit
TsString=Request.Form("TsString")
ToString=Request.Form("ToString")
CsString=Request.Form("CsString")
CoString=Request.Form("CoString")

photourls=Request.Form("photourls")
photourlo=Request.Form("photourlo")

 NewsPaingType=Trim(Request.Form("NewsPaingType"))
   NPsString=Trim(Request.Form("NPsString"))
   NPoString=Trim(Request.Form("NPoString"))
   NewsUrlPaing_s=Trim(Request.Form("NewsUrlPaing_s"))
   NewsUrlPaing_o=Trim(Request.Form("NewsUrlPaing_o"))

PhotoPaingType=Trim(Request.Form("PhotoPaingType"))
PhotoType_s=Request.Form("PhotoType_s")
PhotoType_o=Request.Form("PhotoType_o")
PhotoLurl_s=Request.Form("PhotoLurl_s")
PhotoLurl_o=Request.Form("PhotoLurl_o")
Phototypefy_s=Request.Form("Phototypefy_s")
Phototypefy_o=Request.Form("Phototypefy_o")
Phototypefyurl_s=Request.Form("Phototypefyurl_s")
Phototypefyurl_o=Request.Form("Phototypefyurl_o")
Phototypeurl_s=Request.Form("Phototypeurl_s")
Phototypeurl_o=Request.Form("Phototypeurl_o")

DateType=Trim(Request.Form("DateType"))
DsString=Request.Form("DsString")
DoString=Request.Form("DoString")

AuthorType=Trim(Request.Form("AuthorType"))
AsString=Request.Form("AsString")
AoString=Request.Form("AoString")
AuthorStr=Request.Form("AuthorStr")

CopyFromType=Trim(Request.Form("CopyFromType"))
FsString=Request.Form("FsString")
FoString=Request.Form("FoString")
CopyFromStr=Request.Form("CopyFromStr")

KeyType=Trim(Request.Form("KeyType"))
KsString=Request.Form("KsString")
KoString=Request.Form("KoString")
KeyStr=Request.Form("KeyStr")

UrlTest=Trim(Request.Form("UrlTest"))
If TsString="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>标题开始标记不能为空</li>"
End If
If ToString="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>标题结束标记不能为空</li>" 
End If

If NewsPaingType="" Then

Else
   NewsPaingType=Clng(NewsPaingType)
   If NewsPaingType=0 Then
   ElseIf NewsPaingType=1 Then
		If NPsString="" or NPoString="" Then
				 FoundErr=True
				 ErrMsg=ErrMsg & "<br><li>正文分页列表开始/结束标不能为空!</li>" 
		End If
		If NewsUrlPaing_s="" or NewsUrlPaing_o="" Then
				 FoundErr=True
				 ErrMsg=ErrMsg & "<br><li>正文分页链接开始/结束标不能为空!!</li>" 
		End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误,正文分类设置</li>" 
   End If 
End If

If DateType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置时间类型</li>" 
Else
   DateType=Clng(DateType)
   If DateType=0 Then
   ElseIf DateType=1 Then
      If DsString="" or DoString="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将时间的开始/结束标记填写完整</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误,请从有效链接进入</li>" 
   End If
End If

If AuthorType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置作者类型</li>" 
Else
   AuthorType=Clng(AuthorType)
   If AuthorType=0 Then
   ElseIf AuthorType=1 Then
      If AsString="" or AoString="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将作者开始/结束标记填写完整!</li>" 
      End If
   ElseIf AuthorType=2 Then
      If AuthorStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定作者</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误,请从有效链接进入</li>" 
   End If 
End If

If CopyFromType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置来源类型</li>" 
Else
   CopyFromType=Clng(CopyFromType)
   If CopyFromType=0 Then
   ElseIf CopyFromType=1 Then
      If FsString="" or FoString="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请将来源开始/结束标记填写完整!</li>" 
      End If
   ElseIf CopyFromType=2 Then
      If CopyFromStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定来源</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误,请从有效链接进入</li>" 
   End If 
End If

If KeyType="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>请设置关键字类型</li>" 
Else
   KeyType=Clng(KeyType)
   If KeyType=0 Then
   ElseIf KeyType=1 Then
      If KsString="" or KoString="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>关键字开始/结束标记不能为空</li>" 
      End If
   ElseIf KeyType=2 Then
      If KeyStr="" Then
         FoundErr=True
         ErrMsg=ErrMsg & "<br><li>请指定关键字</li>" 
      End If
   Else
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误,请从有效链接进入</li>" 
   End If
End If

If FoundErr<>True Then
   SqlItem="Select * from Item Where ItemID=" & ItemID
   Set RsItem=server.CreateObject("adodb.recordset")
   RsItem.Open SqlItem,ConnItem,2,3
   RsItem("TsString")=TsString
   RsItem("ToString")=ToString
   RsItem("CsString")=CsString
   RsItem("CoString")=CoString
   
   RsItem("photourls")=photourls
   RsItem("photourlo")=photourlo
   if NewsPaingType<>"" then 
   		RsItem("NewsPaingType")=NewsPaingType
   		if NewsPaingType=1 then
   		RsItem("NPsString")=NPsString
  		RsItem("NPoString")=NPoString
   		RsItem("NewsUrlPaing_s")=NewsUrlPaing_s
   		RsItem("NewsUrlPaing_o")=NewsUrlPaing_o
   		end if
   end if
   
   if PhotoPaingType<>"" then 
   RsItem("PhotoPaingType")=PhotoPaingType
	   If PhotoPaingType=1 Then
		  RsItem("PhotoType_s")=PhotoType_s
          RsItem("PhotoType_o")=PhotoType_o
		  
		  RsItem("PhotoLurl_s")=PhotoLurl_s
		  RsItem("PhotoLurl_o")=PhotoLurl_o
		 
		  RsItem("Phototypefy_s")=Phototypefy_s
		  RsItem("Phototypefy_o")=Phototypefy_o
		  
		  RsItem("Phototypefyurl_s")=Phototypefyurl_s
		  RsItem("Phototypefyurl_o")=Phototypefyurl_o
		  
		  RsItem("Phototypeurl_s")=Phototypeurl_s
		  RsItem("Phototypeurl_o")=Phototypeurl_o
	   end if  
   End If
   
   RsItem("DateType")=DateType
   If DateType=1 Then
      RsItem("DsString")=DsString
      RsItem("DoString")=DoString
   End If

⌨️ 快捷键说明

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