home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 May / CMCD0505.ISO / Software / Shareware / Programare / bugzero / jsp / edit.jsp < prev    next >
Text File  |  2005-03-31  |  1KB  |  43 lines

  1. <%@ page 
  2.     import="com.websina.bean.*,com.websina.util.*,com.websina.util.log.Log"
  3. %>
  4. <html>
  5. <head>
  6. <title>Edit and View</title>
  7. <script LANGUAGE="JavaScript" src="script/attachment.js"></script>
  8. </head>
  9. <body topmargin=0>
  10. <%@ include file="_header.jspf" %>
  11. <%      
  12.   String issueStr = request.getParameter("entryId");
  13.   int entryId = 0;
  14.   try {
  15.     entryId = StringUtil.toInt(issueStr);
  16.   } catch (NumberFormatException e) {
  17.     String msg = MessageCode.get("number.format_error_issue");
  18.     msg = StringUtil.replace(msg, issueStr);
  19.     out.print("<center><font color=red><b>");
  20.     out.print(msg);
  21.     out.print("</b></font></center>");
  22.     return;
  23.   }
  24.   if (!person.viewAllowed(entryId)) {
  25.     String msg = MessageCode.get("servlet.issue.permission_error");
  26.     out.print("<center><font color=red><b>");
  27.     out.print(msg);
  28.     out.print("</b></font></center>");
  29.     return;
  30.   }
  31. %>
  32.  
  33. <% String msg = request.getParameter("msg");
  34.    if (msg != null) { %>
  35. <center><font color=red><b><%=msg%></b></font></center>
  36. <% } %>
  37.  
  38. <%@ include file="_issueform.jspf" %>
  39.  
  40. <%@ include file="_trail.jspf" %>
  41.  
  42. </body></html>
  43.