<form method="post" name="meeting" action="<?php echo Horde::selfURL() ?>">
<?php Horde::pformInput() ?>
<input type='hidden' name='actionID' value='<?php echo MOMENT_SEND ?>' />
<input type='hidden' name='meetingID' value='<?php echo $meetingID ?>' />
<input type='hidden' name='mode' value='<?php echo $mode ?>' />

<table border="0" cellspacing="2" cellpadding="2" align="center" width="100%">

<!-- header -->
<tr>
 <td>

    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" class="header" nowrap="nowrap"><b><?php echo _("Send Updates / Invitations") ?></b>&nbsp;</td>
        </td>
      </tr>
 </table>

 </td>
</tr>

<tr>
 <td>

    <table width="100%" border="0" cellpadding="0" cellspacing="1">
    <tr class="item">
<?php if ($mode != 'cancel'): ?>
        <th class="item" width="2%" align="left" nowrap="nowrap">
            <?php echo _("Send Invitation") ?>
        </th>
<?php endif; ?>
<?php if ($mode == 'update'): ?>
        <th class="item" width="2%" align="left" nowrap="nowrap">
            <?php echo _("Send Update") ?>
        </th>
<?php endif; ?>
<?php if ($mode == 'cancel'): ?>
        <th class="item" width="2%" align="left" nowrap="nowrap">
            <?php echo _("Send Cancellation") ?>
        </th>
<?php endif; ?>
        <th class="item" align="left" nowrap="nowrap">
            <?php echo _("Email Address") ?>
        </th>
        <th class="item" align="left" nowrap="nowrap">
            <?php echo _("Attendance") ?>
        </th>
        <th class="item" align="left" nowrap="nowrap">
            <?php echo _("Response") ?>
        </th>
    </tr>
<?php foreach ($meeting['attendees'] as $key => $attendee): ?>
    <tr>
    <tr class="item">
<?php if ($mode != 'cancel'): ?>
        <td class="item" align="center">
            <input type='checkbox' name='invite[<?php echo $attendee['email'] ?>]' />
        </td>
<?php endif; ?>
<?php if ($mode == 'update'): ?>
        <td class="item" align="center">
            <input type='checkbox' name='update[<?php echo $attendee['email'] ?>]' />
        </td>
<?php endif; ?>
<?php if ($mode == 'cancel'): ?>
        <td class="item" align="center">
            <input type='checkbox' name='cancel[<?php echo $attendee['email'] ?>]' />
        </td>
<?php endif; ?>
        <td class="item" align="left" nowrap="nowrap">
            <input type='hidden' name='meeting[attendees][<?php echo $key ?>][email]' value='<?php echo $attendee['email'] ?>' />
            <?php echo $attendee['email'] ?>
        </td>
        <td class="item" align="left" nowrap="nowrap">
            <?php  if ($attendee['attendance'] == 'required') :?>
                <?php echo _("Required") ?>
            <?php else: ?>
                <?php echo _("Optional") ?>
            <?php endif; ?>
        </td>
        <td class="item" align="left" nowrap="nowrap">
            <?php switch ($attendee['responce']):
                  case 'none': ?>
                <?php echo _("None"); break; ?>
            <?php case 'accepted': ?>
                <?php echo _("Accepted"); break; ?>
            <?php case 'declined': ?>
                    <?php echo _("Declined"); break; ?>
            <?php case 'tentative': ?>
                    <?php echo _("Tentative"); break; ?>
            <?php endswitch; ?>
        </td>

    </tr>
<?php endforeach; ?>
    </table>
  </td>
</tr>
<tr>
 <td align="right">
    <input class="button" type="submit" value="<?php echo _("Send") ?>" ?>
 </td>
</tr>
</table>
