package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
public final class docShow_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
bean.petBean sbean = null;
synchronized (session) {
sbean = (bean.petBean) _jspx_page_context.getAttribute("sbean", PageContext.SESSION_SCOPE);
if (sbean == null){
sbean = new bean.petBean();
_jspx_page_context.setAttribute("sbean", sbean, PageContext.SESSION_SCOPE);
}
}
out.write('\r');
out.write('\n');
db.liangjie Conn = null;
synchronized (session) {
Conn = (db.liangjie) _jspx_page_context.getAttribute("Conn", PageContext.SESSION_SCOPE);
if (Conn == null){
Conn = new db.liangjie();
_jspx_page_context.setAttribute("Conn", Conn, PageContext.SESSION_SCOPE);
}
}
out.write('\r');
out.write('\n');
request.setCharacterEncoding("GBK");
response.setCharacterEncoding("GBK");
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>petShow</title>\r\n");
out.write("<style type=\"text/css\">\r\n");
out.write(" <!--\r\n");
out.write(" body {\r\n");
out.write(" background-image: url(image/bengjing1.jpg);\r\n");
out.write(" }\r\n");
out.write(" .STYLE1 {color: #FF0000}\r\n");
out.write(" .STYLE3 {color: #9966FF}\r\n");
out.write(" .STYLE4 {color: #0000FF; }\r\n");
out.write(" -->\r\n");
out.write("</style>\r\n");
out.write("</head>\r\n");
out.write("<body bgcolor=\"#ffffff\">\r\n");
out.write("<div align=\"center\">\r\n");
out.write(" <h1 class=\"STYLE1\">兽医信息</h1>\r\n");
out.write("</div>\r\n");
out.write("<div align=\"center\">\r\n");
out.write(" <table width=\"768\" border=\"1\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"94\">\r\n");
out.write(" <div align=\"center\">兽医编号</div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"118\">\r\n");
out.write(" <div align=\"center\">兽医姓名</div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"109\">\r\n");
out.write(" <div align=\"center\">兽医性别</div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"99\">\r\n");
out.write(" <div align=\"center\">专业</div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"97\">\r\n");
out.write(" <div align=\"center\">地址</div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"97\">\r\n");
out.write(" <div align=\"center\">联系电话</div>\r\n");
out.write(" </td>\r\n");
out.write(" <!--<td width=\"63\"><div align=\"center\">添加</div></td>-->\r\n");
out.write(" <td width=\"70\">\r\n");
out.write(" <div align=\"center\">删除</div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"66\">\r\n");
out.write(" <div align=\"center\">修改</div>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
try {
String oname = request.getParameter("select");
String zhuanye=request.getParameter("select2");
if (oname != null) {
ResultSet rs = sbean.petSelect("select * from doctor where dname='" + oname + "'");
while( rs.next()){
int id =rs.getInt(1);
String Id=String.valueOf(id).toString();
String name=rs.getString(2);
out.println("<tr><td width=600><div align=\"center\">" + Id + "</div></td>");
out.println("<td width=600><div align=\"center\">" + name + "</div></td>");
out.println("<td width=600><div align=\"center\">" + rs.getString(3) + "</div></td>");
out.println("<td width=600><div align=\"center\">" + rs.getString(4) + "</div></td>");
out.println("<td width=600><div align=\"center\">" + rs.getString(5) + "</div></td>");
out.println("<td width=600><div align=\"center\">" + rs.getString(6) + "</div></td>");
//out.print("<td width=600><div align=\"center\"><a href=\"addpet.jsp?id="+id+"\"'>"+"添加"+"</a>"+"</div></td>");
out.print("<td width=600><div align=\"center\"><a href=\"docdelservlet?id=" + id + "\"'>" + "删除" + "</a>" + "</td>");
out.print("<td width=600><div align=\"center\"><a href=\"docupdata.jsp?id=" + id + "\"'>" + "修改" + "</a>" + "</div></td></tr>");
}
}
else if(zhuanye!=null)
{
ResultSet rs = sbean.petSelect("select * from doctor where dtype='" + zhuanye + "'");
while( rs.next()){
int id =rs.getInt(1);
String Id=String.valueOf(id).toString();
String name=rs.getString(2);
out.println("<tr><td width=600><div align=\"center\">" + Id + "</div></td>");
out.println("<td width=600><div align=\"center\">" + name + "</div></td>");
out.println("<td width=600><div align=\"center\">" + rs.getString(3) + "</div></td>");
out.println("<td width=600><div align=\"center\">" + rs.getString(4) + "</div></td>");
out.println("<td width=600><div align=\"center\">" + rs.getString(5) + "</div></td>");
out.println("<td width=600><div align=\"center\">" + rs.getString(6) + "</div></td>");
//out.print("<td width=600><div align=\"center\"><a href=\"addpet.jsp?id="+id+"\"'>"+"添加"+"</a>"+"</div></td>");
out.print("<td width=600><div align=\"center\"><a href=\"docdelservlet?id=" + id + "\"'>" + "删除" + "</a>" + "</td>");
out.print("<td width=600><div align=\"center\"><a href=\"docupdata.jsp?id=" + id + "\"'>" + "修改" + "</a>" + "</div></td></tr>");
}
}
else {
ResultSet rs = sbean.petSelect("select * from doctor");
while (rs.next()) {
int id = rs.getInt(1);
out.println("<tr><td width=600><div align=\"center\">" + id + "</div></td>");
out.println("<td width=600><div align=\"center\">" + rs.getString(2) + "</div></td>");
out.println("<td width=600><div align=\"center\">" + rs.getString(3) + "</div></td>");
out.println("<td width=600><div align=\"center\">" + rs.getString(4) + "</div></td>");
out.println("<td width=600><div align=\"center\">" + rs.getString(5) + "</div></td>");
out.println("<td width=600><div align=\"center\">" + rs.getString(6) + "</div></td>");
//out.print("<td width=600><div align=\"cen