function showClientInfo($clsRpt, $lCID, $clsClient, $clsDateTime, $bShowAddNew, $lSponID, $bViewOnly, $strClientPreLabel = '') { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $gbDateFormatUS, $genumDateFormat, $glclsDTDateFormat; if (is_null($lCID)) { if ($bViewOnly) { $attributes = new stdClass(); $attributes->lTableWidth = 900; $attributes->divID = 'clientA'; $attributes->divImageID = 'clientADivImg'; openBlock('Client Information', '', $attributes); } else { openBlock('Client Information', ''); } echoT('<i>No client has been linked to this sponsorship.</i>'); if ($bShowAddNew) { echoT(' ' . strLinkAdd_ClientToSpon($lSponID, 'Add client to this sponsorship', true) . ' ' . strLinkAdd_ClientToSpon($lSponID, 'Add client to this sponsorship', false) . ' '); } if ($bViewOnly) { $attributes = new stdClass(); $attributes->bCloseDiv = true; closeBlock($attributes); } else { closeBlock(); } } else { $clsC = $clsClient->clients[0]; if ($bShowAddNew) { echoT(strLinkAdd_Client('Add new client', true) . ' ' . strLinkAdd_Client('Add new client', false) . ' ' . strLinkSpecial_SearchClient('Search clients', true) . ' ' . strLinkSpecial_SearchClient('Search clients', false) . '<br>'); } if (isset($clsC->strFlagsTable)) { $strCFlags = ' ' . $clsC->strFlagsTable; } else { $strCFlags = ''; } if ($bViewOnly) { $strBlockLink = strLinkView_ClientRecord($lCID, 'View client record', true) . ' ' . strLinkView_ClientRecord($lCID, 'View client record', false); $strVocLink = ''; $strLinkLocation = ''; $strLinkStatCat = ''; $strLinkStatHist = ''; $strLinkRem = ''; $attributes = new stdClass(); $attributes->lTableWidth = 900; $attributes->divID = 'clientB'; $attributes->divImageID = 'clientBDivImg'; openBlock($strClientPreLabel . $clsClient->clients[0]->cv_strVocClientS, $strBlockLink . $strCFlags, $attributes); } else { /* $strBlockLink = strLinkEdit_Client ($lCID, 'Edit client record', true ).' ' .strLinkEdit_Client ($lCID, 'Edit client record', false).' ' .strLinkView_ClientAssessmentViaCID($lCID, 'Client Assessments', true ).' ' .strLinkView_ClientAssessmentViaCID($lCID, 'Client Assessments', false); */ $strBlockLink = strLinkEdit_Client($lCID, 'Edit client record', true) . ' ' . strLinkEdit_Client($lCID, 'Edit client record', false); $strVocLink = strLinkEdit_ClientRecVoc($lCID, 'Edit this client\'s vocabulary', true) . ' '; $strLinkLocation = strLinkView_ClientsViaLocation($clsC->lLocationID, 'View this location\'s directory', true); $strLinkStatCat = strLinkEdit_ClientRecStatCat($lCID, 'Edit this client\'s status category', true) . ' '; $strLinkStatHist = strLinkView_ClientStatusHistory($lCID, 'status history', true); $strLinkRem = ' ' . strLinkRem_Client($lCID, 'Remove client record', true, true); openBlock($strClientPreLabel . $clsClient->clients[0]->cv_strVocClientS, $strBlockLink . $strCFlags . $strLinkRem); } echoT($clsRpt->openReport() . $clsRpt->openRow() . $clsRpt->writeLabel('Client ID:') . $clsRpt->writeCell(str_pad($lCID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell(htmlspecialchars($clsC->strFName . ' ' . $clsC->strMName . ' ' . $clsC->strLName . ' (' . $clsC->enumGender . ')')) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Enrollment Date:') . $clsRpt->writeCell(date($genumDateFormat, $clsC->dteEnrollment)) . $clsRpt->closeRow()); //--------------- // birthday //--------------- $mdteBirth = $clsC->dteBirth; $clsDateTime->setDateViaMySQL(0, $mdteBirth); $strAgeBDay = $clsDateTime->strPeopleAge(0, $mdteBirth, $lAgeYears, $glclsDTDateFormat); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Birth Date:') . $clsRpt->writeCell($strAgeBDay) . $clsRpt->closeRow()); //--------------- // location //--------------- echoT($clsRpt->openRow() . $clsRpt->writeLabel('Location:') . $clsRpt->writeCell($strLinkLocation . htmlspecialchars($clsC->strLocation)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Max # of Sponsors:') . $clsRpt->writeCell($clsC->lMaxSponsors) . $clsRpt->closeRow()); //------------------------ // Address //------------------------ echoT($clsRpt->openRow() . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell($clsC->strAddress) . $clsRpt->closeRow()); //------------------------ // Email //------------------------ echoT($clsRpt->openRow() . $clsRpt->writeLabel('Email:') . $clsRpt->writeCell($clsC->strEmailFormatted) . $clsRpt->closeRow()); //------------------------ // Phone //------------------------ echoT($clsRpt->openRow() . $clsRpt->writeLabel('Phone:') . $clsRpt->writeCell(htmlspecialchars(strPhoneCell($clsC->strPhone, $clsC->strCell))) . $clsRpt->closeRow()); //--------------- // Vocabulary //--------------- echoT($clsRpt->openRow() . $clsRpt->writeLabel('Vocabulary:') . $clsRpt->writeCell($strVocLink . $clsC->cv_strVocTitle) . $clsRpt->closeRow()); //------------------ // Status Category //------------------ echoT($clsRpt->openRow() . $clsRpt->writeLabel('Status Category:') . $clsRpt->writeCell($strLinkStatCat . $clsC->strStatusCatName) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Current Status:') . $clsRpt->writeCell($strLinkStatHist . $clsC->curStat_strStatus . ' <small>(set on ' . date($genumDateFormat, $clsC->curStat_dteStatus) . ')</small>') . $clsRpt->closeRow()); //------------------ // Attributed To //------------------ echoT($clsRpt->openRow() . $clsRpt->writeLabel('Attributed To:') . $clsRpt->writeCell(htmlspecialchars($clsC->strAttrib)) . $clsRpt->closeRow()); //------------------ // Bio //------------------ echoT($clsRpt->openRow() . $clsRpt->writeLabel('Bio:') . $clsRpt->writeCell(nl2br(htmlspecialchars($clsC->strBio))) . $clsRpt->closeRow()); echoT($clsRpt->closeReport()); if ($bViewOnly) { $attributes = new stdClass(); $attributes->bCloseDiv = true; closeBlock($attributes); } else { closeBlock(); } } }
echoT(' <tr class="makeStripe"> <td class="enpRpt" style="text-align: center; width: 60pt;">' . strLinkView_ClientLocation($lCLID, 'View client location', true, 'id="cLocView_' . $lCLID . '"') . ' ' . str_pad($lCLID, 5, '0', STR_PAD_LEFT) . ' </td> <td class="enpRpt" style="text-align: center; width: 18pt;">' . $strLinkRemove . ' </td> <td class="enpRpt" style=" width: 160pt;"><b>' . htmlspecialchars($clsLoc->strLocation) . '</b><br>'); echoT($clsLoc->strSponProg); $lNumSponsors = $clsLoc->lNumSponsors; if ($lNumSponsors > 0) { $strLinkSpon = strLinkView_SponsorsViaLocProg($lCLID, 'View sponsors for this location', true); } else { $strLinkSpon = ' '; } echoT(' </td> <td class="enpRpt" style=" width: 160pt;">' . strBuildAddress($clsLoc->strAddress1, $clsLoc->strAddress2, $clsLoc->strCity, $clsLoc->strState, $clsLoc->strCountry, $clsLoc->strPostalCode, true) . ' </td> <td class="enpRpt" style=" width: 70pt;">' . htmlspecialchars($clsLoc->strCountry) . ' </td> <td class="enpRpt" style="text-align: center; width: 70pt;">' . number_format($clsLoc->lNumberClients) . ' ' . strLinkView_ClientsViaLocation($lCLID, 'View Clients at this Location', true) . ' </td> <td class="enpRpt" style="text-align: center;">' . number_format($clsLoc->lNumSponsors) . ' ' . $strLinkSpon . ' </td> <td class="enpRpt" style="text-align: center;">' . ($clsLoc->bEnableEMR ? 'Yes' : 'No') . ' </td> </tr>'); } ?> </table><br>