function showItemInfo(&$clsRpt, &$item, &$auction, $lPackageID, $lItemID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; openBlock('Silent Auction Item', strLinkEdit_AuctionItem($lPackageID, $lItemID, 'Edit item information', true) . ' ' . ' ' . strLinkRem_AuctionItem($lPackageID, $lItemID, 'Remove this item record', true, true)); echoT($clsRpt->openReport()); // Item ID echoT($clsRpt->openRow() . $clsRpt->writeLabel('Item ID:') . $clsRpt->writeCell(str_pad($lItemID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow()); // Item Name echoT($clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell($item->strSafeItemName) . $clsRpt->closeRow()); // Date Obtained echoT($clsRpt->openRow() . $clsRpt->writeLabel('Date Obtained:') . $clsRpt->writeCell(date($genumDateFormat, $item->dteObtained)) . $clsRpt->closeRow()); // Item Donor if ($item->itemDonor_bBiz) { $strNameLink = ' <i>(business)</i> ' . strLinkView_BizRecord($item->lItemDonorID, 'View business record', true); } else { $strNameLink = ' ' . strLinkView_PeopleRecord($item->lItemDonorID, 'View people record', true); } echoT($clsRpt->openRow() . $clsRpt->writeLabel('Item Donor:') . $clsRpt->writeCell($item->itemDonor_safeName . $strNameLink) . $clsRpt->closeRow()); // Donor Acknowledgement echoT($clsRpt->openRow() . $clsRpt->writeLabel('Donor Ack.:') . $clsRpt->writeCell(htmlspecialchars($item->strDonorAck)) . $clsRpt->closeRow()); // Est. Value echoT($clsRpt->openRow() . $clsRpt->writeLabel('Est. Value:') . $clsRpt->writeCell($auction->strCurrencySymbol . ' ' . number_format($item->curEstAmnt, 2)) . $clsRpt->closeRow()); // Out-of-Pocket echoT($clsRpt->openRow() . $clsRpt->writeLabel('Out-of-Pocket:') . $clsRpt->writeCell($auction->strCurrencySymbol . ' ' . number_format($item->curOutOfPocket, 2)) . $clsRpt->closeRow()); // Public Notes echoT($clsRpt->openRow() . $clsRpt->writeLabel('Public Notes:') . $clsRpt->writeCell(nl2br(htmlspecialchars($item->strDescription))) . $clsRpt->closeRow()); // Private Notes echoT($clsRpt->openRow() . $clsRpt->writeLabel('Private Notes:') . $clsRpt->writeCell(nl2br(htmlspecialchars($item->strInternalNotes))) . $clsRpt->closeRow()); echoT($clsRpt->closeReport()); closeBlock(); }
function writeAutoChargeRow($clsACInfo) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $lCID = $clsACInfo->lKeyID; $lSponID = $clsACInfo->lSponsorshipID; $bBiz = $clsACInfo->bBiz; $lFID = $clsACInfo->lForeignID; $lClientID = $clsACInfo->lClientID; if (is_null($lClientID)) { $strClientRow = 'n/a'; } else { $strClientRow = strLinkView_ClientRecord($lClientID, 'View Client', true) . ' ' . str_pad($lClientID, 5, '0', STR_PAD_LEFT) . ' ' . $clsACInfo->strClientSafeNameFL . ' / ' . htmlspecialchars($clsACInfo->strLocation); } if ($bBiz) { $strFLink = strLinkView_BizRecord($lFID, 'View business record', true); } else { $strFLink = strLinkView_PeopleRecord($lFID, 'View people record', true); } echoT(' <tr> <td class="enpRpt" style="text-align:center">' . strLinkView_SponsorCharge($lCID, 'View charge record', true) . ' ' . str_pad($lCID, 5, '0', STR_PAD_LEFT) . ' </td>'); echoT(' <td class="enpRpt" style="text-align:center">' . strLinkView_Sponsorship($lSponID, 'View sponsorship record', true) . ' ' . str_pad($lSponID, 5, '0', STR_PAD_LEFT) . ' </td>'); //------------------------------ // sponsor //------------------------------ echoT(' <td class="enpRpt">' . $strFLink . ' ' . $clsACInfo->strSponSafeNameFL . ' </td>'); //------------------------------ // charge //------------------------------ echoT(' <td class="enpRpt" style="text-align: right;">' . $clsACInfo->strCurSymbol . ' ' . number_format($clsACInfo->curChargeAmnt, 2) . ' ' . $clsACInfo->strFlagImage . ' </td>'); //------------------------------ // client //------------------------------ echoT(' <td class="enpRpt">' . $strClientRow . ' </td>'); echoT(' </tr>'); }
function showBizInfo($clsDateTime, $clsRpt, $biz, $dupIDs) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $gbDateFormatUS, $genumDateFormat, $glclsDTDateFormat; // Biz ID $lBizID = $biz->lKeyID; echoT($clsRpt->openRow() . $clsRpt->writeLabel('Business ID:') . $clsRpt->writeCell(strLinkView_BizRecord($lBizID, 'View business record', true) . ' ' . str_pad($lBizID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow()); // Name echoT($clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell($biz->strSafeName) . $clsRpt->closeRow()); // Address echoT($clsRpt->openRow() . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell($biz->strAddress) . $clsRpt->closeRow()); // Phone echoT($clsRpt->openRow() . $clsRpt->writeLabel('Phone:') . $clsRpt->writeCell(htmlspecialchars(strPhoneCell($biz->strPhone, $biz->strCell))) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Consolidated With:') . $clsRpt->writeCell('Business IDs: ' . implode(', ', $dupIDs)) . $clsRpt->closeRow()); }
function showBizInfo($clsDateTime, $clsRpt, $biz) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $lBID = $biz->lKeyID; echoT($clsRpt->openRow() . $clsRpt->writeLabel('Business ID:') . $clsRpt->writeCell(strLinkView_BizRecord($lBID, 'View business record', true) . ' ' . str_pad($lBID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow()); // Name echoT($clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell($biz->strSafeName) . $clsRpt->closeRow()); // Address echoT($clsRpt->openRow() . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell($biz->strAddress) . $clsRpt->closeRow()); // Phone echoT($clsRpt->openRow() . $clsRpt->writeLabel('Phone:') . $clsRpt->writeCell(htmlspecialchars(strPhoneCell($biz->strPhone, $biz->strCell))) . $clsRpt->closeRow()); /* ------------------------------------- echo('<font class="debug">'.substr(__FILE__, strrpos(__FILE__, '\\')) .': '.__LINE__.'<br>$biz <pre>'); echo(htmlspecialchars( print_r($biz, true))); echo('</pre></font><br>'); // ------------------------------------- */ }
function showPayRec($clsRpt, &$pRec, $lSponID, $lFPayerID, $lPayID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; openBlock('Sponsor payment record ', strLinkEdit_SponsorPayment($lSponID, $lFPayerID, $lPayID, 'Edit payment record', true) . ' ' . strLinkAdd_SponsorPayment($lSponID, 'Add new payment', true) . ' ' . strLinkRem_SponsorPayment($lSponID, $lPayID, 'Remove payment', true, true)); echoT($clsRpt->openReport() . $clsRpt->openRow() . $clsRpt->writeLabel('Payment ID:') . $clsRpt->writeCell(str_pad($lPayID, 5, '0', STR_PAD_LEFT), '', '', 1, 1, 'id="sponPayID"') . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Amount:') . $clsRpt->writeCell($pRec->strCurSymbol . ' ' . number_format($pRec->curPaymentAmnt, 2) . ' ' . $pRec->strFlagImage) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Date of payment:') . $clsRpt->writeCell(date($genumDateFormat, $pRec->dtePayment)) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Payment type:') . $clsRpt->writeCell(htmlspecialchars($pRec->strPaymentType)) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Check #:') . $clsRpt->writeCell(htmlspecialchars($pRec->strCheckNum)) . $clsRpt->closeRow()); if ($pRec->lSponPeopleID == $pRec->lDonorID) { $strPayer = $pRec->strSponSafeNameFL . ' (sponsor)'; } else { if ($pRec->bDonorBiz) { $strPayer = strLinkView_BizRecord($pRec->lDonorID, 'View business record', true) . ' '; } else { $strPayer = strLinkView_PeopleRecord($pRec->lDonorID, 'View people record', true) . ' '; } $strPayer .= $pRec->strDonorSafeNameFL . ' <b>(THIRD PARTY PAYER)</b>'; } echoT($clsRpt->openRow() . $clsRpt->writeLabel('Payer:') . $clsRpt->writeCell($strPayer) . $clsRpt->closeRow() . $clsRpt->closeReport()); }
function writeAuctionItemsTable(&$package, &$items, $bDescriptions) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $lPackageID = $package->lKeyID; echoT(' <table class="enpRpt"> <tr> <td class="enpRptTitle" colspan="8"> Items in the package <b>"' . $package->strPackageSafeName . '"</b> </td> </tr>'); echoT(' <tr> <td class="enpRptLabel"> item ID </td> <td class="enpRptLabel"> </td> <td class="enpRptLabel"> </td> <td class="enpRptLabel"> Name </td> <td class="enpRptLabel"> Est. Value </td> <td class="enpRptLabel"> Out of Pocket </td> <td class="enpRptLabel"> From </td> </tr>'); $curTotVal = $curTotOOP = 0.0; foreach ($items as $item) { $lItemID = $item->lKeyID; if ($item->itemDonor_bBiz) { $strNameLink = ' <i>(business)</i> ' . strLinkView_BizRecord($item->lItemDonorID, 'View business record', true); } else { $strNameLink = ' ' . strLinkView_PeopleRecord($item->lItemDonorID, 'View people record', true); } echoT(' <tr class="makeStripe"> <td class="enpRpt" style="text-align: center; width: 20pt;">' . str_pad($lItemID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_AuctionItem($lItemID, 'View auction item', true) . ' </td> <td class="enpRpt" style="text-align: center;">' . strLinkEdit_AuctionItem($lPackageID, $lItemID, 'Edit Item', true) . ' </td> <td class="enpRpt" style="text-align: center; width: 20pt;">' . strLinkRem_AuctionItem($lPackageID, $lItemID, 'Remove auction item', true, true) . ' </td> <td class="enpRpt" style="width: 140pt;">' . $item->strSafeItemName . ' </td> <td class="enpRpt" style="width: 40pt; text-align: right;">' . number_format($item->curEstAmnt, 2) . ' </td> <td class="enpRpt" style="width: 40pt; text-align: right;">' . number_format($item->curOutOfPocket, 2) . ' </td> <td class="enpRpt" style="width: 110pt;">' . $item->itemDonor_safeName . $strNameLink . ' </td> </tr>'); $curTotVal += $item->curEstAmnt; $curTotOOP += $item->curOutOfPocket; } echoT(' <tr class="makeStripe"> <td class="enpRpt" colspan="4"> <b>Total:</b> </td> <td class="enpRpt" style="width: 40pt; text-align: right;"><b>' . number_format($curTotVal, 2) . '</b> </td> <td class="enpRpt" style="width: 40pt; text-align: right;"><b>' . number_format($curTotOOP, 2) . '</b> </td> <td colspan="2"> </td> </tr>'); echoT(' </table><br>'); }
function showSponsorsPayments(&$sponInfo, &$clsForm, &$linkOpts, &$validation) { // $strSort, $lSponProgID, $lStartRec, $lRecsPerPage){ //--------------------------------------------------------------------- // //--------------------------------------------------------------------- openSponsorPaymentTable($clsForm, $linkOpts); foreach ($sponInfo as $spon) { $lSponID = $spon->lKeyID; $lFID = $spon->lForeignID; echoT('<input type="hidden" name="hdnAOCID[' . $lSponID . ']" value="' . $spon->lCommitACO . '">' . "\n"); echoT('<input type="hidden" name="hdnFID[' . $lSponID . ']" value="' . $spon->lForeignID . '">' . "\n"); if ($spon->bSponBiz) { $strFLink = 'bizID: ' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . ' ' . strLinkView_BizRecord($lFID, 'View business record (new window)', true, 'target="_blank"'); } else { $strFLink = 'peopleID: ' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . ' ' . strLinkView_PeopleRecord($lFID, 'View people record (new window)', true, 'target="_blank"'); } $strRadioName = 'rdoPayType' . $lSponID; $lClientID = $spon->lClientID; if (is_null($lClientID)) { $strClient = 'client: n/a'; } else { $strClient = 'client: ' . str_pad($lClientID, 6, '0', STR_PAD_LEFT) . strLinkView_ClientRecord($lClientID, 'View client record (new window)', true, 'target="_blank"') . ' ' . $spon->strClientSafeNameFL; } echoT(' <tr class="makeStripe"> <td class="enpRpt" style="text-align: center;">' . str_pad($lSponID, 6, '0', STR_PAD_LEFT) . ' ' . strLinkView_Sponsorship($lSponID, 'View sponsorship (new window)', true, 'target="_blank"') . ' </td>'); echoT(' <td class="enpRpt" style="width: 230pt;"><b>' . $spon->strSponSafeNameLF . '</b><br>' . $strFLink . '<br>' . $strClient . '<br> program: ' . htmlspecialchars($spon->strSponProgram) . ' </td>'); echoT(' <td class="enpRpt" style="text-align: right;">' . $spon->strCommitACOCurSym . ' ' . number_format($spon->curCommitment, 2) . ' ' . $spon->strCommitACOFlagImg . ' </td>'); echoT(' <td class="enpRpt" style="vertical-align: top;">' . $spon->strCommitACOCurSym . ' ' . '<input type="text" name="' . $spon->strAmountFN . '" style="width: 60pt; text-align: right;" onChange="bUserDataEntered = true;" value="' . $spon->txtAmount . '">' . $validation->amount[$lSponID] . '<br><span style="font-size: 8pt;">' . $spon->strLastPay . '</span> </td>'); echoT(' <td class="enpRpt"> <table cellpadding="0" cellspacing="0"> <tr> <td style="text-align: right; font-size: 8pt;"> check #: </td> <td> <input type="text" style="width: 60pt;" onChange="bUserDataEntered = true;" name="' . $spon->strCheckFN . '" value="' . $spon->txtCheckNum . '"> </tr>'); echoT(' <tr> <td style="text-align: right; vertical-align: top; font-size: 8pt; padding-top: 4px;"> payment type: </td> <td>' . $spon->strDDLPayType . $validation->paymentType[$lSponID] . ' </td> </tr>'); //---------------------- // Payment Date //---------------------- echoT(' <tr> <td style="text-align: right; vertical-align: top; font-size: 8pt; padding-top: 6px;"> payment date: </td> <td>' . $clsForm->strGenericDatePicker('', 'txtPayDate' . $lSponID, true, $spon->txtPayDate, 'frmBatchPayments', 'datepicker' . $lSponID, '', true) . $validation->paymentDate[$lSponID] . ' </td> </tr>'); echoT(' </table> </td>'); echoT(' </tr>'); echoT(strDatePicker('datepicker' . $lSponID, true)); } closeSponsorPaymentTable(); }
function showGiftContactInfo($clsRpt, $lGID, $lFID, $bBiz, $clsPeopleRec, $clsBiz, $strDonor) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- if ($bBiz) { $strLink = strLinkView_BizRecord($lFID, 'View business/organization record', true); $strAddr = $clsBiz->strAddress; $strPhone = $clsBiz->strPhone; } else { $strLink = strLinkView_PeopleRecord($lFID, 'View people record', true); $strAddr = $clsPeopleRec->strAddress; $strPhone = $clsPeopleRec->strPhone; } openBlock('Donor', ''); echoT($clsRpt->openReport() . $clsRpt->openRow() . $clsRpt->writeLabel('Donor:') . $clsRpt->writeCell($strLink . ' ' . $strDonor) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Donor Type:') . $clsRpt->writeCell($bBiz ? 'Business/Organization' : 'Individual') . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell($strAddr) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Phone:') . $clsRpt->writeCell($strPhone) . $clsRpt->closeRow()); echoT($clsRpt->closeReport('')); closeBlock(); }
function showPeopleBizContacts($lPID, $people, $lNumContacts, $contacts, &$clsRpt) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $attributes = new stdClass(); $attributes->lTableWidth = 900; $attributes->divID = 'peopleBizCon'; $attributes->divImageID = 'preBizConDivImg'; openBlock('Business Contacts <span style="font-size: 9pt;">(' . $lNumContacts . ')</span>', '', $attributes); if ($lNumContacts == 0) { echoT('<i>There are no business contacts for this person.</i><br>'); } else { echoT($clsRpt->openReport()); foreach ($contacts as $clsCon) { echoT($clsRpt->openRow() . $clsRpt->writeCell(strLinkView_BizRecord($clsCon->lBizID, 'View business record', true)) . $clsRpt->writeCell(htmlspecialchars($clsCon->strBizName))); if ($clsCon->strRelationship . '' == '') { echoT($clsRpt->writeCell(' ')); } else { echoT($clsRpt->writeCell('(' . htmlspecialchars($clsCon->strRelationship) . ')')); } if ($clsCon->bSoftCash) { echoT($clsRpt->writeCell('<img src="' . DL_IMAGEPATH . '/misc/dollar.gif" border="0" title="soft cash relationship">')); } else { echoT($clsRpt->writeCell(' ')); } echoT($clsRpt->closeRow()); } echoT($clsRpt->closeReport()); } $attributes = new stdClass(); $attributes->bCloseDiv = true; closeBlock($attributes); }
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->writeCell($bz->strAddress, 160)); echoT($clsRpt->writeCell(strPhoneCell($bz->strPhone, $bz->strCell, true, true) . '<br>' . $bz->strEmailFormatted)); if ($bz->lNumBiz == 0) { echoT($clsRpt->writeCell('<i>none</i>', 260)); } else { $strOut = '<table width="100%">' . "\n"; foreach ($bz->biz as $biz) { if ($biz->bSoftCash) { $strSoft = '<img src="' . IMGLINK_DOLLAR . '" border="0" title="Soft cash relationship">'; } else { $strSoft = ''; } if ($biz->strRelationship . '' == '') { $strRel = ' '; } else { $strRel = ' <i>(' . htmlspecialchars($biz->strRelationship) . ')</i>'; } $strOut .= ' <tr> <td style="width: 130pt;">' . strLinkView_BizRecord($biz->bizID, 'View business record', true) . ' ' . $biz->strBizSafeName . ' </td> <td>' . $strRel . ' ' . $strSoft . ' </td> </tr>' . "\n"; } $strOut .= '</table>' . "\n"; echoT($clsRpt->writeCell($strOut, 300)); } echoT($clsRpt->closeRow()); } echoT($clsRpt->closeReport());
<td class="enpRptLabel"> Date of Donation </td> <td class="enpRptLabel"> Account </td> <td class="enpRptLabel"> Campaign </td> </tr>'); foreach ($gifts as $gift) { $lGiftID = $gift->gi_lKeyID; $lDonorID = $gift->gi_lForeignID; $bBizGift = $gift->pe_bBiz; if ($bBizGift) { $strLinkDonor = strLinkView_BizRecord($lDonorID, 'View business record', true); } else { $strLinkDonor = strLinkView_PeopleRecord($lDonorID, 'View people record', true); } echoT(' <tr class="makeStripe"> <td class="enpRpt">' . strLinkView_GiftsRecord($lGiftID, 'View gift record', true) . ' ' . str_pad($lGiftID, 5, '0', STR_PAD_LEFT) . ' </td> <td class="enpRpt">' . $strLinkDonor . ' ' . str_pad($lDonorID, 5, '0', STR_PAD_LEFT) . ' </td> <td class="enpRpt">' . htmlspecialchars($gift->strImportID) . ' </td> <td class="enpRpt">' . $gift->strSafeNameLF . ' </td> <td class="enpRpt" style="text-align: right;">' . $gift->strFormattedAmnt . ' </td>
private function loadImgDocInfoViaContext($enumContext, $imgDoc, $row) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat, $glChapterID; $lFID = (int) $imgDoc->lForeignID; switch ($enumContext) { case CENUM_CONTEXT_CLIENT: $imgDoc->strNameLabel = 'Client'; $imgDoc->strName = strLinkView_ClientRecord($lFID, 'View Client Record', true) . ' ' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . ' <b>' . htmlspecialchars($row->cr_strLName . ', ' . $row->cr_strFName) . '</b>'; $imgDoc->strAddressLabel = 'Address'; $imgDoc->strAddr = strBuildAddress($row->cr_strAddr1, $row->cr_strAddr2, $row->cr_strCity, $row->cr_strState, $row->cr_strCountry, $row->cr_strZip, true); $strPhone = strPhoneCell($row->cr_strPhone, $row->cr_strCell); if ($strPhone != '') { $imgDoc->strAddr .= '<br>' . $strPhone; } break; case CENUM_CONTEXT_PEOPLE: $imgDoc->strNameLabel = 'Name'; $imgDoc->strName = strLinkView_PeopleRecord($lFID, 'View People Record', true) . ' ' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . ' <b>' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '</b>'; $imgDoc->strAddressLabel = 'Address'; $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true); $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell); if ($strPhone != '') { $imgDoc->strAddr .= '<br>' . $strPhone; } break; case CENUM_CONTEXT_LOCATION: $imgDoc->strNameLabel = 'Client Location'; $imgDoc->strName = strLinkView_ClientLocation($lFID, 'View client location', true) . ' ' . htmlspecialchars($row->cl_strLocation); break; case CENUM_CONTEXT_GRANTPROVIDER: $imgDoc->strNameLabel = 'Funder/Provider'; $imgDoc->strName = strLinkView_GrantProvider($lFID, 'View funder/provider', true) . ' ' . htmlspecialchars($row->gpr_strGrantOrg); break; case CENUM_CONTEXT_INVITEM: $imgDoc->strNameLabel = 'Inventory Item'; $imgDoc->strName = strLinkView_InventoryItem($lFID, 'View inventory item', true) . ' ' . htmlspecialchars($row->ivi_strItemName); break; case CENUM_CONTEXT_AUCTION: $imgDoc->strNameLabel = 'Silent Auction'; $imgDoc->strName = strLinkView_AuctionRecord($lFID, 'View Auction', true) . ' ' . htmlspecialchars($row->auc_strAuctionName) . ' (' . date($genumDateFormat, dteMySQLDate2Unix($row->auc_dteAuctionDate)) . ')'; break; case CENUM_CONTEXT_AUCTIONITEM: $imgDoc->strNameLabel = 'Auction Item'; $imgDoc->strName = strLinkView_AuctionItem($lFID, 'View Auction Item', true) . ' ' . 'item: ' . htmlspecialchars($row->ait_strItemName) . '<br>package: ' . htmlspecialchars($row->ap_strPackageName) . '<br>auction: ' . htmlspecialchars($row->auc_strAuctionName); break; case CENUM_CONTEXT_AUCTIONPACKAGE: $imgDoc->strNameLabel = 'Auction Package'; $imgDoc->strName = strLinkView_AuctionPackageRecord($lFID, 'View Auction Package', true) . ' ' . 'package: ' . htmlspecialchars($row->ap_strPackageName) . '<br>auction: ' . htmlspecialchars($row->auc_strAuctionName); break; case CENUM_CONTEXT_BIZ: $imgDoc->strNameLabel = 'Business/Organization Name'; $imgDoc->strName = strLinkView_BizRecord($lFID, 'View Business/Organization Record', true) . ' ' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . ' <b>' . htmlspecialchars($row->pe_strLName) . '</b>'; $imgDoc->strAddressLabel = 'Address'; $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true); $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell); if ($strPhone != '') { $imgDoc->strAddr .= '<br>' . $strPhone; } break; case CENUM_CONTEXT_SPONSORSHIP: $bBiz = (bool) $row->pe_bBiz; if ($bBiz) { $imgDoc->strNameLabel = 'Sponsor (Business/organization)'; $imgDoc->strName = strLinkView_PeopleRecord($lFID, 'View People Record', true) . ' ' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . ' <b>' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '</b>'; } else { $imgDoc->strNameLabel = 'Sponsor (Individual)'; $imgDoc->strName = strLinkView_BizRecord($lFID, 'View Business/Organization Record', true) . ' ' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . ' <b>' . htmlspecialchars($row->pe_strLName) . '</b>'; } $imgDoc->strAddressLabel = 'Address'; $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true); $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell); if ($strPhone != '') { $imgDoc->strAddr .= '<br>' . $strPhone; } break; case CENUM_CONTEXT_ORGANIZATION: $imgDoc->strNameLabel = 'Your organization'; $imgDoc->strName = strLinkView_OrganizationRecord($lFID, 'View organization record', true) . ' ' . htmlspecialchars($row->ch_strChapterName); break; case CENUM_CONTEXT_STAFF: $imgDoc->strNameLabel = 'Staff Member'; $imgDoc->strName = strLinkView_User($lFID, 'View staff member record', true) . ' ' . htmlspecialchars($row->strFirstName . ' ' . $row->strLastName); break; case CENUM_CONTEXT_VOLUNTEER: $imgDoc->strNameLabel = 'Name'; $imgDoc->strName = strLinkView_Volunteer($lFID, 'View Volunteer Record', true) . ' ' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . ' <b>' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '</b>'; $imgDoc->strAddressLabel = 'Address'; $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true); $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell); if ($strPhone != '') { $imgDoc->strAddr .= '<br>' . $strPhone; } break; default: screamForHelp($enumContext . ': image context not currently implemented<br>error on line <b> -- ' . __LINE__ . ' --</b>,<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__); break; } }
public function packageHTMLSummary() { //----------------------------------------------------------------------- // assumes user has called $cPackages->loadPackageByPacID($lPackageID); //----------------------------------------------------------------------- global $genumDateFormat; $params = array('enumStyle' => 'terse'); $clsRpt = new generic_rpt($params); $clsRpt->setEntrySummary(); $package =& $this->packages[0]; $lAuctionID = $package->lAuctionID; $lPackageID = $package->lKeyID; $strOut = $clsRpt->openReport('', '') . $clsRpt->openRow(false) . $clsRpt->writeLabel('Auction Name:') . $clsRpt->writeCell(htmlspecialchars($package->strAuctionName)) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Overview:') . $clsRpt->writeCell(strLinkView_AuctionOverview($lAuctionID, 'Auction overview', true)) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Auction ID:') . $clsRpt->writeCell(str_pad($lAuctionID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_AuctionRecord($lAuctionID, 'View auction record', true)) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Package Name:') . $clsRpt->writeCell($package->strPackageSafeName) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Package ID:') . $clsRpt->writeCell(str_pad($lPackageID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_AuctionPackageRecord($lPackageID, 'View auction package record', true)) . $clsRpt->closeRow(); if (is_null($package->lBidWinnerID)) { $strOut .= $clsRpt->openRow(false) . $clsRpt->writeLabel('Bid Winner:') . $clsRpt->writeCell('<i>Not set</i>') . $clsRpt->closeRow(); } else { if ($package->bw_bBiz) { $strLink = strLinkView_BizRecord($package->lBidWinnerID, 'View business record', true); } else { $strLink = strLinkView_PeopleRecord($package->lBidWinnerID, 'View people record', true); } $strOut .= $clsRpt->openRow(false) . $clsRpt->writeLabel('Bid Winner:') . $clsRpt->writeCell($package->bw_strSafeName . ' ' . $strLink) . $clsRpt->closeRow(); } $strOut .= $clsRpt->closeReport('<br>'); return $strOut; }
function strPeopleBizDupWarning($bPeople, $strCheckBoxName, $lNumMatches, $matches) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $strWarning = ''; $strLabel1 = $bPeople ? 'people' : 'business/organization'; $strLabel2 = $bPeople ? 'People' : 'Biz/Org'; $strWarning = '<br><div class="formError" style="width: 400pt;"> <b><i>Delightful Labor</i></b> has detected ' . $lNumMatches . ' ' . $strLabel1 . ' records with similar names to your new entry.<br><br> To prevent duplicate records, please verify that your new ' . $strLabel1 . ' record <b><i>is not</i></b> in the database.<br> <table style="border:2px solid #ff0000; border-collapse:collapse;"> <tr> <td class="enpRptTitle" colspan="3" style="background-color: #ffd3d3;"> ' . $strLabel2 . ' records in the database </td> </tr> <tr> <td class="enpRptLabel" style="background-color: #ffd3d3;"> ' . $strLabel2 . ' ID </td> <td class="enpRptLabel" style="background-color: #ffd3d3;"> Name </td> <td class="enpRptLabel" style="background-color: #ffd3d3;"> Address </td>'; $strWarning .= '</tr>'; foreach ($matches as $match) { $lKeyID = $match->lKeyID; if ($bPeople) { $strLink = strLinkView_PeopleRecord($lKeyID, 'View people record', true); } else { $strLink = strLinkView_BizRecord($lKeyID, 'View business/organization record', true); } $strWarning .= ' <tr> <td class="enpRpt" style="text-align: center;background-color: #fff5f5;">' . str_pad($lKeyID, 6, '0', STR_PAD_LEFT) . ' ' . $strLink . ' </td> <td class="enpRpt" style="background-color: #fff5f5;">' . $match->strSafeNameLF . ' </td> <td class="enpRpt" style="background-color: #fff5f5;">' . $match->strAddress . ' </td>'; $strWarning .= '</tr>'; } $strWarning .= ' </table><br> <div style="width: 300pt; border: 1px solid black; padding: 3px 3px 6px 3px; background-color: #fff; vertical-align: middle;"> <input type="checkbox" name="' . $strCheckBoxName . '" value="true"> I have verified that this <b>IS NOT</b> a duplicate entry<br> </div> </div>'; return $strWarning; }
//--------------------------- // sponsor name //--------------------------- if ($showFields->bName) { if ($sponRec->bSponBiz) { $strLinkFID = 'business ID: ' . strLinkView_BizRecord($lFID, 'View business record', true); } else { $strLinkFID = 'people ID: ' . strLinkView_PeopleRecord($lFID, 'View people record', true); } $strLinkFID .= str_pad($lFID, 5, '0', STR_PAD_LEFT); $strHonoree = ''; if ($showFields->bHonoree) { if ($sponRec->bHonoree) { $lHFID = $sponRec->lHonoreeID; if ($sponRec->bHonBiz) { $strLinkHFID = 'business ID: ' . strLinkView_BizRecord($lHFID, 'View business record', true); } else { $strLinkHFID = 'people ID: ' . strLinkView_PeopleRecord($lHFID, 'View people record', true); } $strLinkHFID .= str_pad($lHFID, 5, '0', STR_PAD_LEFT); $strHonoree = '<br><br>Honoree: ' . $sponRec->strHonSafeNameLF . '<br>' . $strLinkHFID; } } echoT(' <td class="enpRpt" style="width: 130pt;' . $strIStyle . '">' . '<b>' . $sponRec->strSponSafeNameLF . '</b>' . '<br>' . $strLinkFID . $strHonoree . '<br> program: ' . htmlspecialchars($sponRec->strSponProgram) . ' </td>'); } //--------------------------- // address / contact //---------------------------
private function loadBizContext() { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $this->clsBiz = new mbiz(); $this->clsBiz->lBID = $lBID = $this->lForeignID; $this->clsBiz->loadBizRecsViaBID($lBID); $this->strContextLabel = 'business/organization record'; $this->strContextName = $this->clsBiz->bizRecs[0]->strSafeName; $this->strContextViewLink = strLinkView_BizRecord($this->lForeignID, 'View business/organization record', true); }
function addEditPayment($lSponID, $lFPayerID, $lPayID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $gdteNow, $gclsChapterACO, $gbDateFormatUS, $gstrFormatDatePicker; if (!bTestForURLHack('showSponsorFinancials')) { return; } $this->load->helper('dl_util/verify_id'); verifyID($this, $lSponID, 'sponsor ID'); verifyID($this, $lFPayerID, 'people/business ID'); if ($lPayID . '' != '0') { verifyID($this, $lPayID, 'sponsor payment ID'); } $displayData = array(); $displayData['formData'] = new stdClass(); $displayData['lSponID'] = $lSponID = (int) $lSponID; $displayData['lFPayerID'] = $lFPayerID = (int) $lFPayerID; $displayData['lPayID'] = $lPayID = (int) $lPayID; $displayData['bNew'] = $bNew = $lPayID <= 0; //------------------------------------------------ // libraries and utilities //------------------------------------------------ $params = array('enumStyle' => 'terse'); $this->load->library('generic_rpt', $params); $this->load->library('util/dl_date_time', '', 'clsDateTime'); $this->load->model('sponsorship/msponsorship', 'clsSpon'); $this->load->model('sponsorship/msponsor_charge_pay', 'clsSCP'); $this->load->model('admin/madmin_aco', 'clsACO'); $this->load->model('util/mlist_generic', 'clsList'); $this->load->helper('dl_util/time_date'); // $this->load->helper ('dl_util/email_web'); $this->load->model('people/mpeople', 'clsPeople'); $bBizPayer = $this->clsPeople->bBizRec($lFPayerID); if ($bBizPayer) { $this->load->model('biz/mbiz', 'clsBiz'); $this->clsBiz->lBID = $lFPayerID; $this->clsBiz->loadBasicBizInfo(); $displayData['strPayer'] = strLinkView_BizRecord($lFPayerID, 'View business/organization record', true) . ' ' . str_pad($lFPayerID, 5, '0', STR_PAD_LEFT) . ' ' . $this->clsBiz->strSafeName; } else { $this->clsPeople->lPeopleID = $lFPayerID; $this->clsPeople->peopleInfoLight(); $displayData['strPayer'] = strLinkView_PeopleRecord($lFPayerID, 'View people record', true) . ' ' . str_pad($lFPayerID, 5, '0', STR_PAD_LEFT) . ' ' . $this->clsPeople->strSafeName; } $this->clsSCP->loadPayRecordViaPayID($lPayID); $pRec =& $this->clsSCP->paymentRec[0]; $this->clsSpon->sponsorInfoViaID($lSponID); if ($bNew) { $pRec->lACOID = $this->clsSpon->sponInfo[0]->lCommitACO; $pRec->curPaymentAmnt = 0.0; $pRec->dtePayment = $gdteNow; } else { // if (!$this->clsSCP->bPaymentExists($lHoldPayID)){ // $this->session->set_flashdata('error', '<b>ERROR:</b> The payment ID '.htmlspecialchars($lHoldPayID).' is not valid.</font>'); // redirect('main/menu/home'); // } } //-------------------------- // validation rules //-------------------------- $this->form_validation->set_error_delimiters('<div class="formError">', '</div>'); $this->form_validation->set_rules('txtAmount', 'Amount', 'trim|required|callback_stripCommas|numeric'); $this->form_validation->set_rules('rdoACO', 'Accounting Country', 'trim|callback_verifyACOSet'); $this->form_validation->set_rules('txtCheck', 'Check Number', 'trim'); $this->form_validation->set_rules('ddlPayType', 'Payment Type', 'trim|callback_sponPayVerifyPayType'); $this->form_validation->set_rules('txtPayDate', 'Date of Payment', 'trim|required|callback_sponPaymentAddEditDateValid'); if ($this->form_validation->run() == FALSE) { $displayData['clsACO'] =& $this->clsACO; $this->load->library('generic_form'); $this->load->helper('dl_util/web_layout'); $displayData['clsForm'] =& $this->generic_form; if (validation_errors() == '') { if ($bNew) { $displayData['strPayDate'] = date($gstrFormatDatePicker, $gdteNow); $displayData['lPayACO'] = $this->clsSpon->sponInfo[0]->lCommitACO; $displayData['strAmount'] = '0.00'; $displayData['strCheckNum'] = ''; } else { $displayData['strPayDate'] = date($gstrFormatDatePicker, $pRec->dtePayment); $displayData['lPayACO'] = $pRec->lACOID; $displayData['strAmount'] = number_format($pRec->curPaymentAmnt, 2); $displayData['strCheckNum'] = $pRec->strCheckNum; } $this->clsList->enumListType = CENUM_LISTTYPE_GIFTPAYTYPE; $displayData['formData']->strDDLPayType = $this->clsList->strLoadListDDL('ddlPayType', true, $pRec->lPaymentType); } else { setOnFormError($displayData); $displayData['strPayDate'] = set_value('txtPayDate'); $displayData['lPayACO'] = set_value('rdoACO'); $displayData['strAmount'] = set_value('txtAmount'); $displayData['strCheckNum'] = set_value('txtCheck'); $this->clsList->enumListType = CENUM_LISTTYPE_GIFTPAYTYPE; $displayData['formData']->strDDLPayType = $this->clsList->strLoadListDDL('ddlPayType', true, set_value('ddlPayType')); } //------------------------------------------------ // breadcrumbs / page setup //------------------------------------------------ $displayData['contextSummary'] = $this->clsSpon->sponsorshipHTMLSummary(); $displayData['mainTemplate'] = array('sponsorship/payment_add_edit_view'); $displayData['pageTitle'] = anchor('main/menu/sponsorship', 'Sponsorship', 'class="breadcrumb"') . ' | ' . anchor('sponsors/view_spon_rec/viewViaSponID/' . $lSponID, 'Sponsorship Record', 'class="breadcrumb"') . ' | ' . ($bNew ? 'Add ' : 'Update ') . 'Sponsorship Payment'; $displayData['title'] = CS_PROGNAME . ' | Sponsorship'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $this->load->vars($displayData); $this->load->view('template'); } else { $this->load->helper('dl_util/util_db'); $this->load->model('donations/maccts_camps', 'clsAC'); $strChargeDate = trim($_POST['txtPayDate']); MDY_ViaUserForm($strChargeDate, $lMon, $lDay, $lYear, $gbDateFormatUS); $pRec->dtePayment = strtotime($lMon . '/' . $lDay . '/' . $lYear); $pRec->curPaymentAmnt = (double) trim($_POST['txtAmount']); $pRec->lACOID = (int) $_POST['rdoACO']; $pRec->lSponsorshipID = $lSponID; $pRec->lDonorID = $lFPayerID; $pRec->lPaymentType = (int) $_POST['ddlPayType']; $pRec->strCheckNum = trim($_POST['txtCheck']); if ($bNew) { $lPayID = $this->clsSCP->lAddNewPayment(); $this->session->set_flashdata('msg', 'Sponsorship payment was added'); } else { $this->clsSCP->updatePayment($lPayID); $this->session->set_flashdata('msg', 'Sponsorship payment was updated'); } redirect_SponsorshipPaymentRec($lPayID); } }
function addEditAuctionItem($lPackageID, $lItemID, $lDonorID = null) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $gbDateFormatUS; if (!bTestForURLHack('showAuctions')) { return; } $this->load->helper('dl_util/verify_id'); verifyID($this, $lPackageID, 'package ID'); if ($lItemID . '' != '0') { verifyID($this, $lItemID, 'auction item ID'); } if (!is_null($lDonorID)) { verifyID($this, $lDonorID, 'people/business ID'); } $displayData = array(); $displayData['js'] = ''; $displayData['formData'] = new stdClass(); //------------------------- // models & helpers //------------------------- $this->load->helper('dl_util/time_date'); $this->load->model('auctions/mauctions', 'cAuction'); $this->load->model('auctions/mpackages', 'cPackages'); $this->load->model('auctions/mitems', 'cItems'); $this->load->model('admin/madmin_aco', 'clsACO'); $this->load->model('img_docs/mimage_doc', 'clsImgDoc'); $this->load->helper('dl_util/web_layout'); $this->load->helper('dl_util/link_auction'); $this->load->helper('auctions/auction'); $params = array('enumStyle' => 'terse'); $this->load->library('generic_rpt', $params); $this->load->library('generic_form'); //----------------------------------------- // load package and associated auction //----------------------------------------- setPackageContext($lPackageID, $lAuctionID, $displayData); $displayData['lAuctionID'] = $lAuctionID = (int) $lAuctionID; $displayData['lPackageID'] = $lPackageID = (int) $lPackageID; $displayData['lItemID'] = $lItemID = (int) $lItemID; $displayData['lDonorID'] = $lDonorID; $displayData['bNew'] = $bNew = $lItemID <= 0; $this->cItems->loadItemViaItemID($lItemID); $displayData['item'] = $item =& $this->cItems->items[0]; //------------------------- // validation rules //------------------------- $this->form_validation->set_error_delimiters('<div class="formError">', '</div>'); $this->form_validation->set_rules('txtItemName', 'Item Name', 'trim|required'); $this->form_validation->set_rules('txtDonorAck', 'Donor Acknowledgement', 'trim|required'); $this->form_validation->set_rules('txtPublicNotes', 'Public Notes', 'trim'); $this->form_validation->set_rules('txtPrivateNotes', 'Private Notes', 'trim'); $this->form_validation->set_rules('txtODate', 'Date Item Obtained', 'trim|required|callback_obtainedDateValid'); $this->form_validation->set_rules('txtEstValue', 'Estimated Value', 'trim|required|callback_stripCommas|numeric|callback_minPackageAmnt[0.01]'); $this->form_validation->set_rules('txtOutOfPocket', 'Out of Pocket Expenses', 'trim|required|callback_stripCommas|numeric|callback_minPackageAmnt[0.00]'); if ($this->form_validation->run() == FALSE) { $displayData['js'] .= strDatePicker('datepickerFuture', true); if (is_null($lDonorID)) { $lHoldDonorID = $item->lItemDonorID; $bBiz = $item->itemDonor_bBiz; $displayData['formData']->txtItemDonor = $item->itemDonor_safeName; $strTempAck = 'Anonymous'; } else { $lHoldDonorID = $lDonorID; $this->load->model('people/mpeople', 'clsPeople'); $this->clsPeople->peopleBizInfoViaPID($lDonorID, $pbInfo); $bBiz = $pbInfo->bBiz; $displayData['formData']->txtItemDonor = $strTempAck = $pbInfo->strSafeNameFL; } if ($bBiz) { $displayData['formData']->txtItemDonor .= ' <i>(business)</i>' . strLinkView_BizRecord($lHoldDonorID, 'View business record', true); } else { $displayData['formData']->txtItemDonor .= ' ' . strLinkView_PeopleRecord($lHoldDonorID, 'View people record', true); } // first time displayed, no user data entry errors if (validation_errors() == '') { if ($bNew) { $displayData['formData']->txtODate = ''; } else { $displayData['formData']->txtODate = strNumericDateViaMysqlDate($item->mdteItemObtained, $gbDateFormatUS); } $displayData['formData']->txtItemName = htmlspecialchars($item->strItemName); if ($item->strDonorAck . '' == '') { $displayData['formData']->txtDonorAck = $strTempAck; } else { $displayData['formData']->txtDonorAck = htmlspecialchars($item->strDonorAck); } $displayData['formData']->txtPublicNotes = htmlspecialchars($item->strDescription); $displayData['formData']->txtPrivateNotes = htmlspecialchars($item->strInternalNotes); $displayData['formData']->txtEstValue = number_format($item->curEstAmnt, 2); $displayData['formData']->txtOutOfPocket = number_format($item->curOutOfPocket, 2); } else { setOnFormError($displayData); $displayData['formData']->txtItemName = set_value('txtItemName'); $displayData['formData']->txtDonorAck = set_value('txtDonorAck'); $displayData['formData']->txtPublicNotes = set_value('txtPublicNotes'); $displayData['formData']->txtPrivateNotes = set_value('txtPrivateNotes'); $displayData['formData']->txtODate = set_value('txtODate'); $displayData['formData']->txtEstValue = set_value('txtEstValue'); $displayData['formData']->txtOutOfPocket = set_value('txtOutOfPocket'); } //-------------------------- // breadcrumbs //-------------------------- $displayData['pageTitle'] = GSTR_AUCTIONTOPLEVEL . ' | ' . anchor('auctions/auctions/auctionEvents', 'Silent Auctions', 'class="breadcrumb"') . ' | ' . anchor('auctions/auctions/viewAuctionRecord/' . $lAuctionID, 'Auction', 'class="breadcrumb"') . ' | ' . anchor('auctions/packages/viewPackageRecord/' . $lPackageID, 'Auction Package', 'class="breadcrumb"') . ' | ' . ($bNew ? 'Add New' : 'Edit') . ' Item'; $displayData['title'] = CS_PROGNAME . ' | Silent Auctions'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $displayData['mainTemplate'] = 'auctions/add_edit_item_view'; $this->load->vars($displayData); $this->load->view('template'); } else { $strDate = trim($_POST['txtODate']); MDY_ViaUserForm($strDate, $lMon, $lDay, $lYear, $gbDateFormatUS); $item->mdteItemObtained = strMoDaYr2MySQLDate($lMon, $lDay, $lYear); $item->lPackageID = $lPackageID; $item->strItemName = trim($_POST['txtItemName']); $item->strDonorAck = trim($_POST['txtDonorAck']); $item->strDescription = trim($_POST['txtPublicNotes']); $item->strInternalNotes = trim($_POST['txtPrivateNotes']); $item->curEstAmnt = (double) trim($_POST['txtEstValue']); $item->curOutOfPocket = (double) trim($_POST['txtOutOfPocket']); //------------------------------------ // update db tables and return //------------------------------------ if ($bNew) { $lItemID = $this->cItems->addNewItem($lDonorID, $lPackageID); $this->session->set_flashdata('msg', 'Auction item record added'); } else { $this->cItems->updateItem($lItemID); $this->session->set_flashdata('msg', 'Auction item record updated'); } redirect('auctions/items/viewItemRecord/' . $lItemID); } }
function contextNameLink($enumType, $lForeignID, &$strContextName, &$strContextLink) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $CI =& get_instance(); $strContextLink = str_pad($lForeignID, 5, '0', STR_PAD_LEFT); switch ($enumType) { case CENUM_CONTEXT_PEOPLE: $CI->clsPeople->loadPeopleViaPIDs($lForeignID, false, false); $strContextName = $CI->clsPeople->people[0]->strFName . ' ' . $CI->clsPeople->people[0]->strLName; $strContextLink .= strLinkView_PeopleRecord($lForeignID, 'View people record', true); break; case CENUM_CONTEXT_CLIENT: $CI->clsClients->loadClientsViaClientID($lForeignID); $strContextName = $CI->clsClients->clients[0]->strFName . ' ' . $CI->clsClients->clients[0]->strLName; $strContextLink .= strLinkView_ClientRecord($lForeignID, 'View client record', true); break; case CENUM_CONTEXT_GIFT: $CI->clsGifts->loadGiftViaGID($lForeignID); $strContextName = 'Donation by ' . $CI->clsGifts->gifts[0]->strSafeName; $strContextLink .= strLinkView_GiftsRecord($lForeignID, 'View gift record', true); break; case CENUM_CONTEXT_BIZ: $CI->clsBiz->loadBizRecsViaBID($lForeignID); $strContextName = $CI->clsBiz->bizRecs[0]->strSafeName; $strContextLink .= strLinkView_BizRecord($lForeignID, 'View business record', true); break; case CENUM_CONTEXT_SPONSORSHIP: $CI->clsSpon->sponsorInfoViaID($lForeignID); $strContextName = 'Sponsor ' . $CI->clsSpon->sponInfo[0]->strSponSafeNameFL; $strContextLink .= strLinkView_Sponsorship($lForeignID, 'View sponsorship record', true); break; case CENUM_CONTEXT_VOLUNTEER: $CI->clsVol->loadVolRecsViaVolID($lForeignID, true); $strContextName = $CI->clsVol->volRecs[0]->strSafeNameFL; $strContextLink .= strLinkView_Volunteer($lForeignID, 'View volunteer record', true); break; case CENUM_CONTEXT_LOCATION: $CI->clsLoc->loadLocationRec($lForeignID); $strContextName = $CI->clsLoc->strLocation; $strContextLink .= strLinkView_ClientLocation($lForeignID, 'View client location record', true); break; case CENUM_CONTEXT_ORGANIZATION: $CI->clsLoc->loadLocationRec($lForeignID); $strContextName = $CI->clsChapter->chapterRec->strSafeChapterName; $strContextLink .= strLinkView_OrganizationRecord($lForeignID, 'View your organization record', true); break; default: screamForHelp($enumType . ': feature not available yet<br>error on line ' . __LINE__ . ',<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__); break; } }
private function strPeopleBasedGroupRptHTML($enumContext) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- switch ($enumContext) { case CENUM_CONTEXT_PEOPLE: $strIDLabel = 'PeopleID'; $strInner = ' INNER JOIN people_names ON pe_lKeyID=gm_lForeignID '; $strFID = ' pe_lKeyID AS lFID '; break; case CENUM_CONTEXT_BIZ: $strIDLabel = 'businessID'; $strInner = ' INNER JOIN people_names ON pe_lKeyID=gm_lForeignID '; $strFID = ' pe_lKeyID AS lFID '; break; case CENUM_CONTEXT_VOLUNTEER: $strIDLabel = 'volunteerID'; $strInner = ' INNER JOIN volunteers ON vol_lKeyID = gm_lForeignID ' . ' INNER JOIN people_names ON vol_lPeopleID = pe_lKeyID '; $strFID = ' pe_lKeyID, vol_lKeyID AS lFID '; break; case CENUM_CONTEXT_SPONSORSHIP: $strIDLabel = 'sponsorID'; $strInner = ' INNER JOIN sponsor ON sp_lKeyID = gm_lForeignID ' . ' INNER JOIN people_names ON sp_lForeignID = pe_lKeyID '; $strFID = ' pe_lKeyID, sp_lKeyID AS lFID '; break; default: screamForHelp($enumContext . ': group type not yet available<br>error on <b>line:</b> ' . __LINE__ . '<br><b>file: </b>' . __FILE__ . '<br><b>function: </b>' . __FUNCTION__); break; } $strOut = '<table class="enpRptC"> <tr> <td class="enpRptLabel">' . $strIDLabel . ' </td> <td class="enpRptLabel"> Name </td> <td class="enpRptLabel"> Address </td> <td class="enpRptLabel"> Phone/Email </td> <td class="enpRptLabel"> Group Membership </td> </tr>' . "\n"; $sqlStr = "SELECT\n {$strFID},\n pe_strLName, pe_strFName, pe_strAddr1, pe_strAddr2,\n pe_strCity, pe_strState, pe_strCountry, pe_strZip, pe_strPhone, pe_strCell, pe_strEmail\n FROM tmpGroupMatch\n {$strInner}\n ORDER BY gm_lKeyID;"; $query = $this->db->query($sqlStr); foreach ($query->result() as $row) { $lFID = $row->lFID; if ($row->pe_strEmail . '' == '') { $strEmail = ''; } else { $strEmail = '<br>' . mailto($row->pe_strEmail, $row->pe_strEmail); } $this->groupMembershipViaFID($enumContext, $lFID); /* tip for preventing that pesky line break before a list http://stackoverflow.com/questions/1682873/how-do-i-prevent-a-line-break-occurring-before-an-unordered-list ul.errorlist {list-style-type: none; display:inline; margin-left: 0; padding-left: 0;} ul.errorlist li {display: inline; color:red; font-size: 0.8em; margin-left: 0px; padding-left: 10px;} */ $strGroupList = '<ul style="list-style-type: square; display:inline; margin-left: 0; padding-left: 0;">'; foreach ($this->arrMemberInGroups as $grpMember) { $strGroupList .= '<li style="margin-left: 20px; padding-left: 3px;">' . htmlspecialchars($grpMember->strGroupName) . '</li>'; } $strGroupList .= '</ul>'; switch ($enumContext) { case CENUM_CONTEXT_PEOPLE: $strLink = strLinkView_PeopleRecord($lFID, 'View people record', true) . ' '; break; case CENUM_CONTEXT_BIZ: $strLink = strLinkView_BizRecord($lFID, 'View people record', true) . ' '; break; case CENUM_CONTEXT_VOLUNTEER: $strLink = strLinkView_Volunteer($lFID, 'View volunteer record', true) . ' '; break; case CENUM_CONTEXT_SPONSORSHIP: $strLink = strLinkView_Sponsorship($lFID, 'View sponsor record', true) . ' '; break; default: screamForHelp($enumContext . ': group type not yet available<br>error on <b>line:</b> ' . __LINE__ . '<br><b>file: </b>' . __FILE__ . '<br><b>function: </b>' . __FUNCTION__); break; } $bBiz = $enumContext == CENUM_CONTEXT_BIZ; $strOut .= '<tr class="makeStripe"> <td class="enpRpt" style="width: 65px;">' . $strLink . str_pad($lFID, 5, '0', STR_PAD_LEFT) . ' </td> <td class="enpRpt" style="width: 160px;">' . htmlspecialchars($row->pe_strLName . ($bBiz ? '' : ', ' . $row->pe_strFName)) . ' </td> <td class="enpRpt" style="width: 200px;">' . strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true) . ' </td> <td class="enpRpt" style="width: 120px;">' . htmlspecialchars(strPhoneCell($row->pe_strPhone, $row->pe_strCell)) . $strEmail . ' </td> <td class="enpRpt" style="width: 200px;">' . $strGroupList . ' </td> </tr>' . "\n"; $strOut .= '</tr>' . "\n"; } $strOut .= '</table>' . "\n"; return $strOut; }
function strDisplayValueViaType($vVal, $enumType, $lTableID, $bAsTableRow, $lWidth = 0, $strClass = 'enpRpt', $strStyleExtra = '') { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $gbDateFormatUS; $strAlign = 'left'; switch ($enumType) { case CS_FT_HEADING: $strOut = $vVal; break; case CS_FT_LOG: $strOut = $vVal; break; case CS_FT_CHECKBOX: $strOut = $vVal ? 'Yes' : 'No'; break; case CS_FT_DATE: $strAlign = 'center'; if ($vVal . '' == '') { $strOut = ' '; } else { $strOut = strNumericDateViaMysqlDate($vVal, $gbDateFormatUS); } break; case CS_FT_DDL: case CS_FT_DDL_SPECIAL: case CS_FT_DDLMULTI: case CS_FT_TEXT80: case CS_FT_TEXT255: case CS_FT_TEXT20: $strOut = htmlspecialchars($vVal); break; case CS_FT_TEXT: case CS_FT_TEXTLONG: $strOut = nl2br(htmlspecialchars($vVal)); break; case CS_FT_ID: $strAlign = 'center'; $strOut = str_pad($vVal, 5, '0', STR_PAD_LEFT); switch ($lTableID) { case CL_STID_CLIENT: $strOut .= ' ' . strLinkView_ClientRecord($vVal, 'View client record', true); break; case CL_STID_GIFTS: $strOut .= ' ' . strLinkView_GiftsRecord($vVal, 'View gift record', true); break; case CL_STID_PEOPLEBIZ: break; case CL_STID_PEOPLE: $strOut .= ' ' . strLinkView_PeopleRecord($vVal, 'View people record', true); break; case CL_STID_BIZ: $strOut .= ' ' . strLinkView_BizRecord($vVal, 'View business/organization record', true); break; } break; case CS_FT_INTEGER: $strAlign = 'right'; if ($vVal . '' == '') { $strOut = ' '; } else { $strOut = number_format($vVal, 0); } break; case CS_FT_CURRENCY: $strAlign = 'right'; if ($vVal . '' == '') { $strOut = ' '; } else { $strOut = number_format($vVal, 2); } break; default: screamForHelp($enumType . ': unexpected field type<br>error on line <b> -- ' . __LINE__ . ' --</b>,<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__); break; } if ($bAsTableRow) { if ($lWidth > 0) { $strStyle = ' style="width: ' . $lWidth . 'pt; ' . $strStyleExtra . ' text-align: ' . $strAlign . ';" '; } else { $strStyle = ' style="' . $strStyleExtra . ' text-align: ' . $strAlign . ';" '; } $strOut = '<td class="' . $strClass . '" ' . $strStyle . '>' . $strOut . '</td>'; } return $strOut; }
function strSponMonthIncomeReport(&$sRpt, &$displayData, $lStartRec, $lRecsPerPage) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; $strOut = ''; $strLimit = " LIMIT {$lStartRec}, {$lRecsPerPage} "; $this->sponIncomeViaMonthVars($sRpt, $lYear, $lMonth, $lACOID); $cACO = new madmin_aco(); $cACO->loadCountries(false, true, true, $lACOID); $cCountry = $cACO->countries[0]; $strOut = '<table class="enpView"> <tr> <td class="enpViewLabel" colspan="2" style="text-align: left; font-size: 13pt;"> Sponsorship Income </td> </tr> <tr> <td class="enpViewLabel"> Accounting Country: </td> <td class="enpView">' . $cCountry->strName . ' ' . $cCountry->strCurrencySymbol . ' ' . $cCountry->strFlagImg . ' </td> </tr> <tr> <td class="enpViewLabel"> Month: </td> <td class="enpView">' . strXlateMonth($lMonth) . ' ' . $lYear . ' </td> </tr> </table>'; $sqlStr = "SELECT\n gi_lKeyID, gi_lSponsorID,\n gi_dteDonation,\n gi_curAmnt, gi_lForeignID, sp_lForeignID,\n payer.pe_bBiz AS bPayerBiz, payer.pe_strLName AS strPayerLName, payer.pe_strFName AS strPayerFName,\n payer.pe_strAddr1, payer.pe_strAddr2, payer.pe_strCity, payer.pe_strState, payer.pe_strZip, payer.pe_strCountry,\n spon.pe_bBiz AS bSponBiz, spon.pe_strLName AS strSponLName, spon.pe_strFName AS strSponFName\n FROM gifts\n INNER JOIN people_names AS payer ON gi_lForeignID=payer.pe_lKeyID\n INNER JOIN sponsor ON gi_lSponsorID=sp_lKeyID\n INNER JOIN people_names AS spon ON sp_lForeignID=spon.pe_lKeyID\n\n WHERE NOT gi_bRetired\n AND gi_lACOID={$lACOID}\n AND MONTH(gi_dteDonation)={$lMonth}\n AND YEAR (gi_dteDonation)={$lYear}\n AND gi_lSponsorID IS NOT NULL\n ORDER BY gi_dteDonation, gi_lKeyID\n {$strLimit};"; $query = $this->db->query($sqlStr); $lNumRows = $query->num_rows(); if ($lNumRows > 0) { $strOut .= ' <table class="enpRptC"> <tr> <td class="enpRptLabel"> Payment ID </td> <td class="enpRptLabel"> Sponsor ID </td> <td class="enpRptLabel"> Amount </td> <td class="enpRptLabel"> Date </td> <td class="enpRptLabel"> Payer </td> <td class="enpRptLabel"> Sponsor </td> </tr>'; foreach ($query->result() as $row) { $lPayID = $row->gi_lKeyID; $lSponsorID = $row->gi_lSponsorID; $lSponsorFID = $row->sp_lForeignID; $lPayerID = $row->gi_lForeignID; // gift ID $strOut .= ' <tr> <td class="enpRpt" style="text-align: center;">' . strLinkView_SponsorPayment($lPayID, 'View payment record', true) . ' ' . str_pad($lPayID, 5, '0', STR_PAD_LEFT) . ' </td>'; // sponsor ID $strOut .= ' <td class="enpRpt" style="text-align: center;">' . strLinkView_Sponsorship($lSponsorID, 'View sponsorship record', true) . ' ' . str_pad($lSponsorID, 5, '0', STR_PAD_LEFT) . ' </td>'; // Amount $strOut .= ' <td class="enpRpt" style="text-align: right; padding-left: 14px;">' . number_format($row->gi_curAmnt, 2) . ' </td>'; // Date $strOut .= ' <td class="enpRpt" style="text-align: right;">' . date($genumDateFormat, dteMySQLDate2Unix($row->gi_dteDonation)) . ' </td>'; // Payer if ($row->bPayerBiz) { $strName = strLinkView_BizRecord($lPayerID, 'View business record', true) . ' ' . str_pad($lPayerID, 5, '0', STR_PAD_LEFT) . ' ' . htmlspecialchars($row->strPayerLName) . ' (business)'; } else { $strName = strLinkView_PeopleRecord($lPayerID, 'View people record', true) . ' ' . str_pad($lPayerID, 5, '0', STR_PAD_LEFT) . ' ' . htmlspecialchars($row->strPayerLName . ', ' . $row->strPayerFName); } $strOut .= ' <td class="enpRpt" >' . $strName . ' </td>'; // Sponsor if ($lPayerID == $lSponsorFID) { $strName = '<span style="color: #999; font-style: italic;">(same as payer)'; } else { if ($row->bSponBiz) { $strName = strLinkView_BizRecord($lSponsorFID, 'View business record', true) . ' ' . str_pad($lSponsorFID, 5, '0', STR_PAD_LEFT) . ' ' . htmlspecialchars($row->strSponLName) . ' (business)'; } else { $strName = strLinkView_PeopleRecord($lSponsorFID, 'View people record', true) . ' ' . str_pad($lSponsorFID, 5, '0', STR_PAD_LEFT) . ' ' . htmlspecialchars($row->strSponLName . ', ' . $row->strSponFName); } } $strOut .= ' <td class="enpRpt" >' . $strName . ' </td>'; $strOut . ' </tr>'; } $strOut .= '</table>'; } else { $strOut .= '<br><br><i>There are no records that match your search criteria</i><br>'; } return $strOut; }
function writeGiftHistoryRow($idx, $lPID, $clsGH, &$curTotal) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; $lGiftID = $clsGH->gi_lKeyID; $lDonorID = $clsGH->gi_lForeignID; $lSponsorID = $clsGH->gi_lSponsorID; $bSoft = $lDonorID != $lPID; $bBiz = $clsGH->pe_bBiz; if ($bSoft) { if ($bBiz) { $strLink = strLinkView_BizRecord($lDonorID, 'View business record ' . str_pad($lDonorID, 5, '0', STR_PAD_LEFT), true) . ' '; } else { $strLink = strLinkView_PeopleRecord($lDonorID, 'View people record ' . str_pad($lDonorID, 5, '0', STR_PAD_LEFT), true) . ' '; } $strFontStyle = 'font-style:italic; color: #666;'; } else { $strLink = ''; $strFontStyle = ''; } if ($bBiz) { $strDonor = htmlspecialchars($clsGH->pe_strLName); } else { $strDonor = htmlspecialchars($clsGH->pe_strLName . ', ' . $clsGH->pe_strFName); } if ($clsGH->gi_bGIK) { $strGH = '<br><small>in-kind: ' . $clsGH->strGIK . '</small>'; } else { $strGH = ''; } if (is_null($lSponsorID)) { $strSponID = ' '; $strGiftLink = strLinkView_GiftsRecord($lGiftID, 'View gift record', true); } else { if (bAllowAccess('showSponsors')) { $strSponID = strLinkView_Sponsorship($lSponsorID, 'view sponsorship', true) . ' ' . str_pad($lSponsorID, 5, '0', STR_PAD_LEFT); } else { $strSponID = ' '; } $strGiftLink = strLinkView_SponsorPayment($lGiftID, 'View sponsorship payment record', true); } $strFlags = ''; if ($clsGH->bHon) { $strFlags .= ' H'; } if ($clsGH->bMem) { $strFlags .= ' M'; } $strFlags = trim($strFlags); if ($strFlags == '') { $strFlags = ' '; } $curTotal += $clsGH->gi_curAmnt; echoT(' <tr class="makeStripe"> <td class="enpRpt" style="' . $strFontStyle . ' text-align:center; width: 15pt;">' . $idx . ' </td> <td class="enpRpt" style="' . $strFontStyle . ' width: 50pt;">' . $strGiftLink . ' ' . str_pad($lGiftID, 5, '0', STR_PAD_LEFT) . ' </td> <td class="enpRpt" style="text-align: right;' . $strFontStyle . ' width: 60pt;">' . number_format($clsGH->gi_curAmnt, 2) . ' </td> <td class="enpRpt" style="text-align: center;' . $strFontStyle . ' width: 60pt;">' . date($genumDateFormat, $clsGH->gi_dteDonation) . ' </td> <td class="enpRpt" style="' . $strFontStyle . ' width: 140pt;">' . $strLink . $strDonor . ' </td> <td class="enpRpt" style="' . $strFontStyle . ' width: 70pt;">' . htmlspecialchars($clsGH->ga_strAccount) . ' </td> <td class="enpRpt" style="' . $strFontStyle . ' width: 130pt;">' . htmlspecialchars($clsGH->gc_strCampaign) . $strGH . ' </td>'); if (bAllowAccess('showSponsors')) { echoT(' <td class="enpRpt" style="text-align: center;' . $strFontStyle . ' width: 50pt;">' . $strSponID . ' </td>'); } echoT(' <td class="enpRpt" style="text-align: center;' . $strFontStyle . ' width: 30pt;">' . $strFlags . ' </td> </tr>'); }
public function strBizHTMLSummary() { //----------------------------------------------------------------------- // assumes user has called $clsBiz->loadBizRecsViaBID($lBID) //----------------------------------------------------------------------- $params = array('enumStyle' => 'terse'); $clsRpt = new generic_rpt($params); $clsRpt->setEntrySummary(); $lBID = $this->lBID; $biz =& $this->bizRecs[0]; $strOut = $clsRpt->openReport('', '') . $clsRpt->openRow(false) . $clsRpt->writeLabel('Business Name:') . $clsRpt->writeCell(strLinkView_BizRecord($lBID, 'View business record', true) . ' ' . $biz->strSafeName . ' (business ID: ' . str_pad($lBID, 5, '0', STR_PAD_LEFT) . ')') . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell($biz->strAddress) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Industry:') . $clsRpt->writeCell(htmlspecialchars($biz->strIndustry)) . $clsRpt->closeRow() . $clsRpt->closeReport('<br>'); return $strOut; }
private function giftNotesSearch(&$results) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; $results->strLabel = 'Gift notes'; $results->lNumResults = 0; $cACO = new madmin_aco(); $sqlStr = 'SELECT gi_lKeyID, gi_lForeignID, gi_curAmnt, gi_lACOID, gi_dteDonation, gi_strNotes, pe_strLName, pe_strFName, pe_bBiz, gi_lSponsorID FROM gifts INNER JOIN people_names ON pe_lKeyID=gi_lForeignID WHERE NOT gi_bRetired AND NOT pe_bRetired AND ' . $this->textSearchWhere('gi_strNotes') . ' ORDER BY pe_strLName, pe_strFName, gi_lKeyID;'; $query = $this->db->query($sqlStr); $results->lNumResults = $lNumRows = $query->num_rows(); if ($lNumRows > 0) { $idx = 0; $results->matches = array(); foreach ($query->result() as $row) { $results->matches[$idx] = new stdClass(); $match =& $results->matches[$idx]; $lGiftID = $row->gi_lKeyID; $lFID = $row->gi_lForeignID; $strFID = str_pad($lFID, 5, '0', STR_PAD_LEFT); $bBiz = $row->pe_bBiz; $lACOID = $row->gi_lACOID; $bSponPay = !is_null($row->gi_lSponsorID); $cACO->loadCountries(false, false, true, $lACOID); $giftACO =& $cACO->countries[0]; if ($bSponPay) { $match->links = 'Sponsor Payment ID ' . str_pad($lGiftID, 5, '0', STR_PAD_LEFT) . strLinkView_SponsorPayment($lGiftID, 'View payment record', true) . ' '; } else { $match->links = 'Gift ID ' . str_pad($lGiftID, 5, '0', STR_PAD_LEFT) . strLinkView_GiftsRecord($lGiftID, 'View gift record', true) . ' '; } $match->searchInfo = 'Donation record of ' . $giftACO->strCurrencySymbol . ' ' . number_format($row->gi_curAmnt, 2) . ' ' . $giftACO->strFlagImg . ' of ' . date($genumDateFormat, dteMySQLDate2Unix($row->gi_dteDonation)) . ' by '; if ($bBiz) { $match->links .= 'Business ID: ' . $strFID . strLinkView_BizRecord($lFID, 'View business record', true); $match->searchInfo .= htmlspecialchars($row->pe_strLName); } else { $match->links .= 'People ID: ' . $strFID . strLinkView_PeopleRecord($lFID, 'View people record', true); $match->searchInfo .= htmlspecialchars($row->pe_strFName . ' ' . $row->pe_strLName); } $match->text = $row->gi_strNotes; $match->textHighlighted = $this->highlightMatchedText($row->gi_strNotes); ++$idx; } } }
*/ foreach ($paymentRecs as $payrec) { $lPayID = $payrec->lKeyID; $lSponID = $payrec->lSponsorshipID; $lClientID = $payrec->lClientID; $lDonorID = $payrec->lDonorID; $lSponFID = $payrec->lSponPeopleID; $bBizDonor = $payrec->bDonorBiz; $bBizSponsor = $payrec->bSponBiz; if ($bBizDonor) { $strLinkDonor = strLinkView_BizRecord($lDonorID, 'View business record of payer', true); } else { $strLinkDonor = strLinkView_PeopleRecord($lDonorID, 'View people record of payer', true); } if ($bBizSponsor) { $strLinkSpon = strLinkView_BizRecord($lSponFID, 'View business record of sponsor', true); } else { $strLinkSpon = strLinkView_PeopleRecord($lSponFID, 'View people record of sponsor', true); } if (is_null($lClientID)) { $strClientLink = ' '; } else { $strClientLink = strLinkView_ClientRecord($lClientID, 'View client record', true) . ' '; } echoT(' <tr class="makeStripe"> <td class="enpRpt" style="text-align: center;">' . strLinkView_SponsorPayment($lPayID, 'View payment record', true) . ' ' . str_pad($lPayID, 5, '0', STR_PAD_LEFT) . ' </td> <td class="enpRpt" style="text-align: center;">' . strLinkView_Sponsorship($lSponID, 'View sponsorship record', true) . ' ' . str_pad($lSponID, 5, '0', STR_PAD_LEFT) . ' </td> <td class="enpRpt" style="text-align: center;">' . $strLinkDonor . ' ' . str_pad($lDonorID, 5, '0', STR_PAD_LEFT) . '
function showItemInfo(&$clsRpt, $lNumItems, &$items, $lPackageID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $attributes = new stdClass(); $attributes->divID = 'aucENPItems'; $attributes->divImageID = 'aucENPItemsDivImg'; openBlock('Items', strLinkView_AuctionItemsViaPID($lPackageID, 'View package items', true) . ' ' . strLinkView_AuctionItemsViaPID($lPackageID, 'View package items', false) . ' ' . strLinkAdd_AuctionItem($lPackageID, 'Add new item', true) . ' ' . strLinkAdd_AuctionItem($lPackageID, 'Add new item', false), $attributes); if ($lNumItems == 0) { echoT('<i>There are no items assigned to this package.</i>'); } else { echoT(' <table class="enpRpt"> <tr> <td class="enpRptLabel"> Item ID </td> <td class="enpRptLabel"> Est. Value </td> <td class="enpRptLabel"> Out-of-Pocket </td> <td class="enpRptLabel"> Name </td> <td class="enpRptLabel"> Provided By </td> </tr>'); $curTotOOP = $curTotEst = 0.0; foreach ($items as $item) { $lItemID = $item->lKeyID; $bBiz = $item->itemDonor_bBiz; $lDonorID = $item->lItemDonorID; $curTotOOP += $item->curOutOfPocket; $curTotEst += $item->curEstAmnt; if ($bBiz) { $strName = strLinkView_BizRecord($lDonorID, 'View business record', true) . ' ' . $item->itemDonor_safeName . ' (business)'; } else { $strName = strLinkView_PeopleRecord($lDonorID, 'View people record', true) . ' ' . $item->itemDonor_safeName; } echoT(' <tr> <td class="enpRpt" style="text-align: center;">' . str_pad($lItemID, 6, '0', STR_PAD_LEFT) . ' ' . strLinkView_AuctionItem($lItemID, 'View auction item', true) . ' </td> <td class="enpRpt" style="text-align: right;">' . number_format($item->curEstAmnt, 2) . ' </td> <td class="enpRpt" style="text-align: right;">' . number_format($item->curOutOfPocket, 2) . ' </td> <td class="enpRpt">' . $item->strSafeItemName . ' </td> <td class="enpRpt">' . $strName . ' </td> </tr>'); } echoT(' <tr> <td class="enpRpt"><b> Total:</b> </td> <td class="enpRpt" style="text-align: right;"><b>' . number_format($curTotEst, 2) . '</b> </td> <td class="enpRpt" style="text-align: right;"><b>' . number_format($curTotOOP, 2) . '</b> </td> <td class="enpRpt"> </td> <td class="enpRpt"> </td> </tr>'); echoT('</table>'); } $attributes = new stdClass(); $attributes->bCloseDiv = true; closeBlock($attributes); }
$lClientID = $sponsor->lClientID; $bInactive = $sponsor->bInactive; $dteInactive = $sponsor->dteInactive; if ($bInactive) { $strSpanInactive = '<span style="color: #999;">'; $strStopSpan = '</span>'; } else { $strSpanInactive = $strStopSpan = ''; } echoT($clsRpt->openRow(true)); if ($showFields->bSponsorID) { echoT($clsRpt->writeCell(strLinkView_Sponsorship($lSponID, 'View sponsorship record', true) . ' ' . $strSpanInactive . str_pad($lSponID, 5, '0', STR_PAD_LEFT) . $strStopSpan, '40', $strStyleExtra = 'text-align: center;')); } if ($showFields->bName) { if ($bBiz) { $strLink = strLinkView_BizRecord($lForeignID, 'View Business Record', true); $strName = htmlspecialchars($sponsor->strSponsorLName) . ' <i>(business)</i>'; } else { $strLink = strLinkView_PeopleRecord($lForeignID, 'View People Record', true); $strName = htmlspecialchars($sponsor->strSponsorLName . ', ' . $sponsor->strSponsorFName); } $strName .= '<br>' . $strLink . ' ' . str_pad($lForeignID, 5, '0', STR_PAD_LEFT); if ($showFields->bSponAddr) { $strName .= '<br>' . $sponsor->strAddr; } echoT($clsRpt->writeCell($strSpanInactive . $strName . $strStopSpan, 175)); } if ($showFields->bSponsorInfo) { if ($sponsor->bInactive) { $strDates = date($genumDateFormat, $sponsor->dteStart) . ' - ' . date($genumDateFormat, $sponsor->dteInactive) . '<br>Inactive'; } else {
public function strDonationViewTable($sqlStr, $bIncludeAck, $bShowACO, $strTitle = '') { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; if ($bShowACO) { $clsACO = new madmin_aco(); } $query = $this->db->query($sqlStr); if ($query->num_rows() == 0) { return '<br><br><i>There are no donations that match your search criteria.</i>'; } else { $strOut = ' <table class="enpRptC" style="width: 100%;">' . $strTitle . ' <tr> <td class="enpRptLabel" style="width: 70px;"> giftID </td> <td class="enpRptLabel" style="width: 80px;"> Amount </td> <td class="enpRptLabel" style="width: 90px;"> Date </td> <td class="enpRptLabel" style="width: 200px;"> Donor </td> <td class="enpRptLabel" style="width: 110px;"> Account </td> <td class="enpRptLabel" style="width: 130px;"> Campaign </td> <td class="enpRptLabel" style="width: 90px;"> In-Kind? </td>'; if ($bIncludeAck) { $strOut .= ' <td class="enpRptLabel" style=""> Acknowledged? </td>'; } $strOut .= ' </tr>'; foreach ($query->result() as $row) { $lGiftID = $row->gi_lKeyID; $bBiz = $row->pe_bBiz; $bSpon = !is_null($row->gi_lSponsorID); $lPeopleID = $row->pe_lKeyID; if ($bShowACO) { $strFlagImg = ' ' . $clsACO->strFlagImage($row->aco_strFlag, $row->aco_strName); } else { $strFlagImg = ''; } if ($bIncludeAck) { if ($row->gi_bAck) { $strAlignAck = 'left'; $strAck = 'Yes - ' . date($genumDateFormat, dteMySQLDate2Unix($row->gi_dteAck)) . ' by ' . htmlspecialchars($row->us_strFirstName . ' ' . $row->us_strLastName); } else { $strAlignAck = 'center'; $strAck = '-'; } } if ($bSpon) { $strLinkViewRec = strLinkView_SponsorPayment($lGiftID, 'View sponsorship payment record', true); $sponLink = ' ' . strLinkView_Sponsorship($row->gi_lSponsorID, 'View sponsorship', true); } else { $strLinkViewRec = strLinkView_GiftsRecord($lGiftID, 'View gift record', true); $sponLink = ''; } if ($row->gi_bGIK) { $strAlign = 'left'; $strGIK = htmlspecialchars($row->strGIK); } else { $strAlign = 'center'; $strGIK = '-'; } if ($bBiz) { $strName = htmlspecialchars($row->pe_strLName); $strLink = strLinkView_BizRecord($lPeopleID, 'View business/organization record', true); } else { $strName = htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName); $strLink = strLinkView_PeopleRecord($lPeopleID, 'View people record', true); } $strOut .= ' <tr class="makeStripe"> <td class="enpRpt" style="width: 50px; text-align: center;">' . $strLinkViewRec . ' ' . str_pad($lGiftID, 5, '0', STR_PAD_LEFT) . ' </td> <td class="enpRpt" style="width: 60px; text-align: right; padding-right: 5px;">' . number_format($row->gi_curAmnt, 2) . $strFlagImg . ' </td> <td class="enpRpt" style="text-align: left;">' . date($genumDateFormat, dteMySQLDate2Unix($row->gi_dteDonation)) . ' </td> <td class="enpRpt" style="text-align: left;">' . $strLink . str_pad($lPeopleID, 5, '0', STR_PAD_LEFT) . ' ' . $strName . ' </td> <td class="enpRpt" style="text-align: left;">' . htmlspecialchars($row->ga_strAccount) . ' </td> <td class="enpRpt" style="text-align: left;">' . htmlspecialchars($row->gc_strCampaign) . $sponLink . ' </td> <td class="enpRpt" style="text-align: ' . $strAlign . ';">' . $strGIK . ' </td>'; if ($bIncludeAck) { $strOut .= ' <td class="enpRpt" style="text-align: ' . $strAlignAck . ';">' . $strAck . ' </td>'; } $strOut .= ' </tr>'; } $strOut .= '</table>' . "\n"; return $strOut; } }