<!--#include file="conn.asp"-->
<!--#include file="adminset.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
end if
if session("flag")>2 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
if qx14<>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
%>
<html>
<head>
<title>网软志成在线购物系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style2 {color: #FF0000}
-->
</style>
</head>

<body><div align="center">
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="1%" height="28">&nbsp;</td>
      <td width="99%"><table width="100%" border="0" cellspacing="0" cellpadding="5">
          <tr>
            <td width="77%" height="27" style="font-size:14px;color:#ffffff">&nbsp;<strong><font color="#000000">网软志成购物后台管理系统 &gt;&gt; 系统管理 &gt;&gt; 公告列表 </font></strong></td>
            <td width="23%" style="font-size:14px;color:#ffffff"><span class="style2">* 为必添项目</span></td>
          </tr>
      </table></td>
    </tr>
  </table>
  <table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/right_top2.gif">
    <tr>
      <td width="1%">&nbsp;</td>
      <td width="99%"><table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="25">&nbsp;&nbsp;<a href="web_gonggao1_add.asp" class="style2">添加新公告</a></td>
          </tr>
      </table></td>
    </tr>
  </table>
  <form method="POST" action="web_gonggao1_del.asp" name="form1">
    <div align="center">
      <table width="95%" border="0" cellpadding="3" cellspacing="1" bgcolor="#999999">
        <tr bgcolor="#cccccc">
          <td height="23">&nbsp;&nbsp;最新公告主题</td>
          <td height="23"><div align="center">发布人</div></td>
          <td width="19%" align="center">发布时间</td>
          <td align="center">会员类型</td>
          <td align="center">修改</td>
          <td width="7%" align="center">删除</td>
        </tr>
  
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_usergg  ORDER BY id DESC",conn,3,1
if rs.eof then
         %>
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
     <tr>
       <td align=center>暂无信息!</td>
     </tr>
   </table>
		 <%
           else 
        rs.PageSize =12 '每页记录条数
		iCount=rs.RecordCount '记录总数
		iPageSize=rs.PageSize
    	maxpage=rs.PageCount 
    	page=request("page")
    	per_page=rs.PageSize
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	For i=0 To x-1
  %>

        <tr bgcolor="#F3F3F3">
          <td width="38%" height="23">&nbsp; <a href="web_gonggao1_edit.asp?id=<%response.write rs("id")%>">
            <%response.write rs("zt")%>
          </a> </td>
          <td width="14%"><div align="center">
              <%response.write rs("fbr")%>
          </div></td>
          <td width="19%" align="center">
          <%response.write rs("adddate")%>          </td>
          <td width="14%" align="center">
            <%if rs("lx")=0 then%>
          所有会员
          <%elseif rs("lx")=1 then%>
          普通会员
          <%elseif rs("lx")=2 then%>
          VIP会员
          <%elseif rs("lx")=3 then%>
          批发会员
          <%end if%>          </td>
          <td width="8%" align="center"><a href="web_gonggao1_edit.asp?id=<%=rs("id")%>">修改</a></td>
          <td width="7%" align="center">
          <input type="checkbox" name="de" value="<%response.write rs(0)%>"></td>
        </tr>
        <%
            rs.movenext
            next%>
      </table>

        <br>
        <input type="submit" value="删除" name="B1"  class="go-wenbenkuang">
&nbsp;
      <input type="reset" value="重选" name="B2"  class="go-wenbenkuang">
      全选
      <input type="checkbox" name="checkbox" value="checkbox" onClick="return mm()">

     
    </div>
  </form>
    <%call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>",per_page)%>
</div>

    <%rs.close 
conn.close%>
  </center>
</div>      <br>
<!--#include file="page.asp"-->
<%end if%>
<!--#include file="copyright.asp"-->
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>
  <script language=javascript>
function mm()
{
   var a = document.getElementsByTagName("input");
   if(form1.checkbox.checked==false){
   for (var i=0; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = false;
   }
   else
   {
   for (var i=0; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = true;
   }
}
</script>
</p>
