Rev 1306 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
469 | jmachado | 1 | <%-- |
2 | Created by IntelliJ IDEA. |
||
3 | User: Jorge |
||
4 | Date: 19/Nov/2009 |
||
5 | Time: 11:22:24 |
||
6 | To change this template use File | Settings | File Templates. |
||
7 | --%> |
||
8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
||
9 | <% |
||
10 | String mime = (String) request.getAttribute("ICON_mime"); |
||
11 | String label = (String) request.getAttribute("ICON_alt"); |
||
12 | |||
13 | if(mime != null) |
||
14 | { |
||
15 | if (mime.toLowerCase().endsWith("doc") || mime.toLowerCase().endsWith("docx") || mime.endsWith("rtf")) |
||
16 | { |
||
17 | %> |
||
18 | <img alt="<%=mime%>" src="<%=request.getContextPath()%>/imgs/mime/doc.gif"> |
||
19 | <% |
||
20 | } |
||
21 | else if (mime.toLowerCase().endsWith("pdf")) |
||
22 | { |
||
23 | %> |
||
24 | <img alt="<%=mime%>" src="<%=request.getContextPath()%>/imgs/mime/pdf.gif"> |
||
25 | <% |
||
26 | } |
||
27 | else if (mime.toLowerCase().endsWith("ppt")) |
||
28 | { |
||
29 | %> |
||
30 | <img alt="<%=mime%>" src="<%=request.getContextPath()%>/imgs/mime/ppt.gif"> |
||
31 | <% |
||
32 | } |
||
33 | else if (mime.toLowerCase().endsWith("zip") || mime.endsWith(".gz") || mime.endsWith("tgz")) |
||
34 | { |
||
35 | %> |
||
36 | <img alt="<%=mime%>" src="<%=request.getContextPath()%>/imgs/mime/zip.gif"> |
||
37 | <% |
||
38 | } |
||
39 | else if (mime.toLowerCase().endsWith("rar")) |
||
40 | { |
||
41 | %> |
||
42 | <img alt="<%=label%>" src="<%=request.getContextPath()%>/imgs/mime/rar.gif"> |
||
43 | <% |
||
44 | } |
||
45 | else if (mime.toLowerCase().endsWith("html") || mime.endsWith("htm")) |
||
46 | { |
||
47 | %> |
||
48 | <img alt="<%=label%>" src="<%=request.getContextPath()%>/imgs/mime/html.gif"> |
||
49 | <% |
||
50 | } |
||
51 | else if (mime.toLowerCase().endsWith("xls") || mime.endsWith("xlsx")) |
||
52 | { |
||
53 | %> |
||
54 | <img alt="<%=label%>" src="<%=request.getContextPath()%>/imgs/mime/xls.gif"> |
||
55 | <% |
||
56 | } |
||
57 | else if (mime.toLowerCase().endsWith("txt")) |
||
58 | { |
||
59 | %> |
||
60 | <img alt="<%=label%>" src="<%=request.getContextPath()%>/imgs/mime/txt.gif"> |
||
61 | <% |
||
62 | } |
||
63 | else if (mime.toLowerCase().endsWith("xml")) |
||
64 | { |
||
65 | %> |
||
66 | <img alt="<%=label%>" src="<%=request.getContextPath()%>/imgs/mime/xml.gif"> |
||
67 | <% |
||
68 | } |
||
69 | else |
||
70 | { |
||
71 | %> |
||
72 | <img alt="<%=label%>" src="<%=request.getContextPath()%>/imgs/mime/unknown.gif"> |
||
73 | <% |
||
74 | } |
||
75 | } |
||
76 | |||
77 | %> |