示例#1
0
            $TempStr = ExpandPhoneNumber($sCellPhone, $sDefaultCountry, $bWierd);
            $OutStr .= "   " . gettext("Cell") . ": " . $TempStr . "\n";
        }
        if ($bDirPersonalEmail && strlen($sEmail)) {
            $OutStr .= "   " . gettext("Email") . ": " . $sEmail . "\n";
        }
        if ($bDirPersonalWorkEmail && strlen($per_WorkEmail)) {
            $OutStr .= "   " . gettext("Work/Other Email") . ": " . ($per_WorkEmail .= "\n");
        }
    }
    // Count the number of lines in the output string
    if (strlen($OutStr)) {
        $numlines = substr_count($OutStr, "\n");
    } else {
        $numlines = 0;
    }
    if ($numlines > 0) {
        if (strtoupper($sLastLetter) != strtoupper(substr($pdf->sRecordName, 0, 1))) {
            $pdf->Check_Lines($numlines + 2);
            $sLastLetter = strtoupper(substr($pdf->sRecordName, 0, 1));
            $pdf->Add_Header($sLastLetter);
        }
        $pdf->Add_Record($pdf->sRecordName, $OutStr, $numlines);
        // another hack: added +1
    }
}
if ($iPDFOutputType == 1) {
    $pdf->Output("Directory-" . date("Ymd-Gis") . ".pdf", true);
} else {
    $pdf->Output();
}
示例#2
0
     }
     if ($bDirPersonalWorkEmail && strlen($per_WorkEmail)) {
         $OutStr .= "   " . gettext("Work/Other Email") . ": " . ($per_WorkEmail .= "\n");
     }
     // Custom Fields
     $OutStr .= $pdf->sGetCustomString($rsCustomFields, $aRow);
 }
 // Count the number of lines in the output string
 if (strlen($OutStr)) {
     $numlines = $pdf->NbLines($pdf->_ColWidth, $OutStr);
 } else {
     $numlines = 0;
 }
 if ($numlines > 0) {
     if (strtoupper($sLastLetter) != strtoupper(substr($pdf->sRecordName, 0, 1))) {
         $pdf->Check_Lines($numlines + 2, 0, 0);
         $sLastLetter = strtoupper(substr($pdf->sRecordName, 0, 1));
         $pdf->Add_Header($sLastLetter);
     }
     // if photo include pass the id, otherwise 0 equates to no family/pers
     $fid = 0;
     $pid = 0;
     if ($bDirPhoto) {
         if ($isFamily) {
             $fid = $fam_ID;
         } else {
             $pid = $per_ID;
         }
     }
     $pdf->Add_Record($pdf->sRecordName, $OutStr, $numlines, $fid, $pid);
     // another hack: added +1
示例#3
0
$sSQL = "SELECT * from family_fam where fam_ID = " . $sFamilyID;
$rsFamily = RunQuery($sSQL);
$aRow = mysql_fetch_array($rsFamily);
extract($aRow);
$sSQL = "SELECT * from person_per LEFT JOIN person_custom on person_custom.per_ID = person_per.per_ID where per_fam_ID = " . $sFamilyID . " order by per_fmr_ID";
$rsPersonInFam = RunQuery($sSQL);
if ($bDirUseTitlePage) {
    $pdf->TitlePage();
}
while ($aPersonInFam = mysql_fetch_array($rsPersonInFam)) {
    extract($aPersonInFam);
    $sName = $per_LastName . ", " . $per_FirstName . " " . $per_MiddleName;
    $aName .= $sName . "\n";
    $numlines++;
    // add an extra blank line after record
    $pdf->Check_Lines(30);
    $pdf->Print_Name($sName);
    $PosX = $pdf->_Margin_Left + 163;
    $PosY = $pdf->_Margin_Top + ($pdf->_CurLine - 1) * 5;
    $sDirImagePer = "..\\Images\\Person\\thumbnails\\" . $per_ID . ".jpg";
    if (is_readable($sDirImagePer)) {
        $pdf->Image($sDirImagePer, $PosX, $PosY, 25);
    }
    $sTitle = "No. Induk";
    $sValue = $fam_NoIndFam . "-" . $per_NoIndJem . "." . $fam_NamaSek;
    $aNoInd .= $sValue . "\n";
    $pdf->Add_Record($sTitle, $sValue, 1);
    $sTitle = "Tempat/Tanggal Lahir";
    if ($per_BirthPlace == "") {
        $per_BirthPlace = "____________";
    }