home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 May
/
CMCD0505.ISO
/
Software
/
Shareware
/
Programare
/
bugzero
/
jsp
/
attachment.jsp
< prev
next >
Wrap
Text File
|
2004-12-03
|
3KB
|
99 lines
<%@ page language="java"
session="true"
import="com.websina.util.*,com.websina.bean.*,com.websina.util.log.Log"
errorPage="error.jsp"
%>
<%@ include file="_charset.jspf" %>
<%@ include file="_cache.jspf" %>
<%
String contextPath = request.getContextPath();
String formId = request.getParameter("formId");
IssueForm issueForm = null;
if(formId != null) {
issueForm = (IssueForm)session.getAttribute("issueForm"+formId);
}
if (issueForm == null) {
out.print("<center><font color=red><b>");
out.print("Sorry, you are in an invalid state");
out.print("</b></font></center>");
return;
}
%>
<html>
<head>
<title>File Attachment</title>
<meta http-equiv=Content-Type content="text/html">
<script LANGUAGE="JavaScript" src="script/attachment.js"></script>
<LINK rel="StyleSheet" href="css/styles.css" type="text/css">
</head>
<body bgcolor="#ffffff">
<center>
<br>
<table cellspacing=0 cellpadding=2 border=0>
<tr><td>
<b>File Attachment</b>
</td></tr><tr><td>
<table cellspacing=0 cellpadding=2 border=0 class="box">
<tr class="header"><td colspan=3>
Attach a file in two steps, repeating the steps as needed to attach multiple files.
Click OK when you are done
</font>
</td></tr>
<tr><td colspan=3> </td></tr>
<tr><td>
1. Click <b>Browse</b> to select the file, or<br>
type the path to the file in the field below.
</td><td colspan=2>
2. Click <b>Attach</b> to move the file
<br> to the Attached Files box.
</td></tr>
<tr><td colspan=3> </td></tr>
<tr><td colspan=2>
Find File</td>
<td>Attached Files</td></tr>
<tr><td>
<form method="POST" ENCTYPE="multipart/form-data"
action="<%=contextPath%>/servlet/upload?id=<%=formId%>">
<input type=file size=32 name=attachment></td>
<td align=center>
<input type=submit class="button" value=" Attach "></td>
</td>
</form>
<form method="POST" name="attachForm"
action="<%=contextPath%>/servlet/upload?id=<%=formId%>">
<input type="hidden" name="action">
<td rowspan=3>
<select name=attached_files size=5 multiple>
<%
Attachment attachment = issueForm.getAttachment();
if (attachment != null) {
%>
<%=ListMaker.makeOptionList(attachment.getAllFilenames()) %>
<% } %>
</select></td>
</tr>
<tr><td> </td>
<td align=center><input type=button class="button" value="Remove"
onClick="do_remove(attachForm)">
</td></tr>
<tr><td colspan=2 height=32> </td></tr>
<tr><td colspan=3 align=center height=30>
<input type=button class="button" value=" OK " onClick="do_ok(attachForm)">
<input type=button class="button" value="Cancel" onClick="do_cancel(attachForm)">
</td></tr>
</form>
<% String msg = request.getParameter("msg");
if (msg != null) {
%>
<tr><td colspan=3 align=center>
<font color=red><b><%=msg%></b></font>
</td></tr>
<% } %>
</table>
</td></tr></table>
</center>
</body>
</html>