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

   // Confirmation page for admin operations
   //
   // Version: $Revision: 1.1 $
   // Date: $Date: 2006/08/06 19:05:33 $
   //
   // Copyright (c) 2006 Benjamin Oshrin
   // License restrictions apply, see LICENSE for details.

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

if(isset($rvar_return))
  $return = $rvar_return;
else
  $return = "index.php";

$op = $rvar_op;

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

if($op == "delcontact")
{
  // See what might be affected by this deletion.

  $ct = get_contact($rvar_contactid);
  
  if($ct &&
     (count($ct['owned']) > 0 || count($ct['hosted']) > 0
      || count($ct['invited']) > 0 || count($ct['locations']) > 0))
  {
    $cmsg .= " (" . render_name("full", $ct['givenname'], $ct['sn'],
				$ct['mail']) . ")";
    
    $cnote .= "\n<UL>\n";
    
    if(count($ct['hosted']) > 0)
    {
      $cnote .= "<LI>" . count($ct['hosted']) . $tx['ok.cancel.hosted'] .
	"<BR />\n";

      foreach($ct['hosted'] as $c)
	$cnote .= '<A HREF="../schedule/review.php?mtgid=' . $c . '">' . $c .
	 '</A> ';

      $cnote .= "</LI>\n";
    }
    
    if(count($ct['owned']) > 0)
    {
      $cnote .= "<LI>" . count($ct['owned']) . $tx['ok.cancel.owned'] .
	"<BR />\n";

      foreach($ct['owned'] as $c)
	$cnote .= '<A HREF="../schedule/review.php?mtgid=' . $c . '">' . $c .
	 '</A> ';

      $cnote .= "</LI>\n";
    }
    
    if(count($ct['invited']) > 0)
    {
      $cnote .= "<LI>" . count($ct['invited']) . $tx['ok.cancel.invited'] .
	"<BR />\n";

      foreach($ct['invited'] as $c)
	$cnote .= '<A HREF="../schedule/review.php?mtgid=' . $c . '">' . $c
	 . '</A> ';

      $cnote .= "</LI>\n";
    }

    if(count($ct['locations']) > 0)
    {
      $cnote .= "<LI>" . count($ct['locations']) . $tx['ok.cancel.locations'] .
	"<BR />\n";

      foreach($ct['locations'] as $c)
	$cnote .= '<A HREF="location.php?locationid=' . $c . '">' . $c .
	 '</A> ';

      $cnote .= "</LI>\n";
    }

    // Although admin-op-handler will execute the SQL anyway, there are
    // currently no ACLs set on a per-user basis, so there is no point
    // saying that we're going to delete then.
    //$cnote .= "<LI>" . $tx['ok.cancel.acls'] . "</LI>\n";

    if(count($ct['delegate']) + count($ct['delegator']) > 0)
      $cnote .= "<LI>" . (count($ct['delegate']) + count($ct['delegator']))
	. $tx['ok.cancel.delegate'] . "</LI>\n";
    
    $cnote .= "</UL>\n";
  }
}

?>
<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>
   <P>
   <TABLE>
   <TR>
    <TD>
     <FORM NAME="send" ACTION="admin-op-handler.php" METHOD="post">
     <INPUT TYPE="hidden" NAME="op" VALUE="<?PHP print hstr($op);?>">
     <INPUT TYPE="hidden" NAME="contactid" VALUE="<?PHP print hstr($rvar_contactid);?>">
     <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="admin-op-handler.php" METHOD="post">
     <INPUT TYPE="hidden" NAME="op" VALUE="null">
     <INPUT TYPE="hidden" NAME="contactid" VALUE="<?PHP print hstr($rvar_contactid);?>">
     <INPUT TYPE="hidden" NAME="return" VALUE="<?PHP print hstr($return);?>">
     <INPUT TYPE="submit" VALUE="<?PHP print $tx['op.no'];?>">
     </FORM>
    </TD>
   </TR>
   </TABLE>
   </P>
  </TD>
 </TR>
</TABLE>
</BODY>
</HTML>
Return current item: Meeting Request Scheduling and Booking System