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

📄 browsephoto.jsp

📁 在线相册系统-java与xml )是你的好帮手!
💻 JSP
字号:
<%@ page contentType="text/html;charset=GBK"%>
<%@ include file = "../admin/CheckPermission.jsp" %>
<%@ include file = "../config.jsp" %>

<jsp:useBean id="pictureAdmin" scope="page" class="com.mg.admin.PictureAdmin"/>
<%@ page import="com.mg.admin.*" %>
<%@ page import="java.util.*" %>

<html>
    <head>
        <meta http-equiv="Content-Language" content="zh-cn">
        <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
        <title>相片</title>
    </head><body>
    <p align="center"><font face="华文行楷" size="5">浏览照片</font></p>
    <br>
        
    <table border="0" cellspacing="16" style="border-collapse: collapse" 
        bordercolor="#111111" width="100%" id="AutoNumber2" height="280">
        
<%
    String uid = (String)session.getAttribute("UID");
    pictureAdmin.setRootPath(application.getRealPath("/data/"));
    Vector pictures = pictureAdmin.getPictures(uid); 
    int i = 0;
    while(i<pictures.size()) {
%>   
        
        <tr>
        
    <%
        //每行2列
        for(int j=0;j<2;j++,i++) {
            if (i<pictures.size()) {
                Picture picture = (Picture)pictures.get(i);
                if (picture!=null)  {
                    String path = application.getRealPath("/")  +
                                PictureAdmin.UP_LOAD_FOLDER + "\\" + uid +"\\"; 
                    String smallPath = path +  "small\\";
                    String filename = picture.getFileName();
                    if (pictureAdmin.createSmallPicture(picture, path, uid)){ 
    %>
            <td width="33%" height="217">
                <table border="0" cellspacing="0" 
                    width="100%" id="AutoNumber3" 
                    style="border-collapse: collapse; 
                    border-style: double; border-width: 0" 
                    bordercolor="#111111" height="100%" cellpadding="0">
                    <tr>
                        <td width="100%" colspan="2" 
                            style="border-left-width: 3; border-right-width: 3; 
                            border-top-width: 3; border-bottom-style: dashed; 
                            border-bottom-width: 1; border-left-style:double; 
                            border-right-style:double; border-top-style:double" 
                            height="12" background="../images/login_top_gb.JPG">
                            标题:<%=picture.getTitle()%>
                        </td>
                    </tr>
                    <tr>
                        <td width="60%" height="97" style="border-left-style: 
                            double; border-left-width: 3; border-bottom-style: 
                            double; border-bottom-width: 3">
                            <a href="photodetails.jsp?filename=<%=filename%>&title=<%=picture.getTitle()%>" 
                                target="mainFrame">
                                <img src="../upload_img/<%=uid%>/small/<%=filename%>">
                                </img>
                            </a>                            
                            
                        </td>
                        <td width="30%" height="97" style="border-right-style:
                            double; border-right-width: 3; 
                            border-bottom-style: double; 
                            border-bottom-width: 3" align=left>
                            <p align="left"><font size="1">
                            用户名:<%=uid%> <br>
                            时间: <%=picture.getDateTime()%></font>
                        </td>
                    </tr>
                </table>
            </td>
            <%
                            }
                        }//if (picture!=null) 
                    }//if (i<pictures.size())
                }//for(int j=0;j<2;j++,i++) {
            %>
        </tr>
        
<%
    }
%>        
        
    </table> </body>
</html>

⌨️ 快捷键说明

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