<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% if session("admid")="" or Session("class")<>"1" then response.redirect"login.asp"%>
<!--#include file="conn.asp"-->
<%sql="select * from online order by pdate desc"
rs.open sql,conn,1,1%>
      <%
dim page,tolpage,maxlist,pageno
maxlist=15		'//* 每页默认显示信息数 *//
if not isempty(request("page")) then 
pageno=cint(request("page"))
else
pageno=1
end if%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
.style1 {color: #FFFFFF}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body>
<table width="550"   border="1"  bordercolorlight="#006d63" bordercolordark="ffffff" align="center" cellpadding="2" cellspacing="0">
  <tr bgcolor="#006d63">
    <td height="25" colspan="6" align="center" class="style1">-=学院报名列表=-</td>
  </tr>
  <tr bgcolor="#88CEDF">
    <td width="47"><div align="center">序号</div></td>
    <td width="80" height="20"><div align="center">姓名</div></td>
    <td width="192"><div align="center">就读学校</div></td>
    <td width="97"><div align="center">时间</div></td>
    <td colspan="2"><div align="center">管理</div></td>
  </tr>
  <%if rs.eof and rs.bof then
	tolpage=0
	page=0
	pageno=0
else
	tolpage=rs.recordcount
	if tolpage mod maxlist=0 then
		page=tolpage\maxlist
	else
		page=tolpage\maxlist+1
	end if
	dim i
	rs.move (pageno-1)*maxlist
  i=1
  do while not rs.eof
  %><tr align="center">
    <td><%=i%></td>
    <td align="left"><%=rs("name")%>
    </td>
    <td align="left"><%=left(rs("school"),20)%></td>
    <td align="left"><%=rs("pdate")%></td>
    <td width="42">      <input name="Submit" type="button" style="position:relative; color:#ffffff; font_family: 宋体;font-size: 9pt; height: 19;background-color:#006d63;" onClick="MM_openBrWindow('view.asp?id=<%=rs("id")%>','报名详情','scrollbars=yes,width=400,height=500')" value="查看">    </td>
    <td width="42">      <input type="button" style="position:relative; color:#ffffff; font_family: 宋体;font-size: 9pt; height: 19;background-color:#006d63;" name="Submit" value="删除" onclick="javascript:if(confirm('确认删除？')){window.location.href='?action=del&id=<%=rs("id")%>';}else{return false;}">    </td>
  </tr><%i=i+1
  if i>=maxlist+1 then exit do
   rs.movenext
    loop
rs.close
  end if %>
  <tr>
    <td colspan="6"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" valign="top">
            <tr>
              <td align="center" >第<%=pageno%>/<%=page%>页</td>
              <td align="center">共<%=tolpage%>条信息</td>
              <td align="center" ><%if pageno>1 then%>
                  <a href="?page=<%=pageno-1%>" title="上一页">上一页</a>
                  <%else%>
      上一页
      <%end if%></td>
              <td align="center"><%if pageno<page then%>
                  <a href="?page=<%=pageno+1%>" title="下一页">下一页</a>
                  <%else%>
      下一页
      <%end if%></td>
              <%if page>1 then%>
              <td align="center" ><a href="?page=1" title="首页">首页</a></td>
              <td align="center" ><a href="?page=<%=page%>" title="尾页">尾页</a></td>
              <%else%>
              <td align="center" >首页</td>
              <td align="center">尾页</td>
              <%end if%>
              <td align="right" >跳转到:&nbsp;第</td>
              <td  align="center"><select name="select" onchange="javascript:window.location.href=this.options[this.selectedIndex].value" size="1">
                  <option value="?page=<%=pageno%>" selected><%=pageno%></option>
                  <%for i=1 to page%>
                  <option value="?page=<%=i%>"><%=i%></option>
                  <%Next%>
              </select></td>
              <td align="left">页</td>
            </tr>
    </table></td>
  </tr>
  
</table>
<%if request.QueryString("action")="del" then
set rs=conn.execute("delete from online where id="&request("id")&"")
response.redirect"?"
end if %>
</body>
</html>
