function strLoadPostGiftRpt(&$viewOpts, $enumRptType) { //--------------------------------------------------------------------- // return reportID //--------------------------------------------------------------------- global $gbDateFormatUS; // if (!bTestForURLHack('showFinancials')) return; $this->load->model('reports/mreports', 'clsReports'); $reportAttributes = array('rptType' => CENUM_REPORTTYPE_PREDEFINED, 'rptName' => $enumRptType, 'rptDestination' => CENUM_REPORTDEST_SCREEN, 'lStartRec' => 0, 'lRecsPerPage' => 50, 'bShowRecNav' => $enumRptType != CENUM_REPORTNAME_GIFTAGG); if ($enumRptType == CENUM_REPORTNAME_GIFTAGG) { $reportAttributes['viewFile'] = 'pre_gift_agg_rpt_view'; } elseif ($enumRptType == CENUM_REPORTNAME_GIFTSPONAGG) { $reportAttributes['viewFile'] = 'pre_spon_pay_agg_rpt_view'; } else { $reportAttributes['viewFile'] = 'pre_generic_rpt_view'; } if ($viewOpts->bShowTimeFrame) { tf_getDateRanges($viewOpts, $formDates); $reportAttributes['dteStart'] = $formDates->dteStart; $reportAttributes['dteEnd'] = $formDates->dteEnd; $reportAttributes['strDateRange'] = $formDates->strDateRange; $reportAttributes['strBetween'] = $formDates->strBetween; } if ($viewOpts->bShowMinAmnt) { $reportAttributes['curMin'] = (double) trim($_POST['txtMinAmount']); } if ($viewOpts->bShowMaxAmnt) { $reportAttributes['curMax'] = (double) trim($_POST['txtMaxAmount']); } if ($viewOpts->bShowIncludes) { $reportAttributes['enumInc'] = trim($_POST['rdoInc']); } if ($viewOpts->bShowACO) { $reportAttributes['lACO'] = (int) $_POST['rdoACO']; } if ($viewOpts->bShowYear) { $reportAttributes['lYear'] = (int) $_POST['ddlYear']; } if ($viewOpts->bShowAggregateDonor) { $reportAttributes['bAggregateDonor'] = $_POST['rdoAggDonor'] == 'group'; } if ($viewOpts->bShowAcct) { $reportAttributes['lNumAccts'] = $lNumAccts = count($_POST['chkAccts']); $reportAttributes['acctIDs'] = array(); for ($idx = 0; $idx < $lNumAccts; ++$idx) { $reportAttributes['acctIDs'][$idx] = (int) $_POST['chkAccts'][$idx]; } } if ($viewOpts->bShowCamp) { $reportAttributes['lNumCamps'] = $lNumCamps = count($_POST['chkCamps']); $reportAttributes['campIDs'] = array(); for ($idx = 0; $idx < $lNumCamps; ++$idx) { $reportAttributes['campIDs'][$idx] = (int) $_POST['chkCamps'][$idx]; } } if ($viewOpts->bShowSortBy) { $enumSort = trim($_POST['rdoSort']); $reportAttributes['enumSort'] = $enumSort; } $this->clsReports->createReportSessionEntry($reportAttributes); return $this->clsReports->sRpt->reportID; }
function showOptsPVA() { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $gbDateFormatUS; $displayData = array(); $displayData['js'] = ''; //------------------------------------------------ // libraries and utilities //------------------------------------------------ $this->load->model('reports/mreports', 'clsReports'); $this->load->helper('dl_util/web_layout'); $this->load->helper('dl_util/time_date'); // time frame support $this->load->helper('reports/date_range_def'); $this->load->helper('reports/date_range'); $this->load->library('js_build/java_joe_radio'); $this->load->model('util/mserial_objects', 'cSO'); $displayData['js'] .= $this->java_joe_radio->insertJavaJoeRadio() . $this->java_joe_radio->insertSetDateRadio(); tf_initDateRangeMenu($displayData['viewOpts']); $displayData['viewOpts']->bShowAggregateDonor = true; $displayData['viewOpts']->strFormName = 'frmVHrsPVARpt'; $displayData['viewOpts']->strID = 'vhrsPVARpt'; // validation rules $this->form_validation->set_error_delimiters('<div class="formError">', '</div>'); $this->tf_setValidationTFRules($displayData['viewOpts']); $this->form_validation->set_rules('rdoSort', 'Sorting Option', 'trim|required'); if ($this->form_validation->run() == FALSE) { $this->load->library('generic_form'); if (validation_errors() == '') { $dteStart = strtotime('1/1/2000'); $dteEnd = time(); $displayData['bSortVol'] = true; $displayData['bSortPHrs'] = $displayData['bSortLHrs'] = false; if ($gbDateFormatUS) { $displayData['txtSDate'] = date('m/d/Y', $dteStart); $displayData['txtEDate'] = date('m/d/Y', $dteEnd); } else { $displayData['txtSDate'] = date('d/m/Y', $dteStart); $displayData['txtEDate'] = date('d/m/Y', $dteEnd); } } else { setOnFormError($displayData); $displayData['txtSDate'] = set_value('txtSDate'); $displayData['txtEDate'] = set_value('txtEDate'); $displayData['bSortVol'] = set_value('rdoSort') == 'vol'; $displayData['bSortPHrs'] = set_value('rdoSort') == 'phrs'; $displayData['bSortLHrs'] = set_value('rdoSort') == 'lhrs'; // time frame support $this->tf_setTFOptsOnFormError($displayData['viewOpts']); } // time frame support $displayData['dateRanges'] = $strRange = tf_strDateRangeMenu($displayData['viewOpts']); //-------------------------- // breadcrumbs //-------------------------- $displayData['pageTitle'] = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | Volunteer Hours - Scheduled vs. Actual'; $displayData['title'] = CS_PROGNAME . ' | Reports'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $displayData['mainTemplate'] = 'reports/pre_vol_hours_pva_view'; $this->load->vars($displayData); $this->load->view('template'); } else { /* $strSDate = trim($_POST['txtSDate']); MDY_ViaUserForm($strSDate, $lMon, $lDay, $lYear, $gbDateFormatUS); $dteStart = strtotime($lMon.'/'.$lDay.'/'.$lYear); $strEndDate = trim($_POST['txtEDate']); MDY_ViaUserForm($strEndDate, $lMon, $lDay, $lYear, $gbDateFormatUS); $dteEnd = strtotime($lMon.'/'.$lDay.'/'.$lYear.' 23:59:59'); */ tf_getDateRanges($displayData['viewOpts'], $formDates); $reportAttributes = array('rptType' => CENUM_REPORTTYPE_PREDEFINED, 'rptName' => CENUM_REPORTNAME_VOLHRS_PVA, 'rptDestination' => CENUM_REPORTDEST_SCREEN, 'lStartRec' => 0, 'lRecsPerPage' => 50, 'bShowRecNav' => true, 'viewFile' => 'pre_generic_rpt_view', 'bSortVol' => trim($_POST['rdoSort']) == 'vol', 'bSortPHrs' => trim($_POST['rdoSort']) == 'phrs', 'bSortLHrs' => trim($_POST['rdoSort']) == 'lhrs', 'dteStart' => $formDates->dteStart, 'dteEnd' => $formDates->dteEnd, 'strDateRange' => $formDates->strDateRange, 'strBetween' => $formDates->strBetween); $this->clsReports->createReportSessionEntry($reportAttributes); $reportID = $this->clsReports->sRpt->reportID; redirect('reports/reports/run/' . $reportID); } }
function strCProgEnrolleeRpt(&$viewOpts, $enumRptType) { //--------------------------------------------------------------------- // return reportID //--------------------------------------------------------------------- global $gbDateFormatUS; $this->load->model('reports/mreports', 'clsReports'); $reportAttributes = array('rptType' => CENUM_REPORTTYPE_PREDEFINED, 'rptName' => $enumRptType, 'rptDestination' => CENUM_REPORTDEST_SCREEN, 'cProgIDs' => arrayCopy($_POST['chkCProgs']), 'lStartRec' => 0, 'lRecsPerPage' => 50, 'bShowRecNav' => false); $reportAttributes['viewFile'] = 'pre_generic_rpt_view'; tf_getDateRanges($viewOpts, $formDates); $reportAttributes['dteStart'] = $formDates->dteStart; $reportAttributes['dteEnd'] = $formDates->dteEnd; $reportAttributes['strDateRange'] = $formDates->strDateRange; $reportAttributes['strBetween'] = $formDates->strBetween; $this->clsReports->createReportSessionEntry($reportAttributes); return $this->clsReports->sRpt->reportID; }
function lLoadPrePostTestRpt(&$viewOpts, $enumRptType) { //--------------------------------------------------------------------- // return reportID //--------------------------------------------------------------------- global $gbDateFormatUS; $this->load->model('reports/mreports', 'clsReports'); $reportAttributes = array('rptType' => CENUM_REPORTTYPE_PREDEFINED, 'rptName' => $enumRptType, 'rptDestination' => CENUM_REPORTDEST_SCREEN, 'lStartRec' => 0, 'lRecsPerPage' => 50, 'viewFile' => 'pre_generic_rpt_view', 'bShowRecNav' => false); tf_getDateRanges($viewOpts, $formDates); $reportAttributes['dteStart'] = $formDates->dteStart; $reportAttributes['dteEnd'] = $formDates->dteEnd; $reportAttributes['strDateRange'] = $formDates->strDateRange; $reportAttributes['strBetween'] = $formDates->strBetween; $reportAttributes['lPPTestID'] = (int) $_REQUEST['ddlTests']; $this->clsReports->createReportSessionEntry($reportAttributes); return $this->clsReports->sRpt->reportID; }
function strLoadPostStaffStatusRpt(&$viewOpts, $enumRptType) { //--------------------------------------------------------------------- // return reportID //--------------------------------------------------------------------- global $gbDateFormatUS; $this->load->model('reports/mreports', 'clsReports'); $reportAttributes = array('rptType' => CENUM_REPORTTYPE_PREDEFINED, 'rptName' => $enumRptType, 'rptDestination' => CENUM_REPORTDEST_SCREEN, 'lStaffGroup' => $_POST['ddlStaffGroup'], 'strSort' => trim($_POST['ddlSort']), 'lStartRec' => 0, 'lRecsPerPage' => 50, 'bShowRecNav' => false); $reportAttributes['viewFile'] = 'pre_generic_rpt_view'; if ($viewOpts->bShowTimeFrame) { tf_getDateRanges($viewOpts, $formDates); $reportAttributes['dteStart'] = $formDates->dteStart; $reportAttributes['dteEnd'] = $formDates->dteEnd; $reportAttributes['strDateRange'] = $formDates->strDateRange; $reportAttributes['strBetween'] = $formDates->strBetween; } $this->clsReports->createReportSessionEntry($reportAttributes); return $this->clsReports->sRpt->reportID; }
function showOpts($enumAckType) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $gdteNow, $gbDateFormatUS, $glChapterID; if (!bTestForURLHack('showFinancials')) { return; } $displayData = array(); $displayData['js'] = ''; $displayData['formData'] = new stdClass(); $displayData['enumAckType'] = $enumAckType; //------------------------------------------------ // libraries and utilities //------------------------------------------------ $this->load->model('reports/mreports', 'clsReports'); $this->load->helper('dl_util/web_layout'); $this->load->helper('dl_util/time_date'); $this->load->helper('dl_util/form_verification'); $this->load->model('admin/madmin_aco', 'clsACO'); $this->load->model('admin/morganization', 'clsChapter'); // time frame support $this->load->helper('reports/date_range_def'); $this->load->helper('reports/date_range'); $this->load->library('js_build/java_joe_radio'); $this->load->model('util/mserial_objects', 'cSO'); $displayData['js'] .= $this->java_joe_radio->insertJavaJoeRadio() . $this->java_joe_radio->insertSetDateRadio(); tf_initDateRangeMenu($displayData['viewOpts']); $displayData['viewOpts']->bShowAggregateDonor = true; $displayData['viewOpts']->strFormName = 'frmGiftAckRpt'; $displayData['viewOpts']->strID = 'giftAckRpt'; // validation rules $this->form_validation->set_error_delimiters('<div class="formError">', '</div>'); $this->tf_setValidationTFRules($displayData['viewOpts']); $this->form_validation->set_rules('rdoAck', 'Not Acknowledged'); $this->form_validation->set_rules('chkSpon', 'Include sponsorships'); $this->form_validation->set_rules('chkMarkAck', 'Mark as Acknowledged'); $this->form_validation->set_rules('rdoSort', 'Sort'); $this->form_validation->set_rules('rdoACO', 'Accounting Country'); if ($this->form_validation->run() == FALSE) { $this->load->library('generic_form'); switch ($enumAckType) { case 'gifts': $strLabel = 'Donations'; break; case 'hon': $strLabel = 'Honorarium Recipient'; break; case 'mem': $strLabel = 'Memorial Mail Contact'; break; default: screamForHelp($enumAckType . ': ack type error<br>error on line <b>' . __LINE__ . '</b>,<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__); break; } $displayData['strLabel'] = $strLabel; if (validation_errors() == '') { $this->clsChapter->lChapterID = $glChapterID; $this->clsChapter->loadChapterInfo(); $displayData['formData']->strACORadio = $this->clsACO->strACO_Radios($this->clsChapter->chapterRec->lDefaultACO, 'rdoACO'); $displayData['bNotAck'] = true; $displayData['bIncludeSpon'] = false; $displayData['bMarkAck'] = false; $displayData['enumSort'] = 'date'; $dteStart = strtotime('1/1/2000'); $dteEnd = $gdteNow; if ($gbDateFormatUS) { $displayData['txtSDate'] = date('m/d/Y', $dteStart); $displayData['txtEDate'] = date('m/d/Y', $dteEnd); } else { $displayData['txtSDate'] = date('d/m/Y', $dteStart); $displayData['txtEDate'] = date('d/m/Y', $dteEnd); } } else { setOnFormError($displayData); $displayData['bNotAck'] = set_value('rdoAck') == 'notAck'; $displayData['bIncludeSpon'] = set_value('chkSpon') == 'true'; $displayData['bMarkAck'] = set_value('chkMarkAck') == 'true'; $displayData['enumSort'] = set_value('rdoSort'); $displayData['txtSDate'] = set_value('txtSDate'); $displayData['txtEDate'] = set_value('txtEDate'); $displayData['formData']->strACORadio = $this->clsACO->strACO_Radios(set_value('rdoACO'), 'rdoACO'); // time frame support $this->tf_setTFOptsOnFormError($displayData['viewOpts']); } // time frame support $displayData['dateRanges'] = $strRange = tf_strDateRangeMenu($displayData['viewOpts']); //-------------------------- // breadcrumbs //-------------------------- $displayData['pageTitle'] = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | Donation Acknowledgments'; $displayData['title'] = CS_PROGNAME . ' | Reports'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $displayData['mainTemplate'] = 'reports/pre_gift_ack_view'; $this->load->vars($displayData); $this->load->view('template'); } else { $bFindNonAck = $_POST['rdoAck'] == 'notAck'; $bIncludeSpon = @$_POST['chkSpon'] == 'true'; $bMarkAsAck = @$_POST['chkMarkAck'] == 'true'; $enumSort = trim($_POST['rdoSort']); $lACO = (int) $_POST['rdoACO']; tf_getDateRanges($displayData['viewOpts'], $formDates); $reportAttributes = array('rptType' => CENUM_REPORTTYPE_PREDEFINED, 'rptName' => CENUM_REPORTNAME_GIFTACK, 'rptDestination' => CENUM_REPORTDEST_SCREEN, 'lStartRec' => 0, 'lRecsPerPage' => 50, 'bShowRecNav' => true, 'viewFile' => 'pre_generic_rpt_view', 'bFindNonAck' => $bFindNonAck, 'bIncludeSpon' => $bIncludeSpon, 'bMarkAsAck' => $bMarkAsAck, 'enumSort' => $enumSort, 'enumAckType' => $enumAckType, 'lACO' => $lACO, 'dteStart' => $formDates->dteStart, 'dteEnd' => $formDates->dteEnd, 'strDateRange' => $formDates->strDateRange, 'strBetween' => $formDates->strBetween); $this->clsReports->createReportSessionEntry($reportAttributes); $reportID = $this->clsReports->sRpt->reportID; if ($bMarkAsAck) { switch ($enumAckType) { case 'gifts': $strLabel = 'gifts'; break; case 'hon': $strLabel = 'honorees'; break; case 'mem': $strLabel = 'memorial mail contacts'; break; } $this->clsReports->sRpt->strExportLabel = 'Export / mark ' . $strLabel . ' as acknowledged'; } redirect('reports/reports/run/' . $reportID); } }