Ejemplo n.º 1
0
 function view()
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     if (!bTestForURLHack('adminOnly')) {
         return;
     }
     $displayData = array();
     $displayData['title'] = CS_PROGNAME . ' | Accounts';
     $displayData['pageTitle'] = anchor('main/menu/admin', 'Admin', 'class="breadcrumb"') . ' | ' . anchor('admin/alists/showLists', 'Lists', 'class="breadcrumb"') . ' | Accounts & Campaigns';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     $this->load->model('donations/maccts_camps', 'clsAC');
     $this->load->model('donations/mdonations', 'clsGifts');
     $this->load->model('admin/madmin_aco', 'clsACO');
     $this->load->model('util/mbuild_on_ready', 'clsOnReady');
     $this->load->helper('dl_util/record_view');
     $this->load->helper('img_docs/link_img_docs');
     $params = array('enumStyle' => 'enpRptC');
     $this->load->library('generic_rpt', $params);
     $this->clsOnReady->addOnReadyTableStripes();
     $this->clsOnReady->closeOnReady();
     $displayData['js'] = $this->clsOnReady->strOnReady;
     $this->clsGifts->bUseDateRange = false;
     $this->clsGifts->enumCumulativeSource = 'account';
     $this->clsAC->loadAccounts(false, false, null);
     $displayData['lNumAccts'] = $this->clsAC->lNumAccts;
     $displayData['clsAC'] = $this->clsAC;
     if ($displayData['lNumAccts'] > 0) {
         $displayData['accts'] = $this->clsAC->accounts;
         $idx = 0;
         foreach ($this->clsAC->accounts as $clsAcct) {
             //-------------------
             // cumulative gifts
             //-------------------
             $lAID = $clsAcct->lKeyID;
             $this->clsGifts->lAcctID = $lAID;
             $this->clsGifts->cumulativeOpts = new stdClass();
             $this->clsGifts->cumulativeOpts->enumCumulativeSource = 'account';
             $this->clsGifts->cumulativeOpts->bSoft = false;
             $this->clsGifts->cumulativeOpts->enumMoneySet = 'all';
             $this->clsGifts->cumulativeDonation($this->clsACO, $lTotHardGifts);
             $displayData['strCumGiftsNonSoft'][$idx] = strBuildCumlativeTable($this->clsGifts->lNumCumulative, $this->clsGifts->cumulative, true);
             if ($this->clsGifts->lNumCumulative > 0) {
                 $displayData['strLinkGifts'][$idx] = '';
             } else {
                 $displayData['strLinkGifts'][$idx] = '';
             }
             ++$idx;
         }
     }
     $displayData['mainTemplate'] = 'accts_camp/account_view';
     $this->load->vars($displayData);
     $this->load->view('template');
 }
Ejemplo n.º 2
0
 function viewCampsViaAcctID($lAcctID)
 {
     if (!bTestForURLHack('adminOnly')) {
         return;
     }
     $this->load->helper('dl_util/verify_id');
     verifyID($this, $lAcctID, 'account ID');
     $displayData = array();
     $displayData['lAcctID'] = $lAcctID = (int) $lAcctID;
     $this->load->model('donations/maccts_camps', 'clsAC');
     $this->clsAC->loadAccounts(false, true, $lAcctID);
     $displayData['strAcctName'] = $strAcctName = $this->clsAC->accounts[0]->strSafeName;
     $this->clsAC->loadCampaigns(false, true, $lAcctID, false, null);
     $displayData['campaigns'] = $this->clsAC->campaigns;
     $this->load->model('donations/mdonations', 'clsGifts');
     $this->clsGifts->bUseDateRange = false;
     $this->clsGifts->enumCumulativeSource = 'campaign';
     $this->load->model('admin/madmin_aco', 'clsACO');
     $this->load->helper('dl_util/record_view');
     $this->load->helper('img_docs/link_img_docs');
     $idx = 0;
     foreach ($this->clsAC->campaigns as $clsCamp) {
         $displayData['lCampID'][$idx] = $lCampID = $clsCamp->lKeyID;
         //-------------------
         // cumulative gifts
         //-------------------
         $this->clsGifts->lCampID = $lCampID;
         $this->clsGifts->cumulativeOpts = new stdClass();
         $this->clsGifts->cumulativeOpts->enumCumulativeSource = 'campaign';
         $this->clsGifts->cumulativeOpts->bSoft = false;
         $this->clsGifts->cumulativeOpts->enumMoneySet = 'all';
         $this->clsGifts->cumulativeDonation($this->clsACO, $lTotHardGifts);
         $displayData['strCumGiftsNonSoft'][$idx] = strBuildCumlativeTable($this->clsGifts->lNumCumulative, $this->clsGifts->cumulative, true);
         if ($this->clsGifts->lNumCumulative > 0) {
             $displayData['strLinkGifts'][$idx] = strLinkView_GiftListCamps($lCampID, 'View gifts for this campaign', true) . ' ' . strLinkView_GiftListCamps($lCampID, 'View gifts', false);
         } else {
             $displayData['strLinkGifts'][$idx] = '';
         }
         ++$idx;
     }
     $params = array('enumStyle' => 'enpRptC');
     $this->load->library('generic_rpt', $params);
     $displayData['clsRpt'] = $this->generic_rpt;
     $this->load->model('donations/mdonations', 'clsGifts');
     $this->clsGifts->bUseDateRange = false;
     $this->clsGifts->enumCumulativeSource = 'campaign';
     $displayData['title'] = CS_PROGNAME . ' | Campaigns';
     $displayData['pageTitle'] = anchor('main/menu/admin', 'Admin', 'class="breadcrumb"') . ' | ' . anchor('admin/alists/showLists', 'Lists', 'class="breadcrumb"') . ' | ' . anchor('accts_camp/accounts/view', 'Accounts & Campaigns', 'class="breadcrumb"') . ' |  ' . $strAcctName . ': View Campaigns';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     $displayData['mainTemplate'] = 'accts_camp/camp_via_acctid_view';
     $this->load->vars($displayData);
     $this->load->view('template');
 }
 public function view($lPID = 0)
 {
     //-------------------------------------------------------------------------
     //
     //-------------------------------------------------------------------------
     global $gbVolLogin, $gVolPerms, $glVolPeopleID, $glUserID;
     if ($gbVolLogin) {
         $lPID = $glVolPeopleID;
     } else {
         if (!bTestForURLHack('viewPeopleBizVol')) {
             return;
         }
     }
     $this->load->helper('dl_util/verify_id');
     verifyID($this, $lPID, 'people ID');
     $displayData = array();
     $displayData['lPID'] = $lPID = (int) $lPID;
     $displayData['js'] = '';
     $params = array('enumStyle' => 'terse', 'clsRpt');
     $this->load->library('generic_rpt', $params);
     //------------------------------------------------
     // libraries and utilities
     //------------------------------------------------
     $this->load->model('people/mpeople', 'clsPeople');
     $this->load->model('biz/mbiz', 'clsBiz');
     $this->load->model('admin/madmin_aco', 'clsACO');
     $this->load->model('admin/muser_accts', 'clsUser');
     $this->load->model('sponsorship/msponsorship', 'clsSpon');
     $this->load->model('sponsorship/msponsor_charge_pay', 'clsSCP');
     $this->load->model('donations/mdonations', 'clsGifts');
     $this->load->model('donations/mpledges', 'clsPledges');
     $this->load->model('vols/mvol', 'clsVol');
     $this->load->model('people/mrelationships', 'clsRel');
     $this->load->model('groups/mgroups', 'groups');
     $this->load->model('img_docs/mimage_doc', 'clsImgDoc');
     $this->load->model('img_docs/mimg_doc_tags', 'cidTags');
     $this->load->model('admin/mpermissions', 'perms');
     $this->load->library('util/dl_date_time', '', 'clsDateTime');
     $this->load->helper('groups/groups');
     $this->load->helper('dl_util/web_layout');
     //      $this->load->helper ('dl_util/email_web');
     $this->load->helper('dl_util/record_view');
     $this->load->helper('img_docs/link_img_docs');
     $this->load->helper('dl_util/time_date');
     $this->load->helper('img_docs/image_doc');
     $this->load->helper('img_docs/link_img_docs');
     $this->load->helper('personalization/ptable');
     $this->load->helper('img_docs/img_doc_tags');
     $this->load->helper('js/div_hide_show');
     $displayData['js'] .= showHideDiv();
     //      $this->load->model('reminders/mreminders', 'clsReminders');
     //      $displayData['clsRem'] = $this->clsReminders;
     $this->clsPeople->sqlWhereExtra = " AND pe_lKeyID = {$lPID} ";
     $this->clsPeople->loadPeople(true, true, true);
     $displayData['people'] =& $this->clsPeople->people[0];
     //-------------------------------
     // volunteer info
     //-------------------------------
     $displayData['vol'] = new stdClass();
     $displayData['vol']->bVol = $this->clsVol->bVolStatusViaPID($lPID, $displayData['vol']->lVolID, $displayData['vol']->bInactive, $displayData['vol']->dteInactive, $displayData['vol']->dteVolStart);
     //-------------------------------
     // sponsorship info
     //-------------------------------
     if (!$gbVolLogin) {
         $this->clsSpon->sponsorshipInfoViaPID($lPID);
         $displayData['sponInfo'] = $this->clsSpon->sponInfo;
         $displayData['lNumSponsors'] = $this->clsSpon->lNumSponsors;
     }
     //-------------------------------
     // personalized tables
     //-------------------------------
     if (!$gbVolLogin) {
         $this->perms->loadUserAcctInfo($glUserID, $acctAccess);
         $this->load->model('personalization/muser_fields', 'clsUF');
         $this->load->model('personalization/muser_fields_display', 'clsUFD');
         $displayData['strPT'] = strPTableDisplay(CENUM_CONTEXT_PEOPLE, $lPID, $this->clsUFD, $this->perms, $acctAccess, $displayData['strFormDataEntryAlert'], $displayData['lNumPTablesAvail']);
     }
     //-------------------------------
     // household
     //-------------------------------
     if (!$gbVolLogin) {
         $this->clsPeople->lHouseholdID = $this->clsPeople->people[0]->lHouseholdID;
         $this->clsPeople->loadPIDsViaHouseholdHID();
         $displayData['arrHouseholds'] = $this->clsPeople->arrHouseholds;
     }
     //-------------------------------
     // relationships
     //-------------------------------
     if (!$gbVolLogin) {
         $this->clsRel->lPID = $lPID;
         $this->clsRel->loadFromRelViaPID();
         $displayData['arrRelAB'] = $this->clsRel->arrRelAB;
         $displayData['lNumRelAB'] = $this->clsRel->lNumRelAB;
         $this->clsRel->loadToRelViaPID();
         $displayData['arrRelBA'] = $this->clsRel->arrRelAB;
         $displayData['lNumRelBA'] = $this->clsRel->lNumRelAB;
     }
     //-------------------------------
     // groups
     //-------------------------------
     if (!$gbVolLogin) {
         $this->groups->groupMembershipViaFID(CENUM_CONTEXT_PEOPLE, $lPID);
         $displayData['inGroups'] = $this->groups->arrMemberInGroups;
         $displayData['lCntGroupMembership'] = $this->groups->lNumMemInGroups;
         $displayData['lNumGroups'] = $this->groups->lCntActiveGroupsViaType(CENUM_CONTEXT_PEOPLE);
         $this->groups->loadActiveGroupsViaType(CENUM_CONTEXT_PEOPLE, 'groupName', $this->groups->strMemListIDs, false, null);
         $displayData['groupList'] = $this->groups->arrGroupList;
     }
     //-------------------------------
     // images and documents
     //-------------------------------
     if (!$gbVolLogin) {
         loadImgDocRecView($displayData, CENUM_CONTEXT_PEOPLE, $lPID);
     }
     //-------------------
     // donation summary
     //-------------------
     if (!$gbVolLogin) {
         $this->clsGifts->lPeopleID = $lPID;
         $displayData['lTotGifts'] = 0;
         $this->clsGifts->cumulativeOpts = new stdClass();
         $this->clsGifts->cumulativeOpts->enumCumulativeSource = 'people';
         $this->clsGifts->cumulativeOpts->enumMoneySet = 'monetaryOnly';
         $this->clsGifts->cumulativeOpts->bSoft = false;
         $this->clsGifts->cumulativeDonation($this->clsACO, $displayData['lTotHard']);
         $displayData['strCumGiftsNonSoftMon'] = strBuildCumlativeTable($this->clsGifts->lNumCumulative, $this->clsGifts->cumulative, true);
         //         $displayData['lTotGifts'] += $this->clsGifts->lNumCumulative;
         // in-kind donations
         $this->clsGifts->cumulativeOpts->enumMoneySet = 'gikOnly';
         $this->clsGifts->cumulativeDonation($this->clsACO, $displayData['lTotInKind']);
         $displayData['strCumGiftsNonSoftInKind'] = strBuildCumlativeTable($this->clsGifts->lNumCumulative, $this->clsGifts->cumulative, true);
         //         $displayData['lTotGifts'] += $this->clsGifts->lNumCumulative;
         // soft donations
         $this->clsGifts->cumulativeOpts->enumMoneySet = 'all';
         $this->clsGifts->cumulativeOpts->bSoft = true;
         $this->clsGifts->cumulativeDonation($this->clsACO, $displayData['lTotSoft']);
         $displayData['strCumGiftsSoft'] = strBuildCumlativeTable($this->clsGifts->lNumCumulative, $this->clsGifts->cumulative, true);
         //         $displayData['lTotGifts'] += $this->clsGifts->lNumCumulative;
         // sponsorship payments
         $this->clsSCP->cumulativeSponsorshipViaPeopleID($this->clsACO, $lPID);
         $displayData['strCumSpon'] = strBuildCumlativeTable($this->clsSCP->lNumSponPayCumulative, $this->clsSCP->sponPayCumulative, true);
         $displayData['lNumSponPay'] = $this->clsSCP->lNumSponPayCumulative;
         $displayData['lNumPledges'] = $this->clsPledges->lNumPledgesViaFID($lPID);
     }
     //-------------------
     // business contacts
     //-------------------
     if (!$gbVolLogin) {
         $this->clsBiz->lPID = $lPID;
         $this->clsBiz->contactList(false, true, false);
         $displayData['lNumContacts'] = $this->clsBiz->lNumContacts;
         $displayData['contacts'] = $this->clsBiz->contacts;
     }
     //--------------------------
     // breadcrumbs
     //--------------------------
     if ($gbVolLogin) {
         $displayData['pageTitle'] = 'Contact Info';
         $displayData['title'] = CS_PROGNAME . ' | Contact Info';
     } else {
         $displayData['pageTitle'] = anchor('main/menu/people', 'People', 'class="breadcrumb"') . ' | People Record';
         $displayData['title'] = CS_PROGNAME . ' | People';
     }
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     $displayData['mainTemplate'] = 'people/people_record_view';
     $this->load->vars($displayData);
     $this->load->view('template');
 }
 //--------------------
 if ($showFields->bPhoneEmail) {
     echoT($clsRpt->writeCell(strPhoneCell($person->strPhone, $person->strCell, true, true) . '<br>' . $person->strEmailFormatted));
 }
 //--------------------
 // Gift Summary
 //--------------------
 if ($showFields->bGiftSummary) {
     $strLinkAddNew = strLinkAdd_Gift($lPID, 'New&nbsp;gift', true) . '&nbsp;' . strLinkAdd_Gift($lPID, 'New&nbsp;gift', false) . '<br>' . strLinkAdd_Pledge($lPID, 'New&nbsp;pledge', true) . '&nbsp;' . strLinkAdd_Pledge($lPID, 'New&nbsp;pledge', false);
     if ($person->lNumACODonationGroups_hard + $person->lNumACODonationGroups_soft > 0) {
         $strLinkGiftHistory = '<br>' . strLinkView_GiftsHistory($lPID, 'History', true) . '&nbsp;' . strLinkView_GiftsHistory($lPID, 'History', false) . '<br>' . $strLinkAddNew;
     } else {
         $strLinkGiftHistory = $strLinkAddNew;
     }
     echoT($clsRpt->writeCell(strBuildCumlativeTable($person->lNumACODonationGroups_hard, $person->donationsViaACO_hard, 140) . $strLinkGiftHistory));
     echoT($clsRpt->writeCell(strBuildCumlativeTable($person->lNumACODonationGroups_soft, $person->donationsViaACO_soft, 140)));
 }
 //--------------------
 // Sponsorship
 //--------------------
 if ($showFields->bSponsor) {
     $strLinkAddNew = strLinkAdd_Sponsorship($lPID, 'Add new sponsorship', true, 'id="addSponI_' . $lPID . '"') . '&nbsp;' . strLinkAdd_Sponsorship($lPID, 'Add new', false, 'id="addSponL_' . $lPID . '"');
     $strSponSum = $clsSpon->strSponsorSumLiteViaPID($lPID);
     if ($strSponSum == 'n/a') {
         $strStyle = ' text-align: center; color: #b0b0b0;';
     } else {
         $strStyle = '';
     }
     echoT($clsRpt->writeCell($strSponSum . '<br>' . $strLinkAddNew, '', $strStyle));
 }
 echoT($clsRpt->closeRow());
Ejemplo n.º 5
0
 public function view($lBID)
 {
     //-------------------------------------------------------------------------
     //
     //-------------------------------------------------------------------------
     global $glUserID;
     $this->load->helper('dl_util/verify_id');
     verifyID($this, $lBID, 'business ID');
     $displayData = array();
     $displayData['lBID'] = $lBID = (int) $lBID;
     $displayData['js'] = '';
     $params = array('enumStyle' => 'terse', 'clsRpt');
     $this->load->library('generic_rpt', $params);
     //------------------------------------------------
     // libraries and utilities
     //------------------------------------------------
     $this->load->helper('img_docs/img_doc_tags');
     $this->load->model('people/mpeople', 'clsPeople');
     $this->load->model('biz/mbiz', 'clsBiz');
     $this->load->model('admin/madmin_aco', 'clsACO');
     $this->load->model('admin/muser_accts', 'clsUser');
     $this->load->model('sponsorship/msponsorship', 'clsSpon');
     $this->load->model('sponsorship/msponsor_charge_pay', 'clsSCP');
     $this->load->model('donations/mdonations', 'clsGifts');
     $this->load->model('donations/mpledges', 'clsPledges');
     $this->load->model('vols/mvol', 'clsVol');
     $this->load->model('people/mrelationships', 'clsRel');
     $this->load->model('groups/mgroups', 'groups');
     $this->load->model('img_docs/mimage_doc', 'clsImgDoc');
     $this->load->model('img_docs/mimg_doc_tags', 'cidTags');
     $this->load->library('util/dl_date_time', '', 'clsDateTime');
     $this->load->helper('personalization/ptable');
     $this->load->helper('dl_util/web_layout');
     //      $this->load->helper ('dl_util/email_web');
     $this->load->helper('dl_util/record_view');
     $this->load->helper('img_docs/link_img_docs');
     $this->load->helper('dl_util/time_date');
     $this->load->helper('img_docs/image_doc');
     $this->load->helper('img_docs/link_img_docs');
     $this->load->helper('groups/groups');
     $this->load->model('reminders/mreminders', 'clsReminders');
     $displayData['clsRem'] = $this->clsReminders;
     $this->load->helper('js/div_hide_show');
     $displayData['js'] .= showHideDiv();
     //-------------------------------
     // business record
     //-------------------------------
     $this->clsBiz->loadBizRecsViaBID($lBID);
     $displayData['biz'] =& $this->clsBiz->bizRecs[0];
     //-------------------------------
     // associated contacts
     //-------------------------------
     $this->clsBiz->contactList(true, false, false);
     $displayData['contacts'] =& $this->clsBiz->contacts;
     $displayData['lNumContacts'] = $this->clsBiz->lNumContacts;
     //-------------------------------
     // personalized tables
     //-------------------------------
     $this->load->model('personalization/muser_fields', 'clsUF');
     $this->load->model('personalization/muser_fields_display', 'clsUFD');
     $this->load->model('admin/mpermissions', 'perms');
     $this->perms->loadUserAcctInfo($glUserID, $acctAccess);
     $this->load->model('personalization/muser_fields', 'clsUF');
     $this->load->model('personalization/muser_fields_display', 'clsUFD');
     $displayData['strPT'] = strPTableDisplay(CENUM_CONTEXT_BIZ, $lBID, $this->clsUFD, $this->perms, $acctAccess, $displayData['strFormDataEntryAlert'], $displayData['lNumPTablesAvail']);
     //-------------------------------
     // groups
     //-------------------------------
     $this->groups->groupMembershipViaFID(CENUM_CONTEXT_BIZ, $lBID);
     $displayData['inGroups'] = $this->groups->arrMemberInGroups;
     $displayData['lCntGroupMembership'] = $this->groups->lNumMemInGroups;
     $displayData['lNumGroups'] = $this->groups->lCntActiveGroupsViaType(CENUM_CONTEXT_BIZ);
     $this->groups->loadActiveGroupsViaType(CENUM_CONTEXT_BIZ, 'groupName', $this->groups->strMemListIDs, false, null);
     $displayData['groupList'] = $this->groups->arrGroupList;
     //-------------------------------
     // images and documents
     //-------------------------------
     loadImgDocRecView($displayData, CENUM_CONTEXT_BIZ, $lBID);
     //-------------------
     // donation summary
     //-------------------
     $this->clsGifts->lPeopleID = $lBID;
     $displayData['lTotGifts'] = 0;
     // monetary
     $this->clsGifts->cumulativeOpts = new stdClass();
     $this->clsGifts->cumulativeOpts->enumCumulativeSource = 'biz';
     $this->clsGifts->cumulativeOpts->enumMoneySet = 'monetaryOnly';
     $this->clsGifts->cumulativeOpts->bSoft = false;
     $this->clsGifts->cumulativeDonation($this->clsACO, $displayData['lTotHard']);
     $displayData['strCumGiftsNonSoftMon'] = strBuildCumlativeTable($this->clsGifts->lNumCumulative, $this->clsGifts->cumulative, true);
     //      $displayData['lTotGifts'] += $this->clsGifts->lNumCumulative;
     // in-kind
     $this->clsGifts->cumulativeOpts->enumMoneySet = 'gikOnly';
     $this->clsGifts->cumulativeDonation($this->clsACO, $displayData['lTotInKind']);
     $displayData['strCumGiftsNonSoftInKind'] = strBuildCumlativeTable($this->clsGifts->lNumCumulative, $this->clsGifts->cumulative, true);
     //      $displayData['lTotGifts'] += $this->clsGifts->lNumCumulative;
     // soft
     $this->clsGifts->cumulativeOpts->enumMoneySet = 'all';
     $this->clsGifts->cumulativeOpts->bSoft = true;
     $this->clsGifts->cumulativeDonation($this->clsACO, $displayData['lTotSoft']);
     $displayData['strCumGiftsSoft'] = strBuildCumlativeTable($this->clsGifts->lNumCumulative, $this->clsGifts->cumulative, true);
     //      $displayData['lTotGifts'] += $this->clsGifts->lNumCumulative;
     // sponsorship payments
     $this->clsSCP->cumulativeSponsorshipViaPeopleID($this->clsACO, $lBID);
     $displayData['strCumSpon'] = strBuildCumlativeTable($this->clsSCP->lNumSponPayCumulative, $this->clsSCP->sponPayCumulative, true);
     $displayData['lNumSponPay'] = $this->clsSCP->lNumSponPayCumulative;
     $displayData['lNumPledges'] = $this->clsPledges->lNumPledgesViaFID($lBID);
     //-------------------------------
     // sponsorship info
     //-------------------------------
     $this->clsSpon->sponsorshipInfoViaPID($lBID);
     $displayData['sponInfo'] = $this->clsSpon->sponInfo;
     $displayData['lNumSponsors'] = $this->clsSpon->lNumSponsors;
     //--------------------------
     // breadcrumbs
     //--------------------------
     $displayData['pageTitle'] = anchor('main/menu/biz', 'Businesses/Organizations', 'class="breadcrumb"') . ' | Business Record';
     $displayData['title'] = CS_PROGNAME . ' | Businesses';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     $displayData['mainTemplate'] = 'biz/biz_record_view';
     $this->load->vars($displayData);
     $this->load->view('template');
 }