📄 search_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import liangjuyan.conndb;
import liangjuyan.chStr;
public final class search_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=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", 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");
out.write("\t\r\n");
out.write(" ");
conndb conn = new conndb();
chStr chStr=new chStr();
String key=chStr.chStr(request.getParameter("key"));
ResultSet rs_haha = conn.executeQuery("select top 3 id,title ,detail from haha ");
String s_title="";
String s_detail="";
String df=request.getParameter("df");
String sql="";
if(!df.equals("")&&!df.equals(null)){if(df.equals("fuzhuang")){sql="select * from fuzhuang";}
else{
if(df.equals("shipin")){sql="select * from shipin";}
else{
if(df.equals("shenghuoyongpin")){sql="select * from shenghuoyongpin";}
else{sql="select * from qita";}}}
if(!key.equals("") && !key.equals(null)){
sql=sql+" where wupinming like '%"+key+"%'";
}
}
else{out.print("请选择类别");}
ResultSet rs_search=conn.executeQuery(sql);
int fuzhuangid=0;
int shipinid=0;
int shenghuoyongpinid=0;
int qitaid=0;
String s_wupinming ="";
String s_yanse="";
String s_changjia ="";
String s_cailiao = "";
String s_shiyongnianxian = "";
String s_shengchanriqi = "";
String s_goumaichishu = "";
String s_tuijianzhishu = "";
String s_youdian = "";
out.write("\r\n");
out.write("<script src=\"JS/check.jsp\"></script>\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title></title>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
out.write("\r\n");
out.write("<style type=\"text/css\">\r\n");
out.write("<!--\r\n");
out.write("body {\r\n");
out.write("\tmargin-top: 0px;\r\n");
out.write("}\r\n");
out.write("-->\r\n");
out.write("</style></head>\r\n");
out.write("<body>\r\n");
out.write(" ");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "daohang.jsp", out, false);
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "dz.jsp", out, false);
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "zhongjian.jsp", out, false);
out.write("\r\n");
out.write(" <table width=\"760\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"230\" height=\"29\" valign=\"top\">");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "aa.jsp", out, false);
out.write("</td>\r\n");
out.write(" <td width=\"518\" align=\"right\" valign=\"top\"><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" >\r\n");
out.write(" <tr>\r\n");
out.write(" <td valign=\"top\"><table width=\"95%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" >\r\n");
out.write(" <tr valign=\"bottom\">\r\n");
out.write(" <td width=\"100%\" height=\"44\" colspan=\"3\" valign=\"top\"><img src=\"images/image92.gif\" width=\"564\" height=\"43\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"45\" colspan=\"3\" valign=\"top\"><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" >\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"58%\">\r\n");
out.write(" 士大夫急口令三联单机石蜡扩大飞机三联单解放似的可怜见法三联单看见发生大立刻副教授机劳动力看法集散地立刻法集散地立刻解放第十六艰苦犯得上了解发生角动量三联单机大家立刻机了 </td>\r\n");
out.write(" <td width=\"19%\"><div align=\"center\"><img src=\"images/1234.jpg\" width=\"70\" height=\"70\"></div></td>\r\n");
out.write(" <td width=\"23%\"><div align=\"center\"><img src=\"images/1234.jpg\" width=\"100\" height=\"100\"></div></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"45\" colspan=\"3\" valign=\"top\"><img src=\"images/image93.gif\" width=\"564\" height=\"43\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"114\"><table height=\"40\" cellpadding=\"0\" cellspacing=\"0\" >\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"562\" height=\"40\" background=\"images/99.gif\" > </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table><table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#cccccc\">\r\n");
out.write(" \r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"568\" height=\"64\" valign=\"top\"><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#cccccc\" bgcolor=\"#e5edff\">\r\n");
out.write(" \r\n");
out.write(" <tr>\r\n");
out.write(" <td valign=\"top\"> <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"1\" bordercolor=\"#cccccc\" background=\"images/beijing.png\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"7%\" height=\"31\"><div align=\"center\">编号</div></td>\r\n");
out.write(" <td width=\"9%\" height=\"31\"><div align=\"center\">物品名</div></td>\r\n");
out.write(" <td width=\"7%\" height=\"31\"><div align=\"center\">颜色</div></td>\r\n");
out.write(" <td width=\"7%\" height=\"31\"><div align=\"center\">厂家</div></td>\r\n");
out.write(" <td width=\"7%\" height=\"31\"><div align=\"center\">材料</div></td>\r\n");
out.write(" <td width=\"12%\" height=\"31\"><div align=\"center\">使用年限</div></td>\r\n");
out.write(" <td width=\"12%\" height=\"31\"><div align=\"center\">生产日期</div></td>\r\n");
out.write(" <td width=\"11%\" height=\"31\"><div align=\"center\">购买次数</div></td>\r\n");
out.write(" <td width=\"10%\" height=\"31\">推荐指数</td>\r\n");
out.write(" <td width=\"9%\" height=\"31\"><div align=\"center\">优点</div></td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
while (rs_search.next()) {
if(df.equals("fuzhuang")){
fuzhuangid=rs_search.getInt("fuzhuangid");}
else{
if(df.equals("shipin")){ shipinid=rs_search.getInt("shipinid");}
else{ if(df.equals("shenghuoyongpin")){shenghuoyongpinid=rs_search.getInt("shenghuoyongpinid");}
else { qitaid=rs_search.getInt("qitaid");}
}
}
s_wupinming = rs_search.getString("wupinming");
s_yanse = rs_search.getString("yanse");
s_changjia = rs_search.getString("changjia");
s_cailiao = rs_search.getString("cailiao");
s_shiyongnianxian = rs_search.getString("shiyongnianxian");
s_shengchanriqi = rs_search.getString("shengchanriqi");
s_goumaichishu= rs_search.getString("goumaichishu");
s_tuijianzhishu= rs_search.getString("tuijianzhishu");
s_youdian= rs_search.getString("youdian");
out.write("\r\n");
out.write(" <tr>\r\n");
out.write(" ");
if(df.equals("fuzhuang")){
out.write("<td height=\"31\"><a href=\"fuzhuang_detail.jsp?ID=");
out.print(fuzhuangid);
out.write('"');
out.write('>');
out.print(fuzhuangid);
out.write("</a></td>\r\n");
out.write(" ");
}
else{if(df.equals("shipin")){
out.write("<td height=\"31\"><a href=\"shipin_detail.jsp?ID=");
out.print(shipinid);
out.write('"');
out.write('>');
out.print(shipinid);
out.write("</a></td>");
}
else{if(df.equals("shenghuoyongpin")){
out.write("<td height=\"31\"><a href=\"shenghuoyongpin_detail.jsp?ID=");
out.print(shenghuoyongpinid);
out.write('"');
out.write('>');
out.print(shenghuoyongpinid);
out.write("</a></td>");
}
else{
out.write("<td height=\"31\"><a href=\"qita_detail.jsp?ID=");
out.print(qitaid);
out.write('"');
out.write('>');
out.print(qitaid);
out.write("</a></td>");
}
}}
out.write("\r\n");
out.write(" <td height=\"31\">");
out.print(s_wupinming);
out.write("</td>\r\n");
out.write(" <td height=\"31\">");
out.print(s_yanse);
out.write("</td>\r\n");
out.write(" <td height=\"31\">");
out.print(s_changjia);
out.write("</td>\r\n");
out.write(" <td height=\"31\">");
out.print(s_cailiao);
out.write("</td>\r\n");
out.write(" <td height=\"31\">");
out.print(s_shiyongnianxian);
out.write("</td>\r\n");
out.write(" <td height=\"31\">");
out.print(s_shengchanriqi);
out.write("</td>\r\n");
out.write(" <td width=\"3%\" height=\"31\">");
out.print(s_goumaichishu);
out.write("</td>\r\n");
out.write(" <td width=\"3%\" height=\"31\">");
out.print(s_tuijianzhishu);
out.write("</td>\r\n");
out.write(" <td width=\"3%\" height=\"31\">");
out.print(s_youdian);
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
}
out.write("\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\t</td>\r\n");
out.write(" </tr>\r\n");
out.write("</table> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write("</table>\r\n");
out.write("\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
out.write(" ");
conn.close();
out.write('\r');
out.write('\n');
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -