manage_head.jsp

来自「一个完整的门户网站,基于JSP环境下开发的,使用SQL数据库.」· JSP 代码 · 共 38 行

JSP
38
字号
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="com.bwm.model.Head" %>
<%@ page import="com.bwm.core.*" %><%if (!Crazyadept.UserIsOK(session,FinalConstants.STATUS_ADMIN)) return;%>
<html>
<head>
<title>manage_head</title>
</head>
<link href="../css/admin.css" rel="stylesheet" type="text/css">
<body bgcolor="#ffffff"> 
<table  border="1" cellpadding="0" cellspacing="0" class="tableBorder2"> 
  <tr align="center"> 
    <td colspan="4" class="TableTitle1">论坛头像管理</td> 
  </tr> 
  <tr> 
    <td colspan="3">&nbsp;</td> 
    <td align="center" width="25%"><a onClick="javascript:window.open('up_head.jsp','Menuhead','location=no,scrollbars=no,menubars=no,toolbars=no,resizable=yes,left=200,top=200,width=500,height=350');">上传新头像</a></td> 
  </tr> <%  BasetableFactory bf=BasetableFactory.getInstance();   int submit_page=ParamUtils.getIntParameter(request,"page");
        Collection coll=bf.ListHead(submit_page,"WHERE state="+FinalConstants.STATE_HEAD);   if(coll==null||coll.size()<=0){%> 
  <tr align="center"> 
    <td colspan="4">没有添加头像</td> 
  </tr> 
  <tr align="center">  <%
 }else{   Iterator it=coll.iterator();     int i=0;
            while(it.hasNext()){  Head head=(Head)it.next(); i++;%> 
    <td width="25%" align="center"><br> 
      <img src='../<%=head.getPath()%>' width="98" height="98"><br> 
      上传时间:<%=head.getAtime()%><br> 
      <a href="modify_head.jsp?action=del&iid=<%=head.getIid()%>" onClick="javascript:return confirm('你确定删头像吗?')">删除</a><br></td> 
    <%   if(i==4){ i=0; out.print("</tr>"); }   } if(i!=0)   for(int j=0;j<(4-i);j++){ out.print("<td align='center'>&nbsp;</td>"); }  if(i!=4) out.println("</tr>");
        }%> 
  <tr align="center"> 
    <td colspan="4"><%=HtmlUtils.table(bf.getRow("ico WHERE state="+FinalConstants.STATE_HEAD),submit_page,"manage_head.jsp")%></td> 
  </tr> 
</table> 
</body>
</html>

⌨️ 快捷键说明

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