if ($lNumPeople == 0) { echoT($clsRpt->openRow(true)); echoT($clsRpt->writeCell('<i>No ' . $strPeopleType . ' match your search criteria</i>', '', '', 5)); echoT($clsRpt->closeRow('')); } else { foreach ($people as $person) { $lPID = $person->lKeyID; echoT($clsRpt->openRow(true)); //-------------------- // People ID //-------------------- echoT($clsRpt->writeCell(strLinkView_PeopleRecord($lPID, 'View people record', true) . ' ' . str_pad($lPID, 5, '0', STR_PAD_LEFT), 60)); //-------------------- // Name //-------------------- echoT($clsRpt->writeCell($person->strSafeNameLF . '<br>' . strLinkView_Household($person->lHouseholdID, $lPID, 'View household', true) . '<i>' . htmlspecialchars($person->strHouseholdName) . '</i>', 240)); //-------------------- // Address //-------------------- echoT($clsRpt->writeCell($person->strAddress, 160)); //------------------ // relationships //------------------ $strRels = ''; if ($person->lNumFromRels > 0 || $person->lNumToRels) { if ($person->lNumFromRels > 0) { foreach ($person->fromRels as $a2b) { $lPIDLink = $a2b->lPerson_B_ID; if ($a2b->bSoftDonations) { $strSoftImg = ' <img src="' . IMGLINK_DOLLAR . ' " border="0">'; } else {
function showHouseholdInfo(&$people, $lPID, $arrHouseholds) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $attributes = new stdClass(); $attributes->lTableWidth = 900; $attributes->divID = 'peopleHousehold'; $attributes->divImageID = 'phdivImg'; openBlock('Household', strLinkView_Household($people->lHouseholdID, $lPID, 'View Household', true) . ' ' . strLinkView_Household($people->lHouseholdID, $lPID, 'View Household', false), $attributes); echoT('<table>'); foreach ($arrHouseholds as $idx => $hhMember) { $strHOH = $idx == 0 ? ' (head of household)' : ''; echoT(' <tr> <td>'); if ($hhMember->PID == $lPID) { echoT(' '); } else { echoT(strLinkView_PeopleRecord($hhMember->PID, 'View People Record', true)); } echoT(' </td> <td>' . htmlspecialchars($hhMember->FName . ' ' . $hhMember->LName) . $strHOH . ' </td> </tr>'); } echoT('</table>'); $attributes = new stdClass(); $attributes->bCloseDiv = true; closeBlock($attributes); }
public function peopleHTMLSummary($idx) { //----------------------------------------------------------------------- // assumes user has called $clsPeople->loadPeople($bIncludeSpon, $bIncludeGiftSum, //----------------------------------------------------------------------- global $gdteNow, $genumDateFormat; $strOut = ''; $params = array('enumStyle' => 'terse'); $clsRpt = new generic_rpt($params); $clsRpt->setEntrySummary(); $lPID = $this->people[$idx]->lKeyID; $strOut .= $clsRpt->openReport('', '') . $clsRpt->openRow(false) . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell($this->people[$idx]->strSafeName . ' (people ID ' . str_pad($lPID, 5, '0', STR_PAD_LEFT) . strLinkView_PeopleRecord($lPID, 'View People Record', true) . ')') . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell($this->people[$idx]->strAddress) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Household:') . $clsRpt->writeCell(htmlspecialchars($this->people[$idx]->strHouseholdName) . strLinkView_Household($this->people[$idx]->lHouseholdID, $lPID, 'View household', true)) . $clsRpt->closeRow(); if (!is_null($this->people[$idx]->dteExpire)) { $dteExpire = $this->people[$idx]->dteExpire; $strDateExpire = date($genumDateFormat, $dteExpire); $strOut .= $clsRpt->openRow(false) . $clsRpt->writeLabel('Expiration:'); if ($dteExpire > $gdteNow) { $strOut .= $clsRpt->writeCell('THIS PEOPLE RECORD WILL EXPIRE ON ' . $strDateExpire); } else { $strOut .= $clsRpt->writeCell('<font color="red"><b>EXPIRED ON ' . $strDateExpire . '</b></font>'); } $strOut .= $clsRpt->closeRow(); } $strOut .= $clsRpt->closeReport('<br>'); return $strOut; }
function strLinkView_ViaRecType($enumSearchType, $lFKey01 = null, $lFKey02 = null) { //----------------------------------------------------------------- // //----------------------------------------------------------------- switch ($enumSearchType) { case CENUM_CONTEXT_HOUSEHOLD: return strLinkView_Household($lFKey01, $lFKey02, 'View household', true); break; case CENUM_CONTEXT_PEOPLE: return strLinkView_PeopleRecord($lFKey01, 'View people record', true); break; case CENUM_CONTEXT_BIZ: return strLinkView_BizRecord($lFKey01, 'View business/prganization record', true); break; case CENUM_CONTEXT_CLIENT: return strLinkView_ClientRecord($lFKey01, 'View client record', true); break; case CENUM_CONTEXT_SPONSORSHIP: return strLinkView_Sponsorship($lFKey01, 'View sponsor record', true); break; default: screamForHelp($enumSearchType . ': invalid link type<br>error on <b>line:</b> ' . __LINE__ . '<br><b>file: </b>' . __FILE__ . '<br><b>function: </b>' . __FUNCTION__); break; } }
echoT($clsRpt->closeRow()); if ($lNumPeople == 0) { echoT($clsRpt->openRow(true)); echoT($clsRpt->writeCell('<i>No ' . $strPeopleType . ' match your search criteria</i>', '', '', $lNumCols)); } else { foreach ($people as $hoh) { //echo('<font class="debug">'.substr(__FILE__, strrpos(__FILE__, '\\')) // .': '.__LINE__.'<pre>'); print_r($hoh); echo('</pre></font><br>'); $lHID = $hoh->lKeyID; echoT($clsRpt->openRow(true)); // $strHONSafeNameFL = $hoh->strSafeName; //-------------------- // Household ID //-------------------- if ($showFields->bHouseholdID) { echoT($clsRpt->writeCell(strLinkView_Household($lHID, $lHID, 'View household', true) . ' ' . str_pad($lHID, 5, '0', STR_PAD_LEFT), 60)); } //-------------------- // Household Name //-------------------- if ($showFields->bHouseholdName) { echoT($clsRpt->writeCell('<i>' . htmlspecialchars($hoh->strHouseholdName) . '</i>', 240)); } //-------------------- // Household Members //-------------------- if ($showFields->bHouseholdMembers) { $strCell = '<table width="100%" border="0">'; foreach ($hoh->household as $member) { //echo('<font class="debug">'.substr(__FILE__, strrpos(__FILE__, '\\')) // .': '.__LINE__.'<pre>'); print_r($member); echo('</pre></font><br>');