| 1 | <?php |
| 2 | /** |
| 3 | * compose_attachments.tpl |
| 4 | * |
| 5 | * Description |
| 6 | * |
| 7 | * The following variables are available in this template: |
| 8 | * $accesskey_compose_attach_browse - The access key to be used for the Browse button |
| 9 | * $accesskey_compose_attach - The access key to be used for the Attach button |
| 10 | * $accesskey_compose_delete_attach - The access key to be used for the Delete Attachments button |
| 11 | * |
| 12 | * @copyright © 1999-2009 The SquirrelMail Project Team |
| 13 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
| 14 | * @version $Id$ |
| 15 | * @package squirrelmail |
| 16 | * @subpackage templates |
| 17 | */ |
| 18 | |
| 19 | /** extract template variables **/ |
| 20 | extract($t); |
| 21 | |
| 22 | /** Begin template **/ |
| 23 | ?> |
| 24 | <div class="compose"> |
| 25 | <table cellspacing="0" class="table1"> |
| 26 | <tr class="header"> |
| 27 | <td class="fieldName" style="width: 1%; white-space: nowrap;"> |
| 28 | <?php echo _("New attachment");?>: |
| 29 | </td> |
| 30 | <td class="fieldValue"> |
| 31 | <?php |
| 32 | if($max_file_size != -1) { |
| 33 | echo '<input type="hidden" name="MAX_FILE_SIZE" value="' . $max_file_size . '" />'; |
| 34 | } |
| 35 | ?> |
| 36 | <input type="file" name="attachfile" size="48" <?php if ($accesskey_compose_attach_browse != 'NONE') echo 'accesskey="' . $accesskey_compose_attach_browse . '" '; ?>/> |
| 37 | |
| 38 | <input type="submit" name="attach" <?php if ($accesskey_compose_attach != 'NONE') echo 'accesskey="' . $accesskey_compose_attach . '" '; ?>value="<?php echo _("Attach"); ?>" /> |
| 39 | |
| 40 | <?php |
| 41 | if($max_file_size != -1) { |
| 42 | echo '(' . _("Max.") . ' ' . humanReadableSize($max_file_size) . ')'; |
| 43 | } |
| 44 | ?> |
| 45 | </td> |
| 46 | </tr> |
| 47 | <?php |
| 48 | $attachment_count = 1; |
| 49 | foreach ($attachments as $attach) { |
| 50 | ?> |
| 51 | <tr class="attachment"> |
| 52 | <td class="fieldName" style="width: 1%"> |
| 53 | <input type="checkbox" name="delete[]" accesskey="<?php echo ($attachment_count % 10); ?>" value="<?php echo $attach['Key']; ?>" /> |
| 54 | </td> |
| 55 | <td class="fieldValue"> |
| 56 | <?php echo $attach['FileName']; ?> - <?php echo $attach['ContentType']; ?> (<?php echo humanReadableSize($attach['Size']); ?>) |
| 57 | </td> |
| 58 | </tr> |
| 59 | <?php |
| 60 | $attachment_count++; |
| 61 | } |
| 62 | |
| 63 | if (count($attachments) > 0) { |
| 64 | ?> |
| 65 | <tr class="header"> |
| 66 | <td colspan="2"> |
| 67 | <input type="submit" name="do_delete" <?php if ($accesskey_compose_delete_attach != 'NONE') echo 'accesskey="' . $accesskey_compose_delete_attach . '" '; ?>value="<?php echo _("Delete Selected Attachments"); ?>" /> |
| 68 | </td> |
| 69 | </tr> |
| 70 | <?php |
| 71 | } |
| 72 | ?> |
| 73 | </table> |
| 74 | </div> |