// Select page
<Form action = "Del. jsp" method = "Post" name = "list" id = "list">
<Table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
<Tr>
<TD> <Table width = "100%" border = "0" cellpadding = "0" cellspacing = "0">
<Tr>
<TD width = "32%" bgcolor = "# d4d0c8"> <strong> selected </strong> </TD>
<TD width = "36%" Height = "23" bgcolor = "# d4d0c8"> <strong> parent class name </strong> </TD>
<TD width = "32%" bgcolor = "# d4d0c8"> <strong> subclass name </strong> </TD>
</Tr>
<%
Int curpages = pagination. curpages (pagination. strpage (request, "page "));
Pagination. setrows (16 );
Resultset rs_countmongodbconn.exe cutequery ("select count (*) as t from class_ware ");
Rs_count.next ();
Int resultconts = rs_count.getint ("T ");
Int totalpages = pagination. getpages (resultconts );
Resultset rs1_pagination.getpageset(dbconn.exe cutequery ("select * From class_ware order by news_class"), curpages );
%>
<% Int I = 1; %>
<% While (Rs. Next () {%>
<Tr>
<TD> <input name = "ID" type = "checkbox" id = "select" value = "<% = Rs. getstring ("ID") %> "> </TD>
<TD Height = "23"> <% = Rs. getstring ("news_class") %> </TD>
<TD Height = "23"> <% = Rs. getstring ("news_subclass") %> </TD>
</Tr>
<Tr valign = "TOP" bgcolor = "# d4d0c8" class = "biaoge">
<TD Height = "1" colspan = "3"> </TD>
</Tr>
<%
I = I + 1;
If (I> 15)
Break;
}
%>
</Table>
<Div align = "right"> page <% = curpages %> total <% = totalpages %>
<%
If (curpages> 1)
{
%>
<A href = "./organ_list.jsp? Page = curPages-1 %> "> previous </a>
<% }%>
<%
If (curpages <totalpages)
{
%>
<A href = "./organ_list.jsp? Page = <% = curpages + 1%> "> next page </a>
<% }%>
& Nbsp; </div> </TD>
</Tr>
</Table>
<P align = "center">
<Input name = "submit3" type = "button" class = "area_self" value = "delete all selected organization information" onclick = "javascript: if (confirm ('Are you sure you want to delete it? ') List. Submit (); else return ">
<Input name = "table" type = "hidden" id = "table" value = "class_ware">
<Input name = "url" type = "hidden" id = "url" value = "news_class_add">
</P>
</Form>
// Execute the Deletion page
<% @ Page contenttype = "text/html; charset = gb2312" Language = "Java" Import = "Java. SQL. *" errorpage = "" %>
<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Title> untitled document </title>
</Head>
<JSP: usebean id = "dbconn" Scope = "page" class = "dbconn. dbconn"/>
<Body>
<% String teacher_name = (string) Session. getvalue ("teacher_name ");
If (teacher_name = NULL | teacher_name = "")
{
Response. sendredirect (".../../do/land. jsp ");
}
Else {
String sqlcheck = "select mark from teacher where name = '" + teacher_name + "'";
Resultset rscheckmongodbconn.exe cutequery (sqlcheck );
Rscheck. Next ();
String mark = rscheck. getstring ("mark ");
If (mark. Trim (). Equals ("info") | Mark. Trim (). Equals ("manager "))
{
String table = request. getparameter ("table ");
String url = request. getparameter ("url ");
String [] id = request. getparametervalues ("ID ");
For (INT I = 0; I <ID. length; I ++)
{
String SQL = "delete from" + Table + "where id = '" + id [I] + "'";
Dbconn.exe cuteupdate (SQL );
// Out. Print (SQL );
}
// Out. Print (URL );
Response. sendredirect (URL + ". jsp ");
}
Else
{
Out. Print ("Sorry, you have no permission to delete it. ");
}
}
%>
<%
Dbconn. closestmt ();
Dbconn. closeconn ();
%>
</Body>
</Html>