⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showimage.jsp

📁 音乐信息管理系统
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" language="java" 
    import="java.util.*,java.sql.*,music.*" %>
   <html>
   <head><title>图片查询结果</title></head>
   <body bgcolor=#772255>
   <br><br><br><br>
   <table  width="75%" height="151" border="0" align="center" cellpadding="0" callspacing="0">
   
   <%
    String name=LoadDriver.convert(request.getParameter("word"));
    int size=Integer.parseInt(LoadDriver.convert(request.getParameter("z")));
    DBManager db=DBManager.getInstance("localhost","music","root","589060");
    String sql=null;
    if(size==1)
    sql="select * from image where  size<50000 and id in (select imageid from own where singerid in (select id from singer where name='"+name+"'))";
    else if(size==2)
    sql="select * from image where  size>50000&&size<10000 and id in (select imageid from own where singerid in (select id from singer where name='"+name+"'))";
    else if(size ==3)
    sql="select * from image where  size>10000 and id in (select imageid from own where singerid in (select id from singer where name='"+name+"'))";
    else
   sql="select * from image where id in (select imageid from own where singerid in (select id from singer where name='"+name+"'))";
  
    ResultSet rs=db.executeQuery(sql);
    if(!rs.next())    
    out.print("没有相关记录!");
    else
    do
   {%>
   <tr><img src=<%=rs.getString(5).substring(1)%>  ></tr>
   <tr>图片名:<%=rs.getString(2)%></tr>
   <tr>大小(字节):<%=rs.getInt(3)%></tr>
   <tr> 格式:<%=rs.getString(4)%></tr>
   <tr> 浏览次数:<%=rs.getString(6)%></tr>
   <tr>
   <% out.print("<a href='do_download.jsp?location="+rs.getString(5)+"'>点击下载</a>"); %>
   </tr>
   <% 
   }while(rs.next());
   %>
   </table>
   </body>
   </html>
   

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -