<!--#include file="../inchuayuwebrlzywzhyweb/CONN.ASP"-->
<!--#include file="../inchuayuwebrlzywzhyweb/cls_huayuweb()^191563631.asp"-->
<!--#include file="../inchuayuwebrlzywzhyweb/cls_showpage.asp"-->
<!--#include file="../inchuayuwebrlzywzhyweb/cls_filemanagehycs.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<%oa.chkadmin()%>
<%
if oa.act<>"" then
dim id
id=request("id")
select case oa.act
       case "zd"
	   set rs=oa.execute("select zd from c_guestbook where id="&id)
	   if rs.eof then oa.msgshow("该留言不存在或已被管理员删除!")
	     if rs(0)=0 then
		 oa.execute("update c_guestbook set zd=1 where id="&id)
		 else
		 oa.execute("update c_guestbook set zd=0 where id="&id)
		 end if
		 response.Redirect(oa.tmpstr)
	   case "sh"
	   
	    set rs=oa.execute("select sh from c_guestbook where id="&id)
	   if rs.eof then oa.msgshow("该留言不存在或已被管理员删除!")
	     if rs(0)=0 then
		 oa.execute("update c_guestbook set sh=1 where id="&id)
		 else
		 oa.execute("update c_guestbook set sh=0 where id="&id)
		 end if
		 response.Redirect(oa.tmpstr)
	   case "del"
	    dim j
	    if instr(id,",")>0 then
		  id=split(id,",")
		  for j=0 to ubound(id)
		    call jj_del(id(j))
		  next
		else
		  call jj_del(id)
		end if
		call oa.msgshowurl("删除成功！",oa.tmpstr)
		
		
end select
End if



Sub jj_del(id)

  oa.execute("delete from c_guestbook where id="&id)
  
End Sub

  
%>
<link href="../inchuayuwebrlzywzhyweb/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE4 {font-weight: bold}
-->
</style>
<table width="98%" height="35" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" bgcolor="#6298E1" style="color:white"><div align="left"><strong><a href="admin_link_manage.asp?classname=linkimg"><font color="white"><strong>&nbsp;<img src="../img/Explain.gif" width="18" height="18" border="0" align="absmiddle" />&nbsp;</strong></font></a>预 约 信 息 管 理</strong><a href="Article_ArticleManage_ys.asp" class="STYLE4"></a></div></td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#6298E1">
  <form id="myform" name="myform" method="get" onsubmit="return CheckForm()" action="admin_lyb_manage.asp">
    <tr bgcolor="#FFFFFF">
      <td height="22" colspan="6"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="30">&nbsp;</td>
        </tr>
      </table></td>
    </tr>
  </form>
  <tr bgcolor="#FFFFFF">
    <td width="4%" height="22" align="center"><strong>选中</strong></td>
    <td width="14%" align="center"><strong>姓名</strong></td>
    <td width="26%" align="center"><strong>所在高中</strong></td>
    <td width="38%" align="center"><strong>电话</strong></td>
    <td width="6%" align="center">&nbsp;</td>
    <td width="12%" align="center"><strong>提交时间</strong></td>
  </tr>
  <form id="form1" name="form1" method="post" onsubmit="return check1()" action="admin_lyb_manage.asp">
    <%
  dim sqlstr,num,zd,hf,sh
num=oa.sqlrequest("num")
sh=oa.sqlrequest("sh")
zd=oa.sqlrequest("zd")
hf=oa.sqlrequest("hf")
if num="" or not isnumeric(num) then num=30
if sh<>"" then sqlstr=sqlstr&" and sh="&sh
if zd<>"" then sqlstr=sqlstr&" and zd="&zd
if hf<>"" then
if hf=0 then
sqlstr=sqlstr&" and hf<>''"
else
sqlstr=sqlstr&" and hf=''"
end if
end if
dim ors,irs,reccount,i
if not isobject(conn) then connectiondatabase
set ors=new cls_showopage
with ors
   
	.pagesize=num
	
	.sql="id,username,telephone,lxr,address,createdate,hf,zd,sh,sl,email$ from c_guestbook where 1=1"&sqlstr&"$id desc$id"
end with
reccount=ors.reccount
iRs=ors.ResultSet()	
if reccount<1 then
%>
    <tr bgcolor="#FFFFFF" onmouseover="this.style.backgroundColor='#BFDFFF'" onmouseout="this.style.backgroundColor=''">
      <td height="22" colspan="6" align="center">还未添加任何信息</td>
    </tr>
    <%
 Else
 
     For i=0 To Ubound(iRs,2)
%>
    <tr bgcolor="#FFFFFF" onmouseover="this.style.backgroundColor='#BFDFFF'" onmouseout="this.style.backgroundColor=''">
      <td height="22" align="center" ><input name="id" type="checkbox" id="id" value="<%=iRs(0,i)%>" /></td>
      <td style="padding-left:4px" ><div align="center"><%=irs(1,i)%></div></td>
      <td style="padding-left:4px"><div align="center"><%=iRs(10,i)%></div></td>
	  
      <td style="padding-left:4px"><div align="center"><%=iRs(2,i)%></div>
      <div align="center"></div>        <div align="center"></div>      <div align="center"></div></td>
      <td align="center">&nbsp;</td>
      <td style="padding-left:4px"><%=iRs(5,i)%></td>
    </tr>
    <%

  Next	
End If
 %>
    <tr bgcolor="#FFFFFF" >
      <td height="22" colspan="6"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="250" height="30"><input name="chkAll" type="checkbox" id="chkAll" onclick="CheckAll(this.form)" value="checkbox" />
            选中本页显示的所有信息 </td>
          <td><input name="submit" type='submit' value='删除选定的信息' />
                <input name="action" type="hidden" id="action" value="del" /></td>
        </tr>
      </table></td>
    </tr>
  </form>
</table>
<table width="98%" border="0" cellspacing="2" cellpadding="2" align="center">
  <tr>
    <td><%call ors.ShowPage1("a2")%>
    </td>
  </tr>
</table>
<script language="JavaScript" type="text/javascript">


  function check1()//表单判断
  {
   var str="";
   var j=0;
   var el=document.form1.getElementsByTagName("input")
   for(i=0;i<form1.length;i++){
    if(el[i].type=="checkbox"){
     if((el[i].checked)&&(el[i].name.indexOf("id")!='-1')){
      j++;
     }
    }
   }
   if(j > 100 || j<1)
   {
    alert("最少必须选择一项，最多不能超过100项!\r\t你现在选择了"+j+"项");
    return false;
   }
   
     if(!confirm("您确定要删除所选信息吗，并且不能恢复？"))
   {
    return false
   } 
   return true;
}

function unselectall()
{
    if(document.myform.chkAll.checked){
	document.myform.chkAll.checked = document.myform.chkAll.checked&0;
    } 	
}

function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.Name != "chkAll"&&e.disabled==false)
       e.checked = form.chkAll.checked;
    }
  }
  

function OpenWindows(xxid,wid,hei)
{
window.open(xxid,'','width='+wid+',height='+hei);
 
}

 
//-->
</script>