be7a2943 |
1 | <?php |
2 | /** |
3 | * printer_friendly_bottom.tpl |
4 | * |
5 | * Display the printer friendly version of an email. This is called "_bottom" |
6 | * because when javaascript is enabled, the printer friendly view is a window |
7 | * with two frames. |
8 | * |
9 | * The following variables are available in this template: |
10 | * $headers - array containing the headers to be displayed for this email. |
11 | * Each element in the array represents a separate header. |
12 | * The index of each element is the field name; the value is |
13 | * the value of that field. |
14 | * $message_body - formatted, scrubbed body of the email. |
15 | * $attachments - array containing info for all message attachments. Each |
16 | * element in the array represents a separate attachment and |
17 | * contains the following elements: |
18 | * $el['Name'] - The name of the attachment |
19 | * $el['Description'] - Description of the attachment |
20 | * $el['DefaultHREF'] - URL to the action that should occur when the name is clicked |
21 | * $el['DownloadHREF'] - URL to download the attachment |
22 | * $el['ViewHREF'] - URL to view the attachment. Empty if not available. |
23 | * $el['Size'] - Size of attachment in bytes. |
24 | * $el['ContentType'] - Content-Type of the attachment |
25 | * $el['OtherLinks'] - array containing links to any other actions |
26 | * available for this attachment that might be |
27 | * provided by plugins, for example. Each element represents |
28 | * a different action and contains the following elements: |
29 | * $link['HREF'] - URL to access the functionality |
30 | * $link['Text'] - Text representing the functionality. |
31 | * |
32 | * |
33 | * @copyright © 1999-2006 The SquirrelMail Project Team |
34 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
35 | * @version $Id$ |
36 | * @package squirrelmail |
37 | * @subpackage templates |
38 | */ |
39 | |
be7a2943 |
40 | |
41 | /** extract template variables **/ |
42 | extract($t); |
43 | |
44 | /** Begin template **/ |
45 | ?> |
46 | <div class="printerFriendly"> |
47 | <table cellspacing="0" class="table_blank"> |
48 | <?php |
49 | foreach ($headers as $field=>$value) { |
50 | # If the value is empty, skip the entry. |
51 | if (empty($value)) |
52 | continue; |
53 | ?> |
54 | <tr> |
55 | <td class="fieldName"> |
56 | <?php echo $field; ?>: |
57 | </td> |
58 | <td class="fieldValue"> |
59 | <?php echo $value; ?> |
60 | </td> |
61 | </tr> |
62 | <?php |
63 | } |
64 | ?> |
65 | </table> |
66 | <hr /> |
67 | <?php echo $message_body; ?> |
68 | <?php |
69 | if (count($attachments) > 0) { |
70 | ?> |
71 | <hr /> |
72 | <b>Attachments:</b> |
73 | <?php |
74 | foreach ($attachments as $attachment) { |
75 | ?> |
76 | <table cellspacing="0" border="1" class="attach"> |
77 | <tr> |
78 | <td colspan="2" class="attachName"> |
79 | <?php echo $attachment['Name']; ?> |
80 | </td> |
81 | </tr> |
82 | <tr> |
83 | <td class="attachField"> |
84 | <?php echo _("Size"); ?>: |
85 | </td> |
86 | <td class="attachFieldValue"> |
87 | <?php echo humanReadableSize($attachment['Size']); ?> |
88 | </td> |
89 | </tr> |
90 | <tr> |
91 | <td class="attachField"> |
92 | <?php echo _("Type"); ?>: |
93 | </td> |
94 | <td class="attachFieldValue"> |
95 | <?php echo $attachment['ContentType']; ?> |
96 | </td> |
97 | </tr> |
98 | <tr> |
99 | <td class="attachField"> |
100 | <?php echo _("Info"); ?>: |
101 | </td> |
102 | <td class="attachFieldValue"> |
103 | <?php echo $attachment['Description']; ?> |
104 | </td> |
105 | </tr> |
106 | </table> |
107 | <?php |
108 | } |
109 | } |
110 | ?> |
d281e128 |
111 | </div> |