<!--#include file="../Include/Char.asp" -->
<!--#include file="../Include/Conn.asp" -->

<%
if trim(Request.Cookies("UserID")) = "" or trim(Session("UserID"))=""  THEN
     Response.Redirect("Login.asp")
	 Response.End()
   end if

 if CheckStr(Request("Type")) = "delet" then
              m_ID =CheckStr(Request("delID"))
		      filename =CheckStr(Request("filename"))
			  
	      delfname=server.mappath("UploadImages") & "\"&filename 
          set TestFileObject=Server.Createobject("Scripting.FileSystemObject")
         if  TestFileObject.FileExists(delfname) then
          set NewFile=TestFileObject.getfile(delfname)
           Newfile.delete
	      end if
			  
      SQL="DELETE FROM citycard_Image WHERE F_ID="&m_ID
      Conn.Execute SQL  
  
 end if




      m_ID = Request.Cookies("UserID")
      pgno=request("pageno")
      if pgno="" or pgno<0 then pgno=1
      response.Cookies("onepage1")=8
 
      SET rs=server.createobject("adodb.recordset")
      SQL="SELECT * FROM  citycard_Image WHERE f_type<>'商家图片' and F_UserName ='"&m_ID&"'"
      rs.Open SQL,conn,1,1 

 if not rs.eof then
	 
	  rs.movefirst
	 
	   rs.pagesize=request.Cookies("onepage1")
	   maxpage=rs.pagecount
	   
	   if rs.recordcount>0 then
	      rs.movefirst
		  rs.absolutepage=cint(pgno)
		end if
	
		   preno=pgno-1
		   postno=pgno+1
	 
	end if

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>襄樊生活网-商家管理系统</title>
<link href="../css/Style.css" rel="stylesheet" type="text/css"><link href="../css/Menu.css" rel="stylesheet" type="text/css"><link href="../css/aCardList.css" rel="stylesheet" type="text/css"><SCRIPT src="../js/029bxw.js" type=text/javascript></SCRIPT>
<script language="JavaScript" type="text/JavaScript">
<!--



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
</head>

<body onLoad="MM_preloadImages('images/xf_link1b.gif','images/xf_link2b.gif','images/xf_link3b.gif','images/xf_link4b.gif','images/xf_link5b.gif','images/ly_b_2b.gif','images/ly_b_4b.gif','images/ly_b_1b.gif','images/ly_b_3b.gif','images/ly_b_5b.gif')">
<!--#include file="../Include/cardMenu.htm" -->
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="170" height="500" rowspan="2" valign="top" bgcolor="f5f5f5"> <!--#include file="Left.asp" --> </td>
    <td width="10" rowspan="2" valign="top"></td>
    <td width="600" height="343" valign="top"> 
      <!--#include file="Ad.asp" -->
      <table width="600" border="1" cellpadding="0" cellspacing="5" bordercolor="e2e2e2" bgcolor="f5f5f5">
        <tr> 
          <td height="25" background="images/about_bj.gif" class="p4">&nbsp;<b>·图片上传 <a href="#" onClick="MM_openBrWindow('Cityhot_upimages.asp','','top=130,width=453,height=230')"><font color="#FF0000">立刻上传</font></a></b></td>
        </tr>
      </table>
      <table width="600" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="5"></td>
        </tr>
        <tr> 
          <td height="1" background="images/line.gif" ></td>
        </tr>
      </table>
      <br>
      <table width="96%" border="0" align="center" cellpadding="3" cellspacing="1" bordercolor="#000000" bgcolor="#FFFFFF">
        <tr>
          <td width="10%" align="center" bgcolor="#EFEFEF"><strong>ID</strong></td>
          <td width="29%" bgcolor="#EFEFEF"><strong>图片显示</strong></td>
          <td width="34%" align="center" bgcolor="#EFEFEF"><strong>名称</strong></td>
          <td width="18%" align="center" bgcolor="#EFEFEF"><strong>发布时间</strong></td>
          <td width="9%" align="center" bgcolor="#EFEFEF"><strong>管理</strong></td>
        </tr>
        <tr>
          <td height="1" colspan="5" bgcolor="#CCCCCC"></td>
        </tr>
        <%
       j=0
       i=0
 do while not rs.eof and j<rs.pagesize
recno=(pgno-1)*rs.pagesize+1
i = i + 1
if i mod 2 <> 0 then
%>
        <tr>
          <td height="24" align="center"><strong><%=i%></strong></td>
          <td><%
   		    Response.write "<a href = 'UploadImages/"&rs("F_Image")&"' target='_blank' ><img src='UploadImages/"&rs("F_Image")&"' width='75' height='82' border='0'></a>"
		  %>          </td>
          <td align="center"><%=rs("f_type")%></td>
          <td align="center"><font color="#999999"><%=rs("F_date")%></font></td>
          <td align="center"><a href='?type=delet&filename=<%=rs("F_image")%>&pageno=<%=pgno%>&delID=<%=rs("F_ID")%>'  onClick="{if(confirm('确定删除选定的纪录吗?')){return true;}return false;}">删除</a></td>
        </tr>
        <tr>
          <td height="24" align="center">&nbsp;</td>
          <td><%=rs("F_title")%></td>
          <td colspan="3" align="center"><%=left(rs("f_info"),10)%></td>
        </tr>
        <%else%>
        <tr>
          <td align="center" bgcolor="f5f5f5"><strong><%=i%></strong></td>
          <td bgcolor="f5f5f5"><%
   		    Response.write "<a href = 'UploadImages/"&rs("F_Image")&"' target='_blank' ><img src='UploadImages/"&rs("F_Image")&"' width='75' height='82' border='0'></a>"
		  %>          </td>
          <td align="center" bgcolor="f5f5f5"><%=rs("f_type")%></td>
          <td align="center" bgcolor="f5f5f5"><font color="#999999"><%=rs("F_date")%></font></td>
          <td align="center" bgcolor="f5f5f5"><a href='?type=delet&filename=<%=rs("F_image")%>&pageno=<%=pgno%>&delID=<%=rs("F_ID")%>'  onClick="{if(confirm('确定删除选定的纪录吗?')){return true;}return false;}">删除</a></td>
        </tr>
        <tr bgcolor="#F5F5F5">
          <td height="24" align="center">&nbsp;</td>
          <td><%=rs("F_title")%></td>
          <td colspan="3" align="center"><%=left(rs("f_info"),10)%></td>
        </tr>
        <%
  end if
  j=j+1
  rs.movenext
 loop
%>
        <% if rs.recordcount =0 then%>
        <tr>
          <td colspan="5" align="center">暂无图片！</td>
        </tr>
        <%end if%>
      </table></td>
    <td rowspan="2" valign="top">
	<!--#include file="Inc_Ser.asp"--></td>
  </tr>
  <tr>
    <td valign="top">
<%
 if rs.recordcount<>0 then
%>	
	<table width="96%" border="0" align="center" cellpadding="3" cellspacing="1" bordercolor="#000000">
     <form name="form1" method="post" action=""> 
	   <tr>
            <td bgcolor="f5f5f5">　共找到 [ <font color=ff0000><%=rs.recordcount%></font> 
              ] 条信息 
              <%
	  response.write "<a href='?pageno=1' title='首页' > 首页</a>"
	  if preno>0 then
	  Response.write "<a href='?pageno="&preno&"'title='上一页' > 上一页</a>"
	else
     response.write " 上一页" 
    end if
	
	if postno<=maxpage then
	  Response.write "<a href='?pageno="&postno&"' title='下一页' > 下一页</a>"
	else
    response.write " 下一页"
	end if
	Response.write "<a href='?pageno="&maxpage&"' title='末页'> 末页</a>"
	%>
              　 转到 
              <input name="pageno" type="text" id="pageno" size="4">
              页 第<font color="#FF0000"><%=pgno%></font>页/共 <font color=ff0000><%=maxpage%></font> 
              页</td>
        </tr>
	    </form>
      </table>
<%end if%>	  
<%
rs.close
set rs = nothing
%>    </td>
  </tr>
</table>
<!--#include file="../Include/CopyRight.htm" -->
</body>
</html>
