Exemplo n.º 1
0
function GenerateLabels(&$pdf, $mode, $bOnlyComplete = false)
{
    if ($mode == "indiv") {
        $sSQL = "SELECT * FROM person_per LEFT JOIN family_fam ON person_per.per_fam_ID = family_fam.fam_ID WHERE per_ID IN (" . ConvertCartToString($_SESSION['aPeopleCart']) . ") ORDER BY per_LastName";
    } else {
        $sSQL = "(SELECT *, 0  AS memberCount FROM person_per  LEFT JOIN family_fam ON per_fam_ID = fam_ID WHERE per_fam_ID = 0 AND per_ID in ( " . ConvertCartToString($_SESSION['aPeopleCart']) . " ))\n\t\tUNION (SELECT *, COUNT(*) AS memberCount FROM person_per  LEFT JOIN family_fam ON per_fam_ID = fam_ID WHERE per_fam_ID > 0 AND per_ID in ( " . ConvertCartToString($_SESSION['aPeopleCart']) . " ) GROUP BY per_fam_ID HAVING memberCount = 1)\n\t\tUNION (SELECT *, COUNT(*) AS memberCount FROM person_per  LEFT JOIN family_fam ON per_fam_ID = fam_ID WHERE per_fam_ID > 0 AND per_ID in ( " . ConvertCartToString($_SESSION['aPeopleCart']) . " ) GROUP BY per_fam_ID HAVING memberCount > 1)";
    }
    $rsCartItems = RunQuery($sSQL);
    while ($aRow = mysql_fetch_array($rsCartItems)) {
        $sRowClass = AlternateRowStyle($sRowClass);
        if ($aRow['memberCount'] > 1 && $mode == "fam") {
            $sName = $aRow['fam_Name'] . " Family";
        } else {
            $sName = FormatFullName($aRow['per_Title'], $aRow['per_FirstName'], "", $aRow['per_LastName'], $aRow['per_Suffix'], 1);
        }
        SelectWhichAddress($sAddress1, $sAddress2, $aRow['per_Address1'], $aRow['per_Address2'], $aRow['fam_Address1'], $aRow['fam_Address2'], false);
        $sCity = SelectWhichInfo($aRow['per_City'], $aRow['fam_City'], False);
        $sState = SelectWhichInfo($aRow['per_State'], $aRow['fam_State'], False);
        $sZip = SelectWhichInfo($aRow['per_Zip'], $aRow['fam_Zip'], False);
        $sAddress = $sAddress1;
        if ($sAddress2 != "") {
            $sAddress .= "\n" . $sAddress2;
        }
        if (!$bOnlyComplete || strlen($sAddress) && strlen($sCity) && strlen($sState) && strlen($sZip)) {
            $pdf->Add_PDF_Label(sprintf("%s\n%s\n%s, %s %s", $sName, $sAddress, $sCity, $sState, $sZip));
        }
    }
}
Exemplo n.º 2
0
        <select name="User" class="TextColumn" onChange="javascript:document.getElementById('PasswordError').innerHTML = '';">
          <option value="0"><?php 
echo gettext("Pilih salah satu");
?>
</option>
          <option value="0">--------------------</option>
          <?php 
while ($aRow = mysql_fetch_array($rsUsers)) {
    extract($aRow);
    // Write the <option> tag
    echo "<option style=\"color:#004477;\" value=\"" . $usr_per_ID . "\"";
    if ($iUserID == $usr_per_ID) {
        echo " selected";
    }
    echo ">";
    $userString = FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 0);
    echo $userString;
    for ($iCount = 25 - strlen($userString); $iCount > 0; $iCount--) {
        echo "&nbsp;";
    }
    echo "[" . $usr_per_ID . "]";
    echo "</option>";
}
?>
        </select>
		<br>
		<br>
		<?php 
echo gettext("Password:"******"password" id="Password" name="Password" size="10">
Exemplo n.º 3
0
}
$sSQL .= "LEFT JOIN person2group2role_p2g2r ON p2g2r_per_ID = person_per.per_ID\n\t\t\tWHERE p2g2r_grp_ID = " . $iGroupID;
if ($iRoleID > 0) {
    $sSQL .= " AND p2g2r_rle_ID = " . $iRoleID;
}
if ($bOnlyCartMembers && count($_SESSION['aPeopleCart']) > 0) {
    $sSQL .= " AND person_per.per_ID IN (" . ConvertCartToString($_SESSION['aPeopleCart']) . ")";
}
$sSQL .= " ORDER BY per_LastName";
$rsRecords = RunQuery($sSQL);
// This is used for the headings for the letter changes.
// Start out with something that isn't a letter to force the first one to work
// $sLastLetter = "0";
while ($aRow = mysql_fetch_array($rsRecords)) {
    $OutStr = "";
    $pdf->sFamily = FormatFullName($aRow['per_Title'], $aRow['per_FirstName'], $aRow['per_MiddleName'], $aRow['per_LastName'], $aRow['per_Suffix'], 3);
    SelectWhichAddress($sAddress1, $sAddress2, $aRow['per_Address1'], $aRow['per_Address2'], $aRow['fam_Address1'], $aRow['fam_Address2'], false);
    $sCity = SelectWhichInfo($aRow['per_City'], $aRow['fam_City'], false);
    $sState = SelectWhichInfo($aRow['per_State'], $aRow['fam_State'], false);
    $sZip = SelectWhichInfo($aRow['per_Zip'], $aRow['fam_Zip'], false);
    $sHomePhone = SelectWhichInfo($aRow['per_HomePhone'], $aRow['fam_HomePhone'], false);
    $sWorkPhone = SelectWhichInfo($aRow['per_WorkPhone'], $aRow['fam_WorkPhone'], false);
    $sCellPhone = SelectWhichInfo($aRow['per_CellPhone'], $aRow['fam_CellPhone'], false);
    $sEmail = SelectWhichInfo($aRow['per_Email'], $aRow['fam_Email'], false);
    if (isset($_POST['GroupRoleEnable'])) {
        $OutStr = gettext("Role") . ": " . $aRoleNames[$aRow['p2g2r_rle_ID']] . "\n";
    }
    if (isset($_POST['AddressEnable'])) {
        if (strlen($sAddress1)) {
            $OutStr .= $sAddress1 . "\n";
        }
Exemplo n.º 4
0
function loadperson($iPersonID)
{
    $sSQL = "SELECT a.*, family_fam.*, cls.lst_OptionName AS sClassName, fmr.lst_OptionName AS sFamRole, b.per_FirstName AS EnteredFirstName,\n\t\t\t\t\tb.Per_LastName AS EnteredLastName, c.per_FirstName AS EditedFirstName, c.per_LastName AS EditedLastName\n\t\t\t\tFROM person_per a\n\t\t\t\tLEFT JOIN family_fam ON a.per_fam_ID = family_fam.fam_ID\n\t\t\t\tLEFT JOIN list_lst cls ON a.per_cls_ID = cls.lst_OptionID AND cls.lst_ID = 1\n\t\t\t\tLEFT JOIN list_lst fmr ON a.per_fmr_ID = fmr.lst_OptionID AND fmr.lst_ID = 2\n\t\t\t\tLEFT JOIN person_per b ON a.per_EnteredBy = b.per_ID\n\t\t\t\tLEFT JOIN person_per c ON a.per_EditedBy = c.per_ID\n\t\t\t\tWHERE a.per_ID = " . $iPersonID;
    $rsPerson = RunQuery($sSQL);
    extract(mysql_fetch_array($rsPerson));
    // Get the lists of custom person fields
    $sSQL = "SELECT person_custom_master.* FROM person_custom_master\n\t\t\t\tWHERE custom_Side = 'left' ORDER BY custom_Order";
    $rsLeftCustomFields = RunQuery($sSQL);
    $sSQL = "SELECT person_custom_master.* FROM person_custom_master\n\t\t\t\tWHERE custom_Side = 'right' ORDER BY custom_Order";
    $rsRightCustomFields = RunQuery($sSQL);
    // Get the custom field data for this person.
    $sSQL = "SELECT * FROM person_custom WHERE per_ID = " . $iPersonID;
    $rsCustomData = RunQuery($sSQL);
    $aCustomData = mysql_fetch_array($rsCustomData, MYSQL_BOTH);
    // Get the notes for this person
    $sSQL = "SELECT nte_Private, nte_ID, nte_Text, nte_DateEntered, nte_EnteredBy, nte_DateLastEdited, nte_EditedBy, a.per_FirstName AS EnteredFirstName, a.Per_LastName AS EnteredLastName, b.per_FirstName AS EditedFirstName, b.per_LastName AS EditedLastName ";
    $sSQL .= "FROM note_nte ";
    $sSQL .= "LEFT JOIN person_per a ON nte_EnteredBy = a.per_ID ";
    $sSQL .= "LEFT JOIN person_per b ON nte_EditedBy = b.per_ID ";
    $sSQL .= "WHERE nte_per_ID = " . $iPersonID;
    // Admins should see all notes, private or not.  Otherwise, only get notes marked non-private or private to the current user.
    if (!$_SESSION['bAdmin']) {
        $sSQL .= " AND (nte_Private = 0 OR nte_Private = " . $_SESSION['iUserID'] . ")";
    }
    $rsNotes = RunQuery($sSQL);
    echo "<font size=\"4\"><b>";
    echo FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 0);
    echo "</font></b><br>";
    if ($fam_ID != "") {
        echo "<font size=\"2\">(";
        if ($sFamRole != "") {
            echo $sFamRole;
        } else {
            echo gettext("Member");
        }
        echo gettext(" of the") . " <a href=\"FamilyView.php?FamilyID=" . $fam_ID . "\">" . $fam_Name . "</a>" . gettext(" family)") . "</font><br><br>";
    } else {
        echo gettext("(No assigned family)") . "<br><br>";
    }
    echo "<div class=\"TinyShadedBox\">";
    echo "<font size=\"3\">";
    if ($sAddress1 != "") {
        echo $sAddress1 . "<br>";
    }
    if ($sAddress2 != "") {
        echo $sAddress2 . "<br>";
    }
    if ($sCity != "") {
        echo $sCity . ", ";
    }
    if ($sState != "") {
        echo $sState;
    }
    if ($sZip != "") {
        echo " " . $sZip;
    }
    if ($sCountry != "") {
        echo "<br>" . $sCountry;
    }
    echo "</font>";
    echo "</div>";
    // Strip tags in case they were added for family inherited data
    $sAddress1 = strip_tags($sAddress1);
    $sCity = strip_tags($sCity);
    $sState = strip_tags($sState);
    $sCountry = strip_tags($sCountry);
    // Upload photo
    if (isset($_POST["UploadPhoto"]) && ($_SESSION['bAddRecords'] || $bOkToEdit)) {
        if ($_FILES['Photo']['name'] == "") {
            $PhotoError = gettext("No photo selected for uploading.");
        } elseif ($_FILES['Photo']['type'] != "image/pjpeg" && $_FILES['Photo']['type'] != "image/jpeg") {
            $PhotoError = gettext("Only jpeg photos can be uploaded.");
        } else {
            // Create the thumbnail used by PersonView
            chmod($_FILES['Photo']['tmp_name'], 0777);
            $srcImage = imagecreatefromjpeg($_FILES['Photo']['tmp_name']);
            $src_w = imageSX($srcImage);
            $src_h = imageSY($srcImage);
            // Calculate thumbnail's height and width (a "maxpect" algorithm)
            $dst_max_w = 200;
            $dst_max_h = 350;
            if ($src_w > $dst_max_w) {
                $thumb_w = $dst_max_w;
                $thumb_h = $src_h * ($dst_max_w / $src_w);
                if ($thumb_h > $dst_max_h) {
                    $thumb_h = $dst_max_h;
                    $thumb_w = $src_w * ($dst_max_h / $src_h);
                }
            } elseif ($src_h > $dst_max_h) {
                $thumb_h = $dst_max_h;
                $thumb_w = $src_w * ($dst_max_h / $src_h);
                if ($thumb_w > $dst_max_w) {
                    $thumb_w = $dst_max_w;
                    $thumb_h = $src_h * ($dst_max_w / $src_w);
                }
            } else {
                if ($src_w > $src_h) {
                    $thumb_w = $dst_max_w;
                    $thumb_h = $src_h * ($dst_max_w / $src_w);
                } elseif ($src_w < $src_h) {
                    $thumb_h = $dst_max_h;
                    $thumb_w = $src_w * ($dst_max_h / $src_h);
                } else {
                    if ($dst_max_w >= $dst_max_h) {
                        $thumb_w = $dst_max_h;
                        $thumb_h = $dst_max_h;
                    } else {
                        $thumb_w = $dst_max_w;
                        $thumb_h = $dst_max_w;
                    }
                }
            }
            $dstImage = ImageCreateTrueColor($thumb_w, $thumb_h);
            imagecopyresampled($dstImage, $srcImage, 0, 0, 0, 0, $thumb_w, $thumb_h, $src_w, $src_h);
            imagejpeg($dstImage, "Images/Person/thumbnails/" . $iPersonID . ".jpg");
            imagedestroy($dstImage);
            imagedestroy($srcImage);
            move_uploaded_file($_FILES['Photo']['tmp_name'], "Images/Person/" . $iPersonID . ".jpg");
        }
    } elseif (isset($_POST["DeletePhoto"]) && $_SESSION['bDeleteRecords']) {
        unlink("Images/Person/" . $iPersonID . ".jpg");
        unlink("Images/Person/thumbnails/" . $iPersonID . ".jpg");
    }
    // Display photo or upload from file
    $photoFile = "Images/Person/thumbnails/" . $iPersonID . ".jpg";
    if (file_exists($photoFile)) {
        echo '<a target="_blank" href="Images/Person/' . $iPersonID . '.jpg">';
        echo '<img border="1" src="' . $photoFile . '"></a>';
        /*			if ($bOkToEdit) {
        				echo '
        					<form method="post"
        					action="PersonView.php?PersonID=' . $iPersonID . '">
        					<br>
        					<input type="submit" class="icTinyButton" 
        					value="' . gettext("Delete Photo") . '" name="DeletePhoto">
        					</form>';
        				}
        */
    } else {
        // Some old / M$ browsers can't handle PNG's correctly.
        if ($bDefectiveBrowser) {
            echo '<img border="0" src="Images/NoPhoto.gif"><br><br><br>';
        } else {
            echo '<img border="0" src="Images/NoPhoto.png"><br><br><br>';
        }
        /*
        			if ($bOkToEdit) {
        				if (isset($PhotoError))
        					echo '<span style="color: red;">' . $PhotoError . '</span><br>';
        
        				echo '
        					<form method="post" 
        					action="PersonView.php?PersonID=' . $iPersonID . '" 
        					enctype="multipart/form-data">
        					<input class="icTinyButton" type="file" name="Photo">
        					<input type="submit" class="icTinyButton" 
        					value="' . gettext("Upload Photo") . '" name="UploadPhoto">
        					</form>';
        			}
        */
    }
}
Exemplo n.º 5
0
&nbsp;</strong></td>
        </tr>
<?php 
    //Set the initial row color
    $sRowClass = "RowColorA";
    for ($row = 1; $row <= $numRows; $row++) {
        //Alternate the row color
        $sRowClass = AlternateRowStyle($sRowClass);
        //Display the row
        ?>
         <tr class="<?php 
        echo $sRowClass;
        ?>
">
           <td class="TextColumn"><?php 
        echo FormatFullName($aTitle[$row], $aFistName[$row], $aMiddleName[$row], $aLastName[$row], $aSuffix[$row], 3);
        ?>
</td>
           <td class="TextColumn"><?php 
        echo $aEmail[$row] ? '<a href="mailto:' . $aEmail[$row] . '" title="Send Email">' . $aEmail[$row] . '</a>' : 'Not Available';
        ?>
</td>
           <td class="TextColumn"><?php 
        echo $aHomePhone[$row] ? ExpandPhoneNumber($aHomePhone[$row], $aPhoneCountry[$row], $dummy) : 'Not Available';
        ?>
</td>
<?php 
        // AddToCart call to go here
        ?>
           <td class="TextColumn"><?php 
        /* echo '<a onclick="return AddToCart('.$aPersonID[$row].');" href="blank.html">'.gettext("Add to Cart").'</a>'; */
Exemplo n.º 6
0
            $sState = SelectWhichInfo($per_State, $fam_State, False);
            $sZip = SelectWhichInfo($per_Zip, $fam_Zip, False);
            $sCountry = SelectWhichInfo($per_Country, $fam_Country, False);
            $sHomePhone = SelectWhichInfo(ExpandPhoneNumber($per_HomePhone, $sCountry, $dummy), ExpandPhoneNumber($fam_HomePhone, $fam_Country, $dummy), False);
            $sWorkPhone = SelectWhichInfo(ExpandPhoneNumber($per_WorkPhone, $sCountry, $dummy), ExpandPhoneNumber($fam_WorkPhone, $fam_Country, $dummy), False);
            $sCellPhone = SelectWhichInfo(ExpandPhoneNumber($per_CellPhone, $sCountry, $dummy), ExpandPhoneNumber($fam_CellPhone, $fam_Country, $dummy), False);
            $sUnformattedEmail = SelectWhichInfo($per_Email, $fam_Email, False);
            //Display the row
            ?>

                        <tr class="<?php 
            echo $sRowClass;
            ?>
">
                                <td><?php 
            echo FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 0);
            ?>
&nbsp;</td>
                                <td><?php 
            echo $sAddress1;
            ?>
&nbsp;<?php 
            if ($sAddress1 != "" && $sAddress2 != "") {
                echo ", ";
            }
            if ($sAddress2 != "") {
                echo $sAddress2;
            }
            ?>
                                <?php 
            if ($sCity || $sState || $sZip) {
Exemplo n.º 7
0
			// Assign the values locally, after selecting whether to display the family or person information
			SelectWhichAddress($sAddress1, $sAddress2, $per_Address1, $per_Address2, $fam_Address1, $fam_Address2, False);
			$sCity = SelectWhichInfo($per_City, $fam_City, False);
			$sState = SelectWhichInfo($per_State, $fam_State, False);
			$sZip = SelectWhichInfo($per_Zip, $fam_Zip, False);
			$sCountry = SelectWhichInfo($per_Country, $fam_Country, False);
			$sHomePhone = SelectWhichInfo(ExpandPhoneNumber($per_HomePhone,$sCountry,$dummy), ExpandPhoneNumber($fam_HomePhone,$fam_Country,$dummy), False);
			$sWorkPhone = SelectWhichInfo(ExpandPhoneNumber($per_WorkPhone,$sCountry,$dummy), ExpandPhoneNumber($fam_WorkPhone,$fam_Country,$dummy), False);
			$sCellPhone = SelectWhichInfo(ExpandPhoneNumber($per_CellPhone,$sCountry,$dummy), ExpandPhoneNumber($fam_CellPhone,$fam_Country,$dummy), False);
			$sUnformattedEmail = SelectWhichInfo($per_Email, $fam_Email, False);

			//Display the row
			?>

			<tr class="<?php echo $sRowClass; ?>">
				<td><?php echo FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 0); ?>&nbsp;</td>
				<td><?php echo $sAddress1;?>&nbsp;<?php if ($sAddress1 != "" && $sAddress2 != "") { echo ", "; } ?><?php if ($sAddress2 != "") echo $sAddress2; ?>
				<?php if ($sCity || $sState || $sZip)
					echo "<br>" . $sCity . ", " . $sState . " " . $sZip; ?></td>
				<td><?php echo $sHomePhone ?>&nbsp;
				<?php if($sWorkPhone) echo "<br>" . $sWorkPhone; ?>
				<?php if($sCellPhone) echo "<br>" . $sCellPhone; ?></td>
				<td><?php echo $sUnformattedEmail ?>&nbsp;
				<br><?php echo $per_WorkEmail ?></td>
				<td><?php echo $per_DateEntered ?>&nbsp;</td>
			</tr>

			<?php

			//Store the family to enable the control break
			$iPrevFamily = $fam_ID;
Exemplo n.º 8
0
//Set the initial row color
$sRowClass = "RowColorA";
//Loop through the person recordset
while ($aRow = mysql_fetch_array($rsUsers)) {
    extract($aRow);
    //Alternate the row color
    $sRowClass = AlternateRowStyle($sRowClass);
    //Display the row
    ?>
	<tr class="<?php 
    echo $sRowClass;
    ?>
">
		<td>
		<?php 
    echo "<a href=\"PersonView.php?PersonID=" . $per_ID . "\">" . FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 1) . "</a>";
    ?>
		</td>
		<td align="center"><?php 
    echo $usr_LastLogin;
    ?>
</td>
		<td align="center"><?php 
    echo $usr_LoginCount;
    ?>
</td>
		<td align="center">
		<?php 
    if ($iMaxFailedLogins > 0 && $usr_FailedLogins >= $iMaxFailedLogins) {
        echo "<span style=\"color: red;\">" . $usr_FailedLogins . "<br></span><a href=\"UserList.php?ResetLoginCount={$per_ID}\">" . gettext("Reset") . "</a>";
    } else {
Exemplo n.º 9
0
function GenerateLabels(&$pdf, $mode, $iBulkMailPresort, $bToParents, $bOnlyComplete)
{
    // $mode is "indiv" or "fam"
    unset($didFam);
    $sSQL = "SELECT cfg_name, IFNULL(cfg_value, cfg_default) AS value ";
    $sSQL .= "FROM config_cfg WHERE cfg_section='General'";
    $rsConfig = RunQuery($sSQL);
    if ($rsConfig) {
        while (list($cfg_name, $cfg_value) = mysql_fetch_row($rsConfig)) {
            ${$cfg_name} = $cfg_value;
        }
    }
    $sAdultRole = $sDirRoleHead . "," . $sDirRoleSpouse;
    $sAdultRole = trim($sAdultRole, " ,\t\n\r\v");
    $aAdultRole = explode(",", $sAdultRole);
    $aAdultRole = array_unique($aAdultRole);
    sort($aAdultRole);
    $sChildRole = trim($sDirRoleChild, " ,\t\n\r\v");
    $aChildRole = explode(",", $sChildRole);
    $aChildRole = array_unique($aChildRole);
    sort($aChildRole);
    $sSQL = "SELECT * FROM person_per LEFT JOIN family_fam ";
    $sSQL .= "ON person_per.per_fam_ID = family_fam.fam_ID ";
    $sSQL .= "WHERE per_ID IN (" . ConvertCartToString($_SESSION['aPeopleCart']) . ") ";
    $sSQL .= "ORDER BY fam_Zip, per_LastName, per_FirstName";
    $rsCartItems = RunQuery($sSQL);
    $sRowClass = "RowColorA";
    $didFam = array();
    while ($aRow = mysql_fetch_array($rsCartItems)) {
        // It's possible (but unlikely) that three labels can be generated for a
        // family even when they are grouped.
        // At most one label for all adults
        // At most one label for all children
        // At most one label for all others (for example, another church or a landscape
        // company)
        $sRowClass = AlternateRowStyle($sRowClass);
        if ($aRow['per_fam_ID'] == 0 && $mode == "fam") {
            // Skip people with no family ID
            continue;
        }
        // Skip if mode is fam and we have already printed labels
        if (array_key_exists($aRow['per_fam_ID'], $didFam) and $didFam[$aRow['per_fam_ID']] && $mode == "fam") {
            continue;
        }
        $didFam[$aRow['per_fam_ID']] = 1;
        unset($aName);
        if ($mode == "fam") {
            $aName = GroupBySalutation($aRow['per_fam_ID'], $aAdultRole, $aChildRole);
        } else {
            $sName = FormatFullName($aRow['per_Title'], $aRow['per_FirstName'], "", $aRow['per_LastName'], $aRow['per_Suffix'], 1);
            $bChild = FALSE;
            foreach ($aChildRole as $value) {
                if ($aRow['per_fmr_ID'] == $value) {
                    $bChild = TRUE;
                }
            }
            if ($bChild) {
                $aName['child'] = substr($sName, 0, 33);
            } else {
                $aName['indiv'] = substr($sName, 0, 33);
            }
        }
        foreach ($aName as $key => $sName) {
            // Bail out if nothing to print
            if ($sName == "Nothing to return") {
                continue;
            }
            if ($bToParents && $key == "child") {
                $sName = "To the parents of:\n" . $sName;
            }
            SelectWhichAddress($sAddress1, $sAddress2, $aRow['per_Address1'], $aRow['per_Address2'], $aRow['fam_Address1'], $aRow['fam_Address2'], false);
            $sCity = SelectWhichInfo($aRow['per_City'], $aRow['fam_City'], False);
            $sState = SelectWhichInfo($aRow['per_State'], $aRow['fam_State'], False);
            $sZip = SelectWhichInfo($aRow['per_Zip'], $aRow['fam_Zip'], False);
            $sAddress = $sAddress1;
            if ($sAddress2 != "") {
                $sAddress .= "\n" . $sAddress2;
            }
            if (!$bOnlyComplete || strlen($sAddress) && strlen($sCity) && strlen($sState) && strlen($sZip)) {
                $sLabelList[] = array('Name' => $sName, 'Address' => $sAddress, 'City' => $sCity, 'State' => $sState, 'Zip' => $sZip);
                //,'fam_ID'=>$aRow['fam_ID']);
            }
        }
        // end of foreach loop
    }
    // end of while loop
    unset($zipLabels);
    if ($iBulkMailPresort) {
        //
        // now sort the label list by presort bundle definitions
        //
        $zipLabels = ZipBundleSort($sLabelList);
        if ($iBulkMailPresort == 2) {
            while (list($i, $sLT) = each($zipLabels)) {
                $pdf->Add_PDF_Label(sprintf("%s\n%s\n%s\n%s, %s %s", $sLT['Note'], $sLT['Name'], $sLT['Address'], $sLT['City'], $sLT['State'], $sLT['Zip']));
            }
            // end while
        } else {
            while (list($i, $sLT) = each($zipLabels)) {
                $pdf->Add_PDF_Label(sprintf("%s\n%s\n%s, %s %s", $sLT['Name'], $sLT['Address'], $sLT['City'], $sLT['State'], $sLT['Zip']));
            }
            // end while
        }
        // end of if ($BulkMailPresort == 2)
    } else {
        while (list($i, $sLT) = each($sLabelList)) {
            $pdf->Add_PDF_Label(sprintf("%s\n%s\n%s, %s %s", $sLT['Name'], $sLT['Address'], $sLT['City'], $sLT['State'], $sLT['Zip']));
        }
        // end while
    }
    // end of if($iBulkMailPresort)
    if (isset($zipLabels)) {
        return serialize($zipLabels);
    } else {
        return serialize($sLabelList);
    }
}
Exemplo n.º 10
0
$sCity = SelectWhichInfo($per_City, $fam_City, False);
$sState = SelectWhichInfo($per_State, $fam_State, False);
$sZip = SelectWhichInfo($per_Zip, $fam_Zip, False);
$sCountry = SelectWhichInfo($per_Country, $fam_Country, False);
$sHomePhone = SelectWhichInfo(ExpandPhoneNumber($per_HomePhone, $sCountry, $dummy), ExpandPhoneNumber($fam_HomePhone, $fam_Country, $dummy), False);
$sWorkPhone = SelectWhichInfo(ExpandPhoneNumber($per_WorkPhone, $sCountry, $dummy), ExpandPhoneNumber($fam_WorkPhone, $fam_Country, $dummy), False);
$sCellPhone = SelectWhichInfo(ExpandPhoneNumber($per_CellPhone, $sCountry, $dummy), ExpandPhoneNumber($fam_CellPhone, $fam_Country, $dummy), False);
$sEmail = SelectWhichInfo($per_Email, $fam_Email, False);
// Instantiate the vCard class and then build the card.
if ($bOldVCardVersion) {
    $vcard = new Contact_Vcard_Build(2.1);
} else {
    $vcard = new Contact_Vcard_Build();
}
// set a formatted name
$vcard->setFormattedName(iconv("UTF-8", "ISO-8859-1", FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 0)));
// set the structured name parts
$vcard->setName(iconv("UTF-8", "ISO-8859-1", $per_LastName), iconv("UTF-8", "ISO-8859-1", $per_FirstName), iconv("UTF-8", "ISO-8859-1", $per_MiddleName), iconv("UTF-8", "ISO-8859-1", $per_Title), iconv("UTF-8", "ISO-8859-1", $per_Suffix));
$vcard->addEmail(iconv("UTF-8", "ISO-8859-1", $sEmail));
$vcard->addParam('TYPE', 'HOME');
$vcard->addParam('TYPE', 'PREF');
$vcard->addEmail(iconv("UTF-8", "ISO-8859-1", $per_WorkEmail));
$vcard->addParam('TYPE', 'WORK');
if ($bPalmVCard) {
    $vcard->addAddress(';', iconv("UTF-8", "ISO-8859-1", $sAddress1), iconv("UTF-8", "ISO-8859-1", $sAddress2), iconv("UTF-8", "ISO-8859-1", $sCity), iconv("UTF-8", "ISO-8859-1", $sState), iconv("UTF-8", "ISO-8859-1", $sZip), iconv("UTF-8", "ISO-8859-1", $sCountry));
} else {
    $vcard->addAddress('', iconv("UTF-8", "ISO-8859-1", $sAddress1), iconv("UTF-8", "ISO-8859-1", $sAddress2), iconv("UTF-8", "ISO-8859-1", $sCity), iconv("UTF-8", "ISO-8859-1", $sState), iconv("UTF-8", "ISO-8859-1", $sZip), iconv("UTF-8", "ISO-8859-1", $sCountry));
}
$vcard->addParam('TYPE', 'HOME');
$vcard->addParam('TYPE', 'PREF');
$vcard->addTelephone(iconv("UTF-8", "ISO-8859-1", $sHomePhone));
Exemplo n.º 11
0
$sCity = SelectWhichInfo($per_City, $fam_City, False);
$sState = SelectWhichInfo($per_State, $fam_State, False);
$sZip = SelectWhichInfo($per_Zip, $fam_Zip, False);
$sCountry = SelectWhichInfo($per_Country, $fam_Country, False);
$sHomePhone = SelectWhichInfo(ExpandPhoneNumber($per_HomePhone, $sCountry, $dummy), ExpandPhoneNumber($fam_HomePhone, $fam_Country, $dummy), False);
$sWorkPhone = SelectWhichInfo(ExpandPhoneNumber($per_WorkPhone, $sCountry, $dummy), ExpandPhoneNumber($fam_WorkPhone, $fam_Country, $dummy), False);
$sCellPhone = SelectWhichInfo(ExpandPhoneNumber($per_CellPhone, $sCountry, $dummy), ExpandPhoneNumber($fam_CellPhone, $fam_Country, $dummy), False);
$sEmail = SelectWhichInfo($per_Email, $fam_Email, False);
// Instantiate the vCard class and then build the card.
if ($bOldVCardVersion) {
    $vcard = new Contact_Vcard_Build(2.1);
} else {
    $vcard = new Contact_Vcard_Build();
}
// set a formatted name
$vcard->setFormattedName(FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 0));
// set the structured name parts
$vcard->setName($per_LastName, $per_FirstName, $per_MiddleName, $per_Title, $per_Suffix);
$vcard->addEmail($sEmail);
$vcard->addParam('TYPE', 'HOME');
$vcard->addParam('TYPE', 'PREF');
$vcard->addEmail($per_WorkEmail);
$vcard->addParam('TYPE', 'WORK');
if ($bPalmVCard) {
    $vcard->addAddress(';', $sAddress1, $sAddress2, $sCity, $sState, $sZip, $sCountry);
} else {
    $vcard->addAddress('', $sAddress1, $sAddress2, $sCity, $sState, $sZip, $sCountry);
}
$vcard->addParam('TYPE', 'HOME');
$vcard->addParam('TYPE', 'PREF');
$vcard->addTelephone($sHomePhone);
Exemplo n.º 12
0
	<i class="fa fa-magic"></i>
	<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
	<b><span style="color: red;"><?php 
echo gettext("Red text");
?>
</span></b> <?php 
echo gettext("indicates items inherited from the associated family record.");
?>
</div>
<div class="row">
	<div class="col-lg-3 col-md-4 col-sm-4">
		<div class="box box-solid box-info">
			<div class="box-header">
				<h3 class='box-title'>
					<?php 
echo getGenderIcon($per_Gender) . " " . FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 0) . " ";
if ($bOkToEdit) {
    ?>
						<a href="PersonEditor.php?PersonID=<?php 
    echo $per_ID;
    ?>
">
						<span class="fa-stack">
							<i class="fa fa-square fa-stack-2x"></i>
							<i class="fa fa-pencil fa-stack-1x fa-inverse"></i>
						</span>
						</a>
					<?php 
}
?>
				</h3>
Exemplo n.º 13
0
                } else {
                    $sEmailLink .= $sMailtoDelimiter . $sEmail;
                }
            }
        } else {
            $sValidEmail = gettext("No");
        }
        $sAddress1 = SelectWhichInfo($per_Address1, $fam_Address1, False);
        $sAddress2 = SelectWhichInfo($per_Address2, $fam_Address2, False);
        if (strlen($sAddress1) > 0 || strlen($sAddress2) > 0) {
            $sValidAddy = gettext("Yes");
        } else {
            $sValidAddy = gettext("No");
        }
        echo '<tr class="' . $sRowClass . '">';
        echo '<td><a href="PersonView.php?PersonID=' . $per_ID . '">' . FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 1) . '</a></td>';
        echo '<td align="center">' . $sValidAddy . '</td>';
        echo '<td align="center">' . $sValidEmail . '</td>';
        echo '<td><a onclick="saveScrollCoordinates()" 
                        href="CartView.php?RemoveFromPeopleCart=' . $per_ID . '">' . gettext("Remove") . '</a></td>';
        echo '<td align="center">' . $aClassificationName[$per_cls_ID] . '</td>';
        echo '<td align="center">' . $aFamilyRoleName[$per_fmr_ID] . '</td>';
        echo "</tr>";
    }
    echo "</table>";
}
if (count($_SESSION['aPeopleCart']) != 0) {
    echo "<br><table align=\"center\" cellpadding=\"15\"><tr><td valign=\"top\">";
    echo "<p align=\"center\" class=\"MediumText\">";
    echo "<b>" . gettext("Cart Functions") . "</b><br>";
    echo "<br>";