<!--#include file="ljconn.asp"-->
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../img/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {
	font-size: 12px;
	font-weight: bold;
}
.style3 {font-size: 12px}
.style4 {font-size: 12; }
-->
</style>
</head>
<body>
<%
'//删除商品
selectbookid=request("selectbookid")
key=request("key")
'selectm=request("selectm")
px=request("px")
if selectbookid<>"" then
conn.execute "delete from jl where id in ("&selectbookid&")"
response.Redirect "managejl.asp?px="&request("px")&"&key="&request("key")&""
conn.close
set conn=nothing
response.End
end if
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> 
<form name="form1" method="post" action="managejl.asp?px=<%=request("px")%>&key=<%=request("key")%>">
<td height="100"> 
<%'开始分页
set rs=server.CreateObject("adodb.recordset")
select case request("px")
case ""
rs.open "select id,xm,adddate,px from jl order by id desc",conn,1,1
flag="师资队伍"

case 2015
rs.open "select id,xm,adddate,px from jl where jgid="&cint(request.querystring("jgid"))&" order by id desc",conn,1,1
flag="师资队伍"


case 2008
rs.open "select id,xm,adddate,px from jl where id like '%"+key+"%' order by id desc",conn,1,1
flag="师资队伍"
case 2009
rs.open "select id,xm,adddate,px from jl where xm like '%"+key+"%' order by id desc",conn,1,1
flag="师资队伍"
end select'else
%>
<table class="tableBorder" width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
  <tr>
    <td colspan="4" align="center" background="img/admin_bg_1.gif"><span class="style2"><font color="#ffffff"><%=flag%>查看与修改</font></span></td>
  </tr>
  <tr>
    <td colspan="6" align="left" bgcolor="#D7D7FF"></td>
  </tr>
  <tr bgcolor="#E8F1FF">
    <td width="7%" align="center"><span class="style3">Id</span></td>
    <td align="center"><span class="style3">名称</span></td>
    <td width="18%" align="center"><span class="style3">加入时间</span></td>
    <td width="9%" align="center"><span class="style3">选 择</span></td>
  </tr>
  <%if rs.recordcount=0 then%>
  <tr>
    <td colspan=6><span class="style3">抱歉,没找到你想要的!<a href="managejl.asp">返回>>></a></span></td>
  </tr>
  <%else%>
  <%
	if not isempty(request("page")) then
      					currentPage=cint(request("page"))
   					else
      					currentPage=1
   					end if
					rs.pagesize=12
   					totalPut=rs.recordcount '记录总数    
   					totalPage=rs.pagecount    
   					MaxPerPage=rs.pagesize    
      				if currentpage<1 then    
          				currentpage=1    
      				end if    
      				if currentpage>totalPage then    
          				currentpage=totalPage    
      				end if    
   					if currentPage=1 then    
      					showContent    
                        showpages1
    				else    
         				if (currentPage-1)*MaxPerPage<totalPut then    
         					rs.move  (currentPage-1)*MaxPerPage    
         					dim bookmark    
         					bookmark=rs.bookmark '移动到开始显示的记录位置    
         					showContent    
                  showpages1
      					end if    
   					end if    
					%>
  <%sub showContent   
					dim i
					%>
  <%for i=1 to rs.pagesize%>
  

  <tr bgcolor="#E8F1FF">
    <td height="20" align="center" class="style3"><a href="editjl.asp?id=<%=rs("id")%>"><%=rs("id")%></a></td>
    <td width="28%" class="style3" style='PADDING-LEFT: 10px'>
      <a href="editjl.asp?id=<%=rs("id")%>"><% if len(trim(rs("xm")))>18 then
			response.write left(trim(rs("xm")),18)&".."
			else
			response.write trim(rs("xm"))
			end if%></a></td>
    <td align="center"><span class="style4"><%=rs("adddate")%></span></td>
    <td align="center"><input name="selectbookid" type="checkbox" id="selectbookid" value="<%=rs("id")%>">    </td>
  </tr>
  <%rs.movenext
  if rs.eof then exit for
  next
  %>
  <%end sub%>
  <%
sub showpages1()     
dim n     
n=totalPage
%>
  <tr align="center" bgcolor="#E8F1FF">
    <td height="20" colspan="6"><span class="style3">
      <% If currentPage <> 1 Then %>
&nbsp;<a href="managejl.asp?Page=1&px=<%=px%>&key=<%=key%>" class="top">首页</a>&nbsp;<a href="managejl.asp?Page=<%=(currentPage-1)%>&px=<%=px%>&key=<%=key%>" class="top">上一页</a>
      <%else%>
&nbsp;首页&nbsp;上一页
      <% End If %>
      <% If currentPage <> rs.PageCount Then %>
      <a href="managejl.asp?Page=<%=(currentPage+1)%>&px=<%=px%>&key=<%=key%>" class="top">下一页</a>&nbsp;<a href="managejl.asp?Page=<%=totalPage%>&px=<%=px%>&key=<%=key%>" class="top">尾页</a>
      <%else%>
      下一页&nbsp;尾页
      <% End If %>
      第<%=currentPage%>页/共<%=totalPage%>页&nbsp;共有<%=rs.RecordCount%>条</span></td>
  </tr>
  <%end sub%>
  <tr bgcolor="#E8F1FF">
    <td height="30" colspan="4" align="right"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="85%" align="center"><table width="98%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="center" valign="middle"><span style="display:none;"><a href="?px=2015&jgid=1" class="style3">学者</a>&nbsp;&nbsp;<a href="?px=2015&jgid=2" class="style3">成员</a>&nbsp;&nbsp;<a href="managejl.asp" class="style3">全部</a></span></td>
          </tr>
        </table></td>
        <td width="15%" align="right"><span class="style3 style3">全选
            <input type="checkbox" name="checkbox" value="Check All" onClick="mm()">
            <input type="submit" name="Submit" value="删 除" onClick="return test();">
        </span></td>
      </tr>
    </table>      </td>
    </table>
<table width="12" height="7" border="0" cellpadding="0" cellspacing="0">
<tr> 
<td height=7></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<table class="tableBorder" width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
  <tr>
    <td colspan="2" align="center" background="img/admin_bg_1.gif"><span class="style3"><b><font color="#ffffff">查询</font></b></span></td>
  </tr>
  <tr bgcolor="#E8F1FF">
      <td height="50" align="left"><table border="0" align="center" cellpadding="0" cellspacing="0">
            <form name="form2" method="post" action="managejl.asp" onSubmit="return checkdata()">
<tr>
          <td width="200" align="center">
            <input name="key" type="text" id="key"></td>
          <td width="120" align="center">
            <select name="px" id="px">
              <option value="2008">按ID</option>
              <option value="2009">按名称</option>
            </select></td>
          <td width="40" height="30" align="center">
            <input type="submit" name="Submit2" value="查 询"></td>
        </tr>
          </form>
</table>
  </tr>
</table>
<!--#include file="copyright.asp"-->
<%end if
rs.close 
set rs=nothing
conn.close   
set conn=nothing
%>
</body>
</html>
<script>
function test()
{
  if(!confirm('确认删除吗？')) return false;
}
</script>
<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;
   }
}
</script>
