コード例 #1
0
 function userAcctDir($strLookupLetter, $lStartRec = 0, $lRecsPerPage = 50)
 {
     //------------------------------------------------------------------------
     // User directory
     //------------------------------------------------------------------------
     $displayData = array();
     $displayData['js'] = '';
     if (!bTestForURLHack('adminOnly')) {
         return;
     }
     $strLookupLetter = urldecode($strLookupLetter);
     //-------------------------------------
     // models, libraries, and helpers
     //-------------------------------------
     $this->load->model('admin/muser_accts', 'clsUsers');
     $this->load->model('admin/mpermissions', 'perms');
     $this->load->helper('dl_util/web_layout');
     $this->load->helper('dl_util/directory');
     $this->load->helper('dl_util/rs_navigate');
     $this->load->helper('js/div_hide_show');
     $displayData['js'] .= showHideDiv();
     $displayData['pageTitle'] = anchor('main/menu/admin', 'Admin', 'class="breadcrumb"') . ' | User Accounts';
     $displayData['title'] = CS_PROGNAME . ' | User Accounts';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     //------------------------------------------------
     // display option / sanitize the lookup letter
     //------------------------------------------------
     $bShowAll = $strLookupLetter == 'showAll' || is_null($strLookupLetter) || $strLookupLetter == '*';
     if ($bShowAll) {
         $strLookupLetter = null;
     } else {
         $strLookupLetter = strtoupper(substr($strLookupLetter, 0, 1));
         if ($strLookupLetter < 'A' || $strLookupLetter > 'Z') {
             $strLookupLetter = '#';
         }
     }
     $displayData['strDirLetter'] = $strLookupLetter;
     $strLinkBase = 'admin/accts/userAcctDir/';
     $displayData['strDirTitle'] = strDisplayDirectory($strLinkBase, ' class="directoryLetters" ', $strLookupLetter, true, $lStartRec, $lRecsPerPage);
     $displayData['lNumRecsTot'] = $lNumRecsTot = $this->clsUsers->lCountUsers(null, $strLookupLetter);
     if ($lNumRecsTot == 0) {
         $displayData['strNobodyHome'] = 'There are no user records that begin with <b>"' . htmlspecialchars($strLookupLetter) . '"</b>';
     } else {
         if ($bShowAll) {
             $strWhereExtra = '  ';
         } else {
             $strWhereExtra = strNameWhereClauseViaLetter('us_strLastName', $strLookupLetter) . ' AND NOT us_bInactive ';
         }
         $this->clsUsers->loadUserDirectoryPage($strWhereExtra, $lStartRec, $lRecsPerPage);
         $displayData['lNumDisplayRows'] = $this->clsUsers->lNumDirRows;
         $displayData['directory'] = $this->clsUsers->directory;
         $displayData['directoryRecsPerPage'] = $lRecsPerPage;
         $displayData['directoryStartRec'] = $lStartRec;
     }
     $displayData['mainTemplate'] = 'admin/user_directory_view';
     $this->load->vars($displayData);
     $this->load->view('template');
 }
コード例 #2
0
 function view($strShowInactive = 'true', $lSponProgID = -1, $strLookupLetter = 'A', $lStartRec = 0, $lRecsPerPage = 50)
 {
     //------------------------------------------------------------------------------
     //
     //------------------------------------------------------------------------------
     if (!bTestForURLHack('showSponsors')) {
         return;
     }
     $strLookupLetter = urldecode($strLookupLetter);
     $displayData = array();
     $lStartRec = (int) $lStartRec;
     $lRecsPerPage = (int) $lRecsPerPage;
     $lSponProgID = (int) $lSponProgID;
     $bShowAllProgs = $lSponProgID <= 0;
     $displayData['bShowInactive'] = $bShowInactive = strtoupper($strShowInactive) == 'TRUE';
     //------------------------------------------------
     // libraries and utilities
     //------------------------------------------------
     $this->load->helper('people/people');
     $this->load->helper('people/people_display');
     $this->load->model('sponsorship/msponsorship', 'clsSpon');
     $this->load->model('sponsorship/msponsorship_programs', 'clsSponProg');
     $this->load->helper('sponsors/sponsorship');
     $this->load->helper('dl_util/directory');
     $this->load->helper('dl_util/rs_navigate');
     //      $this->load->helper('dl_util/email_web');
     $this->load->helper('dl_util/record_view');
     $this->load->helper('img_docs/link_img_docs');
     $params = array('enumStyle' => 'terse');
     $this->load->library('generic_rpt', $params);
     $this->load->library('util/dl_date_time', '', 'clsDateTime');
     $this->load->model('people/mpeople', 'clsPeople');
     $this->load->model('admin/madmin_aco', 'clsACO');
     //------------------------------------------------
     // sponsorship program
     //------------------------------------------------
     if ($lSponProgID > 0) {
         $this->clsSponProg->loadSponProgsViaSPID($lSponProgID);
         $sprog =& $this->clsSponProg->sponProgs[0];
         $strProgName = ': ' . htmlspecialchars($sprog->strProg);
     } else {
         $strProgName = '';
     }
     //------------------------------------------------
     // sanitize the lookup letter and inputs
     //------------------------------------------------
     $displayData['strDirLetter'] = $strLookupLetter = strSanitizeLetter($strLookupLetter);
     $displayData['lStartRec'] = $lStartRec;
     $displayData['lRecsPerPage'] = $lRecsPerPage;
     //------------------------------------------------
     // stripes
     //------------------------------------------------
     $this->load->model('util/mbuild_on_ready', 'clsOnReady');
     $this->clsOnReady->addOnReadyTableStripes();
     $this->clsOnReady->closeOnReady();
     $displayData['js'] = $this->clsOnReady->strOnReady;
     //------------------------------------------------
     // define columns to display
     //------------------------------------------------
     initSponReportDisplay($displayData);
     //------------------------------------------------
     // set up directory display
     //------------------------------------------------
     $displayData['strRptTitle'] = 'Sponsorship Directory' . $strProgName;
     $displayData['strDirLetter'] = $strLookupLetter;
     $displayData['strLinkBase'] = $strLinkBase = 'sponsors/spon_directory/view/' . $strShowInactive . '/' . $lSponProgID . '/';
     $displayData['strLinkToggleActive'] = strLinkView_SponDir(!$bShowInactive, $lSponProgID, $strLookupLetter, 0, $lRecsPerPage, ($bShowInactive ? 'Hide' : 'Show') . ' inactive', false) . '<br>';
     $displayData['strDirTitle'] = strDisplayDirectory($strLinkBase, ' class="directoryLetters" ', $strLookupLetter, true, $lStartRec, $lRecsPerPage);
     //-------------------------------------------------------------
     // make sure one or more sponsorship programs exist
     //-------------------------------------------------------------
     $displayData['lNumSponProgs'] = $lNumSponProgs = $this->clsSponProg->lNumSponPrograms();
     if ($lNumSponProgs > 0) {
         $displayData['lNumRecsTot'] = $lNumRecsTot = $this->clsSpon->lNumSponsorsViaProgram($lSponProgID, $bShowInactive, $strLookupLetter);
         // sponsor program ddl
         $displayData['strSponProgDDL'] = '<select name="ddlSponProg">
            <option value="-1" ' . ($lSponProgID <= 0 ? 'selected' : '') . '>(all programs)</option>' . "\n" . $this->clsSponProg->strSponProgramDDL($lSponProgID, false) . "\n" . '</select>' . "\n";
         if ($lNumRecsTot > 0) {
             $displayData['directoryRecsPerPage'] = $lRecsPerPage;
             $displayData['directoryStartRec'] = $lStartRec;
             $strLimit = "LIMIT  {$lStartRec}, {$lRecsPerPage} ";
             // strLoadRecSpecs($lRecsPerPage, $lStartRec);
             $strWhereExtra = '';
             if ($lSponProgID > 0) {
                 $strWhereExtra .= " AND sp_lSponsorProgramID={$lSponProgID} ";
             }
             if (!$bShowInactive) {
                 $strWhereExtra .= ' AND NOT sp_bInactive ';
             }
             if ($strLookupLetter . '' != '') {
                 $strWhereExtra .= strNameWhereClauseViaLetter('tblPeopleSpon.pe_strLName', $strLookupLetter);
             }
             $this->clsSpon->sponsorInfoGenericViaWhere($strWhereExtra, $strLimit);
             $displayData['sponInfo'] =& $this->clsSpon->sponInfo;
         }
         $displayData['lNumDisplayRows'] = $this->clsSpon->lNumSponsors;
     }
     //------------------------------------------------
     // breadcrumbs / page setup
     //------------------------------------------------
     $displayData['mainTemplate'] = array('sponsorship/sponsor_directory_view', 'sponsorship/rpt_generic_spon_list');
     $displayData['pageTitle'] = anchor('main/menu/sponsorship', 'Sponsorship', 'class="breadcrumb"') . ' | Directory';
     $displayData['title'] = CS_PROGNAME . ' | Sponsorship';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     $this->load->vars($displayData);
     $this->load->view('template');
 }
コード例 #3
0
 function viewCName($strLookupLetter = 'A', $lStartRec = 0, $lRecsPerPage = 50)
 {
     //---------------------------------------------------------------------
     // contact directory by name
     //---------------------------------------------------------------------
     if (!bTestForURLHack('showPeople')) {
         return;
     }
     $strLookupLetter = urldecode($strLookupLetter);
     $displayData = array();
     //------------------------------------------------
     // libraries and utilities
     //------------------------------------------------
     $this->load->helper('dl_util/rs_navigate');
     //      $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('biz/biz');
     $this->load->helper('people/people_display');
     $this->load->helper('dl_util/directory');
     $this->load->library('util/dl_date_time', '', 'clsDateTime');
     $this->load->model('biz/mbiz', 'clsBiz');
     $this->load->model('people/mpeople', 'clsPeople');
     $params = array('enumStyle' => 'terse');
     $this->load->library('generic_rpt', $params);
     //------------------------------------------------
     // sanitize the lookup letter and inputs
     //------------------------------------------------
     $displayData['strDirLetter'] = $strLookupLetter = strSanitizeLetter($strLookupLetter);
     $strWhereExtra = $this->clsPeople->strWhereByLetter($strLookupLetter, CENUM_CONTEXT_PEOPLE, '');
     $this->clsBiz->loadContactNameDirectoryPage($strWhereExtra, $lStartRec, $lRecsPerPage);
     //------------------------------------------------
     // stripes
     //------------------------------------------------
     $this->load->model('util/mbuild_on_ready', 'clsOnReady');
     $this->clsOnReady->addOnReadyTableStripes();
     $this->clsOnReady->closeOnReady();
     $displayData['js'] = $this->clsOnReady->strOnReady;
     //------------------------------------------------
     // set up directory display
     //------------------------------------------------
     $displayData['strRptTitle'] = 'Contact Directory';
     $displayData['lNumRecsTot'] = lNumPeopleRecsViaLetter($strLookupLetter, CENUM_CONTEXT_BIZCONTACT);
     $displayData['strDirLetter'] = $strLookupLetter;
     $displayData['strLinkBase'] = $strLinkBase = 'biz/biz_directory/viewCName/';
     $displayData['strDirTitle'] = strDisplayDirectory($strLinkBase, ' class="directoryLetters" ', $strLookupLetter, true, $lStartRec, $lRecsPerPage);
     $displayData['strRecNavTitle'] = 'Contact Directory (by Contact Name): ';
     $displayData['lNumDisplayRows'] = $lNumContactsNames = $this->clsBiz->lNumContactsNames;
     $displayData['directoryRecsPerPage'] = $lRecsPerPage;
     $displayData['directoryStartRec'] = $lStartRec;
     $displayData['bizRecs'] =& $this->clsBiz->contactsNames;
     //------------------------------------------------
     // breadcrumbs / page setup
     //------------------------------------------------
     $displayData['mainTemplate'] = array('biz/biz_directory_view', 'biz/contact_dir');
     $displayData['pageTitle'] = anchor('main/menu/biz', 'Businesses/Organizations', 'class="breadcrumb"') . ' | Contact Directory by Name';
     $displayData['title'] = CS_PROGNAME . ' | Businesses';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     $this->load->vars($displayData);
     $this->load->view('template');
 }
コード例 #4
0
 function clientDirectory($lLocationID, $lSponProgID, $strIncludeInactive, $strLookupLetter, $lStartRec, $lRecsPerPage)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     if (!bTestForURLHack('showClients')) {
         return;
     }
     $_SESSION[CS_NAMESPACE . 'clientLastDir'] = 'name';
     $strLookupLetter = urldecode($strLookupLetter);
     $displayData = array();
     $displayData['bIncludeInactive'] = $bIncludeInactive = $strIncludeInactive == 'Y';
     $displayData['bViaLocation'] = $bViaLocation = !is_null($lLocationID);
     $displayData['bViaSponProg'] = $bViaSponProg = !is_null($lSponProgID);
     //--------------------------------------
     // models, helpers, libraries
     //--------------------------------------
     $this->load->helper('dl_util/directory');
     $this->load->helper('dl_util/rs_navigate');
     $this->load->helper('clients/client');
     $this->load->helper('clients/client_sponsor');
     $this->load->model('clients/mclient_locations', 'clsLocation');
     $this->load->model('clients/mclients', 'clsClients');
     $this->load->library('util/dl_date_time', '', 'clsDataTime');
     $this->load->model('sponsorship/msponsorship_programs', 'clsSponProg');
     $params = array('enumStyle' => 'terse');
     $this->load->library('generic_rpt', $params);
     $displayData['strRptTitle'] = 'Client Directory';
     $strWhereExtra = '';
     //------------------------------------------------
     // location
     //------------------------------------------------
     if ($bViaLocation) {
         $this->clsLocation->loadAllLocations();
         $displayData['lNumLocations'] = $lNumLocations = $this->clsLocation->lNumLocations;
         if ($lLocationID <= 0) {
             $lLocationID = $this->clsLocation->clientLocations[0]->lKeyID;
         }
         $this->clsLocation->cl_lKeyID = $lLocationID;
         $this->clsLocation->loadLocationRec($lLocationID);
         $displayData['strRptTitle'] .= ': ' . htmlspecialchars($this->clsLocation->strLocation);
         $strWhereExtra = " AND cr_lLocationID={$lLocationID} ";
         $displayData['ddlLocations'] = $this->clsLocation->strDDLAllLocations($lLocationID);
         $displayData['locChange'] = new stdClass();
         $displayData['locChange']->frmName = 'frmLocation';
         $displayData['locChange']->frmDest = 'clients/client_dir/changeLocation/' . $strIncludeInactive . '/' . urlencode($strLookupLetter) . '/' . $lStartRec . '/' . $lRecsPerPage;
     }
     //------------------------------------------------
     // program
     //------------------------------------------------
     if ($bViaSponProg) {
         $this->clsSponProg->loadSponProgsGeneric(false);
         $displayData['lNumSponProg'] = $lNumSponProg = $this->clsSponProg->lNumSponPrograms;
         if ($lSponProgID <= 0) {
             $lSponProgID = $this->clsSponProg->sponProgs[0]->lKeyID;
         }
         $strDDL = '<select name="ddlSponProg">' . "\n";
         foreach ($this->clsSponProg->sponProgs as $sprog) {
             if ($sprog->lKeyID == $lSponProgID) {
                 $strSel = 'selected';
                 $displayData['strRptTitle'] .= ': ' . htmlspecialchars($sprog->strProg);
             } else {
                 $strSel = '';
             }
             $strDDL .= '<option value="' . $sprog->lKeyID . '" ' . $strSel . '>' . htmlspecialchars($sprog->strProg) . '</option>' . "\n";
         }
         $strDDL .= '</select>' . "\n";
         $displayData['ddlSProgs'] = $strDDL;
         $strWhereExtra = " AND csp_lSponProgID={$lSponProgID} ";
         $this->clsClients->strInnerExtra = ' INNER JOIN client_supported_sponprogs ON cr_lKeyID=csp_lClientID ';
         $displayData['progChange'] = new stdClass();
         $displayData['progChange']->frmName = 'frmSProg';
         $displayData['progChange']->frmDest = 'clients/client_dir/changeSProg/' . $strIncludeInactive . '/' . urlencode($strLookupLetter) . '/' . $lStartRec . '/' . $lRecsPerPage;
     }
     //------------------------------------------------
     // sanitize the lookup letter
     //------------------------------------------------
     $displayData['strDirLetter'] = $strLookupLetter = strSanitizeLetter($strLookupLetter);
     initClientReportDisplay($displayData);
     $displayData['showFields']->bLocation = true;
     $displayData['strDirLetter'] = $strLookupLetter;
     $strLinkEnd = urlencode($strLookupLetter) . '/' . $lStartRec . '/' . $lRecsPerPage;
     $strLabelToggle = ($bIncludeInactive ? 'Hide' : 'Show') . ' inactive clients';
     if ($bViaLocation) {
         $displayData['strLinkBase'] = $strLinkBase = 'clients/client_dir/view/' . $lLocationID . '/' . ($bIncludeInactive ? 'Y' : 'N') . '/';
         $displayData['strToggleLink'] = anchor('clients/client_dir/view/' . $lLocationID . '/' . ($bIncludeInactive ? 'N' : 'Y') . '/' . $strLinkEnd, $strLabelToggle);
     } elseif ($bViaSponProg) {
         $displayData['strLinkBase'] = $strLinkBase = 'clients/client_dir/sProg/' . $lSponProgID . '/' . ($bIncludeInactive ? 'Y' : 'N') . '/';
         $displayData['strToggleLink'] = anchor('clients/client_dir/sProg/' . $lSponProgID . '/' . ($bIncludeInactive ? 'N' : 'Y') . '/' . $strLinkEnd, $strLabelToggle);
     } else {
         $displayData['strLinkBase'] = $strLinkBase = 'clients/client_dir/name/' . ($bIncludeInactive ? 'Y' : 'N') . '/';
         $displayData['strToggleLink'] = anchor('clients/client_dir/name/' . ($bIncludeInactive ? 'N' : 'Y') . '/' . $strLinkEnd, $strLabelToggle);
     }
     $displayData['strDirTitle'] = strDisplayDirectory($strLinkBase, ' class="directoryLetters" ', $strLookupLetter, true, $lStartRec, $lRecsPerPage);
     //------------------------------------------------
     // total # clients for this letter
     //------------------------------------------------
     $displayData['lNumRecsTot'] = $lNumRecsTot = $this->clsClients->lNumClientsViaLetter($strLookupLetter, $bIncludeInactive, $strWhereExtra);
     $displayData['lNumClients'] = $lNumRecsTot;
     //------------------------------------------------
     // breadcrumbs / page setup
     //------------------------------------------------
     $displayData['mainTemplate'] = array('client/client_directory_view', 'client/rpt_generic_client_list');
     $displayData['pageTitle'] = anchor('main/menu/client', 'Clients', 'class="breadcrumb"') . ' | Client Directory';
     $displayData['title'] = CS_PROGNAME . ' | Clients';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     //------------------------------------------------
     // load client directory page
     //------------------------------------------------
     $strWhereExtra .= $this->clsClients->strWhereByLetter($strLookupLetter, $bIncludeInactive);
     $this->clsClients->loadClientDirectoryPage($strWhereExtra, $lStartRec, $lRecsPerPage);
     $displayData['lNumDisplayRows'] = $this->clsClients->lNumClients;
     $displayData['directoryRecsPerPage'] = $lRecsPerPage;
     $displayData['directoryStartRec'] = $lStartRec;
     $displayData['clientInfo'] = $this->clsClients->clients;
     $this->load->vars($displayData);
     $this->load->view('template');
 }
コード例 #5
0
 function view($strLookupLetter = 'A', $lStartRec = 0, $lRecsPerPage = 50)
 {
     //------------------------------------------------------------------------------
     //
     //------------------------------------------------------------------------------
     if (!bTestForURLHack('showPeople')) {
         return;
     }
     $strLookupLetter = urldecode($strLookupLetter);
     $displayData = array();
     //------------------------------------------------
     // libraries and utilities
     //------------------------------------------------
     $this->load->helper('people/people');
     $this->load->helper('people/people_display');
     $this->load->helper('dl_util/directory');
     $this->load->helper('dl_util/rs_navigate');
     //      $this->load->helper('dl_util/email_web');
     $this->load->helper('dl_util/record_view');
     $this->load->helper('img_docs/link_img_docs');
     $params = array('enumStyle' => 'terse');
     $this->load->library('generic_rpt', $params);
     $this->load->library('util/dl_date_time', '', 'clsDateTime');
     $this->load->model('people/mpeople', 'clsPeople');
     $this->load->model('admin/madmin_aco', 'clsACO');
     $this->load->model('sponsorship/msponsorship');
     $this->load->model('donations/mdonations');
     $this->load->model('people/mrelationships', 'clsRel');
     //------------------------------------------------
     // sanitize the lookup letter
     //------------------------------------------------
     /*
           $strLookupLetter = strtoupper(substr($strLookupLetter, 0, 1));
           if ($strLookupLetter < 'A' || $strLookupLetter > 'Z') $strLookupLetter = '#';
           $displayData['strDirLetter'] = $strLookupLetter;
     */
     $displayData['strDirLetter'] = $strLookupLetter = strSanitizeLetter($strLookupLetter);
     //------------------------------------------------
     // stripes
     //------------------------------------------------
     $this->load->model('util/mbuild_on_ready', 'clsOnReady');
     $this->clsOnReady->addOnReadyTableStripes();
     $this->clsOnReady->closeOnReady();
     $displayData['js'] = $this->clsOnReady->strOnReady;
     initHouseholdReportDisplay($displayData);
     $displayData['strRptTitle'] = 'Household Directory';
     $displayData['strDirLetter'] = $strLookupLetter;
     $displayData['strLinkBase'] = $strLinkBase = 'people/people_household_dir/view/';
     $displayData['strDirTitle'] = strDisplayDirectory($strLinkBase, ' class="directoryLetters" ', $strLookupLetter, true, $lStartRec, $lRecsPerPage);
     //------------------------------------------------
     // total # households for this letter
     //------------------------------------------------
     $displayData['lNumRecsTot'] = $lNumRecsTot = lNumPeopleRecsViaLetter($strLookupLetter, CENUM_CONTEXT_HOUSEHOLD);
     $displayData['lNumPeople'] = $lNumRecsTot;
     $displayData['strPeopleType'] = CENUM_CONTEXT_HOUSEHOLD;
     //------------------------------------------------
     // load household directory page
     //------------------------------------------------
     $strWhereExtra = $this->clsPeople->strWhereByLetter($strLookupLetter, CENUM_CONTEXT_HOUSEHOLD, false);
     $this->clsPeople->loadHouseholdDirectoryPage($strWhereExtra, $lStartRec, $lRecsPerPage);
     $displayData['lNumDisplayRows'] = $this->clsPeople->lNumPeople;
     $displayData['directoryRecsPerPage'] = $lRecsPerPage;
     $displayData['directoryStartRec'] = $lStartRec;
     $displayData['people'] = $this->clsPeople->people;
     //------------------------------------------------
     // breadcrumbs / page setup
     //------------------------------------------------
     $displayData['mainTemplate'] = array('people/household_directory_view', 'people/rpt_generic_household_list_view');
     $displayData['pageTitle'] = anchor('main/menu/people', 'People', 'class="breadcrumb"') . ' | Household Directory';
     $displayData['title'] = CS_PROGNAME . ' | People';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     $this->load->vars($displayData);
     $this->load->view('template');
 }
コード例 #6
0
 function peopleDirView($strLookupLetter, $lStartRec, $lRecsPerPage, $bRelDir)
 {
     //------------------------------------------------------------------------------
     //
     //------------------------------------------------------------------------------
     if (!bTestForURLHack('showPeople')) {
         return;
     }
     $strLookupLetter = urldecode($strLookupLetter);
     $displayData = array();
     //------------------------------------------------
     // libraries and utilities
     //------------------------------------------------
     $this->load->helper('people/people');
     $this->load->helper('people/people_display');
     $this->load->helper('dl_util/directory');
     $this->load->helper('dl_util/rs_navigate');
     //      $this->load->helper('dl_util/email_web');
     $this->load->helper('dl_util/record_view');
     $this->load->helper('img_docs/link_img_docs');
     $params = array('enumStyle' => 'terse');
     $this->load->library('generic_rpt', $params);
     $this->load->library('util/dl_date_time', '', 'clsDateTime');
     $this->load->model('people/mpeople', 'clsPeople');
     $this->load->model('admin/madmin_aco', 'clsACO');
     $this->load->model('sponsorship/msponsorship');
     $this->load->model('donations/mdonations');
     $this->load->model('people/mrelationships', 'clsRel');
     //------------------------------------------------
     // sanitize the lookup letter
     //------------------------------------------------
     $displayData['strDirLetter'] = $strLookupLetter = strSanitizeLetter($strLookupLetter);
     $displayData['bRelDir'] = $bRelDir;
     //------------------------------------------------
     // stripes
     //------------------------------------------------
     $this->load->model('util/mbuild_on_ready', 'clsOnReady');
     $this->clsOnReady->addOnReadyTableStripes();
     $this->clsOnReady->closeOnReady();
     $displayData['js'] = $this->clsOnReady->strOnReady;
     initPeopleReportDisplay($displayData);
     $displayData['strRptTitle'] = 'People ' . ($bRelDir ? 'Relationship ' : '') . 'Directory';
     $displayData['strDirLetter'] = $strLookupLetter;
     $displayData['strLinkBase'] = $strLinkBase = 'people/people_dir/' . ($bRelDir ? 'relView' : 'view') . '/';
     $displayData['strDirTitle'] = strDisplayDirectory($strLinkBase, ' class="directoryLetters" ', $strLookupLetter, true, $lStartRec, $lRecsPerPage);
     //------------------------------------------------
     // total # people for this letter
     //------------------------------------------------
     $displayData['lNumRecsTot'] = $lNumRecsTot = lNumPeopleRecsViaLetter($strLookupLetter, CENUM_CONTEXT_PEOPLE);
     $displayData['lNumPeople'] = $lNumRecsTot;
     $displayData['strPeopleType'] = CENUM_CONTEXT_PEOPLE;
     //------------------------------------------------
     // load people directory page
     //------------------------------------------------
     $strWhereExtra = $this->clsPeople->strWhereByLetter($strLookupLetter, CENUM_CONTEXT_PEOPLE, false);
     $this->clsPeople->loadPeopleDirectoryPage($strWhereExtra, $lStartRec, $lRecsPerPage);
     $displayData['lNumDisplayRows'] = $this->clsPeople->lNumPeople;
     $displayData['directoryRecsPerPage'] = $lRecsPerPage;
     $displayData['directoryStartRec'] = $lStartRec;
     $displayData['people'] =& $this->clsPeople->people;
     if ($bRelDir) {
         if ($this->clsPeople->lNumPeople > 0) {
             foreach ($this->clsPeople->people as $person) {
                 $this->clsRel->lPID = $person->lKeyID;
                 $this->clsRel->loadFromRelViaPID();
                 $person->lNumFromRels = $this->clsRel->lNumRelAB;
                 if ($person->lNumFromRels > 0) {
                     $person->fromRels = arrayCopy($this->clsRel->arrRelAB);
                 }
                 $this->clsRel->loadToRelViaPID();
                 $person->lNumToRels = $this->clsRel->lNumRelAB;
                 if ($person->lNumToRels > 0) {
                     $person->toRels = arrayCopy($this->clsRel->arrRelAB);
                 }
             }
         }
     }
     //------------------------------------------------
     // breadcrumbs / page setup
     //------------------------------------------------
     $displayData['mainTemplate'] = array('people/people_directory_view', 'people/' . ($bRelDir ? 'rpt_people_rel_dir_view' : 'rpt_generic_people_list'));
     $displayData['pageTitle'] = anchor('main/menu/people', 'People', 'class="breadcrumb"') . ' | People' . ($bRelDir ? ' Relationship' : '') . ' Directory';
     $displayData['title'] = CS_PROGNAME . ' | People';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     $this->load->vars($displayData);
     $this->load->view('template');
 }
コード例 #7
0
 function view_generic($strShowInactive = 'true', $strLookupLetter = 'A', $lStartRec = 0, $lRecsPerPage = 50)
 {
     //------------------------------------------------------------------------------
     //
     //------------------------------------------------------------------------------
     global $glChapterID;
     if (!bTestForURLHack('volMgr')) {
         return;
     }
     $strLookupLetter = urldecode($strLookupLetter);
     $displayData = array();
     $displayData['bShowInactive'] = $bShowInactive = strtoupper($strShowInactive) == 'TRUE';
     $displayData['js'] = '';
     //------------------------------------------------
     // models / libraries / helpers
     //------------------------------------------------
     $this->load->helper('people/people');
     $this->load->helper('people/people_display');
     $this->load->model('vols/mvol', 'clsVol');
     $this->load->model('vols/mvol_skills', 'clsVolSkills');
     $this->load->helper('vols/vol');
     $this->load->helper('dl_util/time_duration_helper');
     $this->load->helper('dl_util/directory');
     $this->load->helper('dl_util/rs_navigate');
     $this->load->helper('hospice/link_hospice');
     $this->load->helper('dl_util/record_view');
     $this->load->helper('img_docs/link_img_docs');
     $params = array('enumStyle' => 'terse');
     $this->load->library('generic_rpt', $params);
     $this->load->library('util/dl_date_time', '', 'clsDateTime');
     //------------------------------------------------
     // sanitize the lookup letter
     //------------------------------------------------
     $displayData['strDirLetter'] = $strLookupLetter = strSanitizeLetter($strLookupLetter);
     // the toggle-a-tizer
     $strLabelToggle = ($bShowInactive ? '<b>Hide</b>' : '<b>Show</b> active and ') . ' inactive volunteers';
     $strLinkEnd = $lStartRec . '/' . $lRecsPerPage;
     $displayData['strToggleLink'] = anchor('hospice/vols/vol_directory/view/' . ($bShowInactive ? 'false' : 'true') . '/' . ($strLookupLetter == '*' ? '%2A' : $strLookupLetter) . '/' . $strLinkEnd, $strLabelToggle);
     //------------------------------------------------
     // stripes
     //------------------------------------------------
     $this->load->model('util/mbuild_on_ready', 'clsOnReady');
     $this->clsOnReady->addOnReadyTableStripes();
     $this->clsOnReady->closeOnReady();
     $displayData['js'] .= $this->clsOnReady->strOnReady;
     //------------------------------------------------
     // define columns to display
     //------------------------------------------------
     initVolReportDisplay($displayData);
     $displayData['showFields']->bSkills = true;
     //------------------------------------------------
     // set up directory display
     //------------------------------------------------
     $displayData['strRptTitle'] = 'Volunteer Directory <span style="font-weight: normal;">(' . ($bShowInactive ? 'Active and Inactive' : 'Active Only') . ')</span>';
     $displayData['strLinkBase'] = $strLinkBase = 'hospice/vols/vol_directory/view/' . ($bShowInactive ? 'true' : 'false') . '/';
     $strWhereExtraReg = " AND vol_lChapterID={$glChapterID} ";
     $displayData['strDirLetter'] = $strLookupLetter;
     $displayData['strDirTitle'] = strDisplayDirectory($strLinkBase, ' class="directoryLetters" ', $strLookupLetter, true, $lStartRec, $lRecsPerPage);
     //------------------------------------------------
     // total # people for this letter
     //------------------------------------------------
     $displayData['lNumRecsTot'] = $lNumRecsTot = lNumVolRecsViaLetter($glChapterID, $strLookupLetter, CENUM_CONTEXT_VOLUNTEER, $bShowInactive, $strWhereExtraReg);
     $displayData['lNumVols'] = $lNumRecsTot;
     $displayData['strPeopleType'] = 'volunteer';
     //------------------------------------------------
     // load volunteer directory page
     //------------------------------------------------
     $strWhereExtra = $this->clsVol->strWhereByLetter($strLookupLetter) . $strWhereExtraReg;
     if (!$bShowInactive) {
         $strWhereExtra .= ' AND NOT vol_bInactive ';
     }
     $this->clsVol->loadVolDirectoryPage($strWhereExtra, $lStartRec, $lRecsPerPage);
     $displayData['lNumDisplayRows'] = $lNumVols = $this->clsVol->lNumVolRecs;
     $displayData['directoryRecsPerPage'] = $lRecsPerPage;
     $displayData['directoryStartRec'] = $lStartRec;
     if ($lNumVols) {
         foreach ($this->clsVol->volRecs as $volRec) {
             $this->clsVolSkills->lVolID = $lVolID = $volRec->lKeyID;
             $this->clsVolSkills->loadSingleVolSkills();
             $volRec->lNumJobSkills = $lNumSkills = $this->clsVolSkills->lNumSingleVolSkills;
             if ($lNumSkills > 0) {
                 $volRec->volSkills = arrayCopy($this->clsVolSkills->singleVolSkills);
             }
             $this->clsVol->loadVolClientAssocViaVolID($lVolID, $volRec->volClient, true);
         }
     }
     $displayData['vols'] =& $this->clsVol->volRecs;
     //------------------------------------------------
     // breadcrumbs / page setup
     //------------------------------------------------
     $displayData['mainTemplate'] = array('hospice/vols/vol_directory_view', 'hospice/vols/rpt_generic_vol_list');
     $displayData['pageTitle'] = 'Volunteer Directory';
     $displayData['title'] = CS_PROGNAME . ' | Volunteers';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     $this->load->vars($displayData);
     $this->load->view('template');
 }
コード例 #8
0
 function view($strIncludeInactive = 'N', $strLookupLetter = 'A', $lStartRec = 0, $lRecsPerPage = 50)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $glChapterID;
     if (!bTestForURLHack('volMgr')) {
         return;
     }
     $_SESSION[CS_NAMESPACE . 'clientLastDir'] = 'name';
     $strLookupLetter = urldecode($strLookupLetter);
     $displayData = array();
     $displayData['js'] = '';
     $displayData['bIncludeInactive'] = $bIncludeInactive = $strIncludeInactive == 'Y';
     $displayData['bViaLocation'] = false;
     $displayData['bViaSponProg'] = false;
     //--------------------------------------
     // models, helpers, libraries
     //--------------------------------------
     $this->load->helper('dl_util/directory');
     $this->load->helper('dl_util/rs_navigate');
     $this->load->helper('clients/client');
     $this->load->helper('clients/client_sponsor');
     $this->load->model('vols/mvol', 'cVols');
     $this->load->model('patients/mpatients', 'cPatients');
     $this->load->model('patients/mpatient_contacts', 'cPCons');
     $this->load->library('util/dl_date_time', '', 'clsDataTime');
     $this->load->helper('hospice/link_hospice');
     $params = array('enumStyle' => 'terse');
     $this->load->library('generic_rpt', $params);
     //------------------------------------------------
     // stripes
     //------------------------------------------------
     $this->load->model('util/mbuild_on_ready', 'clsOnReady');
     $this->clsOnReady->addOnReadyTableStripes();
     $this->clsOnReady->closeOnReady();
     $displayData['js'] .= $this->clsOnReady->strOnReady;
     $displayData['strRptTitle'] = 'Patient Directory';
     $strWhereExtra = '';
     //------------------------------------------------
     // sanitize the lookup letter
     //------------------------------------------------
     $displayData['strDirLetter'] = $strLookupLetter = strSanitizeLetter($strLookupLetter);
     initClientReportDisplay($displayData);
     $displayData['strDirLetter'] = $strLookupLetter;
     $strLinkEnd = $lStartRec . '/' . $lRecsPerPage;
     $strLabelToggle = ($bIncludeInactive ? '<b>Hide</b>' : '<b>Show</b> active and ') . ' inactive patients';
     $displayData['strLinkBase'] = $strLinkBase = 'hospice/patients/patient_directory/view/' . ($bIncludeInactive ? 'Y' : 'N') . '/';
     $displayData['strToggleLink'] = anchor('hospice/patients/patient_directory/view/' . ($bIncludeInactive ? 'N' : 'Y') . '/' . ($strLookupLetter == '*' ? '%2A' : $strLookupLetter) . '/' . $strLinkEnd, $strLabelToggle);
     $displayData['strDirTitle'] = strDisplayDirectory($strLinkBase, ' class="directoryLetters" ', $strLookupLetter, true, $lStartRec, $lRecsPerPage);
     //------------------------------------------------
     // total # clients for this letter
     //------------------------------------------------
     $displayData['lNumRecsTot'] = $lNumRecsTot = $this->cPatients->lNumPatientsViaLetter($glChapterID, $strLookupLetter, $bIncludeInactive, $strWhereExtra);
     $displayData['lNumPatients'] = $lNumRecsTot;
     //------------------------------------------------
     // breadcrumbs / page setup
     //------------------------------------------------
     $displayData['mainTemplate'] = array('hospice/patients/directory_view', 'hospice/patients/rpt_patient_list');
     $displayData['pageTitle'] = 'Patient Directory';
     $displayData['title'] = CS_PROGNAME . ' | Patients';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     //------------------------------------------------
     // load client directory page
     //------------------------------------------------
     $strWhereExtra .= $this->cPatients->strWhereByLetter($strLookupLetter, $bIncludeInactive);
     $this->cPatients->loadPatientDirectoryPage($glChapterID, $strWhereExtra, $lStartRec, $lRecsPerPage);
     $displayData['lNumDisplayRows'] = $lNumP = $this->cPatients->lNumPatients;
     $displayData['directoryRecsPerPage'] = $lRecsPerPage;
     $displayData['directoryStartRec'] = $lStartRec;
     // load associated volunteers and contacts
     if ($lNumP > 0) {
         foreach ($this->cPatients->patients as $pRec) {
             $lPatientID = $pRec->lKeyID;
             $this->cVols->loadVolClientAssocViaPatientID($lPatientID, $pRec->volClient);
             $this->cPCons->loadPContactsViaPatientID($lPatientID, $lDummy, $pRec->pContacts);
         }
     }
     $displayData['patientInfo'] = $pi =& $this->cPatients->patients;
     $this->load->vars($displayData);
     $this->load->view('template');
 }
コード例 #9
0
 function view_generic($strLookupLetter = 'A', $lStartRec = 0, $lRecsPerPage = 50, $strShowInactive = 'true', $bViaRegFormID, $lRegFormID = null)
 {
     //------------------------------------------------------------------------------
     //
     //------------------------------------------------------------------------------
     if (!bTestForURLHack('showPeople')) {
         return;
     }
     $strLookupLetter = urldecode($strLookupLetter);
     $bShowInactive = strtoupper($strShowInactive) == 'TRUE';
     $displayData = array();
     if ($bViaRegFormID) {
         $lRegFormID = (int) $lRegFormID;
     }
     //------------------------------------------------
     // models / libraries / helpers
     //------------------------------------------------
     $this->load->helper('people/people');
     $this->load->helper('people/people_display');
     $this->load->model('vols/mvol', 'clsVol');
     $this->load->model('vols/mvol_skills', 'clsVolSkills');
     $this->load->helper('vols/vol');
     $this->load->helper('dl_util/time_duration_helper');
     $this->load->helper('dl_util/directory');
     $this->load->helper('dl_util/rs_navigate');
     //      $this->load->helper('dl_util/email_web');
     $this->load->helper('dl_util/record_view');
     $this->load->helper('img_docs/link_img_docs');
     $params = array('enumStyle' => 'terse');
     $this->load->library('generic_rpt', $params);
     $this->load->library('util/dl_date_time', '', 'clsDateTime');
     $this->load->model('people/mpeople', 'clsPeople');
     $this->load->model('admin/madmin_aco', 'clsACO');
     //------------------------------------------------
     // sanitize the lookup letter
     //------------------------------------------------
     $displayData['strDirLetter'] = $strLookupLetter = strSanitizeLetter($strLookupLetter);
     //------------------------------------------------
     // stripes
     //------------------------------------------------
     $this->load->model('util/mbuild_on_ready', 'clsOnReady');
     $this->clsOnReady->addOnReadyTableStripes();
     $this->clsOnReady->closeOnReady();
     $displayData['js'] = $this->clsOnReady->strOnReady;
     //------------------------------------------------
     // define columns to display
     //------------------------------------------------
     initVolReportDisplay($displayData);
     $displayData['showFields']->bSkills = true;
     //------------------------------------------------
     // set up directory display
     //------------------------------------------------
     if ($bViaRegFormID) {
         $this->load->model('vol_reg/mvol_reg', 'volReg');
         $this->volReg->loadVolRegFormsViaRFID($lRegFormID);
         $rRec =& $this->volReg->regRecs[0];
         $displayData['strRptTitle'] = 'Volunteer Directory By Registration Form (' . htmlspecialchars($rRec->strFormName) . ')';
         $displayData['strLinkBase'] = $strLinkBase = 'volunteers/vol_directory/viewViaRegFormID/' . $lRegFormID . '/';
         $strWhereExtraReg = " AND vol_lRegFormID = {$lRegFormID} ";
     } else {
         $displayData['strRptTitle'] = 'Volunteer Directory';
         $displayData['strLinkBase'] = $strLinkBase = 'volunteers/vol_directory/view/';
         $strWhereExtraReg = '';
     }
     $displayData['strDirLetter'] = $strLookupLetter;
     $displayData['strDirTitle'] = strDisplayDirectory($strLinkBase, ' class="directoryLetters" ', $strLookupLetter, true, $lStartRec, $lRecsPerPage);
     //------------------------------------------------
     // total # people for this letter
     //------------------------------------------------
     $displayData['lNumRecsTot'] = $lNumRecsTot = lNumPeopleRecsViaLetter($strLookupLetter, CENUM_CONTEXT_VOLUNTEER, $bShowInactive, $strWhereExtraReg);
     $displayData['lNumVols'] = $lNumRecsTot;
     $displayData['strPeopleType'] = 'volunteer';
     //------------------------------------------------
     // load volunteer directory page
     //------------------------------------------------
     $strWhereExtra = $this->clsPeople->strWhereByLetter($strLookupLetter, CENUM_CONTEXT_PEOPLE) . $strWhereExtraReg;
     if (!$bShowInactive) {
         $strWhereExtra .= ' AND NOT vol_bInactive ';
     }
     $this->clsVol->loadVolDirectoryPage($strWhereExtra, $lStartRec, $lRecsPerPage);
     $displayData['lNumDisplayRows'] = $lNumVols = $this->clsVol->lNumVolRecs;
     $displayData['directoryRecsPerPage'] = $lRecsPerPage;
     $displayData['directoryStartRec'] = $lStartRec;
     if ($lNumVols) {
         foreach ($this->clsVol->volRecs as $volRec) {
             $this->clsVolSkills->lVolID = $lVolID = $volRec->lKeyID;
             $this->clsVolSkills->loadSingleVolSkills();
             $volRec->lNumJobSkills = $lNumSkills = $this->clsVolSkills->lNumSingleVolSkills;
             if ($lNumSkills > 0) {
                 $volRec->volSkills = arrayCopy($this->clsVolSkills->singleVolSkills);
             }
         }
     }
     $displayData['vols'] =& $this->clsVol->volRecs;
     //------------------------------------------------
     // breadcrumbs / page setup
     //------------------------------------------------
     $displayData['mainTemplate'] = array('vols/vol_directory_view', 'vols/rpt_generic_vol_list');
     $displayData['pageTitle'] = anchor('main/menu/vols', 'Volunteers', 'class="breadcrumb"') . ' | Directory';
     $displayData['title'] = CS_PROGNAME . ' | Volunteers';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     $this->load->vars($displayData);
     $this->load->view('template');
 }