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

   // Select additional meeting person information
   //
   // Version: $Revision: 1.3 $
   // Date: $Date: 2006/08/30 03:09:19 $
   //
   // Copyright (c) 2006 Benjamin Oshrin
   // License restrictions apply, see LICENSE for details.

$auth_required = 1;
include "../lib/mrsbs.inc";
$pgtitle = $tx['who.edit'];
$pgtype = "schedule";

if(!authorize("schedule", "who", $rvar_mtgid))
  mexit($tx['op.err.perm'], 1);
$mtg = get_meeting_info($rvar_mtgid);
if(!$mtg)
  mexit($tx['op.err.nomtg'], 1);

if(isset($rvar_next))
  $nexturi = $rvar_next;
else
  $nexturi = "when.php?mtgid=" . $rvar_mtgid;
?>
<HTML>
<HEAD>
<TITLE><?PHP print $pgtitle;?></TITLE>
</HEAD>

<BODY>
<TABLE CLASS="main">
 <?PHP include "../lib/titlebar.php";?>
 <TR>
  <TD CLASS="main">
   <TABLE CLASS="form">
    <TR>
     <TD CLASS="formheader">
      <?PHP print $tx['sd.mtgid'] . ' <A HREF="review.php?mtgid=' .
        hstr($rvar_mtgid) . '">' . hstr($rvar_mtgid) . "</A>";?>
     </TD>
    </TR>
    <FORM NAME="whonew" ACTION="schedule-op-handler.php" METHOD="post">
    <INPUT TYPE="hidden" NAME="op" VALUE="who2">
    <INPUT TYPE="hidden" NAME="mtgid" VALUE="<?PHP print hstr($rvar_mtgid);?>">
    <INPUT TYPE="hidden" NAME="return" VALUE="<?PHP print hstr($nexturi);?>">
    <TR>
     <TD CLASS="formheader2">
      <?PHP print $tx['sd.owner'];?><BR>
      <FONT CLASS="note"><?PHP print $tx['sd.owner.desc'];?></FONT>
     </TD>
    </TR>
    <TR>
     <TD CLASS="formfield2">
       <?PHP
        if(authorize("schedule", "owner", $rvar_mtgid))
	{
	  print '
      <SELECT NAME="owner">
          ';

	  render_contacts_select(get_contacts(), false, $mtg['contactid']);

	  print '
      </SELECT>
          ';
	}
	else
	{
	  print render_name("compact",
			    $_SESSION['givenname'],
			    $_SESSION['sn'],
			    $_SESSION['mail']);
	}
       ?>
     </TD>
    </TR>
    <TR>
     <TD CLASS="formheader2">
      <?PHP print $tx['sd.host'];?><BR>
      <FONT CLASS="note"><?PHP print $tx['sd.host.desc'];?></FONT>
     </TD>
    </TR>
    <TR>
     <TD CLASS="formfield2">
      <SELECT NAME="host">
       <?PHP
       // Self can always host

       print '<OPTION VALUE="' . $_SESSION['contactid'] . '"' .
         ($mtg['hostid'] == $_SESSION['contactid'] ? " SELECTED" : "") . '>' .
	  render_name("full",
		      $_SESSION['givenname'],
		      $_SESSION['sn'],
		      $_SESSION['mail']) .
	     '</OPTION>
	     ';

       // See if we can create for anyone else

       $dfor = get_delegate_create_for($_SESSION['contactid']);

       render_contacts_select($dfor, false, $mtg['hostid']);
       ?>
      </SELECT>
     </TD>
    </TR>
    <TR>
     <TD CLASS="formfield2">
      <INPUT TYPE="submit" VALUE="<?PHP print $tx['op.continue'];?>">
     </TD>
    </TR>
    </FORM>
   </TABLE>
  </TD>
 </TR>
</TABLE>
</BODY>
</HTML>
Return current item: Meeting Request Scheduling and Booking System