Location: PHPKode > projects > Meeting Request Scheduling and Booking System > mrsbs/php/schedule/send.php
<?PHP

  // Include file for building a form to send invitations.
  //
  //  $mtg must contain get_meeting_info() data
  //
  // Version: $Revision: 1.2 $
  // Date: $Date: 2006/12/09 22:03:25 $
  //
  // Copyright (c) 2006 Benjamin Oshrin
  // License restrictions apply, see LICENSE for details.

?>
 <TR>
  <TD CLASS="<?PHP print ($mtg['status'] == 'B' ? 'notice' : 'main'); ?>">
   <TABLE CLASS="form">
    <TR>
     <TD CLASS="formheader">
      <?PHP
       $op = "send";

       switch($mtg['status'])
       {
       case 'B':
         print $tx['op.sendinvites'];
	 
	 // If replyby mode is not wait, there is 1 window of duration
	 // length, and there are no locations to choose from, then
	 // send notifications instead of invites.
	 if($mtg['replybymode'] != 'W' && $mtg['windows']['count'] == 1
	    &&
	    (($mtg['windows'][0]['end'] - $mtg['windows'][0]['begin'])
	     == ($mtg['duration'] * 60))
	    &&
	    $mtg['locations']['count'] == 0)
	   $op = "sendnotify";
         break;
       case 'I':
         print $tx['op.sendinvites.again'];
         break;
       case 'S':
         print $tx['op.sendinvites.again'];
	 $op = "notify";
         break;
       }
      ?>
     </TD>
    </TR>
    <FORM NAME="send" ACTION="schedule-op-handler.php" METHOD="post">
    <INPUT TYPE="hidden" NAME="op" VALUE="<?PHP print $op;?>">
    <INPUT TYPE="hidden" NAME="mtgid" VALUE="<?PHP print $mtg['mtgid'];?>">
    <INPUT TYPE="hidden" NAME="return" VALUE="acknowledge.php?mtgid=<?PHP print $mtg['mtgid'];?>">
    <?PHP
      if($mtg['status'] == 'I' || $mtg['status'] == 'S')
      {
	print '
    <TR>
     <TD CLASS="formheader2">
      ' . $tx['sd.send.recipients'] . '<BR>
      <FONT CLASS="note">' . $tx['sd.send.recipients.desc'] . '</FONT>
     </TD>
    </TR>
    <TR>
     <TD CLASS="formfield2">
      <TABLE CLASS="form">
      <TR>
       <TD CLASS="formfield">
        <INPUT TYPE="radio" NAME="all" VALUE="all" CHECKED />
       </TD>
       <TD CLASS="formfield">
        ' . $tx['sd.send.recipients.all'] . '
       </TD>
      </TR>
      <TR>
       <TD CLASS="formfield">
        <INPUT TYPE="radio" NAME="all" VALUE="some">
       </TD>
       <TD CLASS="formfield">
        <SELECT NAME="recipients[]" MULTIPLE
         ONCLICK=\'document.send.all[1].checked="true"\'>
        ';

	for($i = 0;$i < $mtg['invitees']['count'];$i++)
	  print '<OPTION VALUE="' . $mtg['invitees'][$i]['contactid'] . '">' .
	    render_name("full",
			$mtg['invitees'][$i]['givenname'],
			$mtg['invitees'][$i]['sn'],
			$mtg['invitees'][$i]['mail']) . '</OPTION>
            ';

	print '
	</SELECT>
       </TD>
      </TR>
      </TABLE>
     </TD>
    </TR>
        ';
      }
    ?>
    <TR>
     <TD CLASS="formheader2">
      <?PHP print $tx['sd.send.note'];?><BR>
      <FONT CLASS="note"><?PHP print $tx['sd.send.note.desc'];?></FONT>
     </TD>
    </TR>
    <TR>
     <TD CLASS="formfield2">
      <TEXTAREA NAME="note" ROWS=10 COLS=70></TEXTAREA>
     </TD>
    </TR>
    <TR>
     <TD CLASS="formfield2">
      <FONT CLASS="note"><?PHP print $tx['sd.send.desc'];?></FONT><BR>
      <INPUT TYPE="submit" VALUE="<?PHP print $tx['op.send'];?>">
     </TD>
    </TR>
    </FORM>
   </TABLE>
  </TD>
 </TR>
Return current item: Meeting Request Scheduling and Booking System