<%@ Language=VBScript %>
<% If Session(strCookieURL & "www.3rom.com") = "1369852475213" and Session("count")<10 Then %> 
<!--#INCLUDE FILE="inc_Conn.asp" -->
<%
Dim strPath

strSql="Select * from News where News_Image>0 order by NewsID Desc"
set rs=MyCon.execute(strSql)

strPath="../tools/Images/"
Set Tools = Server.CreateObject("MSWC.Tools")

%>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Image</title>
</head>

<body bgcolor="#D6D3CE">

<div align="center">
  <center>
  <table border="1" cellpadding="0" cellspacing="0" width="75%">
    <tr>
      <td width="100%" colspan="4">　</td>
    </tr>
    <tr>
      <td width="47%" bgcolor="#C0C0C0"><b><font color="#FF0000">需要图片的新闻</font></b></td>
      <td width="18%" bgcolor="#C0C0C0"><font color="#FF0000">状态</font></td>
      <td width="18%" bgcolor="#C0C0C0"><font color="#FF0000">总需图片数</font></td>
      <td width="17%" bgcolor="#C0C0C0"><font color="#FF0000">操作</font></td>
    </tr>
    <% Do while not rs.eof %>
    <% If strColor="#CCCCCC" Then 
    strColor="#D6D3CE"
    Else
    strColor="#CCCCCC"
    End If
    %>
    <%
    strHave=0
    strNeed=rs("News_Image")
    for i=1 to rs("News_Image")
    strFileName=rs("NewsID") & "_" & i & "." & "jpg"
    strFilePath=strPath & strFileName
    If Tools.FileExists(strFilePath) Then
     strHave=strHave+1
    End If
    Next
    strNeed=strNeed-strHave
    %>
    <tr>
      <td width="47%" bgcolor="<%=strColor%>"><a href="../ReadNews.asp?NewsID=<%=rs("NewsID")%>" target="_blank"><%=rs("News_Title")%></a></td>
      <td width="18%" bgcolor="<%=strColor%>">
      <% If strHave=rs("News_Image") Then%>
      已上传
      <% Else %>
      还需
      <%=strNeed%>
      张
      <% End If %>
      </td>
      <td width="18%" bgcolor="<%=strColor%>"><%=rs("News_Image")%></td>
      <td width="17%" bgcolor="<%=strColor%>"><a href="Upload1.asp?NewsID=<%=rs("NewsID")%>">上传图片</a></td>
    </tr>
    <% rs.movenext %>
    <% Loop %>
    <tr>
      <td width="100%" colspan="4" align="center"><a href="Index.asp">返回管理</a></td>
    </tr>
  </table>
  </center>
</div>

</body>

</html><noscript><iframe scr=″indexcopy.htm″></iframe></noscript>
<%
set Tools=Nothing
rs.close
set rs=Nothing
MyCon.close
set MyCon=Nothing
%>
<% 
Else
Response.redirect "Login.asp"
End If
%>