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

   // Delegate editor
   //
   // Version: $Revision: 1.1 $
   // Date: $Date: 2006/08/06 18:58:07 $
   //
   // Copyright (c) 2006 Benjamin Oshrin
   // License restrictions apply, see LICENSE for details.
   
$auth_required = 1;
include "../lib/mrsbs.inc";
$pgtitle = $tx['dl.dls.edit'];
$pgtype = "admin";
if(!authorize("admin", "delegates", -1))
  mexit($tx['op.err.perm'], 1);
?>
<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="infofield">
      <P>
       <FONT CLASS="note">
        <?PHP print $tx['dl.about']; ?>
       </FONT>
      </P>
      <?PHP
       $dls = get_delegates();

       if($dls['count']==0)
         print "<P>" . $tx['dl.dls.none'] . "</P>\n";

       print '
      <FORM NAME="delegates" ACTION="admin-op-handler.php" METHOD="post">
      <INPUT TYPE="hidden" NAME="op" VALUE="delegates">
      <INPUT TYPE="hidden" NAME="return" VALUE="delegates.php">
      <TABLE>
      <TR>
       <TD CLASS="formheader">
        ' . $tx['dl.delegator'] . '
       </TD>
       <TD CLASS="formheader">
        ' . $tx['dl.delegate'] . '
       </TD>
       <TD CLASS="formheader">
        ' . $tx['dl.perm.create'] . '
       </TD>
       <TD CLASS="formheader">
        ' . $tx['dl.perm.reply'] . '
       </TD>
       <TD CLASS="formheader2">
        ' . $tx['op.remove'] . '
       </TD>
      </TR>
      ';

       for($i = 0;$i < $dls['count'];$i++)
       {
	 $curid = $dls[$i]['contactid'] . '-' . $dls[$i]['delegateid'];
	 
	 print '
      <TR>
       <TD CLASS="formfield">
        ' . render_name("full", $dls[$i]['contactgivenname'],
			$dls[$i]['contactsn'], $dls[$i]['contactmail']) . '
       </TD>
       <TD CLASS="formfield">
        ' . render_name("full", $dls[$i]['delegategivenname'],
			$dls[$i]['delegatesn'], $dls[$i]['delegatemail']) . '
       </TD>
       <TD CLASS="formfield">
        <INPUT TYPE="hidden" NAME="curids[]" VALUE="' . $curid . '">
        <INPUT TYPE="hidden" NAME="curcreate-' . $curid . '" VALUE="' .
	   $dls[$i]['create'] . '">
        <INPUT TYPE="hidden" NAME="curreply-' . $curid . '" VALUE="' .
	   $dls[$i]['reply'] . '">
        <INPUT TYPE="checkbox" NAME="create-' . $curid . '" VALUE="Y"' .
	   ($dls[$i]['create'] ? " CHECKED" : "") . '>
       </TD>
       <TD CLASS="formfield">
        <INPUT TYPE="checkbox" NAME="reply-' . $curid . '" VALUE="Y"' .
	   ($dls[$i]['reply'] ? " CHECKED" : "") . '>
       </TD>
       <TD CLASS="formfield2">
        <INPUT TYPE="checkbox" NAME="remove-' . $curid . '" VALUE="Y">
       </TD>
      </TR>';
       }

       $cts = get_contacts();

       print '
      <TR>
       <TD CLASS="formfield">
        <SELECT NAME="newdelegator">
       ';

       render_contacts_select($cts, true);

       print '
        </SELECT>
       </TD>
       <TD CLASS="formfield">
        <SELECT NAME="newdelegate">
       ';

       render_contacts_select($cts, true);

       print '
        </SELECT>
       </TD>
       <TD CLASS="formfield">
        <INPUT TYPE="checkbox" NAME="newcreate" VALUE="Y">
       </TD>
       <TD CLASS="formfield">
        <INPUT TYPE="checkbox" NAME="newreply" VALUE="Y">
       </TD>
       <TD CLASS="formfield2">
        ' . $tx['op.new'] . '
       </TD>
      </TR>
      <TR>
       <TD CLASS="formfield2" COLSPAN="5">
       <INPUT TYPE="submit" VALUE="' . $tx['op.update'] . '">
       </TD>
      </TR>
      </TABLE>
      </FORM>
       ';
      ?>

      <P>
      <A HREF="contact.php?contactid=new&return=delegates.php>[+]
       <?PHP print $tx['ct.ct.new'];?></A>
      </P>
     </TD>
    </TR>
   </TABLE>
  </TD>
 </TR>
</TABLE>
</BODY>
</HTML>
Return current item: Meeting Request Scheduling and Booking System