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

   // Confirm scheduling operations
   //
   // Version: $Revision: 1.1 $
   // Date: $Date: 2006/08/06 19:23:30 $
   //
   // Copyright (c) 2006 Benjamin Oshrin
   // License restrictions apply, see LICENSE for details.

$auth_required = 0;
include "../lib/mrsbs.inc";
$pgtitle = $tx['op.confirm'];
$pgtype = "schedule";

if(isset($rvar_return))
  $return = $rvar_return;
else
  $return = "review.php?mtgid=" . $rvar_mtgid;

$op = $rvar_op;

$cmsg = $tx['ok.'.$rvar_op];
$cnote = $tx['ok.'.$rvar_op.'.note'];

$mtg = get_meeting_info($rvar_mtgid);

if($mtg)
{
  if($op == "uncancel")
  {
    // If we are uncanceling a meeting of status 'i', see if the replyby
    // time has passed or is about to (30 minutes).  If so, override
    // $return and request a new one, and change the op.

    if(($mtg['status'] == 'i') && ($mtg['replyby'] <= (time() + 1800)))
    {
      $return = "when2.php?mtgid=" . $rvar_mtgid . "&next=" .
	urlencode("confirm.php?mtgid=" . $rvar_mtgid . "&op=uncancel") .
	"&error="	. $tx['ok.uncancel.rsvp'];
      
      $op = "null";
    }

    // If the meeting is being built, we won't notify anyone, so drop the note.

    if(($mtg['status'] == 'b'))
      $cnote = "";
  }

  if($op == "cancel")
  {
    // If the meeting is being built, we won't notify anyone, so drop the note.
    
    if($mtg['status'] == 'B')
      $cnote = "";
  }
}

?>
<HTML>
<HEAD>
<TITLE><?PHP print $pgtitle;?></TITLE>
</HEAD>

<BODY>
<TABLE CLASS="main">
 <?PHP include "../lib/titlebar.php";?>
 <TR>
  <TD CLASS="main">
   <P>
    <?PHP print $cmsg;?>
   <BR />
    <FONT CLASS="note"><?PHP print $cnote;?></FONT>
   </P>
   <TABLE>
   <TR>
    <TD>
     <FORM NAME="send" ACTION="schedule-op-handler.php" METHOD="post">
     <INPUT TYPE="hidden" NAME="op" VALUE="<?PHP print hstr($op);?>">
     <INPUT TYPE="hidden" NAME="mtgid" VALUE="<?PHP print hstr($rvar_mtgid);?>">
     <INPUT TYPE="hidden" NAME="return" VALUE="<?PHP print hstr($return);?>">
     <INPUT TYPE="submit" VALUE="<?PHP print $tx['op.yes'];?>">
     </FORM>
    </TD>
    <TD>
     <FORM NAME="send" ACTION="schedule-op-handler.php" METHOD="post">
     <INPUT TYPE="hidden" NAME="op" VALUE="null">
     <INPUT TYPE="hidden" NAME="mtgid" VALUE="<?PHP print hstr($rvar_mtgid);?>">
     <INPUT TYPE="hidden" NAME="return" VALUE="<?PHP print hstr($return);?>">
     <INPUT TYPE="submit" VALUE="<?PHP print $tx['op.no'];?>">
     </FORM>
    </TD>
   </TR>
   </TABLE>
  </TD>
 </TR>
</TABLE>
</BODY>
</HTML>
Return current item: Meeting Request Scheduling and Booking System