function showTSUsersBlock($lTSTID, $userAssignments, $clsRpt, $tst, $lLabelWidth)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $attributes = new stdClass();
    $attributes->lTableWidth = 900;
    $attributes->divID = 'userDiv';
    $attributes->divImageID = 'userDivImg';
    $attributes->bStartOpen = true;
    openBlock('Staff Members Assigned to this Template', '', $attributes);
    $frmAtt = array('name' => 'frmAssignToTST');
    echoT(form_open('admin/timesheets/add_edit_tst_record/setTSTUsers/' . $lTSTID, $frmAtt));
    echoT('<br>' . strHTMLSetClearAllButton(true, 'frmAssignToTST', 'chkGroup[]', 'Select All ') . '&nbsp;&nbsp;' . strHTMLSetClearAllButton(false, 'frmAssignToTST', 'chkGroup[]', 'Clear All') . '<br>');
    echoT('<div style="vertical-align: middle;">
                Assign Staff Members to this Time Sheet Template<br>
                <i>You must click "Update Assignments" for your changes to be recorded.</i><br></div>');
    echoT('
         <div id="scrollCB" style="height:150px;   width:440px; overflow:auto;  border: 1px solid black;">' . "\n\n");
    echoT('<table class="enpRpt" style="width: 100%">');
    foreach ($userAssignments as $uA) {
        $lUserID = $uA->lUserID;
        $strAssigned = '';
        echoT('
            <tr>
               <td class="enpRpt" style="width: 10px; vertical-align:top;">');
        if ($uA->bGrayed) {
            echoT('&nbsp;');
            $strStyle = 'color: #999;';
            $strAssigned = ' <i>(assigned to <b>' . htmlspecialchars($uA->strAssignedTemplateName) . '</b>)</i>';
        } else {
            $strStyle = '';
            echoT('
                  <input type="checkbox" 
                         name="chkGroup[]" 
                         value="' . $lUserID . '" ' . ($uA->bCheckedAssign ? 'checked' : '') . '>');
        }
        echoT('
               </td>
               <td class="enpRpt" style="vertical-align:top;  ' . $strStyle . '">' . htmlspecialchars($uA->strLName . ', ' . $uA->strFName) . $strAssigned . '
               </td>
            </tr>');
    }
    echoT('</table></div>

             <input type="submit" name="cmdSubmit" value="Update Assignments"
                 style=""
                 class="btn"
                    onmouseover="this.className=\'btn btnhov\'"
                    onmouseout="this.className=\'btn\'">');
    echoT(form_close('<br>'));
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
<?php

if ($lNumSkillsList <= 0) {
    echoT('<br><i>There are no job skills 
             defined in your system. </i><br><br>');
} else {
    $attributes = array('name' => 'frmSkillsRpt');
    echoT(form_open('reports/pre_vol_job_skills/saveOpts', $attributes));
    echoT('<br><br>' . strHTMLSetClearAllButton(true, 'frmSkillsRpt', 'chkSkill[]', 'Select All ') . '&nbsp;&nbsp;' . strHTMLSetClearAllButton(false, 'frmSkillsRpt', 'chkSkill[]', 'Clear All') . '<br>');
    echoT('<div style="vertical-align: middle;">
                Find all the volunteers ' . ' having <input type="radio" name="rdoAnyAll" value="any" checked><b>any</b>
                                    <input type="radio" name="rdoAnyAll" value="all" ><b>all</b>
                 of the selected job skills:<br><br></div>');
    echoT('
         <div id="scrollCB" style="height:130px;   width:300px; overflow:auto;  border: 1px solid black;">' . "\n\n");
    echoT('<table class="enpRpt" style="width: 100%">');
    foreach ($skillsList as $skill) {
        $lSkillID = $skill->lSkillID;
        echoT('
            <tr>
               <td class="enpRpt" style="width: 10px; vertical-align:top;">
                  <input type="checkbox" name="chkSkill[]" value="' . $lSkillID . '">
               </td>
               <td class="enpRpt" style="vertical-align:top; width: 180px;">' . htmlspecialchars($skill->strSkill) . '
               </td>
            </tr>');
    }
    echoT('</table></div>
             <input type="checkbox" name="chkInactive" value="TRUE">Include inactive volunteers<br><br>

             <input type="submit" name="cmdSubmit" value="Run Report"
<?php

global $genumDateFormat;
$attributes = array('name' => 'frmCloneVolEvent');
echoT(form_open('volunteers/event_date_shifts_add_edit/cloneShift/' . $lEventID . '/' . $lEventDateID . '/' . $lShiftID, $attributes));
echoT(strHTMLSetClearAllButton(true, 'frmCloneVolEvent', 'chkDate[]', 'Select All Dates') . '&nbsp;&nbsp;' . strHTMLSetClearAllButton(false, 'frmCloneVolEvent', 'chkDate[]', 'Clear All Dates') . '<br>');
echoT('<b>Clone this shift to other event dates:</b><br>');
echoT('<input type="checkbox" name="chkVols" value="TRUE" checked>Include shift volunteer assignments<br>');
echoT('
      <div id="scrollCB" style="height:200px;   width:300px; overflow:auto;  border: 1px solid black;">' . "\n\n");
echoT('<table class="enpRpt" style="width: 100%">');
foreach ($dates as $clsDate) {
    $lDateID = $clsDate->lKeyID;
    if ($lEventDateID != $lDateID) {
        echoT('
            <tr>
               <td class="enpRpt" style="width: 10px; vertical-align:top;">
                  <input type="checkbox" name="chkDate[]" value="' . $lDateID . '">
               </td>
               <td class="enpRpt" style="vertical-align:top; width: 180px;">' . date($genumDateFormat . ' (D)', $clsDate->dteEvent) . '
               </td>
            </tr>');
    }
}
echoT('</table></div><br>

          <input type="submit" name="cmdSubmit" value="Clone Shift to Selected Dates"
              onclick="return(verifyBoxChecked(\'frmCloneVolEvent\', \'chkDate[]\', \' (Event Dates)\'))"
              style=""
              class="btn"
                 onmouseover="this.className=\'btn btnhov\'"
<?php

global $genumDateFormat;
if ($lNumEvents == 0) {
    echoT('<br><i>There are no <b>' . $strLabel . '</b> events to report!</i><br><br>');
} else {
    $attributes = array('name' => 'frmGroupRpt');
    echoT(form_open('reports/pre_vol_schedule/run', $attributes));
    echoT('<br><br>' . strHTMLSetClearAllButton(true, 'frmGroupRpt', 'chkEvent[]', 'Select All ') . '&nbsp;&nbsp;' . strHTMLSetClearAllButton(false, 'frmGroupRpt', 'chkEvent[]', 'Clear All') . '<br>');
    echoT('<div style="vertical-align: middle;">
             Please select the events you wish to view:<br><br></div>');
    $lHeight = 30 * $lNumEvents;
    if ($lHeight > 160) {
        $lHeight = 160;
    }
    if ($lHeight < 45) {
        $lHeight = 45;
    }
    echoT('
      <div id="scrollCB" style="height:' . $lHeight . 'px;   width:445px; overflow:auto;  border: 1px solid black;">' . "\n\n");
    echoT('<table class="enpRpt" style="width: 100%">');
    foreach ($events as $event) {
        $lEventID = $event->lKeyID;
        echoT('
            <tr>
               <td class="enpRpt" style="width: 10px; vertical-align:top;">
                  <input type="checkbox" name="chkEvent[]" value="' . $lEventID . '">
               </td>
               <td class="enpRpt" style="vertical-align:top; width: 220px;">' . htmlspecialchars($event->strEventName) . '
               </td>
               <td class="enpRpt" style="vertical-align:top; width: 220px;">' . date($genumDateFormat, $event->dteEventStart) . ' - ' . date($genumDateFormat, $event->dteEventEnd) . '
// attendance date
//----------------------
$clsForm->strStyleExtraLabel = 'width: 100pt; padding-top: 8px;';
echoT(strDatePicker('datepicker1', true));
$clsForm->strExtraFieldText = form_error('txtADate');
echoT($clsForm->strGenericDatePicker('Attendance Date', 'txtADate', true, $formData->txtADate, 'frmCloneAttendance', 'datepicker1'));
//----------------------
// skip duplicates
//----------------------
$clsForm->strStyleExtraLabel = 'padding-top: 4px;';
$clsForm->strExtraFieldText = '<br><i>If checked, skip clients who already
                have attendance records<br>for the specified date.</i>';
echoT($clsForm->strGenericCheckEntry('Skip duplicates', 'chkSkipDups', 'true', false, $bSkipDups));
// the client list
$clsForm->strStyleExtraLabel = 'padding-top: 8px;';
$strClientChk = strHTMLSetClearAllButton(true, 'frmCloneAttendance', 'chkClient[]', 'Select All') . '&nbsp;&nbsp;' . strHTMLSetClearAllButton(false, 'frmCloneAttendance', 'chkClient[]', 'Clear All') . '<br>' . "\n";
foreach ($clients as $client) {
    if ($client->lNumERecs > 0) {
        $lClientID = $client->lClientID;
        foreach ($client->erecs as $erec) {
            $strEDates = ' <i>(enrollment: ' . date('m/d/Y', $erec->dteStart) . ' - ';
            if (is_null($erec->dteEnd) || $erec->dteEnd == 0) {
                $strEDates .= 'ongoing)</i>';
            } else {
                $strEDates .= date('m/d/Y', $erec->dteEnd) . ')</i>';
            }
            $strClientChk .= '<div><input type="checkbox" name="chkClient[]" ' . ($client->bSelected ? 'checked' : '') . ' value="' . $client->lClientID . '_' . $erec->lKeyID . '">' . strLinkView_ClientRecord($lClientID, 'View client record', true) . '&nbsp;' . htmlspecialchars($client->strClientLName . ', ' . $client->strClientFName) . ' ' . $strEDates . '</div>' . "\n";
        }
    }
}
echoT($clsForm->strLabelRow('Clone to', $strClientChk, 1));
function showTSAdminsBlock($userAssignments, $lLabelWidth)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $attributes = new stdClass();
    $attributes->lTableWidth = 900;
    $attributes->divID = 'userADiv';
    $attributes->divImageID = 'userADivImg';
    $attributes->bStartOpen = true;
    openBlock('Staff Members Authorized To Edit Time Sheets', '', $attributes);
    $frmAtt = array('name' => 'frmAdminToTST');
    echoT(form_open('admin/timesheets/add_edit_tst_record/setTSTAdmins', $frmAtt));
    echoT('<br>' . strHTMLSetClearAllButton(true, 'frmAdminToTST', 'chkGroup[]', 'Select All ') . '&nbsp;&nbsp;' . strHTMLSetClearAllButton(false, 'frmAdminToTST', 'chkGroup[]', 'Clear All') . '<br>');
    echoT('<div style="vertical-align: middle;">
                Assign Staff Members to View/Edit Submitted Time Sheets<br>
                <i>You must click "Update Assignments" for your changes to be recorded.</i><br></div>');
    echoT('
         <div id="scrollCBAdmin" style="height:150px; width:310px; overflow:auto;  border: 1px solid black;">' . "\n\n");
    echoT('<table class="enpRpt" style="width: 100%">');
    foreach ($userAssignments as $uA) {
        $lUserID = $uA->lUserID;
        echoT('
            <tr>
               <td class="enpRpt" style="width: 10px; vertical-align:top;">');
        if ($uA->bAdmin) {
            echoT('<img src="' . base_url() . 'images/misc/checkBox.gif" title="Admin" border="0">');
        } else {
            echoT('
                  <input type="checkbox" 
                         name="chkGroup[]" 
                         value="' . $lUserID . '" ' . ($uA->bTSAdmin ? 'checked' : '') . '>');
        }
        echoT('
               </td>
               <td class="enpRpt" style="vertical-align:top; ">' . htmlspecialchars($uA->strLName . ', ' . $uA->strFName) . ($uA->bAdmin ? ' <i>(system admin)</i>' : '') . '
               </td>
            </tr>');
    }
    echoT('</table></div>

             <input type="submit" name="cmdSubmit" value="Update Assignments"
                 style=""
                 onClick="return(verifyBoxChecked(\'frmAdminToTST\', \'chkGroup[]\', \' (Staff members authorized to edit time sheets)\'));"
                 class="btn"
                    onmouseover="this.className=\'btn btnhov\'"
                    onmouseout="this.className=\'btn\'">');
    echoT(form_close('<br>'));
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}