当前位置: 首页>>代码示例>>PHP>>正文


PHP SelectWhichInfo函数代码示例

本文整理汇总了PHP中SelectWhichInfo函数的典型用法代码示例。如果您正苦于以下问题:PHP SelectWhichInfo函数的具体用法?PHP SelectWhichInfo怎么用?PHP SelectWhichInfo使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SelectWhichInfo函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GenerateLabels

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));
        }
    }
}
开发者ID:vikingkarwur,项目名称:smjgpib,代码行数:28,代码来源:PDFLabel.php

示例2: RunQuery

$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";
        }
        if (strlen($sAddress2)) {
            $OutStr .= $sAddress2 . "\n";
        }
        if (strlen($sCity)) {
            $OutStr .= $sCity . ", " . $sState . " " . $sZip . "\n";
        }
    }
    if (isset($_POST['HomePhoneEnable']) && strlen($sHomePhone)) {
开发者ID:dschwen,项目名称:CRM,代码行数:31,代码来源:GroupReport.php

示例3: mysql_fetch_assoc

for ($row = 1; $row <= $numRows; $row++) {
    $aRow = mysql_fetch_assoc($rsOpps);
    extract($aRow);
    if ($_GET['Action'] == "List") {
        $aEventID[$row] = $event_id;
        $aEventTitle[$row] = htmlentities(stripslashes($event_title), ENT_NOQUOTES, "UTF-8");
        $aEventStartDateTime[$row] = $event_start;
    } else {
        $aPersonID[$row] = $per_ID;
        $aTitle[$row] = $per_Title;
        $aFistName[$row] = $per_FirstName;
        $aMiddleName[$row] = $per_MiddleName;
        $aLastName[$row] = $per_LastName;
        $aSuffix[$row] = $per_Suffix;
        $aEmail[$row] = $per_Email;
        $aHomePhone[$row] = SelectWhichInfo(ExpandPhoneNumber($per_HomePhone, $per_Country, $dummy), ExpandPhoneNumber($fam_HomePhone, $fam_Country, $dummy), True);
    }
}
// Construct the form
?>
<table cellpadding="4" align="center" cellspacing="0" width="60%">

<?php 
if ($_GET['Action'] == "List" && $numRows > 0) {
    ?>
       <caption>
         <h3><?php 
    echo gettext("There " . ($numRows == 1 ? "is " . $numRows . " event" : "are " . $numRows . " events")) . " in this category";
    ?>
</h3>
       </caption>
开发者ID:jwigal,项目名称:emcommdb,代码行数:31,代码来源:EventAttendance.php

示例4: extract

            $fam_HomePhone = "";
            $fam_CellPhone = "";
            $fam_Email = "";
            extract($aRow);
            //Alternate the row color
            $sRowClass = AlternateRowStyle($sRowClass);
            // 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 
开发者ID:jwigal,项目名称:churchinfo,代码行数:31,代码来源:SelectList.php

示例5: RunQuery

$sSQL = 'SELECT person_id, per_LastName FROM event_attend JOIN person_per ON person_per.per_id = event_attend.person_id WHERE event_id = ' . $EventID . ' ORDER by per_LastName, per_FirstName';
$rsOpps = RunQuery($sSQL);
$numAttRows = mysql_num_rows($rsOpps);
if ($numAttRows != 0) {
    $sRowClass = "RowColorA";
    for ($na = 0; $na < $numAttRows; $na++) {
        $attRow = mysql_fetch_array($rsOpps, MYSQL_BOTH);
        extract($attRow);
        $sSQL = 'SELECT per_Title, per_ID, per_FirstName, per_MiddleName, per_LastName, per_Suffix, per_Email, per_HomePhone, per_Country, fam_HomePhone, fam_Email, fam_Country FROM person_per LEFT JOIN family_fam ON per_fam_id=fam_id WHERE per_ID = ' . $person_id;
        $perOpps = RunQuery($sSQL);
        $perRow = mysql_fetch_array($perOpps, MYSQL_BOTH);
        extract($perRow);
        $sRowClass = AlternateRowStyle($sRowClass);
        $sPhoneCountry = SelectWhichInfo($per_Country, $fam_Country, False);
        $sHomePhone = SelectWhichInfo(ExpandPhoneNumber($per_HomePhone, $sPhoneCountry, $dummy), ExpandPhoneNumber($fam_HomePhone, $fam_Country, $dummy), True);
        $sEmail = SelectWhichInfo($per_Email, $fam_Email, False);
        ?>
    <tr class="<?php 
        echo $sRowClass;
        ?>
">
        <td class="TextColumn"><?php 
        echo FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 3);
        ?>
</td>
        <td class="TextColumn"><?php 
        echo $sEmail ? '<a href="mailto:' . $sEmail . '" title="Send Email">' . $sEmail . '</a>' : 'Not Available';
        ?>
</td>
        <td class="TextColumn"><?php 
        echo $sHomePhone ? $sHomePhone : 'Not Available';
开发者ID:dschwen,项目名称:CRM,代码行数:31,代码来源:EditEventAttendees.php

示例6: sGetMemberString

 function sGetMemberString($aRow)
 {
     global $bDirPersonalPhone;
     global $bDirPersonalWork;
     global $bDirPersonalCell;
     global $bDirPersonalEmail;
     global $bDirPersonalWorkEmail;
     global $bDirBirthday;
     global $aChildren;
     extract($aRow);
     $sMemberStr = $per_FirstName;
     // Check to see if family member has different last name
     if (strlen($per_LastName) && $per_LastName != $this->sLastName) {
         $sMemberStr .= " " . $per_LastName;
     }
     if ($bDirBirthday && $per_BirthMonth && $per_BirthDay) {
         $sMemberStr .= sprintf(" (%d/%d", $per_BirthMonth, $per_BirthDay);
         if ($per_BirthYear && in_array($per_fmr_ID, $aChildren)) {
             $sMemberStr .= sprintf("/%d)\n", $per_BirthYear);
         } else {
             $sMemberStr .= ")\n";
         }
     } else {
         $sMemberStr .= "\n";
     }
     $sCountry = SelectWhichInfo($per_Country, $fam_Country, false);
     if ($bDirPersonalPhone && strlen($per_HomePhone)) {
         $TempStr = ExpandPhoneNumber($per_HomePhone, $sCountry, $bWierd);
         $sMemberStr .= "   " . gettext("Phone") . ": " . ($TempStr .= "\n");
     }
     if ($bDirPersonalWork && strlen($per_WorkPhone)) {
         $TempStr = ExpandPhoneNumber($per_WorkPhone, $sCountry, $bWierd);
         $sMemberStr .= "   " . gettext("Work") . ": " . ($TempStr .= "\n");
     }
     if ($bDirPersonalCell && strlen($per_CellPhone)) {
         $TempStr = ExpandPhoneNumber($per_CellPhone, $sCountry, $bWierd);
         $sMemberStr .= "   " . gettext("Cell") . ": " . ($TempStr .= "\n");
     }
     if ($bDirPersonalEmail && strlen($per_Email)) {
         $sMemberStr .= "   " . gettext("Email") . ": " . ($per_Email .= "\n");
     }
     if ($bDirPersonalWorkEmail && strlen($per_WorkEmail)) {
         $sMemberStr .= "   " . gettext("Work/Other Email") . ": " . ($per_WorkEmail .= "\n");
     }
     return $sMemberStr;
 }
开发者ID:jwigal,项目名称:churchinfo,代码行数:46,代码来源:DirectoryReport.php

示例7: gettext

        if (strlen($sEmail)) {
            $sValidEmail = gettext("Yes");
            if (!stristr($sEmailLink, $sEmail)) {
                $email_array[] = $sEmail;
                if ($iEmailNum == 0) {
                    $sEmailLink .= $sEmail;
                    $iEmailNum++;
                } else {
                    $sEmailLink .= "," . $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 href=\"CartView.php?RemoveFromPeopleCart=" . $per_ID . "\">" . gettext("Remove") . "</a></td>";
        echo "</tr>";
    }
    echo "</table>";
}
if (count($_SESSION['aPeopleCart']) != 0) {
开发者ID:vikingkarwur,项目名称:smjgpib,代码行数:31,代码来源:CartView.php

示例8: loadperson

function loadperson($iPersonID)
{
    global $bDefectiveBrowser;
    if ($iPersonID == 0) {
        return;
    }
    $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);
    if (!$rsPerson || mysql_num_rows($rsPerson) == 0) {
        return;
    }
    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);
    SelectWhichAddress($sAddress1, $sAddress2, $per_Address1, $per_Address2, $fam_Address1, $fam_Address2, false);
    $sAddress2 = SelectWhichInfo($per_Address2, $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);
    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);
//.........这里部分代码省略.........
开发者ID:dschwen,项目名称:CRM,代码行数:101,代码来源:Checkin.php

示例9: FilterInput

     $sHomePhone = FilterInput($_POST["HomePhone"]);
     $sWorkPhone = FilterInput($_POST["WorkPhone"]);
     $sCellPhone = FilterInput($_POST["CellPhone"]);
     if (!isset($_POST["NoFormat_HomePhone"])) {
         $sHomePhone = CollapsePhoneNumber($sHomePhone, $sCountry);
     }
     if (!isset($_POST["NoFormat_WorkPhone"])) {
         $sWorkPhone = CollapsePhoneNumber($sWorkPhone, $sCountry);
     }
     if (!isset($_POST["NoFormat_CellPhone"])) {
         $sCellPhone = CollapsePhoneNumber($sCellPhone, $sCountry);
     }
     $sHomePhone = SelectWhichInfo($sHomePhone, $per_HomePhone);
     $sWorkPhone = SelectWhichInfo($sWorkPhone, $per_WorkPhone);
     $sCellPhone = SelectWhichInfo($sCellPhone, $per_CellPhone);
     $sEmail = SelectWhichInfo(FilterInput($_POST["Email"]), $per_Email);
     if (strlen($sFamilyName) == 0) {
         $sError = "<p class=\"MediumLargeText\" align=\"center\" style=\"color:red;\">" . gettext("No family name entered!") . "</p>";
         $bError = true;
     } else {
         $sSQL = "INSERT INTO family_fam (fam_Name, fam_Address1, fam_Kompleks1, fam_RTRW1, fam_Kelurahan1, fam_Address2, fam_Kompleks2, fam_RTRW2, fam_Kelurahan2, fam_City, fam_State, fam_Zip, fam_Country, fam_HomePhone, fam_WorkPhone, fam_CellPhone, fam_Email, fam_WeddingDate, fam_DateEntered, fam_EnteredBy) VALUES ('" . $sFamilyName . "','" . $sAddress1 . "','" . $sKompleks1 . "','" . $sRTRW1 . "','" . $sKelurahan1 . "','" . $sAddress2 . "','" . $sKompleks2 . "','" . $sRTRW2 . "','" . $sKelurahan2 . "','" . $sCity . "','" . $sState . "','" . $sZip . "','" . $sCountry . "','" . $sHomePhone . "','" . $sWorkPhone . "','" . $sCellPhone . "','" . $sEmail . "'," . $dWeddingDate . ",'" . date("YmdHis") . "'," . $_SESSION['iUserID'] . ")";
         RunQuery($sSQL);
         //Get the key back
         $sSQL = "SELECT MAX(fam_ID) AS iFamilyID FROM family_fam";
         $rsLastEntry = RunQuery($sSQL);
         extract(mysql_fetch_array($rsLastEntry));
     }
 }
 if (!$bError) {
     // Loop through the cart array
     $iCount = 0;
开发者ID:vikingkarwur,项目名称:smjgpib,代码行数:31,代码来源:CartToFamily.php

示例10: mb_substr

    // Mailto should comply with RFC 2368
    if ($bEmailMailto) {
        // Does user have permission to email groups
        // Display link
        echo ' | <a class="SmallText" href="mailto:' . mb_substr($sEmailLink, 0, -3) . '">' . gettext('Email Group') . '</a>';
        echo ' | <a class="SmallText" href="mailto:?bcc=' . mb_substr($sEmailLink, 0, -3) . '">' . gettext('Email (BCC)') . '</a>';
    }
}
// Group Text Message Comma Delimited - added by RSBC
// Note: This will provide cell phone numbers for the entire group, even if a specific role is currently selected.
$sSQL = "SELECT per_CellPhone, fam_CellPhone\n            FROM person_per\n            LEFT JOIN person2group2role_p2g2r ON per_ID = p2g2r_per_ID\n            LEFT JOIN group_grp ON grp_ID = p2g2r_grp_ID\n            LEFT JOIN family_fam ON per_fam_ID = family_fam.fam_ID\n        WHERE per_ID NOT IN \n            (SELECT per_ID \n            FROM person_per \n            INNER JOIN record2property_r2p ON r2p_record_ID = per_ID \n            INNER JOIN property_pro ON r2p_pro_ID = pro_ID AND pro_Name = 'Do Not SMS') \n        AND p2g2r_grp_ID = " . $iGroupID;
$rsPhoneList = RunQuery($sSQL);
$sPhoneLink = '';
$sCommaDelimiter = ', ';
while (list($per_CellPhone, $fam_CellPhone) = mysql_fetch_row($rsPhoneList)) {
    $sPhone = SelectWhichInfo($per_CellPhone, $fam_CellPhone, False);
    if ($sPhone) {
        /* if ($sPhoneLink) // Don't put delimiter before first phone
           $sPhoneLink .= $sCommaDelimiter; */
        // Add phone only if phone is not already in string
        if (!stristr($sPhoneLink, $sPhone)) {
            $sPhoneLink .= $sPhone .= $sCommaDelimiter;
        }
    }
}
if ($sPhoneLink) {
    if ($bEmailMailto) {
        // Does user have permission to email groups
        // Display link
        echo ' | <a class="SmallText" href="javascript:void(0)" onclick="allPhonesCommaD()">Text Group</a>';
        echo '<script>function allPhonesCommaD() {prompt("Press CTRL + C to copy all group members\' phone numbers", "' . mb_substr($sPhoneLink, 0, -2) . '")};</script>';
开发者ID:dschwen,项目名称:CRM,代码行数:31,代码来源:GroupView.php

示例11: SelectWhichInfo

 $sWorkPhone = $per_WorkPhone;
 $sCellPhone = $per_CellPhone;
 $sEmail = $per_Email;
 $sWorkEmail = $per_WorkEmail;
 $iBirthMonth = $per_BirthMonth;
 $iBirthDay = $per_BirthDay;
 $iBirthYear = $per_BirthYear;
 $bHideAge = ($per_Flags & 1) != 0;
 $iOriginalFamily = $per_fam_ID;
 $iFamily = $per_fam_ID;
 $iFamilyRole = $per_fmr_ID;
 $dMembershipDate = $per_MembershipDate;
 $dFriendDate = $per_FriendDate;
 $iClassification = $per_cls_ID;
 $iViewAgeFlag = $per_Flags;
 $sPhoneCountry = SelectWhichInfo($sCountry, $fam_Country, false);
 $sHomePhone = ExpandPhoneNumber($per_HomePhone, $sPhoneCountry, $bNoFormat_HomePhone);
 $sWorkPhone = ExpandPhoneNumber($per_WorkPhone, $sPhoneCountry, $bNoFormat_WorkPhone);
 $sCellPhone = ExpandPhoneNumber($per_CellPhone, $sPhoneCountry, $bNoFormat_CellPhone);
 //The following values are True booleans if the family record has a value for the
 //indicated field.  These are used to highlight field headers in red.
 $bFamilyAddress1 = strlen($fam_Address1);
 $bFamilyAddress2 = strlen($fam_Address2);
 $bFamilyCity = strlen($fam_City);
 $bFamilyState = strlen($fam_State);
 $bFamilyZip = strlen($fam_Zip);
 $bFamilyCountry = strlen($fam_Country);
 $bFamilyHomePhone = strlen($fam_HomePhone);
 $bFamilyWorkPhone = strlen($fam_WorkPhone);
 $bFamilyCellPhone = strlen($fam_CellPhone);
 $bFamilyEmail = strlen($fam_Email);
开发者ID:chiahsiao,项目名称:hoc3-db,代码行数:31,代码来源:PersonEditor.php

示例12: GenerateLabels

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']));
//.........这里部分代码省略.........
开发者ID:dschwen,项目名称:CRM,代码行数:101,代码来源:PDFLabel.php

示例13: RunQuery

     break;
 case Envelope2Address:
     // Security check
     if (!$_SESSION['bFinance']) {
         exit;
     }
     $sSQL = "SELECT\tper_Address1, per_Address2, per_City, per_State, per_Zip, per_Country,\n\t\t\t\t\t\tfam_Address1, fam_Address2, fam_City, fam_State, fam_Zip, fam_Country\n\t\t\t\t\tFROM person_per\tLEFT JOIN family_fam ON person_per.per_fam_ID = family_fam.fam_ID\n\t\t\t\t\tWHERE per_Envelope=" . $data;
     $rsQuery = RunQuery($sSQL);
     if (mysql_num_rows($rsQuery) == 0) {
         $sGeneratedHTML = "invalid";
     } else {
         extract(mysql_fetch_array($rsQuery));
         $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);
         SelectWhichAddress($sAddress1, $sAddress2, $per_Address1, $per_Address2, $fam_Address1, $fam_Address2, false);
         $sGeneratedHTML = "<b>" . gettext("Address Info:") . "</b><br>";
         if ($sAddress1 != "") {
             $sGeneratedHTML .= $sAddress1 . "<br>";
         }
         if ($sAddress2 != "") {
             $sGeneratedHTML .= $sAddress2 . "<br>";
         }
         if ($sCity != "") {
             $sGeneratedHTML .= $sCity . ", ";
         }
         if ($sState != "") {
             $sGeneratedHTML .= $sState;
         }
         if ($sZip != "") {
开发者ID:dschwen,项目名称:CRM,代码行数:31,代码来源:RPCdummy.php


注:本文中的SelectWhichInfo函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。