<%
'=====================================================================
' 软件名称：w163采集管理系统
' 当前版本：1.0
' 更新日期：2006-11-6
' 官方网站：w163建站(www.w163.cn)

 'QQ：85651782


'=====================================================================
%>
<!--#include file="inc/setup.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='w163_login.asp' target='_top'>登陆</a>。"
	response.Redirect("w163_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 w163_photo")
	if lx=5 then Set FRS = ConnItem.execute("select * from w163_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='w163_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 w163_Article Where ArticleID in(" & HistrolyID & ")", ConnItem, 1, 3
			  If Not FRS.EOF Then
				  while not FRS.eof
					FRS("Passed")=1
				  FRS.movenext
				  SuccNum=SuccNum+1
				  wend
			  End if
			  FRS.close
			  set FRS=nothing
		 end if
		 if lx=3 then
		 	  Set FRS = Server.CreateObject("ADODB.RECORDSET")
			  FRS.Open "select * from w163_photo Where ID in(" & HistrolyID & ")", ConnItem, 1, 3
			  If Not FRS.EOF Then
				  while not FRS.eof
				  Frs("Verific")=1
				  FRS.movenext
				  SuccNum=SuccNum+1
				  wend
			  End if
			  FRS.close
			  set FRS=nothing
		 end if
		 if lx=5 then
		 	  Set FRS = Server.CreateObject("ADODB.RECORDSET")
			  FRS.Open "select * from w163_download Where ID in(" & HistrolyID & ")", ConnItem, 1, 3
			  If Not FRS.EOF Then
				  while not FRS.eof
				  Frs("Verific")=1
				  FRS.movenext
				  SuccNum=SuccNum+1
				  wend
			  End if
			  FRS.close
			  set FRS=nothing
		 end if
		  Call NumMsg()
	End if 
	case "审核入库全部记录"
		select case lx
		case 1
			SQLstr="select * from w163_Article order by ArticleID DESC"
		case 3
			SQLstr="select  * from w163_photo order by ID DESC"
		case 5
			SQLstr="select * from w163_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  FRS("Passed")=1
					if lx=3 then  Frs("Verific")=1
					if lx=5 then  Frs("Verific")=1
					FRS.movenext
					SuccNum=SuccNum+1
				  wend 
		 	  end if
		 	  FRS.close
		 	  set FRS=nothing
		End if
		 response.write  "<script>alert('提示:本次共操作 " & SuccNum & "篇, 篇;');location.href='w163_checkdatabase.asp?radiobutton="& lx &"'</script>"  
	case "删除所选记录"
		if HistrolyID<>""  then 
			if lx=1 then ConnItem.execute("Delete From w163_Article Where ArticleID in(" & HistrolyID & ")")
 			if lx=3 then ConnItem.execute("Delete From w163_photo Where ID in(" & HistrolyID & ")")
			if lx=5 then ConnItem.execute("Delete From w163_download Where ID in(" & HistrolyID & ")")
		end if
		response.write "<meta http-equiv=""refresh"" content=""0;url=w163_checkdatabase.asp?radiobutton="& lx &""">"
	case "删除全部记录"
		if lx=1 then ConnItem.execute("Delete From w163_Article")
		if lx=3 then ConnItem.execute("Delete From w163_photo")
		if lx=5 then ConnItem.execute("Delete From w163_download")
		response.write "<meta http-equiv=""refresh"" content=""0;url=w163_checkdatabase.asp?radiobutton="& lx &""">"
	case "图片地址替换"
	    picurl_th=Trim(Request("picurl_th"))
	    Set FRS = Server.CreateObject("ADODB.RECORDSET")
		FRS.Open "select * from w163_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='w163_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 w163_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='w163_checkdatabase.asp?radiobutton=5'</script>"
	end select
case "del"
		Response.Flush()
		if HistrolyID<>""  then 
			if lx=1 then ConnItem.execute("Delete From w163_Article Where ArticleID in(" & HistrolyID & ")")
 			if lx=3 then ConnItem.execute("Delete From w163_photo Where ID in(" & HistrolyID & ")")
		end if
		response.write "<meta http-equiv=""refresh"" content=""0;url=w163_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 & "篇;');</script>" 
		   response.write "<meta http-equiv=""refresh"" content=""0;url=w163_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="w163_checkDatabase.asp">管理首页</a>&nbsp;&nbsp;|&nbsp;&nbsp;数据审核   </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
%>

<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 width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
  <form name="form1" method="POST" action="w163_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 w163_Article" 
If Request("page")<>"" then
    CurrentPage=Cint(Request("Page"))
Else
    CurrentPage=1
End if 

SqlItem=SqlItem  &  " order by ArticleID DESC"
RsItem.open SqlItem,ConnItem,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("ArticleID")%>" name="HistrolyID" onClick="unselectall(this.form)" style="border: 0px;background-color: #E1F4EE;">      </td>
      <td width="142" align="center"> <%=left(RsItem("CopyFrom"),8)%> </td>
      <td width="358" align="left"><%=RsItem("Title")%></td>
      <td width="110" align="center"><%Call Admin_ShowClass_Name(RsItem("ChannelID"),RsItem("ClassID"),0)%></td>
      <td align="center"> <%If RsItem("Passed")=True Then
           Response.write "已审核"
        Else
		   Response.Write "<font color=red>未审核</font>"
        End If
      %> </td>
      <td width="90" align="center"> <a href="w163_checkDatabase.asp?Actionl=Del&HistrolyID=<%=RsItem("ArticleID")%>&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 name="DelFlag" type="submit" class="lostfocus" style="cursor: hand;background-color: #cccccc;" onclick='return confirm("确定要入库选中的记录吗？");' value="审核入库所选记录">
	          &nbsp;&nbsp; <input name="DelFlag" type="submit" class="lostfocus" style="cursor: hand;background-color: #cccccc;" onclick='return confirm("确定添加全部记录吗？");' value="审核入库全部记录"> 
        &nbsp;&nbsp; <input name="DelFlag" type="submit" class="lostfocus" style="cursor: hand;background-color: #cccccc;"  onclick='return confirm("确定要删除选中的记录吗？");' value="删除所选记录"> 
        &nbsp;&nbsp;&nbsp;&nbsp; <input name="DelFlag" type="submit" class="lostfocus" style="cursor: hand;background-color: #cccccc;" onclick='return confirm("确定要删除所有的记录吗？");' value="删除全部记录"> 
      &nbsp;&nbsp;
	  </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("w163_checkDatabase.asp?Action="& Action,HistrolyNum,MaxPerPage,True,True," 个记录")
%>

      </td>
    </tr>
</table>

<!--列表-->       
</body>         
</html>
<%End Sub
'---------文章------------------
%>

<%
'-------------软件列表------------------
Sub Main5
%>
<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 class="tableBorder" border="0" align="center" cellspacing="1" width="100%" cellpadding="0">
  <form name="form1" method="POST" action="w163_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 w163_DownLoad" 
If Request("page")<>"" then
    CurrentPage=Cint(Request("Page"))
Else
    CurrentPage=1
End if 
SqlItem=SqlItem  &  " order by ID DESC"
RsItem.open SqlItem,ConnItem,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"><% Call Admin_ShowClass_Name(5,RsItem("tID"),0) %></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="w163_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="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> 
     </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;"> 
        &nbsp;&nbsp; <input type="submit" value="审核入库全部记录" name="DelFlag" onclick='return confirm("确定添加全部记录吗？");' style="cursor: hand;background-color: #cccccc;"> 
        &nbsp;&nbsp; <input type="submit" value="删除所选记录" name="DelFlag"  onclick='return confirm("确定要删除选中的记录吗？");' style="cursor: hand;background-color: #cccccc;"> 
		&nbsp;&nbsp; <input type="submit" value="删除全部记录" name="DelFlag" onclick='return confirm("确定要删除所有的记录吗？");' style="cursor: hand;background-color: #cccccc;"> 
       &nbsp;&nbsp; <input type="button" value="输出全部软件地址" name="DelFlag" onClick="window.location.href='w163_checkDatabase.asp?Urlsc=ok&radiobutton=5'" style="cursor: hand;background-color: #cccccc;">
	   <br>
	   <input name="picurl_th" type="text" class="lostfocus" value="" size="80" maxlength="150">
	   &nbsp;&nbsp; <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("w163_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="w163_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 w163_photo" 
If Request("page")<>"" then
    CurrentPage=Cint(Request("Page"))
Else
    CurrentPage=1
End if 
SqlItem=SqlItem  &  " order by ID DESC"
RsItem.open SqlItem,ConnItem,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">
	  <% Call Admin_ShowClass_Name(5,RsItem("TID"),0) %>
</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="w163_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;"> 
        &nbsp;&nbsp; <input type="submit" value="审核入库全部记录" name="DelFlag" onclick='return confirm("确定添加全部记录吗？");' style="cursor: hand;background-color: #cccccc;"> 
        &nbsp;&nbsp; <input type="submit" value="删除所选记录" name="DelFlag"  onclick='return confirm("确定要删除选中的记录吗？");' style="cursor: hand;background-color: #cccccc;"> 
		&nbsp;&nbsp; <input type="submit" value="删除全部记录" name="DelFlag" onclick='return confirm("确定要删除所有的记录吗？");' style="cursor: hand;background-color: #cccccc;"> 
       &nbsp;&nbsp; <input type="button" value="输出全部图片地址" name="DelFlag" onClick="window.location.href='w163_checkDatabase.asp?Urlsc=ok&radiobutton=3'" style="cursor: hand;background-color: #cccccc;">
	   <br>
	   <input name="picurl_th" type="text" class="lostfocus" value="" size="80" maxlength="150">
	   &nbsp;&nbsp; <input type="submit" value="图片地址替换" name="DelFlag" onClick="" 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("w163_checkDatabase.asp?Action="& Action &"&radiobutton="& lx,HistrolyNum,MaxPerPage,True,True," 个记录")
%>

      </td>
    </tr>
</table>     
</body>         
</html>
<%End Sub
 '*********************************************************************************************************
'函数名：FSOSaveFile
'作  用：生成文件
'参  数： Content内容,路径 注意虚拟目录
'*********************************************************************************************************
Sub FSOSaveFile(Content, LocalFileName)
    Dim FSO, FileObj
    Set FSO = Server.CreateObject("Scripting.FileSystemObject")
    Set FileObj = FSO.CreateTextFile(Server.MapPath(LocalFileName), True) '创建文件
    FileObj.Write Content
    FileObj.Close     '释放对象
    Set FileObj = Nothing
    Set FSO = Nothing
End Sub
Call CloseConnItem()
%>
<!--#include file="Admin_ItemFoot.asp"-->
