<!--#include file="WebConfig/Conn.asp"-->
<!--#include file="WebConfig/LoginYN.asp"-->
<!--#include file="WebConfig/Function.asp"-->
<html xmlns:v>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link type="text/css" rel="stylesheet" href="Css/BackStyle.css" />
<title></title>
<script language="javascript" src="Js/Nor.js"></script>
<script language="javascript" src="Js/checkBaseInfo.js"></script>
</head>
<%
If Request.Form("ck")<>"" Then

sql="select * from gaojian where id="&Request.Form("ck")
set rs=server.createObject("adodb.recordset") 
rs.open sql,conn,1,1 
if not rs.eof then 
arr="../"&rs("url")
set fso=createObject("Scripting.FileSystemObject") 
whichfile=server.mappath(arr) 
Set thisfile = fso.GetFile(whichfile) 
thisfile.delete True 
end if
rs.close 
set rs=nothing 

conn.Execute("Delete from gaojian where Id in ("&Request.Form("ck")&")")
End If
%>
<body>
<div id="BackBg">
	<v:RoundRect id="BackCo" strokeColor="#7EB977" arcsize=".01" Filled="T">
		<div id="BackDocTitle" class="B cW">管理学生投稿</div>
		<form id="BaseInfo" name="BaseInfor" method="post" action="">
		<div id="BackDoZone">
				<ul id="Ti" class="B">
					<p class="w5 bR">ID</p>
					<p class="w10 bR">姓名</a></p>
					<p class="w25 bR">班级</a></p>					
					<p class="w30 bR">文件地址</p>
					<p class="w10 bR">添加时间</p>
					<p class="w10 bR">下载</p>
					<p class="w10">选择</p>
				</ul>
				<%
					Set rsNews=Server.CreateObject("ADODB.RecordSet")
					rsNews.Open "Select * from gaojian  order by addtime desc ",conn,1,1
					If Not rsNews.Eof Then
						rsNews.PageSize=8
						Page=Cint(Request.QueryString("Page"))
						If Page<1 Then Page=1 End If
						If Page>rsNews.PageCount Then Page=rsNews.PageCount End If
						If rsNews.RecordCount<rsNews.PageSize Then CuPage=1 Else CuPage=Cint(rsNews.RecordCount/rsNews.PageSize) End If
						rsNews.AbsolutePage=Page
					End If
					for i=1 to rsNews.RecordCount
					If rsNews.Eof or i>rsNews.PageSize Then Exit for End If
				%>
				<ul id="Co">
					<p class="w5 bR bB"><%=rsNews("Id")%></p>
					<p class="w10 bR bB"><%=rsNews("name")%></p>
					<p class="w25 bR bB"><%=rsNews("class")%></p>					
					<p class="w30 bR bB" align="left" style="padding-left:5px"><%=right(rsNews("url"),28)%></p>
					<p class="w10 bR bB"  align="left" style="padding-left:5px"><%=rsNews("addTime")%></p>
					<p class="w10 bR bB"><input name="url" type="hidden" value="<%=rsNews("url")%>" /><a  href="../<%=rsNews("url")%>" target="_blank">下载</a></p>
					<p class="w10 bB"><input name="ck" type="checkbox" value="<%=rsNews("Id")%>" onClick="selectOne();" /></p>
				</ul>
				<%
					rsNews.MoveNext
					Next
				%>
		</div>
		<div id="BackPage">当前<%=CuPage%>页 每页 <%=rsNews.PageSize%> 信息 / 共<%=rsNews.PageCount%>页 共有 <span class="Red"><%=rsNews.RecordCount%></span> 条信息 <a href="?Page=1">首页</a> <a href="?Page=<%=Page-1%>">上一页</a> <a href="?Page=<%=Page+1%>">下一页</a> <a href="?Page=<%=rsNews.PageCount%>">尾页</a></div>
		<div id="BackBn"><input id="BnDel" disabled="disabled" type="button" value="删除所选内容"  onClick="confirmDel('BaseInfo');" /> 全选 <input name="Total" type="checkbox" onClick="selectAll(this);" /></div>	</form>
		
	
		
	</v:roundrect>
</div>
<%
	rsNews.Close
	Set rsNews=Nothing
%>
</body>
</html>
