Exemplo n.º 1
0
 $OutStr = "";
 extract($aRow);
 $isFamily = false;
 if ($memberCount > 1) {
     $iFamilyID = $per_fam_ID;
     $isFamily = true;
     $pdf->sRecordName = "";
     $pdf->sLastName = $fam_Name;
     $OutStr .= $pdf->sGetFamilyString($aRow);
     $bNoRecordName = true;
     // Find the Head of Household
     $sSQL = "SELECT * from (person_per {$sGroupTable}) LEFT JOIN family_fam ON per_fam_ID = fam_ID \n            WHERE per_fam_ID = " . $iFamilyID . " \n            AND per_fmr_ID in ({$sDirRoleHeads}) {$sWhereExt} {$sClassQualifier} {$sGroupBy}";
     $rsPerson = RunQuery($sSQL);
     if (mysql_num_rows($rsPerson) > 0) {
         $aHead = mysql_fetch_array($rsPerson);
         $OutStr .= $pdf->sGetHeadString($rsCustomFields, $aHead);
         $bNoRecordName = false;
     }
     // Find the Spouse of Household
     $sSQL = "SELECT * from (person_per {$sGroupTable}) LEFT JOIN family_fam ON per_fam_ID = fam_ID \n            WHERE per_fam_ID = " . $iFamilyID . " \n            AND per_fmr_ID in ({$sDirRoleSpouses}) {$sWhereExt} {$sClassQualifier} {$sGroupBy}";
     $rsPerson = RunQuery($sSQL);
     if (mysql_num_rows($rsPerson) > 0) {
         $aSpouse = mysql_fetch_array($rsPerson);
         $OutStr .= $pdf->sGetHeadString($rsCustomFields, $aSpouse);
         $bNoRecordName = false;
     }
     // In case there was no head or spouse, just set record name to family name
     if ($bNoRecordName) {
         $pdf->sRecordName = $fam_Name;
     }
     // Find the other members of a family
Exemplo n.º 2
0
$sLastLetter = "0";
while ($aRow = mysql_fetch_array($rsRecords)) {
    $OutStr = "";
    extract($aRow);
    if ($memberCount > 1) {
        $iFamilyID = $per_fam_ID;
        $pdf->sRecordName = "";
        $pdf->sLastName = $fam_Name;
        $OutStr .= $pdf->sGetFamilyString($aRow);
        $bNoRecordName = true;
        // Find the Head of Household
        $sSQL = "SELECT * from person_per {$sGroupTable} LEFT JOIN family_fam ON per_fam_ID = fam_ID \n\t\t\tWHERE per_fam_ID = " . $iFamilyID . " \n\t\t\tAND per_fmr_ID in ({$sDirRoleHeads}) {$sWhereExt} {$sClassQualifier} {$sGroupBy}";
        $rsPerson = RunQuery($sSQL);
        if (mysql_num_rows($rsPerson) > 0) {
            $aHead = mysql_fetch_array($rsPerson);
            $OutStr .= $pdf->sGetHeadString($aHead);
            $bNoRecordName = false;
        }
        // Find the Spouse of Household
        $sSQL = "SELECT * from person_per {$sGroupTable} LEFT JOIN family_fam ON per_fam_ID = fam_ID \n\t\t\tWHERE per_fam_ID = " . $iFamilyID . " \n\t\t\tAND per_fmr_ID in ({$sDirRoleSpouses}) {$sWhereExt} {$sClassQualifier} {$sGroupBy}";
        $rsPerson = RunQuery($sSQL);
        if (mysql_num_rows($rsPerson) > 0) {
            $aSpouse = mysql_fetch_array($rsPerson);
            $OutStr .= $pdf->sGetHeadString($aSpouse);
            $bNoRecordName = false;
        }
        // In case there was no head or spouse, just set record name to family name
        if ($bNoRecordName) {
            $pdf->sRecordName = $fam_Name;
        }
        // Find the other members of a family