++$lNumCols; } if ($showFields->bName) { ++$lNumCols; } if ($showFields->bSponsorInfo) { ++$lNumCols; } if ($showFields->bClient) { ++$lNumCols; } if ($lNumCols == 0) { echoT('There are no sponsorship fields to report.'); } else { echoT('<br>' . $clsRpt->openReport(800)); echoT($clsRpt->writeTitle($strRptTitle, '', '', $lNumCols)); echoT($clsRpt->openRow(true)); if ($showFields->bSponsorID) { echoT($clsRpt->writeLabel('SponsorID', 40)); } if ($showFields->bName) { echoT($clsRpt->writeLabel('Name')); } if ($showFields->bSponsorInfo) { echoT($clsRpt->writeLabel('Sponsorship Info')); } if ($showFields->bClient) { echoT($clsRpt->writeLabel('Client')); } echoT($clsRpt->closeRow()); foreach ($sponInfo as $sponsor) {
<?php if ($lNumDisplayRows == 0) { echoT('<i>There are no business contacts that meet your search criteria.<br><br></i>'); return; } $params = array('enumStyle' => 'enpRptC'); $clsRpt = new generic_rpt($params); echoT('<br>' . $clsRpt->openReport()); echoT($clsRpt->writeTitle($strRptTitle, '', '', 6)); echoT($clsRpt->openRow(true)); echoT($clsRpt->writeLabel('PeopleID', 60)); // echoT($clsRpt->writeLabel(' ', 20)); echoT($clsRpt->writeLabel('Name', 150)); echoT($clsRpt->writeLabel('Address')); echoT($clsRpt->writeLabel('Phone/Email')); echoT($clsRpt->writeLabel('Business Relationships')); echoT($clsRpt->closeRow()); foreach ($bizRecs as $bz) { $lPID = $bz->lPeopleID; echoT($clsRpt->openRow(true)); echoT($clsRpt->writeCell(strLinkView_PeopleRecord($lPID, 'View people record', true) . ' ' . str_pad($lPID, 5, '0', STR_PAD_LEFT), 60)); echoT($clsRpt->writeCell($bz->strSafeNameLF, 210)); 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) {
<?php echoT(strLinkAdd_GiftAcct('Add new donation account', true) . ' ' . strLinkAdd_GiftAcct('Add new account', false) . '<br><br>'); if ($lNumAccts == 0) { echoT('<i>There are currently no accounts defined in your database!</i><br><br>'); } else { $params = array('enumStyle' => 'enpRptC'); $clsRpt = new generic_rpt($params); echoT($clsRpt->openReport(400) . $clsRpt->writeTitle('Donation Accounts', 500, '', 4) . $clsRpt->openRow(false) . $clsRpt->writeLabel('Acct ID', '65', 'text-align: center; vertical-align: bottom;') . $clsRpt->writeLabel('Account Name', '', 'text-align: center; vertical-align: bottom;') . $clsRpt->writeLabel('# Campaigns', '30', 'text-align: center; vertical-align: bottom;') . $clsRpt->writeLabel('Total Donations', '130', 'text-align: center; vertical-align: bottom;') . $clsRpt->closeRow()); $idx = 0; foreach ($accts as $clsAcct) { $lAID = $clsAcct->lKeyID; $clsRpt->openRow(true); if ($clsAcct->bProtected) { $strLinkEdit = ' '; } else { $strLinkEdit = strLinkEdit_GiftAcct($lAID, 'Edit account', true); } echoT($clsRpt->writeCell($strLinkEdit . ' ' . str_pad($lAID, 5, '0', STR_PAD_LEFT), '', $strStyleExtra = 'text-align: center;') . $clsRpt->writeCell(htmlspecialchars($clsAcct->strAccount)) . $clsRpt->writeCell($clsAC->lNumCampsViaAcctID($lAID, false) . ' ' . strLinkView_GiftCampaigns($lAID, 'View campaigns', true) . ' ', '', 'text-align: right;') . $clsRpt->writeCell($strCumGiftsNonSoft[$idx] . $strLinkGifts[$idx], '', 'text-align: left;') . $clsRpt->closeRow()); ++$idx; } echoT($clsRpt->closeReport()); }
function viewViaObject($enumRemType, $lFID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $gbDateFormatUS, $gdteNow, $glUserID, $genumDateFormat; if (!bTestForURLHack('notVolunteer')) { return; } $this->load->helper('dl_util/verify_id'); verifyIDsViaType($this, $enumRemType, $lFID, false); $displayData = array(); $displayData['enumRemType'] = $enumRemType; $displayData['lFID'] = $lFID = (int) $lFID; //-------------------------- // models & helpers //-------------------------- $this->load->model('admin/madmin_aco', 'clsACO'); $this->load->model('admin/muser_accts'); $this->load->model('clients/mclients'); $this->load->model('people/mpeople'); $this->load->model('donations/mdonations'); $this->load->library('util/dl_date_time', '', 'clsDateTime'); $this->load->model('sponsorship/msponsorship', 'clsSpon'); $this->load->model('biz/mbiz', 'clsBiz'); // $this->load->helper('dl_util/email_web'); $this->load->helper('dl_util/web_layout'); $this->load->helper('dl_util/time_date'); $this->load->helper('dl_util/page_title'); $this->load->helper('dl_util/reminder'); $params = array('enumStyle' => 'enpRptC'); $this->load->library('generic_rpt', $params); $clsRpt = new generic_rpt($params); $this->load->model('reminders/mreminders', 'clsRem'); $this->clsRem->enumSort = 'currentFirst'; configRemRecViewViaType($enumRemType, $lFID, $displayData); $bUserReminder = $enumRemType == CENUM_CONTEXT_USER; if ($bUserReminder) { $this->clsRem->enumLookupType = 'CurrentViaEnumRemTypeUserID'; } else { $this->clsRem->enumLookupType = 'ViaEnumRemTypeFID'; } $this->clsRem->loadEnumTypeList($enumRemType); $strRemRpt = ''; $lTotRems = 0; $this->clsRem->lFID = $lFID; foreach ($this->clsRem->enumRemTypeList as $enumRT) { $this->clsRem->enumRemType = $enumRT; $strRT = strtoupper(substr($enumRT, 0, 1)) . substr($enumRT, 1); $this->clsRem->loadReminders(); $lTotRems += $this->clsRem->lNumReminders; if ($this->clsRem->lNumReminders > 0) { $strRemRpt .= $clsRpt->openReport(550); if ($bUserReminder) { $strRemRpt .= $clsRpt->openRow(false); $strRemRpt .= $clsRpt->writeTitle($strRT . ' Reminders', '', '', 8); $strRemRpt .= $clsRpt->closeRow(); } $strRemRpt .= $clsRpt->openRow(false); $strRemRpt .= $clsRpt->writeLabel('Reminder Dates', '160pt'); $strRemRpt .= $clsRpt->writeLabel('Reminder', ''); // $strRemRpt .= $clsRpt->writeLabel(' ', ''); $strRemRpt .= $clsRpt->closeRow(); foreach ($this->clsRem->reminders as $clsSingleRem) { if ($this->clsRem->bOKToView($clsSingleRem, $glUserID)) { $lRemID = $clsSingleRem->lKeyID; $strRemRpt .= $clsRpt->openRow(true); $strRemLogLabel = ''; $lNumPast = $this->clsRem->lNumPast($clsSingleRem, $gdteNow, $lIdxLastPast); $lNumFuture = $this->clsRem->lNumFuture($clsSingleRem, $gdteNow, $lIdxFirstFuture); $lCurDateIdx = $this->clsRem->lCurrentRemIdx($clsSingleRem, $gdteNow); //------------------------------------------------------- // it's the little things that make a house a home.... //------------------------------------------------------- if ($lNumPast > 0) { $strRemLogLabel .= ' / ' . $lNumPast . ' past reminder' . ($lNumPast == 1 ? '' : 's'); } if ($lNumFuture > 0) { $strRemLogLabel .= ' / ' . $lNumFuture . ' future reminder' . ($lNumFuture == 1 ? '' : 's'); } if ($strRemLogLabel != '') { $strRemLogLabel = '<br><small>' . substr($strRemLogLabel, 3) . '</small>'; } if ($bUserReminder) { $strRemLink = '<br><i>' . $this->clsRem->strHTMLOneLineLink($clsSingleRem) . '</i>'; } else { $strRemLink = ''; } //--------------------------------------------------------------------------- // if reminder is not current, indicate next reminder; if no next reminder, // indicate most recent reminder //--------------------------------------------------------------------------- $bCurrent = !is_null($lCurDateIdx); if (!$bCurrent) { $strRemStyle = 'color: #999999;'; if ($lNumFuture > 0) { $strRemDate = '<i>next reminder: ' . date($genumDateFormat, $clsSingleRem->dates[$lIdxFirstFuture]->dteDisplayStart) . '</i>'; } else { $strRemDate = '<i>reminded on: ' . date($genumDateFormat, $clsSingleRem->dates[$lIdxLastPast]->dteDisplayStart) . '</i>'; } } else { $strRemStyle = ''; $strRemDate = date($genumDateFormat, $clsSingleRem->dates[$lCurDateIdx]->dteDisplayStart); } //-------------------------- // reminder title/note //-------------------------- $strReminder = '<b>' . htmlspecialchars($clsSingleRem->strTitle) . '</b>' . $strRemLink; if ($clsSingleRem->strTitle != '') { $strReminder .= '<br>' . nl2br(htmlspecialchars($clsSingleRem->strReminderNote)); } //-------------------------- // follow-up notes //-------------------------- if ($clsSingleRem->lNumFollowUps > 0) { $strReminder .= '<small><br><br><b>Follow-up notes:</b><br>'; foreach ($clsSingleRem->followUpNotes as $clsFollow) { $strReminder .= '<i>' . date($genumDateFormat, $clsFollow->dteOfNote) . ' by ' . $clsFollow->strSafeName . '</i><br>' . nl2br(htmlspecialchars($clsFollow->strFollowUpNote)) . '<br><br>'; } $strReminder .= '</small>'; } //-------------------------- // follow-up note form //-------------------------- $clsNav = new stdClass(); $clsNav->strKey02 = 'RID'; $clsNav->lKey02 = $lRemID; $attributes = array('name' => 'frmFollowUp' . $lRemID); $strReminder .= form_open('reminders/rem_add_edit/addReminderFollup/' . $enumRemType . '/' . $lFID . '/' . $lRemID, $attributes) . '<br> <i>add follow-up note:</i> <input type="submit" name="cmdSubmit" value="Save" style="font-size: 7pt; height: 13pt; vertical-align: center;" onclick="this.disabled=1; this.form.submit();" class="btn" onmouseover="this.className=\'btn btnhov\'" onmouseout="this.className=\'btn\'"><br> <textarea name="txtFollowUp" rows="1" cols="45"></textarea><br> </form>'; $strRemRpt .= $clsRpt->writeCell($strRemDate . $strRemLogLabel . '<br><br>' . strLinkRem_Reminder($lRemID, $lFID, $enumRemType, 'Remove reminder', true, true)); $strRemRpt .= $clsRpt->writeCell($strReminder, '', $strRemStyle); /* $strRemRpt .= $clsRpt->writeCell(strLinkRem_Reminder($lRemID, $lFID, $enumRemType, 'Remove reminder', true, true), '', $strRemStyle); */ $strRemRpt .= $clsRpt->closeRow(); } } $strRemRpt .= $clsRpt->closeReport('<br>'); } } if ($lTotRems == 0) { $strRemRpt = '<br><i>There are no reminders for this user.</i><br><br>'; } $displayData['strRemRpt'] = $strRemRpt; //-------------------------- // breadcrumbs //-------------------------- $displayData['title'] = CS_PROGNAME . ' | People'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $displayData['mainTemplate'] = 'reminders/view_reminder_record_view'; $this->load->vars($displayData); $this->load->view('template'); }
private function strAttribRptSponsor(&$sRpt, $strLimit, $strAttrib, $strLabel) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; $this->load->model('sponsorship/msponsorship', 'clsSpon'); $params = array('enumStyle' => 'enpRptC'); $clsRpt = new generic_rpt($params); // $this->load->helper('dl_util/email_web'); $this->clsSpon->sponsorInfoGenericViaWhere(" AND sp_lAttributedTo {$strAttrib} ", $strLimit); $strOut = '<br>' . $clsRpt->openReport(); $strOut .= $clsRpt->writeTitle('Sponsorships ' . $strLabel, '', '', 7); $strOut .= $clsRpt->openRow(true); $strOut .= $clsRpt->writeLabel('SponsorID', 60) . $clsRpt->writeLabel('Active', 90) . $clsRpt->writeLabel('Sponsor', 150) . $clsRpt->writeLabel('Address') . $clsRpt->writeLabel('Client') . $clsRpt->writeLabel('Commitment') . $clsRpt->closeRow(); foreach ($this->clsSpon->sponInfo as $sponRec) { $lSponID = $sponRec->lKeyID; $lFID = $sponRec->lForeignID; if ($sponRec->bInactive) { $strIStyle = 'color: #999;'; $strActiveDates = 'sponsor dates: ' . date($genumDateFormat, $sponRec->dteStart) . ' - ' . date($genumDateFormat, $sponRec->dteInactive); } else { $strIStyle = ''; $strActiveDates = 'sponsor since: ' . date($genumDateFormat, $sponRec->dteStart); } $strOut .= $clsRpt->openRow(true); $strOut .= $clsRpt->writeCell(strLinkView_Sponsorship($lSponID, 'View sponsorship record', true) . ' ' . str_pad($lSponID, 5, '0', STR_PAD_LEFT), 60, $strIStyle); //--------------------------- // active state //--------------------------- $strOut .= $clsRpt->writeCell($strActiveDates, '', $strIStyle); 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); //--------------------------- // sponsor name //--------------------------- $strHonoree = ''; 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; } $strContact = '<b>' . $sponRec->strSponSafeNameLF . '</b>' . '<br>' . $strLinkFID . $strHonoree . '<br> program: ' . htmlspecialchars($sponRec->strSponProgram); $strOut .= $clsRpt->writeCell($strContact, '', $strIStyle); //--------------------------- // address / contact //--------------------------- $strAddr = strBuildAddress($sponRec->strSponAddr1, $sponRec->strSponAddr2, $sponRec->strSponCity, $sponRec->strSponState, $sponRec->strSponCountry, $sponRec->strSponZip, true); if ($sponRec->strSponEmail . '' != '') { $strAddr .= strBuildEmailLink($sponRec->strSponEmail, '<br>', false, ' style="' . $strIStyle . '"'); } $strPhone = strPhoneCell($sponRec->strSponPhone, $sponRec->strSponPhone, true, true); if ($strPhone != '') { $strAddr .= '<br>' . $strPhone; } $strOut .= $clsRpt->writeCell($strAddr, '', $strIStyle); //--------------------------- // client //--------------------------- $lClientID = $sponRec->lClientID; if (is_null($lClientID)) { if ($sponRec->bInactive) { $strClientInfo = '<i>Client not set</i>'; } else { $strClientInfo = '<i>Client not set</i><br>' . strLinkAdd_ClientToSpon($lSponID, 'Add client to sponsorship', false); } } else { $strClientInfo = '<b>' . $sponRec->strClientSafeNameLF . '</b><br>' . 'client ID: ' . strLinkView_ClientRecord($lClientID, 'View client record', true) . str_pad($lClientID, 5, '0', STR_PAD_LEFT) . '<br>' . htmlspecialchars($sponRec->strLocation) . '<br>' . 'birth/age: ' . $sponRec->strClientAgeBDay; $strClientInfo .= '<br>' . htmlspecialchars($sponRec->strLocation); } $strOut .= $clsRpt->writeCell($strClientInfo, '', $strIStyle); //--------------------------- // financial commitment //--------------------------- $strOut .= $clsRpt->writeCell($sponRec->strCommitACOCurSym . ' ' . number_format($sponRec->curCommitment, 2) . ' ' . $sponRec->strCommitACOFlagImg . '<br>' . strLinkView_SponsorFinancials($lSponID, 'View sponsorship financials', true) . strLinkView_SponsorFinancials($lSponID, 'View financials', false), '', $strIStyle); $strOut .= $clsRpt->closeRow(); } $strOut .= $clsRpt->closeReport(); return $strOut; }
<?php if ($lNumInHousehold == 0) { echoT('<i>The requested household was not found.</i>'); } else { $params = array('enumStyle' => 'enpRptC'); $clsRpt = new generic_rpt($params); $clsSpon = new msponsorship(); echoT(strLinkAdd_PersonToHousehold($lHouseholdID, 'Add person to this household', true) . ' ' . strLinkAdd_PersonToHousehold($lHouseholdID, 'Add person to this household', false) . '<br>'); echoT('<br>' . $clsRpt->openReport()); echoT($clsRpt->writeTitle(htmlspecialchars($strHouseholdName), '', '', 7)); echoT($clsRpt->openRow(true)); echoT($clsRpt->writeLabel(' ', '')); echoT($clsRpt->writeLabel(' ', '')); echoT($clsRpt->writeLabel('Name', 160)); echoT($clsRpt->writeLabel('Contact Info', 160)); if (bAllowAccess('showGiftHistory')) { echoT($clsRpt->writeLabel('Gift Totals (hard)', 160)); echoT($clsRpt->writeLabel('Gift Totals (soft)', 160)); } if (bAllowAccess('showSponsors')) { echoT($clsRpt->writeLabel('Sponsorship', 160)); } $bHOH = true; foreach ($households as $contact) { $strLinkGiftHistory = ''; $lPID = $contact->PID; if ($bHOH) { $strHOH = '<b>'; $strEndHOH = '</b> <span class="smaller">(head)</span>'; $bHOH = false;