📄 adminupdate.jsp
字号:
<%@ page language="java" contentType="text/html;charset=UTF-8" import="com.terac.album.bean.*,com.terac.album.*,java.text.SimpleDateFormat" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<html:html locale="true">
<html:base/>
<%@ include file="_header.jsp" %>
<!-- navi begin -->
<table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
<tr>
<td bgcolor="#cccccc" height="1"></td>
</tr>
<tr>
<td height="30" bgcolor="#eeeeee">
<a href="adminList.do"><b><bean:message key="label.admin" /></b></a> - <bean:message key="label.update" />
</td>
</tr>
<tr>
<td bgcolor="#cccccc" height="1"></td>
</tr>
</table>
<br>
<!-- navi end -->
<%
Photo photo=(Photo)request.getAttribute("photo");
Config cfg=(Config)application.getAttribute(Constants.ALBUM_CONFIG);
%>
<table border="0" cellspacing="5" cellpadding="5" width="100%" align="center">
<tr>
<td align="center" colspan="2">
<br>
<%
String filename=cfg.getUploadDirectory()+"/"+photo.getFilename()+".jpg";
double scale =Util.cScale(photo.getWidth(), photo.getHeight(), 400, 400);
if (scale>1.0){
scale=1.0;
}
int newWidth=(int) (photo.getWidth() * scale);
int newHeight=(int) (photo.getHeight() * scale);
%>
<a href="<%=filename%>" target="_blank"><img src="<%=filename%>" border="0" width="<%=newWidth%>" height="<%=newHeight%>"></a></td>
</tr>
<tr>
<html:form action="adminUpdate2.do">
<td class="p3" align="center" colspan="2" >
<html:text property="name" size="20" maxlength="20" value="<%=photo.getName()%>"/><br>
<%=photo.getSize()%>K | <%=photo.getWidth()%>*<%=photo.getHeight()%><br>
<%=new SimpleDateFormat("yyyy-MM-dd HH:mm").format(photo.getUploadDate())%><br><br>
<html:textarea property="description" cols="40" rows="3" value="<%=photo.getDescription()%>"/>
<br><br>
<html:hidden property="id" value="<%=""+photo.getId()%>" />
<html:submit>
<bean:message key="button.update" />
</html:submit>
<html:reset>
<bean:message key="button.clear" />
</html:reset>
</td>
</html:form>
</tr>
</table>
<%@ include file="_footer.jsp" %>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -