gusucode.com > ASP+ACCESS在线教育系统设计(源代码+论文) > ASP+ACCESS在线教育系统设计(源代码+论文)\王智_在线教育系统\teacher\problemadmin.asp

    <%@  Language = "VBScript"  %>
<!-- #Include file="..\include\adovbs.inc" -->
<!-- #Include file="..\include\cod_ado.inc" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<!-- #Include file="..\include\style.inc" -->
</head>
<body>
<%
	strPage = Request.queryString("page")
	
	dim objCnn,rs
	strDSN = Application("dsn")
	strSQL = "select id,title,flag_answer from problems where flag_show=true order by id desc"
	cod_AdoOpen objCnn,rs,strDSN,strSQL
%>

<table border="0" cellspacing="1" width="600">
<tr><td colspan="4">

<%
	if rs.RecordCount>0 then 
		sumcount = rs.RecordCount
		rs.MoveFirst
	end if
		rs.PageSize = 12	
		intPageCount = rs.PageCount
		if Len(strPage) = 0 then strPage = "1"
		if int(strPage)<1 then strPage = "1"
		'if int(strPage)>intPageCount then strPage = CStr(intPageCount)
		if rs.eof then 
%>
<p>对不起,没有您要找的内容。</p></td></tr></table>
<%			
			response.end 
		end if
		rs.absolutepage=cint(strpage)
%>

<p align="center">[本页是第<%=int(strPage)%>/<%=intPageCount%>页] <% 
		if int(strPage)>1 then
%> 
[<a href="problemadmin.asp?page=<%=CStr( int(strPage)-1 )%>">前一页</a>] <%
		end if
%> <% 
		if int(strPage)<intPageCount then
%> [<a href="problemadmin.asp?page=<%=CStr( int(strPage)+1 )%>">下一页</a>] <%
		end if
%> </p>
<form action method="POST" id="form1" name="form1">
</td></tr>

<tr class="tr3">
    <td width="50" ALIGN="CENTER">标记</td>
    <td width="50" align="center">序号</td>
    <td width="400" align="center">标题</td>
    <td width="100" align="center">回答标志</td>
</tr>

<% 
dim flagcolor,classtype
flagcolor = true

for intRecord = 1 To rs.PageSize 
	if rs.EOF then 
		exit for
	end if

	flagcolor = not (flagcolor)	
	if (flagcolor) then 
		classtype = "tr1"
	else 
		classtype = "tr2"
	end if
%>
<tr class="<%=classtype%>">
    <td width="10%" ALIGN="CENTER"><input TYPE="CHECKBOX" NAME="id" VALUE="<%=rs("id")%>"></td>
    <td width="10%" align="center"> <%=sumcount-12*(cint(strpage)-1)-intRecord+1%> </td>
    <td width="70%"><a href="problem_detail.asp?ID=<%=rs("ID")%>&amp;page=<%=strpage%>"><%=rs("title")%></a></td>
    <td width="10%">
    <%
    if rs("flag_answer") = true then
		Response.Write "已回答"
	else
		Response.Write "未回答"
	end if
    %>
    </td>
  </tr>
<%
	rs.MoveNext			
Next 
%>
<tr><td colspan="4">
<p align="center">[本页是第<%=int(strPage)%>/<%=intPageCount%>页] <% 
		if int(strPage)>1 then
%> 
[<a href="problemadmin.asp?page=<%=CStr( int(strPage)-1 )%>">前一页</a>] <%
		end if
%> <% 
		if int(strPage)<intPageCount then
%> [<a href="problemadmin.asp?page=<%=CStr( int(strPage)+1 )%>">下一页</a>] <%
		end if
%> </p>
<input type="hidden" name="page" value="<%=strpage%>">
</form>
<input type="button" value="删除" id="btndel" name="btndel">
</td></tr>
</table>

<script language="vbscript">
'sub item_delete(no)
'	value = msgbox("确定要删除号码为" & no & "的问题吗?",1,"清华网络学堂")
'	if value = 1 then
'		form1.id.value = id
'		form1.submit
'	end if
'end sub
sub btndel_onclick
	msg="确定要删除所有带有标记的问题吗?"
	if msgbox(msg,1,"清华网络学堂")=1 then
		form1.action ="problemdelete.asp"
		form1.submit
	end if
end sub
</script>
<%
call cod_AdoClose(objCnn, rs)
%>
</body>
</html>