📄 sk_checkdatabase.asp
字号:
<%
'=====================================================================
' 软件名称:SK采集管理系统
' 当前版本:2.0
' 更新日期:2006-9-7
' 官方网站:SK娱乐网(www.skxiu.com) QQ:85103270
'=====================================================================
%>
<!--#include file="inc/setup.asp"-->
<!--#include file="Session.asp"-->
<%
Dim cmsrs,Rs,Sql,SqlItem,RsItem,Action,FoundErr,Num,SuccNum,ErrNum,Frs,RSNum,Inum,ii
Dim HistrolyID,ItemID,ChannelID,ClassID,SpecialID,ArticleID,Title,CollecDate,NewsUrl,Result
Dim Arr_Histroly,Arr_ArticleID,i_Arr,Del,Flag,NewsID,DelFlag
Dim MaxPerPage,CurrentPage,AllPage,HistrolyNum,i_His,lx,radiobutton,lb,rslb
'----是否登陆
%>
<html>
<head>
<title>新闻采集系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css/Admin_Style.css">
<style type="text/css">
.ButtonList {
BORDER-RIGHT: #000000 2px solid; BORDER-TOP: #ffffff 2px solid; BORDER-LEFT: #ffffff 2px solid; CURSOR: default; BORDER-BOTTOM: #999999 2px solid; BACKGROUND-COLOR: #e6e6e6
}
</style>
<%
'Call Admin()
'If IsAdmin=false then
' ErrMsg="<li> 您没有登陆或不是管理员。请<a href='sk_login.asp' target='_top'>登陆</a>。"
' response.Redirect("Sk_err.asp?action=AdminErr&ErrMsg="&ErrMsg&"")
' response.End()
'end if
'-----
SuccNum=Trim(Request("SuccNum"))
ErrNum=Trim(Request("ErrNum"))
RSNum=Trim(Request("RSNum"))
Inum=Trim(Request("INum"))
HistrolyID=Trim(Request("HistrolyID"))
DelFlag=Trim(Request("DelFlag"))
if SuccNum="" or ErrNum="" or RSNum="" or Inum="" then
SuccNum=0 : ErrNum=0 : RSNum=0 : Inum=0
end if
MaxPerPage=20
FoundErr=False
Action=Trim(Request("Action"))
lx=Request("radiobutton")
if lx="" or lx=0 then lx=1
'输出图片地址
if Trim(Request("Urlsc"))="ok" then
if lx=3 then Set FRS = ConnItem.execute("select * from SK_photo")
if lx=5 then Set FRS = ConnItem.execute("select * from SK_DownLoad")
if lx=3 then
while not FRS.eof
PhotoUrl= PhotoUrl & vbcrlf & frs("PhotoUrl")
PicUrls=Split(frs("PicUrls"),"|||")
for i=0 to Ubound(PicUrls)
pic_temp=Replace(PicUrls(i),"图片" & i+1 &"|","")
pic_1 = pic_1 & vbcrlf & pic_temp
next
pic_2 = pic_2 & vbcrlf & pic_1
pic_1=""
Frs.movenext
SuccNum=SuccNum+1
wend
end if
if lx=5 then
while not FRS.eof
PhotoUrl= PhotoUrl & vbcrlf & frs("PhotoUrl")
PicUrls=Split(frs("DownUrls"),"|||")
for i=0 to Ubound(PicUrls)
pic_temp=Replace(PicUrls(i),"下载地址" & i+1 &"|","")
pic_1 = pic_1 & vbcrlf & pic_temp
next
pic_2 = pic_2 & vbcrlf & pic_1
pic_1=""
Frs.movenext
SuccNum=SuccNum+1
wend
end if
Response.Write PhotoUrl
Response.Write pic_2
if lx =3 then call FSOSaveFile(PhotoUrl & pic_2,"photo.txt")
if lx =5 then call FSOSaveFile(PhotoUrl & pic_2,"soft.txt")
Frs.close
set frs=nothing
response.write "<script>alert('提示:本次共输出 " & SuccNum & " 条地址;');location.href='sk_checkdatabase.asp?radiobutton="& lx &"'</script>"
end if
select case Action
case "ok"
select case DelFlag
case "审核入库所选记录"
If HistrolyID="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请选择要发布的记录</li>"
Else
HistrolyID=Replace(HistrolyID," ","")
if lx=1 then
Set FRS = Server.CreateObject("ADODB.RECORDSET")
FRS.Open "select * from SK_Article Where ArticleID in(" & HistrolyID & ")", ConnItem, 1, 3
If Not FRS.EOF Then
while not FRS.eof
InsertIntoBase 1,FRS
FRS.movenext
wend
End if
ConnItem.execute("Delete From SK_Article Where ArticleID in(" & HistrolyID & ")")
FRS.close
set FRS=nothing
end if
if lx=3 then
Set FRS = Server.CreateObject("ADODB.RECORDSET")
FRS.Open "select * from SK_photo Where ID in(" & HistrolyID & ")", ConnItem, 1, 3
If Not FRS.EOF Then
while not FRS.eof
InsertIntoBase_photo FRS
FRS.movenext
wend
End if
ConnItem.execute("Delete From SK_photo Where ID in(" & HistrolyID & ")")
FRS.close
set FRS=nothing
end if
if lx=5 then
Set FRS = Server.CreateObject("ADODB.RECORDSET")
FRS.Open "select * from SK_download Where ID in(" & HistrolyID & ")", ConnItem, 1, 3
If Not FRS.EOF Then
while not FRS.eof
InsertIntoBase_down FRS
FRS.movenext
wend
End if
ConnItem.execute("Delete From SK_download Where ID in(" & HistrolyID & ")")
FRS.close
set FRS=nothing
end if
Call NumMsg()
End if
case "审核入库全部记录"
select case lx
case 1
SQLstr="select * from SK_Article order by ArticleID DESC"
case 3
SQLstr="select * from SK_photo order by ID DESC"
case 5
SQLstr="select * from SK_download order by ID DESC"
end select
if SQLstr<>"" then
Set FRS = Server.CreateObject("ADODB.RECORDSET")
FRS.Open SQLstr, ConnItem, 1, 3
If Not FRS.EOF Then
while not FRS.eof
if lx=1 then InsertIntoBase 1,FRS
if lx=3 then InsertIntoBase_photo FRS
if lx=5 then InsertIntoBase_down FRS
FRS.movenext
wend
end if
if lx=1 then ConnItem.execute("Delete From SK_Article")
if lx=3 then ConnItem.execute("Delete From sk_photo")
if lx=5 then ConnItem.execute("Delete From sk_download")
FRS.close
set FRS=nothing
End if
response.write "<script>alert('提示:本次共操作 " & SuccNum + ErrNum & " 篇文章\n其中成功入库 " & SuccNum & " 篇,重复而不允许入库 "&ErrNum & " 篇;');location.href='sk_checkdatabase.asp?radiobutton="& lx &"'</script>"
case "删除所选记录"
if HistrolyID<>"" then
if lx=1 then ConnItem.execute("Delete From SK_Article Where ArticleID in(" & HistrolyID & ")")
if lx=3 then ConnItem.execute("Delete From SK_photo Where ID in(" & HistrolyID & ")")
if lx=5 then ConnItem.execute("Delete From SK_download Where ID in(" & HistrolyID & ")")
end if
response.write "<meta http-equiv=""refresh"" content=""0;url=sk_checkdatabase.asp?radiobutton="& lx &""">"
case "删除全部记录"
if lx=1 then ConnItem.execute("Delete From SK_Article")
if lx=3 then ConnItem.execute("Delete From sk_photo")
if lx=5 then ConnItem.execute("Delete From sk_download")
response.write "<meta http-equiv=""refresh"" content=""0;url=sk_checkdatabase.asp?radiobutton="& lx &""">"
case "图片地址替换"
picurl_th=Trim(Request("picurl_th"))
Set FRS = Server.CreateObject("ADODB.RECORDSET")
FRS.Open "select * from SK_photo", ConnItem, 1, 3
while not FRS.eof
PhotoUrl=Split(frs("PhotoUrl"),"/")
Photo_Url=picurl_th & PhotoUrl(Ubound(PhotoUrl))
'PhotoUrl= PhotoUrl & vbcrlf & frs("PhotoUrl")
PicUrls=Split(frs("PicUrls"),"|||")
for i=0 to Ubound(PicUrls)
pic_temp=Replace(PicUrls(i),"图片" & i+1 &"|","")
pic_temp=Split(pic_temp,"/")
pic_temp1=picurl_th & pic_temp(Ubound(pic_temp))
If i=0 then
PicUrls_i="图片1|" & pic_temp1
Else
PicUrls_i= PicUrls_i & "|||" & "图片" & i & "|" & pic_temp1
End if
next
frs("PhotoUrl")=Photo_Url
frs("PicUrls")=PicUrls_i
PicUrls_i=""
Frs.update
Frs.movenext
SuccNum=SuccNum+1
wend
Frs.close
set frs=nothing
response.write "<script>alert('提示:本次共替换 " & SuccNum & " 条地址;');location.href='sk_checkdatabase.asp?radiobutton=3'</script>"
case "软件地址替换"
picurl_th=Trim(Request("picurl_th"))
if picurl_th<>"" then
Set FRS = Server.CreateObject("ADODB.RECORDSET")
FRS.Open "select * from SK_DownLoad", ConnItem, 1, 3
while not FRS.eof
if frs("PhotoUrl")<>"" then
PhotoUrl=Split(frs("PhotoUrl"),"/")
Photo_Url= picurl_th & PhotoUrl(Ubound(PhotoUrl))
end if
PicUrls=Split(frs("DownUrls"),"|||")
for i=0 to Ubound(PicUrls)
pic_temp=Replace(PicUrls(i),"下载地址" & i+1 &"|","")
pic_temp=Split(pic_temp,"/")
pic_temp1=picurl_th & pic_temp(Ubound(pic_temp))
If i=0 then
PicUrls_i="下载地址1|" & pic_temp1
Else
PicUrls_i= PicUrls_i & "|||" & "下载地址" & i & "|" & pic_temp1
End if
next
frs("PhotoUrl")=Photo_Url
frs("DownUrls")=PicUrls_i
PicUrls_i=""
Frs.update
Frs.movenext
SuccNum=SuccNum+1
wend
Frs.close
set frs=nothing
end if
response.write "<script>alert('提示:本次共替换 " & SuccNum & " 条地址;');location.href='sk_checkdatabase.asp?radiobutton=5'</script>"
end select
case "del"
Response.Flush()
if HistrolyID<>"" then
if lx=1 then ConnItem.execute("Delete From SK_Article Where ArticleID in(" & HistrolyID & ")")
if lx=3 then ConnItem.execute("Delete From SK_photo Where ID in(" & HistrolyID & ")")
end if
response.write "<meta http-equiv=""refresh"" content=""0;url=sk_checkdatabase.asp?radiobutton="& lx &""">"
case else
call top()
select case lx
case 1
Call Main1()'新闻
case 5
Call Main5()'软件
case 3
Call Main3()'图片
case 6
Call Main6()'自定
case else
Call Main1()
end select
end select
if FoundErr=True then Call WriteErrMsg(ErrMsg)
sub NumMsg()
response.write "<script>alert('提示:本次共操作 " & SuccNum + ErrNum & " 篇文章\n其中成功入库 " & SuccNum & " 篇,重复而不允许入库 "&ErrNum & " 篇;');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=sk_checkdatabase.asp?radiobutton="& lx &""">"
end sub
%>
<%sub top()%>
<SCRIPT language=javascript>
function unselectall(thisform)
{
if(thisform.chkAll.checked)
{
thisform.chkAll.checked = thisform.chkAll.checked&0;
}
}
function CheckAll(thisform)
{
for (var i=0;i<thisform.elements.length;i++)
{
var e = thisform.elements[i];
if (e.Name != "chkAll"&&e.disabled!=true)
e.checked = thisform.chkAll.checked;
}
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table cellpadding="0" cellspacing="1" border="0" width="100%" class="tableBorder" align=center>
<tr class="topbg">
<td height="22" colspan="2" align="center"><strong>已 采 数 据 审 核</strong></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr class="tdbg">
<td height="30" width="65"><strong>管理导航:</strong></td>
<td height="30"><a href="sk_checkDatabase.asp">管理首页</a> | 数据审核 </td>
</tr>
</table>
<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0" class="tableBorder">
<tr>
<td height=30 align="center">
选择类型:
<input name="radiobutton" type="radio" value="1" <%if lx =1 then Response.Write "checked" %> onClick="location.href='?radiobutton=1';" >
新闻采集
<input type="radio" name="radiobutton" value="3" <%if lx =3 then Response.Write "checked" %> onClick="location.href='?radiobutton=3';">
图片采集
<input type="radio" name="radiobutton" value="5" <%if lx =5 then Response.Write "checked" %> onClick="location.href='?radiobutton=5';">
软件采集 </td>
</tr>
</table>
<%end sub %>
<%
'---------文章------------------
Sub Main1
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -