Ejemplo n.º 1
0
function showVolunteerRec($clsRpt, &$volRec, $lVolID)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $gbVolMgr;
    $strLinkEdit = strLinkEdit_Volunteer($lVolID, 'Edit record', true, ' id="editPrec" ') . ' ' . strLinkEdit_Volunteer($lVolID, 'Edit', false, ' id="editPrec1" ');
    openBlock($gbVolMgr ? 'Volunteer' : 'Your Contact Information', $strLinkEdit);
    echoT($clsRpt->openReport());
    // Vol. ID
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Vol ID:') . $clsRpt->writeCell(str_pad($lVolID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow());
    // name
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell(htmlspecialchars($volRec->strLName . ', ' . $volRec->strFName . ' ' . $volRec->strTitle)) . $clsRpt->closeRow());
    // Prefered name
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Prefered Name:') . $clsRpt->writeCell(htmlspecialchars($volRec->strPreferred)) . $clsRpt->closeRow());
    // date of birth
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Date of Birth:') . $clsRpt->writeCell($volRec->mdteBirthDate) . $clsRpt->closeRow());
    // status
    if ($gbVolMgr) {
        $bActive = $volRec->bActive;
        $strLinkAct = '   ' . strLink_VolActiveInactive($lVolID, !$bActive, 'Set to ' . (!$bActive ? 'active' : 'inactive'), true) . ' ' . strLink_VolActiveInactive($lVolID, !$bActive, 'Set to ' . (!$bActive ? 'active' : 'inactive'), false);
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Status:') . $clsRpt->writeCell(($volRec->bActive ? 'Active' : 'Inactive') . $strLinkAct) . $clsRpt->closeRow());
    }
    // address 1
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Address 1:') . $clsRpt->writeCell(htmlspecialchars($volRec->strAddr1)) . $clsRpt->closeRow());
    // address 2
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Address 2:') . $clsRpt->writeCell(htmlspecialchars($volRec->strAddr2)) . $clsRpt->closeRow());
    // city/state/zip/country
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('City/State/Zip/Country:') . $clsRpt->writeCell(htmlspecialchars($volRec->strCity . ', ' . $volRec->strState . ' ' . $volRec->strZip . ' ' . $volRec->strCountry)) . $clsRpt->closeRow());
    // phone
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Phone:') . $clsRpt->writeCell(htmlspecialchars($volRec->strPhone)) . $clsRpt->closeRow());
    // cell
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Cell:') . $clsRpt->writeCell(htmlspecialchars($volRec->strCell)) . $clsRpt->closeRow());
    // email
    if ($volRec->strEmail == '') {
        $strEMail = '';
    } else {
        $strEMail = '<a href="mailto:' . $volRec->strEmail . '">' . $volRec->strEmail . '</a>';
    }
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('EMail:') . $clsRpt->writeCell($strEMail) . $clsRpt->closeRow());
    // notes
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Notes:') . $clsRpt->writeCell(nl2br(htmlspecialchars($volRec->strNotes))) . $clsRpt->closeRow());
    echoT($clsRpt->closeReport());
    closeBlock();
}
 if ($bInactive) {
     $strColor = ' color: #888;';
 } else {
     $strColor = '';
 }
 if ($bInactive) {
     $strLinkResetPW = $strLinkAddMiscAct = $strLinkAddNewAssoc = $strLinkTraining = '';
 } else {
     $strLinkResetPW = strLinkEdit_ResetPWord($lAcctID, true, 'Password') . '&nbsp;' . strLinkEdit_ResetPWord($lAcctID, false, 'Password') . '<br>';
     $strLinkAddMiscAct = strLinkAdd_VolMgrAddMiscVolActivity($lVolID, 'Vol. activity', true, ' id="otherVAct_' . $lVolID . '" ') . '&nbsp;' . strLinkAdd_VolMgrAddMiscVolActivity($lVolID, 'Vol. activity', false) . '<br>';
     $strLinkAddNewAssoc = strLinkAdd_PatientAssociation($lVolID, 'Add association', true, ' id="pvAssoc_' . $lVolID . '" ') . '&nbsp;' . strLinkAdd_PatientAssociation($lVolID, 'Add association', false) . '<br>';
     $strLinkTraining = strLinkView_VMgrViewVolTraining($lVolID, 'Training Log', true, ' id="vTrain_' . $lVolID . '" ') . '&nbsp;' . strLinkView_VMgrViewVolTraining($lVolID, 'Training Log', false);
 }
 echoT($clsRpt->openRow(true));
 echoT($clsRpt->writeCell(strLinkView_VolRecord($lVolID, 'View record', true, ' id="vvolRec_' . $lVolID . '" ') . '&nbsp;' . str_pad($lVolID, 5, '0', STR_PAD_LEFT), 60, 'text-align: center;' . $strColor));
 echoT($clsRpt->writeCell(($vol->bInactive ? 'No' : 'Yes') . '&nbsp;' . strLink_VolActiveInactive($lVolID, $bInactive, 'Set to ' . ($bInactive ? 'active' : 'inactive'), true), 60, 'text-align: center;' . $strColor));
 //---------------------------
 // name
 //---------------------------
 echoT($clsRpt->writeCell($vol->strSafeNameLF . '<br><br>' . strLinkView_VMgrViewVolLog($lVolID, 'Volunteer Log', true) . '&nbsp;' . strLinkView_VMgrViewVolLog($lVolID, 'Volunteer Log', false) . '<br>', 220, $strColor));
 //---------------------------
 // address
 //---------------------------
 $strPC = trim(strPhoneCell($vol->strPhone, $vol->strCell, true, true));
 if ($strPC != '') {
     $strPC .= '<br>';
 }
 echoT($clsRpt->writeCell($vol->strAddress, 160, $strColor));
 echoT($clsRpt->writeCell($strPC . $vol->strEmailFormatted, 100, $strColor));
 //---------------------------
 // tools