📄 albumupload.jsp
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ include file="../../lybbs/jsp/common/include/taglibs.jsp" %>
<html:html>
<head>
<title><lybbs:blog key="blogName"/>--上传照片</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="bookmark" href="favicon.ico" type="image/x-icon">
<%@ include file="../../lybbs/jsp/common/include/header.jsp" %>
<script language="JavaScript">
var openner=window.opener==null?parent:window.opener;
function verify_upload(formobj) {
var haveupload = false;
for (var i=0; i < formobj.elements.length; i++) {
var elm = formobj.elements[i];
if (elm.type == 'file'){
if (elm.value != ""){
haveupload = true;
}
}
}
if (haveupload){
toggle_display();
formobj.submit();
formobj.upload.disabled=true;
} else {
alert("Please select your file for upload.");
}
return false;
}
function toggle_display() {
var obj=uploading;
if (obj.style.display == "none") {
obj.style.display = "";
} else {
obj.style.display = "none";
}
}
</script>
</head>
<%
int uploadAllowedNumber=net.lybbs.util.PropertiesCache.getInstance().getUploadAllowedNumber();
int albumMaxFileSize=net.lyblog.blog.cache.BlogConfigCache.getInstance().getAlbumMaxFileSize()/1024;
%>
<body topmargin=0 leftmargin=0>
<html:form method="post" action="blog_albumUpload.do" enctype="multipart/form-data">
<html:hidden property="albumDirID"/>
<html:hidden property="action"/>
<input type=hidden name="checkAction" value="yes">
<table class=tableCommonStyle cellpadding=3 cellspacing=1 border=0 align=center>
<tr>
<td class=catStyle align=center colspan=2><b>上传照片</b></td>
</tr>
<lybbs:blog key="albumQuote"/>
<tr>
<td class=forumColorOne width=28%>
<b>上传照片</b><br>
<li>照片最大允许 <B><%=albumMaxFileSize%></B> KB
</td>
<td class=forumColorTwo>
<%
for(int i=0;i<uploadAllowedNumber;i++) {
%>
相片名:<input type="text" name="addMeName<%=i%>" size=15 maxlength="40" style="height:18px"> <input type="file" name="addMe<%=i%>" size=25><br>
<%
}
%>
</td>
</tr>
<tr>
<td class=forumColorTwo align=center colspan=2>
<input type="button" name="upload" value="<bean:message key="common.lybbs.upload"/>" onclick="verify_upload(this.form);" />
</td>
</tr>
<logic:messagesPresent>
<tr>
<td class=forumColorTwo align=center colspan=2>
<html:errors/>
<script>openner.location.reload();</script>
</td>
</tr>
</logic:messagesPresent>
<tr id="uploading" style="display:none;">
<td class=forumColorTwo align=center colspan=2>
<strong>Uploading, please wait...</strong>
</td>
</tr>
<tr>
<td class=forumColorTwo align=center colspan=2>
<input type="button" value="<bean:message key="common.lybbs.close"/>" onclick="window.close();" />
</td>
</tr>
</table>
</html:form>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -