sk_checkdatabase.asp
来自「1.支持文章」· ASP 代码 · 共 657 行 · 第 1/2 页
ASP
657 行
CurrentPage=Cint(Request("Page"))
Else
CurrentPage=1
End if
SqlItem=SqlItem & " order by ID DESC"
RsItem.open SqlItem,Conn,1,1
If (Not RsItem.Eof) and (Not RsItem.Bof) then
RsItem.PageSize=MaxPerPage
Allpage=RsItem.PageCount
If Currentpage>Allpage Then Currentpage=1
HistrolyNum=RsItem.RecordCount
RsItem.MoveFirst
RsItem.AbsolutePage=CurrentPage
i_His=0
Do While not RsItem.Eof
%>
<tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#cccccc'" style="padding: 0px 2px;">
<td width="57" align="center"> <input type="checkbox" value="<%=RsItem("ID")%>" name="HistrolyID" onClick="unselectall(this.form)" style="border: 0px;background-color: #E1F4EE;"> </td>
<td width="142" align="center">
<%
if RsItem("SaveFile")=1 then
Response.Write "本地"
else
Response.Write "远程"
end if
%> </td>
<td width="358" align="left"><%=RsItem("Title")%></td>
<td width="110" align="center"><%
set lb=conn.execute("select top 1 * from SK_Class where ClassID="& RsItem("TID"))
Response.Write lb("classname")
lb.close
set lb=nothing
%></td>
<td align="center"> <%If RsItem("Verific")=1 Then
Response.write "已审核"
Else
Response.Write "<font color=red>未审核</font>"
End If
%> </td>
<td width="90" align="center"> <a href="sk_checkDatabase.asp?Action=<%=Action%>&Del=Del&HistrolyID=<%=RsItem("ID")%>&radiobutton=<%=lx%>" onclick='return confirm("确定要删除此记录吗?");'>删除</a> </td>
</tr>
<%
i_His=i_His+1
If i_His > MaxPerPage Then
Exit Do
End If
RsItem.Movenext
Loop
%>
<tr class="tdbg">
<td colspan=8 height="30"> <input name="Del" type="hidden" id="Del" value="Del">
<input name="Action" type="hidden" id="Action" value="<%=Action%>">
<input name="radiobutton" type="hidden" id="Action" value="<%=lx%>">
<input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox" style="border: 0px;background-color: #E1F4EE;">
全选 </td>
</tr>
<tr class="tdbg">
<td colspan=8 height="30" align=center>
</td>
</tr>
<tr class="tdbg">
<td colspan=8 height="30"> </td>
</tr>
<%Else%>
<tr class="tdbg">
<td colspan='9' class="tdbg" align="center"><br>
系统中暂无历史记录!</td>
</tr>
<%End If%>
<%
RsItem.Close
Set RsItem=nothing
%>
</form>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
<tr>
<td height="22" colspan="2" class="tdbg">
<%
Response.Write ShowPage("sk_checkDatabase.asp?Action="& Action &"&radiobutton="& lx,HistrolyNum,MaxPerPage,True,True," 个记录")
%>
</td>
</tr>
</table>
</body>
</html>
<%End Sub%>
<%
'-------------图片列表------------------
Sub Main3
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
<tr>
<td height="22" colspan="2" class="title"> <div align="center"><strong>所 有 记 录</strong></div></td>
</tr>
</table>
<!--列表-->
<table align="center" class="tableBorder" border="0" cellspacing="1" width="100%" cellpadding="0">
<form name="form1" method="POST" action="sk_checkDatabase.asp">
<tr class="tdbg" style="padding: 0px 2px;">
<td width="57" height="22" align="center" class=ButtonList>选择</td>
<td width="142" align="center" class=ButtonList>文件所在</td>
<td width="358" align="center" class=ButtonList>图片标题</td>
<td width="110" height="22" align="center" class=ButtonList>栏目</td>
<td width="120" align="center" class=ButtonList>审核结果</td>
<td width="90" height="22" align="center" class=ButtonList>操作</td>
</tr>
<%
Set RsItem=server.createobject("adodb.recordset")
SqlItem="select * from sk_photo"
If Request("page")<>"" then
CurrentPage=Cint(Request("Page"))
Else
CurrentPage=1
End if
SqlItem=SqlItem & " order by ID DESC"
RsItem.open SqlItem,Conn,1,1
If (Not RsItem.Eof) and (Not RsItem.Bof) then
RsItem.PageSize=MaxPerPage
Allpage=RsItem.PageCount
If Currentpage>Allpage Then Currentpage=1
HistrolyNum=RsItem.RecordCount
RsItem.MoveFirst
RsItem.AbsolutePage=CurrentPage
i_His=0
Do While not RsItem.Eof
%>
<tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#cccccc'" style="padding: 0px 2px;">
<td width="57" align="center"> <input type="checkbox" value="<%=RsItem("ID")%>" name="HistrolyID" onClick="unselectall(this.form)" style="border: 0px;background-color: #E1F4EE;"> </td>
<td width="142" align="center">
</td>
<td width="358" align="left"><%=RsItem("Title")%></td>
<td width="110" align="center"><%
set lb=cmsconn.execute("select top 1 * from ks_Class where ID='"& RsItem("TID")&"'")
if not lb.eof then Response.Write lb("FolderName")
lb.close
set lb=nothing
%></td>
<td align="center"> <%If RsItem("Verific")=1 Then
Response.write "已审核"
Else
Response.Write "<font color=red>未审核</font>"
End If
%> </td>
<td width="90" align="center"> <a href="sk_checkDatabase.asp?Action=del&HistrolyID=<%=RsItem("ID")%>&radiobutton=<%=lx%>" onclick='return confirm("确定要删除此记录吗?");'>删除</a> </td>
</tr>
<%
i_His=i_His+1
If i_His > MaxPerPage Then
Exit Do
End If
RsItem.Movenext
Loop
%>
<tr class="tdbg">
<td colspan=8 height="30">
<input name="Action" type="hidden" id="Action" value="ok">
<input name="radiobutton" type="hidden" id="Action" value="<%=lx%>">
<input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox" style="border: 0px;background-color: #E1F4EE;">
全选 </td>
</tr>
<tr class="tdbg">
<td colspan=8 height="30" align=center> <input type="submit" value="审核入库所选记录" name="DelFlag" onclick='return confirm("确定发布选中的记录吗?");' style="cursor: hand;background-color: #cccccc;">
<input type="submit" value="审核入库全部记录" name="DelFlag" onclick='return confirm("确定添加全部记录吗?");' style="cursor: hand;background-color: #cccccc;">
<input type="submit" value="删除所选记录" name="DelFlag" onclick='return confirm("确定要删除选中的记录吗?");' style="cursor: hand;background-color: #cccccc;">
<input type="submit" value="删除全部记录" name="DelFlag" onclick='return confirm("确定要删除所有的记录吗?");' style="cursor: hand;background-color: #cccccc;">
</tr>
<tr class="tdbg">
<td colspan=8 height="30"> </td>
</tr>
<%Else%>
<tr class="tdbg">
<td colspan='9' class="tdbg" align="center"><br>
系统中暂无历史记录!</td>
</tr>
<%End If%>
<%
RsItem.Close
Set RsItem=nothing
%>
</form>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
<tr>
<td height="22" colspan="2" class="tdbg">
<%
Response.Write ShowPage("sk_checkDatabase.asp?Action="& Action &"&radiobutton="& lx,HistrolyNum,MaxPerPage,True,True," 个记录")
%>
</td>
</tr>
</table>
<!--列表-->
</body>
</html>
<%End Sub
Sub InsertIntoBase(collectlx,FRS)
Response.Flush()
set rslb=cmsConn.Execute("select top 1 * from ks_Class Where ID='" & FRS("ClassID") &"'")
Set CMSRS=Server.CreateObject("ADODB.RECORDSET")
CMSRS.Open "Select top 1 * From KS_Article Where Title='" & FRS("Title") & "' And Tid='" & FRS("ClassID") & "'",cmsconn,1,3
If CMSRS.EOF Then
CMSRS.addnew
NewsID=GetInfoID_CMS(1)
CMSRS("NewsID")=NewsID
CMSRS("Tid")=FRS("ClassID")'目标ID
CMSRS("Keywords")=FRS("Keyword")
CMSRS("Title")=FRS("Title")
if FRS("IncludePic")=1 then CMSRS("TitleType")="[图文]"
CMSRS("ShowComment")=0
CMSRS("ArticleContent")=FRS("Content")
CMSRS("Author")=FRS("Author")
CMSRS("Origin")=FRS("CopyFrom")
CMSRS("Rank")="★★★"
CMSRS("Hits")=FRS("Hits") '点击数
CMSRS("AddDate")=FRS("UpdateTime")
CMSRS("TemplateID")=rslb("ArticleTemplateID")
CMSRS("articleFsoType")=rslb("ArticleFsoType")
CMSRS("Fname")=GetFileName(rslb("ArticleFsoType"), FRS("UpdateTime"),NewsID & rslb("ArticleFnameType"))
CMSRS("RefreshTF")=0
CMSRS("PicNews")=0
CMSRS("ArticleInput") = FRS("Inputer")
CMSRS("Changes") = 0
CMSRS("Recommend") = 0
CMSRS("Rolls") = 0
CMSRS("strip") = 0
CMSRS("Popular") = 0
CMSRS("Verific") = 1 '审核与否
CMSRS("Slide") = 0
CMSRS("BeyondSavePic") = 0
CMSRS("Comment") = 0
CMSRS("OrderID") = 1
CMSRS.update
SuccNum = SuccNum + 1
if DelFlag="审核入库全部记录" then Conn.Execute("Delete From sk_Article Where ArticleID=" & FRS("ArticleID") )
Else
ErrNum = ErrNum + 1
End if
Inum=Inum+1
rslb.close
set rslb=nothing
CMSRS.close
Set CMSRS = Nothing
if DelFlag="审核入库全部记录" then
FRS.close
set FRS=nothing
if Inum =cint(RSnum) then
response.write "<script>alert('提示:本次共操作 " & SuccNum + ErrNum & " 篇文章\n其中成功入库 " & SuccNum & " 篇,重复而不允许入库 "&ErrNum & " 篇;');location.href='sk_checkdatabase.asp'</script>"
else
Response.Write " 总公有 <font color=""#FF3333"">"& RSnum &"</font> 条记录<br>系统正在导入第 <font color=""#FF3333"">"& Inum &"</font> 条,请耐心等待....!"
response.write "<meta http-equiv=""refresh"" content=""0;url=sk_checkdatabase.asp?radiobutton=1&Action=ok&DelFlag="& DelFlag &"&RSNum="& RSNum &"&SuccNum="& SuccNum &"&ErrNum="& ErrNum &"&Inum="& Inum &""">"
End if
End if
end sub
Sub InsertIntoBase_photo(FRS)
Response.Flush()
set rslb=cmsConn.Execute("select top 1 * from ks_Class Where ID='" & FRS("Tid") &"'")
Set CMSRS=Server.CreateObject("ADODB.RECORDSET")
CMSRS.Open "Select top 1 * From KS_Photo Where Title='" & FRS("Title") & "' And Tid='" & FRS("Tid") & "'",cmsconn,1,3
If CMSRS.EOF Then
CMSRS.addnew
CMSRS("PicID")=GetInfoID_CMS(2)
CMSRS("Tid")=FRS("Tid")
CMSRS("KeyWords")=FRS("KeyWords")
CMSRS("Title")=FRS("Title")
CMSRS("PhotoUrl")=FRS("PhotoUrl")
CMSRS("PicUrls")=FRS("PicUrls")
CMSRS("PictureContent")=FRS("PictureContent")
CMSRS("Author")=FRS("Author")
CMSRS("Origin")=FRS("Origin")
CMSRS("Rank")="★★★★★"
CMSRS("Hits")=FRS("Hits")
CMSRS("HitsByDay")=MakeRandom(3)
CMSRS("HitsByWeek")=MakeRandom(3)
CMSRS("HitsByMonth")=MakeRandom(3)
CMSRS("AddDate")=FRS("AddDate")
CMSRS("TemplateID")=rslb("ArticleTemplateID")
CMSRS("PictureFsoType")=rslb("ArticleFsoType")
CMSRS("Fname")=GetFileName(rslb("ArticleFsoType"), FRS("AddDate"),NewsID & rslb("ArticleFnameType"))
CMSRS("PictureInput")=FRS("PictureInput")
CMSRS("RefreshTF")=0
CMSRS("Recommend")=0
CMSRS("Rolls")=0
CMSRS("Strip")=0
CMSRS("Popular")=0
CMSRS("Verific")=1
CMSRS("Comment")=1
CMSRS("Score")=MakeRandom(3)
CMSRS("Slide")=0
CMSRS("BeyondSavePic")=0
CMSRS("DelTF")=0
CMSRS("OrderID")=1
CMSRS.update
SuccNum = SuccNum + 1
if DelFlag="审核入库全部记录" then Conn.Execute("Delete From sk_photo Where ID=" & FRS("ID") )
Else
ErrNum = ErrNum + 1
End if
Inum=Inum+1
rslb.close
set rslb=nothing
CMSRS.close
Set CMSRS = Nothing
if DelFlag="审核入库全部记录" then
FRS.close
set FRS=nothing
if Inum =cint(RSnum) then
response.write "<script>alert('提示:本次共操作 " & SuccNum + ErrNum & " 篇文章\n其中成功入库 " & SuccNum & " 篇,重复而不允许入库 "&ErrNum & " 篇;');location.href='sk_checkdatabase.asp?radiobutton=3'</script>"
else
Response.Write " 总公有 <font color=""#FF3333"">"& RSnum &"</font> 条记录<br>系统正在导入第 <font color=""#FF3333"">"& Inum &"</font> 条,请耐心等待....!"
response.write "<meta http-equiv=""refresh"" content=""0;url=sk_checkdatabase.asp?radiobutton=3&Action=ok&DelFlag="& DelFlag &"&RSNum="& RSNum &"&SuccNum="& SuccNum &"&ErrNum="& ErrNum &"&Inum="& Inum &""">"
End if
End if
end sub
Call CloseConn()
Call CloseConnItem()
Call closeCmSconn()
%>
<!--#include file="Admin_ItemFoot.asp"-->
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?