Пример #1
0
 function showOpts($enumContext)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     if (!bTestForURLHack('showUTable', $enumContext)) {
         return;
     }
     $displayData = array();
     $displayData['enumContext'] = $enumContext;
     //------------------------------------------------
     // libraries and utilities
     //------------------------------------------------
     $this->load->model('groups/mgroups', 'groups');
     $this->load->helper('dl_util/context');
     $this->load->helper('groups/groups');
     //------------------------------------
     // load the check/uncheck support
     //------------------------------------
     $this->load->helper('js/set_check_boxes');
     $displayData['js'] = insertCheckSet();
     $this->load->helper('js/verify_check_set');
     $displayData['js'] .= verifyCheckSet();
     $this->groups->loadActiveGroupsViaType($enumContext, 'groupName', '', false, null);
     $displayData['lNumGroupList'] = $lNumGroupList = $this->groups->lNumGroupList;
     if ($lNumGroupList > 0) {
         $displayData['groupList'] =& $this->groups->arrGroupList;
     }
     //--------------------------
     // breadcrumbs
     //--------------------------
     $displayData['pageTitle'] = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . strLabelViaContextType($enumContext, true, false) . ' Groups';
     $displayData['title'] = CS_PROGNAME . ' | Reports';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     $displayData['mainTemplate'] = 'reports/pre_group_opts_view';
     $this->load->vars($displayData);
     $this->load->view('template');
 }
Пример #2
0
 function strTagTableHeaderViaTag($lNumParentRecs, $tag)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $strOut = '<br>
      <table>
         <tr>
            <td>
               <b>Tag Type:</b>
            </td>
            <td>' . $tag->strIDType . ' / ' . strLabelViaContextType($tag->enumParentContext, true, true) . '
            </td>
         </tr>
         <tr>
            <td>
               <b>Tag:</b>
            </td>
            <td>' . htmlspecialchars($tag->strDDLEntry) . '
            </td>
         </tr>
         <tr>
            <td>
               <b># Parent Records:</b>
            </td>
            <td>' . number_format($lNumParentRecs) . '
            </td>
         </tr>
      </table><br>';
     if ($lNumParentRecs == 0) {
         return $strOut;
     }
     return $strOut;
 }
Пример #3
0
 private function xferPTableToTable(&$tables, $lTIdx, &$pTable)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $tables[$lTIdx] = new stdClass();
     $t =& $tables[$lTIdx];
     $t->lTableID = $pTable->lTableID;
     $t->name = $pTable->strUserTableName;
     $t->internalTName = $pTable->strDataTableName;
     $t->enumAttachType = $pTable->enumAttachType;
     $t->strAttachLabel = strLabelViaContextType($t->enumAttachType, true, false);
     $t->tType = 'Personalized table: ' . ($pTable->bMultiEntry ? 'Multiple' : 'Single') . '-entry';
     $t->fields = array();
     $lFIdx = 0;
     foreach ($pTable->fields as $pField) {
         $pfType = $pField->enumFieldType;
         if (!$pField->bHidden) {
             $this->addReportFields($t->fields, $lFIdx, $pfType, $pField->strFieldNameUser, $pField->strFieldNameInternal, $pField->lCurrencyACO, $pField->lFieldID);
         }
     }
 }
<?php

$clsForm = new generic_form();
$clsForm->strLabelClass = $clsForm->strLabelRowLabelClass = $clsForm->strLabelClassRequired = 'enpViewLabel';
$clsForm->strTitleClass = 'enpViewTitle';
$clsForm->strEntryClass = 'enpView';
$clsForm->bValueEscapeHTML = false;
openBlock(($bUpdate ? 'Update ' : 'Add new ') . strLabelViaContextType($enumContextType, true, false) . ' ' . ($bImage ? 'Image' : 'PDF document'), '');
$attributes = array('name' => 'frmUpload');
if ($bUpdate) {
    echoT(form_open('img_docs/upload_image_doc/edit/' . $lImageDocID, $attributes));
} else {
    echoT(form_open_multipart('img_docs/upload_image_doc/add/' . $enumContextType . '/' . $enumEntryType . '/' . $lFID, $attributes));
}
$clsForm->strStyleExtraLabel = 'padding-top: 9px;';
//----------------------
// file selection
//----------------------
echoT('<table class="enpView">');
if ($bUpdate) {
    if ($bImage) {
        echoT($clsForm->strLabelRow('Image', $strImageTag, 1));
    }
} else {
    $clsForm->strExtraFieldText = form_error('userfile');
    echoT($clsForm->strLabelRow($bImage ? 'Image file (jpg/gif/png)' : 'Document (pdf)', '<input type="file" name="userfile" size="80" />', 1));
}
//----------------------
// date of image/doc
//----------------------
echoT(strDatePicker('datepicker1', true));
Пример #5
0
 private function docImageSearch(&$results)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $genumDateFormat;
     $results->strLabel = 'Image and Document Descriptions';
     $results->lNumResults = 0;
     $sqlStr = 'SELECT
            di_lKeyID, di_enumEntryType, di_enumContextType,
            di_lForeignID, di_strCaptionTitle, di_strDescription,
            di_dteDocImage, di_strUserFN
         FROM docs_images
         WHERE NOT di_bRetired AND ' . $this->textSearchWhere('di_strDescription') . '
         ORDER BY di_enumContextType, di_lForeignID, di_lKeyID;';
     $query = $this->db->query($sqlStr);
     $results->lNumResults = $lNumRows = $query->num_rows();
     if ($lNumRows > 0) {
         $idx = 0;
         $results->matches = array();
         $bModelLoaded = array();
         foreach ($query->result() as $row) {
             $enumContext = $row->di_enumContextType;
             $enumEntryType = $row->di_enumEntryType;
             $lForeignID = $row->di_lForeignID;
             if (!isset($bModelLoaded[$enumContext])) {
                 $bModelLoaded[$enumContext] = true;
                 loadSupportModels($enumContext, $lForeignID);
             }
             $results->matches[$idx] = new stdClass();
             $match =& $results->matches[$idx];
             $match->searchInfo = strLabelViaContextType($enumContext, true, false) . ' / ' . $enumEntryType;
             contextNameLink($enumContext, $lForeignID, $strContextName, $strContextLink);
             $match->links = $strContextLink . ' ' . htmlspecialchars($strContextName);
             $match->text = $row->di_strDescription;
             $match->textHighlighted = $this->highlightMatchedText($row->di_strDescription);
             ++$idx;
         }
     }
 }
Пример #6
0
 function strGroupReportPage($enumContext, &$groupIDs, $bShowAny, $bReport, $lStartRec, $lRecsPerPage)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $this->db->query('DROP TABLE IF EXISTS tmpGroupMatch;');
     $strOut = $strExport = '';
     $strLabel = strLabelViaContextType($enumContext, true, true);
     $strOut = $strLabel . ' who belong to <b>' . ($bShowAny ? 'any' : 'all') . '</b> of the following groups:<br>';
     $this->loadGroupInfo($groupIDs);
     $strGroupsReviewed = '';
     if ($this->numGroups > 0) {
         if ($bReport) {
             $strOut .= '<ul>';
         }
         foreach ($this->groupTable as $grp) {
             if ($bReport) {
                 $strOut .= '<li>' . htmlspecialchars($grp->gp_strGroupName) . '</li>';
             } else {
                 $strGroupsReviewed .= "\n* " . $grp->gp_strGroupName;
             }
         }
         if ($bReport) {
             $strOut .= '</ul>';
         }
     }
     // create temporary table to hold foreign ID of report results
     $sqlStr = 'CREATE TEMPORARY TABLE tmpGroupMatch (
           gm_lKeyID int(11) NOT NULL AUTO_INCREMENT,
           gm_lForeignID int(11) NOT NULL DEFAULT \'0\',
           PRIMARY KEY (gm_lKeyID),
           KEY gm_lForeignID (gm_lForeignID)
         ) ENGINE=MyISAM;';
     $this->db->query($sqlStr);
     $strGroupList = implode(',', $groupIDs);
     $lNumGroups = count($groupIDs);
     if ($lNumGroups == 0) {
         $strGroupList = ' -1 ';
     }
     if ($bReport) {
         $strLimit = " LIMIT {$lStartRec}, {$lRecsPerPage} ";
     } else {
         $strLimit = '';
     }
     if ($bShowAny) {
         switch ($enumContext) {
             case CENUM_CONTEXT_BIZ:
             case CENUM_CONTEXT_PEOPLE:
                 $sqlSelect = 'SELECT DISTINCT pe_lKeyID AS lForeignID
               FROM people_names
                  INNER JOIN groups_child  ON pe_lKeyID=gc_lForeignID
                  INNER JOIN groups_parent ON gc_lGroupID=gp_lKeyID
               WHERE gp_enumGroupType=' . strPrepStr($enumContext) . '
                  AND gp_lKeyID IN (' . $strGroupList . ')
                  AND NOT pe_bRetired
                  AND ' . ($enumContext == CENUM_CONTEXT_PEOPLE ? ' NOT ' : '') . 'pe_bBiz
               ORDER BY pe_strLName, pe_strFName, pe_lKeyID ' . $strLimit . ';';
                 break;
             case CENUM_CONTEXT_VOLUNTEER:
                 $sqlSelect = 'SELECT DISTINCT vol_lKeyID AS lForeignID
               FROM volunteers
                  INNER JOIN groups_child  ON vol_lKeyID  = gc_lForeignID
                  INNER JOIN groups_parent ON gc_lGroupID = gp_lKeyID
                  INNER JOIN people_names  ON pe_lKeyID   = vol_lPeopleID
               WHERE gp_enumGroupType=' . strPrepStr($enumContext) . '
                  AND gp_lKeyID IN (' . $strGroupList . ')
                  AND NOT pe_bRetired
                  AND NOT vol_bRetired
                  AND NOT vol_bInactive
               ORDER BY pe_strLName, pe_strFName, pe_lKeyID ' . $strLimit . ';';
                 break;
             case CENUM_CONTEXT_CLIENT:
                 $sqlSelect = 'SELECT DISTINCT cr_lKeyID AS lForeignID
               FROM client_records
                  INNER JOIN groups_child  ON cr_lKeyID   = gc_lForeignID
                  INNER JOIN groups_parent ON gc_lGroupID = gp_lKeyID
               WHERE gp_enumGroupType=' . strPrepStr($enumContext) . '
                  AND gp_lKeyID IN (' . $strGroupList . ')
                  AND NOT cr_bRetired
               ORDER BY cr_strLName, cr_strFName, cr_lKeyID ' . $strLimit . ';';
                 break;
             case CENUM_CONTEXT_SPONSORSHIP:
                 $sqlSelect = 'SELECT DISTINCT sp_lKeyID AS lForeignID
               FROM sponsor
                  INNER JOIN groups_child  ON sp_lKeyID   = gc_lForeignID
                  INNER JOIN groups_parent ON gc_lGroupID = gp_lKeyID
                  INNER JOIN people_names  ON pe_lKeyID   = sp_lForeignID
               WHERE gp_enumGroupType=' . strPrepStr($enumContext) . '
                  AND gp_lKeyID IN (' . $strGroupList . ')
                  AND NOT pe_bRetired
                  AND NOT sp_bRetired
               ORDER BY pe_strLName, pe_strFName, pe_lKeyID ' . $strLimit . ';';
                 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;
         }
     } else {
         // member of all selected groups
         switch ($enumContext) {
             case CENUM_CONTEXT_BIZ:
             case CENUM_CONTEXT_PEOPLE:
                 $sqlSelect = 'SELECT pe_lKeyID AS lForeignID
               FROM people_names
                  INNER JOIN groups_child  ON pe_lKeyID=gc_lForeignID
                  INNER JOIN groups_parent ON gc_lGroupID=gp_lKeyID
               WHERE gp_enumGroupType=' . strPrepStr($enumContext) . '
                  AND gp_lKeyID IN (' . $strGroupList . ')
                  AND ' . ($enumContext == CENUM_CONTEXT_PEOPLE ? ' NOT ' : '') . 'pe_bBiz
                  AND NOT pe_bRetired
               GROUP BY pe_lKeyID
               HAVING COUNT(pe_lKeyID)=' . $lNumGroups . '
               ORDER BY pe_strLName, pe_strFName, pe_strMName, pe_lKeyID ' . $strLimit . ';';
                 break;
             case CENUM_CONTEXT_VOLUNTEER:
                 $sqlSelect = 'SELECT vol_lKeyID AS lForeignID
               FROM volunteers
                  INNER JOIN groups_child  ON vol_lKeyID  = gc_lForeignID
                  INNER JOIN groups_parent ON gc_lGroupID = gp_lKeyID
                  INNER JOIN people_names  ON pe_lKeyID   = vol_lPeopleID
               WHERE gp_enumGroupType=' . strPrepStr($enumContext) . '
                  AND gp_lKeyID IN (' . $strGroupList . ')
                  AND NOT pe_bRetired
                  AND NOT vol_bRetired
                  AND NOT vol_bInactive
               GROUP BY vol_lKeyID
               HAVING COUNT(vol_lKeyID)=' . $lNumGroups . '
               ORDER BY pe_strLName, pe_strFName, pe_strMName, pe_lKeyID ' . $strLimit . ';';
                 break;
             case CENUM_CONTEXT_SPONSORSHIP:
                 $sqlSelect = 'SELECT sp_lKeyID AS lForeignID
               FROM sponsor
                  INNER JOIN groups_child  ON sp_lKeyID   = gc_lForeignID
                  INNER JOIN groups_parent ON gc_lGroupID = gp_lKeyID
                  INNER JOIN people_names  ON pe_lKeyID   = sp_lForeignID
               WHERE gp_enumGroupType=' . strPrepStr($enumContext) . '
                  AND gp_lKeyID IN (' . $strGroupList . ')
                  AND NOT pe_bRetired
                  AND NOT sp_bRetired
               GROUP BY sp_lKeyID
               HAVING COUNT(sp_lKeyID)=' . $lNumGroups . '
               ORDER BY pe_strLName, pe_strFName, pe_strMName, pe_lKeyID ' . $strLimit . ';';
                 break;
             case CENUM_CONTEXT_CLIENT:
                 $sqlSelect = 'SELECT cr_lKeyID AS lForeignID
               FROM client_records
                  INNER JOIN groups_child  ON cr_lKeyID  = gc_lForeignID
                  INNER JOIN groups_parent ON gc_lGroupID=gp_lKeyID
               WHERE gp_enumGroupType=' . strPrepStr($enumContext) . '
                  AND gp_lKeyID IN (' . $strGroupList . ')
                  AND NOT cr_bRetired
               GROUP BY cr_lKeyID
               HAVING COUNT(cr_lKeyID)=' . $lNumGroups . '
               ORDER BY cr_strLName, cr_strFName, cr_lKeyID ' . $strLimit . ';';
                 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;
         }
     }
     $sqlStr = "INSERT INTO tmpGroupMatch\n            (gm_lForeignID)\n            {$sqlSelect};";
     $query = $this->db->query($sqlStr);
     $lNumRows = $this->db->affected_rows();
     if ($lNumRows == 0) {
         return $strOut . '<br><br><i>There are no records that match your search criteria.</i>';
     }
     if ($bReport) {
         if ($enumContext == CENUM_CONTEXT_CLIENT) {
             $strOut .= $this->strClientBasedGroupRptHTML();
         } else {
             $strOut .= $this->strPeopleBasedGroupRptHTML($enumContext);
         }
         return $strOut;
     } else {
         switch ($enumContext) {
             case CENUM_CONTEXT_PEOPLE:
                 $strExport = $this->strGroupRptExport_PeopleBiz(false, $strGroupsReviewed, $bShowAny);
                 break;
             case CENUM_CONTEXT_CLIENT:
                 $strExport = $this->strGroupRptExport_Client($strGroupsReviewed, $bShowAny);
                 break;
             case CENUM_CONTEXT_VOLUNTEER:
                 $strExport = $this->strGroupRptExport_Vol($strGroupsReviewed, $bShowAny);
                 break;
             case CENUM_CONTEXT_SPONSORSHIP:
                 $strExport = $this->strGroupRptExport_Sponsor($strGroupsReviewed, $bShowAny);
                 break;
             case CENUM_CONTEXT_BIZ:
                 $strExport = $this->strGroupRptExport_PeopleBiz(true, $strGroupsReviewed, $bShowAny);
                 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;
         }
         return $strExport;
     }
 }
function strRptBreadCrumb(&$sRpt)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    if ($sRpt->rptType == CENUM_REPORTTYPE_PREDEFINED) {
        switch ($sRpt->rptName) {
            case CENUM_REPORTNAME_GROUP:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_groups/showOpts/' . $sRpt->enumContext, strLabelViaContextType($sRpt->enumContext, true, false) . ' Groups', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_VOLJOBSKILL:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_job_skills/showOpts', 'Volunteer Skills', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_VOL_JOBCODE_YEAR:
            case CENUM_REPORTNAME_VOL_JOBCODE_MONTH:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_jobcodes/showOpts', 'Volunteer Job Codes', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_VOLHOURSTFSUM:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_hours/showOptsTFSum', 'Volunteer Summary by Time Frame', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_VOLHOURS:
            case CENUM_REPORTNAME_VOLHOURSDETAIL:
            case CENUM_REPORTNAME_VOLHOURSVIAVID:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_hours/showOpts', 'Volunteer Hours', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_VOL_HRS_MON:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_hours/showOptsYear', 'Volunteer Hours by Year', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_hours/yearRunY/' . $sRpt->lYear, 'Year ' . $sRpt->lYear, 'class="breadcrumb"') . ' | Monthly Details';
                break;
            case CENUM_REPORTNAME_VOL_HRS_SUM:
                if (is_null($sRpt->lMon)) {
                    $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_hours/showOptsYear', 'Volunteer Hours by Year', 'class="breadcrumb"') . ' | Yearly Summary';
                } else {
                    $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_hours/showOptsYear', 'Volunteer Hours by Year', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_hours/yearRunY/' . $sRpt->lYear, 'Year ' . $sRpt->lYear, 'class="breadcrumb"') . ' | Monthly Summary';
                }
                break;
            case CENUM_REPORTNAME_VOL_HRS_DETAIL:
                if (is_null($sRpt->lMon)) {
                    $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_hours/showOptsYear', 'Volunteer Hours by Year', 'class="breadcrumb"') . ' | Yearly Details';
                } else {
                    $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_hours/showOptsYear', 'Volunteer Hours by Year', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_hours/yearRunY/' . $sRpt->lYear, 'Year ' . $sRpt->lYear, 'class="breadcrumb"') . ' | Monthly Details';
                }
                break;
            case CENUM_REPORTNAME_VOLHRS_PVA:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_hours/showOptsPVA', 'Volunteer Hours - Scheduled vs. Actual', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_VOL_HRS_YEAR:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_hours/showOptsYear', 'Volunteer Hours by Year', 'class="breadcrumb"') . ' | Year ' . $sRpt->lYear;
                break;
            case CENUM_REPORTNAME_VOLHRSDETAIL_PVA:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_vol_hours/showOptsPVA', 'Volunteer Hours - Scheduled vs. Actual', 'class="breadcrumb"') . ' | Details';
                break;
            case CENUM_REPORTNAME_VOLHOURSCHEDULE:
                $strCrumb = anchor('main/menu/vols', 'Volunteers', 'class="breadcrumb"') . ' | ' . anchor('volunteers/vol_record/volRecordView/' . $sRpt->lVolID, 'Record', 'class="breadcrumb"') . ' | Volunteer Schedule';
                break;
            case CENUM_REPORTNAME_VOLEVENTSCHEDULE:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . 'Event Schedule';
                break;
            case CENUM_REPORTNAME_SPONPASTDUE:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_spon_past_due/showOpts', 'Sponsor Past Due Report', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_HONMEMGIFTLIST:
                $bHon = $sRpt->bHon;
                $strCrumb = anchor('main/menu/admin', 'Admin', 'class="breadcrumb"') . ' | ' . anchor('admin/alists/showLists', 'Lists', 'class="breadcrumb"') . ' | ' . anchor('admin/admin_special_lists/hon_mem/' . ($bHon ? 'honView' : 'memView'), $bHon ? 'Honorariums' : 'Memorials', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_GIFTACK:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_gift_ack/showOpts/' . $sRpt->enumAckType, 'Donation Acknowledgments', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_GIFTRECENT:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_gifts/recentOpts', 'Recent Donations', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_GIFTTIMEFRAME:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_gifts/timeframeOpts', 'Donations by Timeframe', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_GIFTACCOUNT:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_gifts/accountOpts', 'Donations by Account', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_GIFTCAMP:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_gifts/campOpts', 'Donations by Campaign', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_GIFTYEAREND:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_gifts/yearEndOpts', 'Year-End Donation Report', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_GIFTAGG:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_gifts/agOpts', 'Donation Aggregate Report', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_GIFTSPONAGG:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_gifts/agSponOpts', 'Sponsorship Payment Aggregate Report', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_SPONVIAPROG:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_spon_via_prog/showOpts', 'Sponsors Via Program', 'class="breadcrumb"');
                break;
            case CENUM_REPORTNAME_SPONVIALOCID:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | Sponsors Via Location';
                break;
            case CENUM_REPORTNAME_SPONWOCLIENT:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | Sponsors Without Clients';
                break;
            case CENUM_REPORTNAME_SPONINCOMEMONTH:
            case CENUM_REPORTNAME_SPONCHARGEMONTH:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_spon_income/showOpts', 'Sponsorship Income', 'class="breadcrumb"') . ' | Sponsors Income via Month';
                break;
            case CENUM_REPORTNAME_ADMINUSAGE:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | Admin | User Logins';
                break;
            case CENUM_REPORTNAME_ADMINUSERLOGIN:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | Admin | Login Log';
                break;
            case CENUM_REPORTNAME_ATTRIB:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_attrib/attrib', 'Attribute', 'class="breadcrumb"') . ' | Details';
                break;
            case CENUM_REPORTNAME_CLIENTAGE:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_clients/aggRptsLocAge', 'Client Aggregate Report', 'class="breadcrumb"') . ' | Client Age Details';
                break;
            case CENUM_REPORTNAME_CLIENTVIASTATUS:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_clients/aggRptsStatus/' . ($sRpt->bActive ? 'true' : 'false'), 'Client Aggregate Report', 'class="breadcrumb"') . ' | Clients Via Status';
                break;
            case CENUM_REPORTNAME_CLIENTVIASTATCAT:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_clients/aggRptsStatus/' . ($sRpt->bActive ? 'true' : 'false'), 'Client Aggregate Report', 'class="breadcrumb"') . ' | Client Via Status Category';
                break;
            case CENUM_REPORTNAME_CLIENTBDAY:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_clients/bDay', 'Client Birthdays', 'class="breadcrumb"') . ' | Birthday Report';
                break;
            case CENUM_REPORTNAME_DEPOSITLOG:
                $strCrumb = anchor('main/menu/financials', 'Financials', 'class="breadcrumb"') . ' | Deposit Log';
                break;
            case CENUM_REPORTNAME_CLIENT_PREPOST:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_client_pre_post/opts', 'Client Pre/Post Tests', 'class="breadcrumb"') . ' | Client Pre/Post Test Report';
                break;
            case CENUM_REPORTNAME_CLIENT_PREPOSTDIR:
                $strCrumb = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | ' . anchor('reports/pre_client_pre_post/dirViaTest', 'Client Pre/Post Test Directory', 'class="breadcrumb"') . ' | Client Pre/Post Test Directory';
                break;
            default:
                screamForHelp($sRpt->rptName . ': Unknow report type<br>error on line <b>-- ' . __LINE__ . ' --</b>,<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__);
                break;
        }
    } else {
        $strCrumb = 'TBD';
    }
    return $strCrumb;
}
Пример #8
0
function contextLabels($enumType, &$labels)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $labels = new stdClass();
    $labels->strType = $enumType;
    $labels->strTypeP = strLabelViaContextType($enumType, false, true);
    $labels->strTypeC = strLabelViaContextType($enumType, true, false);
    $labels->strTypePC = strLabelViaContextType($enumType, true, true);
    $labels->strTypeUC = strtoupper($enumType);
    $labels->strTypeUCP = strtoupper($labels->strTypeP);
}
<?php

if ($lNumGroupList <= 0) {
    echoT('<br><i>There are no ' . strLabelViaContextType($enumContext, false, false) . ' groups
             defined in your system. </i><br><br>');
} else {
    $attributes = array('name' => 'frmGroupRpt');
    echoT(form_open('reports/pre_groups/saveOpts/' . $enumContext, $attributes));
    echoT('<br><br>' . strHTMLSetClearAllButton(true, 'frmGroupRpt', 'chkGroup[]', 'Select All ') . '&nbsp;&nbsp;' . strHTMLSetClearAllButton(false, 'frmGroupRpt', 'chkGroup[]', 'Clear All') . '<br>');
    echoT('<div style="vertical-align: middle;">
                Find all the ' . strLabelViaContextType($enumContext, false, true) . ' who are members of <input type="radio" name="rdoAnyAll" value="any" checked><b>any</b>
                                    <input type="radio" name="rdoAnyAll" value="all" ><b>all</b>
                 of the selected groups:<br><br></div>');
    echoT('
         <div id="scrollCB" style="height:130px;   width:300px; overflow:auto;  border: 1px solid black;">' . "\n\n");
    echoT('<table class="enpRpt" style="width: 100%">');
    foreach ($groupList as $group) {
        $lGroupID = $group->lKeyID;
        echoT('
            <tr>
               <td class="enpRpt" style="width: 10px; vertical-align:top;">
                  <input type="checkbox" name="chkGroup[]" value="' . $lGroupID . '">
               </td>
               <td class="enpRpt" style="vertical-align:top; width: 180px;">' . htmlspecialchars($group->strGroupName) . '
               </td>
            </tr>');
    }
    echoT('</table></div><br>

             <input type="submit" name="cmdSubmit" value="Run Report"
                 style=""