<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include file="conn.asp"-->
<%
dim cls
if session("admin")="" then
	Response.Redirect("admin.asp")	
end if

if request("action") = "save" then
     set rs=server.CreateObject("adodb.recordset")
     rs.open "select * from news where myid='公告'",conn,1,1
	 mycount = rs.recordcount
	 rs.close
	 
rs.open "select * from news where myid='公告'",conn,1,3
do while not rs.eof
set mrs = server.CreateObject("adodb.recordset")
   '--------------删除数据库链接-------------------
	if request("checkbox" & rs("id")) = "t1" then
			mrs.open "select * from news where id=" & rs("id"),conn,1,3
		    mrs.delete
			mrs.close
	end if	
	rs.movenext
loop
rs.close
set rs = nothing	 
set mrs = nothing
	 
end if

%>

<style type="text/css">
.top{
	border-bottom-width: 1px;
	border-bottom-style: dashed;
	border-bottom-color:#999999;
}
</style>
<script language="javascript">
function mm()
{
   var a = document.getElementsByTagName("input");
   if(a[0].checked==true){
   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;
   }
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function quer(){
 return confirm("您确认删除吗? 此操作无法恢复 !");
 }
</script>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body>
 <form name="form1" method="post" action="?action=save">
<div style="background-color:#FBF4F4;border: 1px solid #6699CC; margin-top:20px; width:90%; margin-left:7%; margin-right:auto;">
<table width="100%" align="center" cellpadding="6" cellspacing="0" bgcolor="#FBF4F4">
 

    <tr> 
      <td colspan="7" align="center" background="images/admin_bg_1.gif"><b><font color="#ffffff">公告设置</font></b></td>
    </tr>
    
    	
<%
id=request("id")
if id="" then
	id=1
end if
	
     set rs=server.CreateObject("adodb.recordset")
     rs.open "select * from news where myid='公告' order by id desc",conn,1,1
	 
if not rs.eof then
	 
	 rs.pagesize = 10 '每页大小
     rs.absolutepage=id '当前是第几页
	 
	 i=0
	 dd = rs.pagecount

	 
do while not rs.eof and i < 10
%>


<tr > 
      <td width="15%" height="30" align="center" valign="middle" bordercolor="#999999" class="top">标题：</td>
      <td width="20%" align="left" valign="middle" bordercolor="#999999" class="top"><A href="../news_show.asp?id=<%=rs("id")%>" title="<%=rs("title")%>" target="_blank"><%=left(rs("title"),10)%></A></td>
      <td width="18%" height="30" align="center" valign="middle" class="top"><%=rs("date")%></td>
      <td width="10%" align="center" valign="middle" class="top"><%=rs("zuozh")%></td>
      <td width="10%" align="center" valign="middle" class="top"><a href="Zone_up_up.asp?id=<%=rs("id")%>">编辑</a></td>
      <td colspan="2" align="center" valign="middle" bordercolor="#999999" class="top"><input type="checkbox" name="checkbox<%=rs("id")%>" value="t1"/></td>
      </tr>


<%
	i = i + 1
	rs.movenext
loop

else
%>
<tr > 
<td height="30" align="center" valign="middle" bordercolor="#999999" class="top">暂无内容</td>
    </tr>

<%
end if
%>

    
    <tr> 
      <td align="center">&nbsp;</td>
      <td align="center">&nbsp;</td>
      <td align="center">&nbsp;</td>
      <td align="center">&nbsp;</td>
      <td align="center">&nbsp;</td>
      <td width="10%" align="center">&nbsp;</td>
      <td width="11%" align="center">&nbsp;</td>
    </tr>

    
    
    <tr > 
      <td align="center" valign="middle">        　　　　　　　　　　　　　　　　　　　　</td>
      <td align="center" valign="middle">&nbsp;
　</td>
      <td align="center" valign="middle"><input type="submit" name="Submit" value=" 删除选中 " onclick="return quer()" /></td>
      <td align="center" valign="middle">&nbsp;</td>
      <td align="center" valign="middle">&nbsp;</td>
      <td colspan="2" align="left" valign="middle">
        <label>
		　　全选：        </label>        <input type="checkbox" name="checkbox2" value="checkbox" onclick="mm()" /></td>
      </tr>
</table>

<div style="width:100%;background-color:#FBF4F4;text-align:center;line-height:25px;height:40px;">
   <%
ta=request.ServerVariables("SCRIPT_NAME")

mysize = 5
%>
<p id="At3">
  <font face="宋体" color="#333333" size="3">页<% = id & "/" & dd  %></font> 
    
  <a href="<%= ta %>?page=4&id=1&dd=<%= mysize %>">【首页】</a>
  
<%if id=1 then%>

<font face="宋体" color="#333333" size="2"> 上一页</font>
 
 <%else%>  
   
  <a href="<%= ta %>?page=4&id=<%= id-1 %>">【上一页】</a>
<% end if  %>
  
<%if int(id) = int(dd) then %>

<font face="宋体" color="#333333" size="2"> 下一页</font>
  
<% else %>

<a href="<%= ta %>?page=4&id=<%= id + 1 %>">【下一页】</a>  
  
 <%end if%> 
  
  <a href="<%= ta %>?page=4&id=<%= dd %>">【尾页】</a>
  <label>
  <select name="jumpMenu" id="jumpMenu" onChange="MM_jumpMenu('self',this,0)" class="g_xz">
  <option>选择</option>
  
  <%for tt1=1 to dd%>
  
    <option value="<%= ta %>?page=4&id=<%= tt1 %>&dd=<%= mysize%>"><%=tt1%>页</option>
    
   <%next%> 
    
    </select>
  </label> 
 
<%
rs.close
set rs = nothing
%> 
 </div>
</div>
 </form>
<!--#include file="foot.asp"-->
</body>
</html>
