www.gusucode.com > ASP+ACCESS在线教育系统设计(源代码+论文) > ASP+ACCESS在线教育系统设计(源代码+论文)\王智_在线教育系统\teacher\bulletin.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,idnum,title,inputdate from board order by idnum desc" cod_AdoOpen objCnn,rs,strDSN,strSQL %> <% 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 %> <form action="bulletin_new.asp" method="POST" id="form1" name="form1"> <input type="submit" value="新增" id="btnnew" name="btnnew"> </form> <% response.end end if rs.absolutepage=cint(strpage) %> <table border="0" cellspacing="1" width="600"> <tr><td colspan="3"> <p align="center">[本页是第<%=int(strPage)%>/<%=intPageCount%>页] <% if int(strPage)>1 then %> [<a href="bulletin.asp?page=<%=CStr( int(strPage)-1 )%>">前一页</a>] <% end if %> <% if int(strPage)<intPageCount then %> [<a href="bulletin.asp?page=<%=CStr( int(strPage)+1 )%>">下一页</a>] <% end if %> </p> </td></tr> <tr class="tr3"> <td width="50" ALIGN="CENTER">标记</td> <td width="50" align="center">序号</td> <td width="500" align="center">标题</td> </tr> <form action method="POST" id="form1" name="form1"> <% 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 ALIGN="CENTER"><input TYPE="CHECKBOX" NAME="id" VALUE="<%=rs("id")%>"></td> <td align="center"> <%=sumcount-12*(cint(strpage)-1)-intRecord+1%> </td> <td><a href="bulletin_detail.asp?ID=<%=rs("ID")%>&page=<%=strpage%>"><%=rs("title")%></a></td> </tr> <% rs.MoveNext Next %> <tr><td colspan="3"> <p align="center">[本页是第<%=int(strPage)%>/<%=intPageCount%>页] <% if int(strPage)>1 then %> [<a href="bulletin.asp?page=<%=CStr( int(strPage)-1 )%>">前一页</a>] <% end if %> <% if int(strPage)<intPageCount then %> [<a href="bulletin.asp?page=<%=CStr( int(strPage)+1 )%>">下一页</a>] <% end if %> </p> <input type="hidden" name="page" value="<%=strpage%>"> </form> <input type="button" value="新增" id="btnnew" name="btnnew"> <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 btnnew_onclick window.location = "bulletin_new.asp" end sub sub btndel_onclick msg="确定要删除所有带有标记的公告吗?" if msgbox(msg,1,"清华网络学堂")=1 then form1.action ="bulletindelete.asp" form1.submit end if end sub </script> <% call cod_AdoClose(objCnn, rs) %> </body> </html>