function mgrViewLog($lUserID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $this->load->helper('dl_util/verify_id'); verifyID($this, $lUserID, 'user ID'); $lUserID = (int) $lUserID; $displayData = array(); $displayData['js'] = ''; $this->load->helper('dl_util/permissions'); // in autoload if (!bAllowAccess('management')) { return ''; } $displayData['lUserID'] = $lUserID = (int) $lUserID; //------------------------------------- // models, libraries, and helpers //------------------------------------- $this->load->model('staff/mstaff_status', 'cstat'); $this->load->model('admin/muser_accts', 'clsUser'); $this->load->model('admin/mpermissions', 'perms'); $this->load->helper('dl_util/web_layout'); $this->load->helper('staff/link_staff'); $this->load->helper('staff/status_report'); // load the current user's record $this->clsUser->loadSingleUserRecord($lUserID); $displayData['uRec'] = $uRec =& $this->clsUser->userRec[0]; $this->cstat->loadStatusReportViaUserID($lUserID); $displayData['lNumSReports'] = $lNumSReports = $this->cstat->lNumSReports; $displayData['sreports'] = $sreports =& $this->cstat->sreports; // $displayData['bReviewedByTheMan'] = false; // load the reviews for this status report if ($lNumSReports > 0) { foreach ($sreports as $srpt) { $lRptID = $srpt->lKeyID; $srpt->bReviewedByTheMan = false; $this->cstat->loadReviewsViaRptID($lRptID, $srpt->lNumReviews, $srpt->reviewLog); if ($srpt->lNumReviews > 0) { foreach ($srpt->reviewLog as $rlog) { if ($rlog->lReviewerID == $lUserID) { $srpt->bReviewedByTheMan = true; break; } } } } } //-------------------------- // breadcrumbs //-------------------------- $displayData['pageTitle'] = anchor('aayhf/main/aayhfMenu', 'AAYHF', 'class="breadcrumb"') . ' | ' . anchor('staff/mgr_performance/review', 'Status Report Review', 'class="breadcrumb"') . ' | Status Log for ' . $uRec->strSafeName; $displayData['title'] = CS_PROGNAME . ' | Status Report Review'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $displayData['mainTemplate'] = 'aayhf/aayhf_staff/mgr_status_staff_log_view'; $this->load->vars($displayData); $this->load->view('template'); }
function viewTS($lTSLogID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $glUserID; $displayData = array(); $displayData['js'] = ''; $displayData['lTSLogID'] = $lTSLogID = (int) $lTSLogID; //------------------------- // models & helpers //------------------------- $this->load->helper('staff/link_staff'); $this->load->helper('dl_util/web_layout'); $this->load->model('staff/mtime_sheets', 'cts'); $this->load->helper('staff/timesheet'); $this->load->helper('dl_util/time_date'); $params = array('enumStyle' => 'enpRptC'); $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; $this->cts->loadUserTSLogByLogID($lTSLogID, $lNumLogRecs, $logRecs, true); if ($lNumLogRecs == 0) { redirect('staff/timesheets/ts_log_edit/error_tst_access'); } $displayData['logRec'] = $logRec =& $logRecs[0]; $lUserID = $logRec->lStaffID; $lTSTemplateID = $logRec->lTimeSheetID; // if time sheet is being edited by a 3rd party, make sure they are authorized if ($glUserID != $lUserID) { if (!bAllowAccess('timeSheetAdmin')) { // if (!$this->cts->bIsUserAuthorizedToViewEdit($lTSTID, $glUserID)){ redirect('staff/timesheets/ts_log_edit/error_tst_access'); } } $displayData['lUserID'] = $lUserID; // load project assignments for this time sheet $this->cts->projectsViaLogID($lTSLogID, $displayData['lNumProjects'], $displayData['projects']); //-------------------------- // breadcrumbs //-------------------------- $displayData['pageTitle'] = anchor('main/menu/more', 'More', 'class="breadcrumb"') . ' | ' . anchor('staff/timesheets/ts_log/viewLog', 'Time Sheet Log', 'class="breadcrumb"') . ' | View Time Sheet'; $displayData['title'] = CS_PROGNAME . ' | Staff'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $displayData['mainTemplate'] = 'staff/timesheets/view_timesheet_view'; $this->load->vars($displayData); $this->load->view('template'); }
function initClientReportDisplay(&$displayData) { $displayData['showFields'] = new stdClass(); $displayData['showFields']->bLocationDDL = false; $displayData['showFields']->bClientID = true; $displayData['showFields']->bRemClient = true; $displayData['showFields']->bName = true; $displayData['showFields']->bAgeGender = true; $displayData['showFields']->bLocation = true; $displayData['showFields']->bStatus = true; $displayData['showFields']->bSponsors = bAllowAccess('showSponsors'); }
function viewUsers() { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- // $this->load->helper('dl_util/permissions'); // in autoload if (!bAllowAccess('timeSheetAdmin')) { redirect('staff/timesheets/ts_log_edit/error_tst_access'); } $displayData = array(); $displayData['js'] = ''; //------------------------- // models & helpers //------------------------- $this->load->helper('staff/link_staff'); $this->load->helper('dl_util/web_layout'); $this->load->model('staff/mtime_sheets', 'cts'); $this->load->helper('staff/timesheet'); $this->load->helper('staff/link_staff'); $this->load->helper('dl_util/time_date'); //-------------------------- // Stripes //-------------------------- $this->load->model('util/mbuild_on_ready', 'clsOnReady'); $this->clsOnReady->addOnReadyTableStripes(); $this->clsOnReady->closeOnReady(); $displayData['js'] .= $this->clsOnReady->strOnReady; $this->cts->loadMappedUsers($lNumUsers, $users); if ($lNumUsers > 0) { foreach ($users as $user) { $lUserID = $user->lStaffID; $user->lNumSubmitted = $this->cts->lNumSubUnSubTSViaUserID(true, $lUserID); $user->lNumNotSubmitted = $this->cts->lNumSubUnSubTSViaUserID(false, $lUserID); } } $displayData['lNumUsers'] = $lNumUsers; $displayData['users'] =& $users; /*/ ------------------------------------- echo('<font class="debug">'.substr(__FILE__, strrpos(__FILE__, '\\')) .': '.__LINE__.'<br>$users <pre>'); echo(htmlspecialchars( print_r($users, true))); echo('</pre></font><br>'); // ------------------------------------- */ //-------------------------- // breadcrumbs //-------------------------- $displayData['pageTitle'] = anchor('main/menu/more', 'More', 'class="breadcrumb"') . ' | Time Sheet Administration'; $displayData['title'] = CS_PROGNAME . ' | Staff'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $displayData['mainTemplate'] = 'staff/timesheets/ts_admin_users_view'; $this->load->vars($displayData); $this->load->view('template'); }
function initPeopleReportDisplay(&$displayData) { $displayData['showFields'] = new stdClass(); $displayData['showFields']->bPeopleID = true; $displayData['showFields']->bRemPeople = bAllowAccess('editPeopleBizVol'); $displayData['showFields']->bName = true; $displayData['showFields']->bAddress = true; $displayData['showFields']->bPhoneEmail = true; $displayData['showFields']->bGiftSummary = bAllowAccess('showFinancials'); $displayData['showFields']->bSponsor = bAllowAccess('showSponsors'); $displayData['showFields']->bImportID = false; $displayData['showFields']->deleteReturnPath = null; $displayData['showFields']->lReturnPathID = null; }
function initBizReportDisplay(&$displayData) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $displayData['showFields'] = new stdClass(); $displayData['showFields']->bBizID = true; $displayData['showFields']->bRemBiz = true; $displayData['showFields']->bName = true; $displayData['showFields']->bAddress = true; $displayData['showFields']->bPhoneEmail = true; $displayData['showFields']->bGiftSummary = bAllowAccess('showGiftHistory'); $displayData['showFields']->bSponsor = bAllowAccess('showSponsors'); $displayData['showFields']->bContacts = true; $displayData['showFields']->bContactNames = false; $displayData['showFields']->bImportID = false; $displayData['showFields']->deleteReturnPath = null; $displayData['showFields']->lReturnPathID = null; }
function strStatReviewTable($lSRptID, &$srpt) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $glUserID, $genumDateFormat; if (!$srpt->bPublished) { return '<i>n/a</i>'; } $bReviewedByUser = false; $strOut = ''; if ($srpt->lNumReviews == 0) { $strOut .= '<i>No reviews for this weekly report.</i><br>'; } else { foreach ($srpt->reviewLog as $review) { $lReviewID = $review->lKeyID; $lReviewerID = $review->lReviewerID; $bIAmTheMan = $glUserID == $lReviewerID; if ($bIAmTheMan) { $bReviewedByUser = true; } if ($review->bReviewed) { $strOut .= strLinkView_StaffReviewedRpt($lSRptID, $lReviewID, 'View review', true) . ' ' . 'reviewed by ' . $review->strReviewerSafeName . ' on ' . date('l, ' . $genumDateFormat, $review->dteReviewed) . '<br>'; } else { if ($bIAmTheMan) { $strOut .= strLinkEdit_StaffStatReview($lSRptID, $lReviewID, 'Edit the review draft', true) . ' '; } $strOut .= 'Draft saved by ' . $review->strReviewerSafeName . ' on ' . date('l, ' . $genumDateFormat, $review->dteLastUpdate) . '<br>'; } } $strOut .= strLinkView_StaffReviewedRpt($lSRptID, -1, 'View all reviews', true) . ' ' . strLinkView_StaffReviewedRpt($lSRptID, -1, 'View all reviews', false) . '<br>'; } if (!$bReviewedByUser && bAllowAccess('management')) { $strOut .= '<span style="background-color: #e1def6; color: red;">'; $strOut .= strLinkAdd_StaffStatReview($lSRptID, 'Add a review to weekly report', true) . ' ' . strLinkAdd_StaffStatReview($lSRptID, 'Add a review to weekly report', false, ' style="font-weight: bold; color: #5c48f4;" ') . '</span><br>' . "\n"; } return $strOut; }
<?php if (!bAllowAccess('adminOnly')) { return ''; } echoT('<br>' . strLinkAdd_TimeSheetProject('Add time sheet project', true) . ' ' . strLinkAdd_TimeSheetProject('Add time sheet project', false) . '<br>'); if ($lNumProjects <= 0) { echoT('<br><i>There are no time sheet projects defined in your database.</i><br><br>'); return; } openTSProjectsTable(); foreach ($projects as $proj) { writeProjectRow($proj); } closeTSProjectsTable(); function writeProjectRow($proj) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $lProjectID = $proj->lKeyID; echoT(' <tr class="makeStripe"> <td class="enpRpt" style="width: 50pt; text-align: center;">' . strLinkEdit_TimeSheetProject($lProjectID, 'Edit project', true) . ' ' . str_pad($lProjectID, 5, '0', STR_PAD_LEFT) . ' </td> <td class="enpRpt" style="width: 20pt; text-align: center;">' . strLinkRem_TimeSheetProject($lProjectID, 'Remove project', true, true) . ' </td> <td class="enpRpt" style="width: 200pt;">' . htmlspecialchars($proj->strProjectName) . ' </td> <td class="enpRpt" style="text-align: center;">' . ($proj->bInternalProject ? 'Yes' : 'No') . ' </td>
function viewRec($lSReportID, $lReviewID = 0) { //------------------------------------------------------------------------ // if $lReviewID == -1, load all reviews //------------------------------------------------------------------------ global $glUserID, $gdteNow; /*---------------------------- echo(__FILE__.' '.__LINE__.'<br>'."\n"); $this->output->enable_profiler(TRUE); //----------------------------- */ if (!bTestForURLHack('notVolunteer')) { return; } $displayData = array(); $displayData['js'] = ''; $displayData['lSReportID'] = $lSReportID = (int) $lSReportID; $displayData['lReviewID'] = $lReviewID = (int) $lReviewID; $displayData['bAddReview'] = $bAddReview = $lReviewID != 0; //------------------------------------- // models, libraries, and helpers //------------------------------------- $this->load->model('staff/mstaff_status', 'cstat'); $params = array('enumStyle' => 'terse'); $this->load->library('generic_rpt', $params); $this->load->helper('staff/status_report'); $this->load->helper('dl_util/web_layout'); $this->load->helper('staff/link_staff'); // load the status report $this->cstat->loadStatusReportViaRptID($lSReportID); $displayData['sreport'] = $sreport =& $this->cstat->sreports[0]; // if tagged with a review, load the review if ($bAddReview) { if ($lReviewID == -1) { $this->cstat->loadReviewsViaRptID($lSReportID, $displayData['lNumReviews'], $displayData['reviews']); } else { $this->cstat->loadReviewsViaReviewID($lReviewID, $displayData['lNumReviews'], $displayData['reviews']); } } $this->load->helper('js/div_hide_show'); $displayData['js'] .= showHideDiv(); $bAsTheMan = false; if ($glUserID != $sreport->lUserID) { if (!bAllowAccess('management')) { return; } $bAsTheMan = true; } $displayData['bAsTheMan'] = $bAsTheMan; //-------------------------- // breadcrumbs //-------------------------- if ($bAsTheMan) { $displayData['pageTitle'] = anchor('aayhf/main/aayhfMenu', 'AAYHF', 'class="breadcrumb"') . ' | ' . anchor('staff/mgr_performance/review', 'Status Report Review', 'class="breadcrumb"') . ' | ' . anchor('staff/mgr_performance/mgrViewLog/' . $sreport->lUserID, 'Status Log for ' . $sreport->strRptSafeName, 'class="breadcrumb"') . ' | Status Record'; } else { $displayData['pageTitle'] = anchor('aayhf/main/aayhfMenu', 'AAYHF', 'class="breadcrumb"') . ' | ' . anchor('staff/performance/log', 'Status Report Log', 'class="breadcrumb"') . ' | Status Record'; } $displayData['title'] = CS_PROGNAME . ' | Status Report'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $displayData['mainTemplate'] = 'aayhf/aayhf_staff/status_record_view'; $this->load->vars($displayData); $this->load->view('template'); }
function writeTSEntryRow(&$attributes, &$lMonthGroup, $logRec) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; $lMon = (int) date('n', $logRec->dteTSEntry); $lTSLogID = $logRec->lKeyID; $bPublished = !is_null($logRec->dteSubmitted); $dteStarting = $logRec->dteTSEntry; if ($lMonthGroup != $lMon) { if ($lMonthGroup > 0) { echoT('</table>' . "\n"); $attributes->bCloseDiv = true; closeBlock($attributes); $attributes->bCloseDiv = false; } $attributes->divID = 'month' . $lMon . 'Div'; $attributes->divImageID = 'month' . $lMon . 'DivImg'; $attributes->bStartOpen = true; openBlock(date('F Y', $logRec->dteTSEntry), '', $attributes); echoT('<table style="border: 1px solid black;"> <tr> <td style="width: 50pt; color: #fff; background-color: #888;"> <b>entryID</b> </td> <td style="width: 50pt; color: #fff; background-color: #888;"> <b>Submitted?</b> </td> <td style="width: 200pt; color: #fff; background-color: #888;"> <b>Time Frame</b> </td> <td style="width: 150pt; color: #fff; background-color: #888;"> <b>Template</b> </td> <td style="width: 80pt; color: #fff; background-color: #888;"> <b>Reporting Period</b> </td> <td style="width: 50pt; color: #fff; background-color: #888;"> <b>Total Hours</b> </td> </tr>' . "\n"); $lMonthGroup = $lMon; } echoT('<tr class="makeStripe"> <td style="width: 50pt; text-align: center; vertical-align: top;">' . strLinkView_TSLogEntries($lTSLogID, 'View Time Sheet', true) . ' ' . str_pad($lTSLogID, 5, '0', STR_PAD_LEFT) . ' </td>'); if ($bPublished) { if (bAllowAccess('timeSheetAdmin')) { $strUnsubmit = '<br>' . strLink_TSLogEntryUnsubmit($lTSLogID, 'Unsubmit', true) . ' ' . strLink_TSLogEntryUnsubmit($lTSLogID, 'Unsubmit', false); } else { $strUnsubmit = ''; } echoT(' <td style="width: 80pt; text-align: center; center; vertical-align: top;">Yes: ' . date($genumDateFormat, $logRec->dteSubmitted) . $strUnsubmit . ' </td>'); } else { echoT(' <td style="width: 80pt; text-align: center; center; vertical-align: top;">' . strLinkEdit_TSLog($lTSLogID, 'Edit Time Sheet', true) . ' No </td>'); } echoT(' <td style="width: 50pt; text-align: left; center; vertical-align: top;"> <font style="font-size: 8pt;">Week beginning: </font>' . date('l, F jS, Y', $dteStarting) . ' </td>'); echoT(' <td style="width: 150pt; center; vertical-align: top;">' . htmlspecialchars($logRec->strTSName) . ' </td>'); echoT(' <td style="width: 80pt; center; vertical-align: top;">' . $logRec->enumRptPeriod . ' </td>'); echoT(' <td style="width: 50pt; text-align: right; padding-right: 3pt; center; vertical-align: top;">' . strDurationViaMinutes($logRec->lCumulativeMinutes) . ' </td> </tr>'); }
<li>' . anchor('reports/pre_vol_hours/showOpts', 'Volunteer Hours (Scheduled)') . '</li> <li>' . anchor('reports/pre_vol_hours/showOptsPVA', 'Volunteer Hours - Scheduled vs. Actual') . '</li> <li>' . anchor('reports/pre_vol_schedule/past', 'Past Events') . '</li> <li>' . anchor('reports/pre_vol_schedule/current', 'Current and Future Events') . '</li> <li>' . anchor('reports/pre_vol_jobcodes/showOpts', 'Job Codes', 'id="viewrpts_vol_jcode"') . '</li> </ul> </ul>'); } //--------------------- // Miscellaneous //--------------------- echoT('<ul style="margin-top: 4pt;"> <li><b>Miscellaneous</b></li> <ul> <li>' . anchor('reports/pre_attrib/attrib', 'Attributed To') . '</li> <li>' . anchor('reports/pre_log_search/searchOpts', 'Log Search') . '</li> <li>' . anchor('reports/pre_data_entry/daOpts', 'Data Entry Log') . '</li> </ul> </ul>'); echoT('</ul>'); //----------------- // exports //----------------- if (bAllowAccess('allowExports')) { echoT('<b><u>Exports</u></b> <ul style="margin-top: 4pt;"> <li>' . anchor('reports/exports/showTableOpts', 'Exports') . ' </li> </ul>'); } }
function strLinkView_GrantProvider($lProviderID, $strTitle, $bShowIcon, $strAnchorExtra = '') { //--------------------------------------------------------------- // //--------------------------------------------------------------- if (!bAllowAccess('showGrants')) { return ''; } return strImageLink('grants/provider_record/viewProvider/' . $lProviderID, $strAnchorExtra, $bShowIcon, !$bShowIcon, IMGLINK_VIEW, $strTitle); }
} $strSearchIn .= ' <input type="checkbox" name="chkLogs[]" value="docsImages" ' . ($bCheckedLog->docsImages ? 'checked' : '') . '>Document and Image descriptions<br>' . "\n"; if (bAllowAccess('showFinancials')) { $strSearchIn .= ' <input type="checkbox" name="chkLogs[]" value="giftNotes" ' . ($bCheckedLog->giftNotes ? 'checked' : '') . '>Donation notes<br> '; } /* ------------------------------------- echo('<font class="debug">'.substr(__FILE__, strrpos(__FILE__, '\\')) .': '.__LINE__.'<br>$pTabs <pre>'); echo(htmlspecialchars( print_r($pTabs, true))); echo('</pre></font><br>'); // ------------------------------------- */ foreach ($pTabs as $pTab) { $enumTType = $pTab->enumTType; if (bAllowAccess('showImagesDocs', $enumTType)) { $strLabel = 'Personalized ' . $pTab->strTTypeLabel . ' tables'; $lNumLF = $pTab->lNumLogFields; if ($lNumLF == 0) { $strCount = '(no log fields)'; } elseif ($lNumLF == 1) { $strCount = '(one log field)'; } else { $strCount = '(' . $lNumLF . ' log fields)'; } $strSearchIn .= ($lNumLF == 0 ? '<i><font style="color: #999;">' : '') . '<input type="checkbox" name="chkLogs[]" value="' . $enumTType . '" ' . ($lNumLF == 0 ? ' disabled="disabled" ' : '') . ' ' . ($bCheckedLog->{$enumTType} ? 'checked' : '') . '>' . $strLabel . ' ' . $strCount . ($lNumLF == 0 ? '</i></font>' : '') . '<br>'; if ($lNumLF == 0) { } else { } } }
function strLinkSpecial_XferUField($lTableID, $lFieldID, $strTitle, $bShowIcon, $strAnchorExtra = '') { //--------------------------------------------------------------- // //--------------------------------------------------------------- if (!bAllowAccess('adminOnly')) { return ''; } return strImageLink('admin/uf_fields/xfer1/' . $lTableID . '/' . $lFieldID, $strAnchorExtra, $bShowIcon, !$bShowIcon, IMGLINK_XFER, $strTitle); }
function showGifts($lFID, $bBiz, $strCumGiftsNonSoftMon, $strCumGiftsNonSoftInKind, $strCumGiftsSoft, $strCumSpon, $lNumPledges, $lTotHard, $lTotSoft, $lTotInKind, $lNumSponPay) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $gstrCurrency; $attributes = new stdClass(); $attributes->lTableWidth = 900; $attributes->divID = 'giftSumDiv'; $attributes->divImageID = 'giftSumDivImg'; $attributes->bStartOpen = false; openBlock('Donations <span style="font-size: 9pt;">(' . $lTotHard . ' hard / ' . $lTotSoft . ' soft / ' . $lTotInKind . ' in-kind / ' . $lNumSponPay . ' spon pay)</span><br>', strLinkView_GiftsHistory($lFID, 'Gift history', true) . ' ' . strLinkView_GiftsHistory($lFID, 'Gift history', false) . ' ' . strLinkAdd_Gift($lFID, 'New donation', true) . ' ' . strLinkAdd_Gift($lFID, 'New donation', false) . ' ' . strLinkAdd_Pledge($lFID, 'New pledge', true) . ' ' . strLinkAdd_Pledge($lFID, 'New pledge', false), $attributes); if (bAllowAccess('showGiftHistory')) { echoT(' <table border="0"> <tr> <td class="enpView" style="width: 120pt;"> Total Monetary Gifts: </td> <td class="enpView" style="text-align: right; vertical-align: top; width: 70pt;" nowrap>' . $gstrCurrency . $strCumGiftsNonSoftMon . ' </td> <td class="enpView"> </td> </tr>'); echoT(' <tr> <td class="enpView"> Total In-Kind Gifts: </td> <td class="enpView" style="text-align: right;">' . $gstrCurrency . ' ' . $strCumGiftsNonSoftInKind . ' </td> <td class="enpView"> </td> </tr>'); echoT(' <tr> <td class="enpView"> Sponsorship Payments:<br> <i>included in monetary gifts</i> </td> <td class="enpView" style="text-align: right;">' . $gstrCurrency . ' ' . $strCumSpon . ' </td> <td class="enpView"> </td> </tr>'); echoT(' <tr> <td class="enpView"> Total Soft Donations: </td> <td class="enpView" style="text-align: right;">' . $gstrCurrency . ' ' . $strCumGiftsSoft . ' </td> <td class="enpView"> </td> </tr>'); if ($lNumPledges > 0) { $strLinkPledges = strLinkView_PledgeViaFID($lFID, 'View pledges', true); } else { $strLinkPledges = ''; } echoT(' <tr> <td class="enpView"> Pledges: </td> <td class="enpView" style="text-align: center;">' . $lNumPledges . ' ' . $strLinkPledges . ' </td> <td class="enpView"> </td> </tr>'); echoT(' </table>'); } $attributes = new stdClass(); $attributes->bCloseDiv = true; closeBlock($attributes); }
function logViaUserID($lUserID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $gbAdmin, $glUserID; $this->load->helper('dl_util/verify_id'); verifyID($this, $lUserID, 'user ID'); $lUserID = (int) $lUserID; $displayData = array(); $displayData['js'] = ''; // defense against the dark arts if (!$gbAdmin && $lUserID != $glUserID) { if (!bAllowAccess('management')) { $this->session->set_flashdata('error', '<b>ERROR:</b> User ID is not valid.</font>'); redirect('main/menu/home'); } } $displayData['bSelfSame'] = $lUserID == $glUserID; //------------------------- // models & helpers //------------------------- $this->load->model('staff/mstaff_status', 'cstat'); $this->load->model('admin/muser_accts', 'clsUser'); $this->load->model('admin/mpermissions', 'perms'); $this->load->helper('staff/link_staff'); $this->load->helper('staff/status_report'); //-------------------------- // Stripes //-------------------------- $this->load->model('util/mbuild_on_ready', 'clsOnReady'); $this->clsOnReady->addOnReadyTableStripes(); $this->clsOnReady->closeOnReady(); $displayData['js'] .= $this->clsOnReady->strOnReady; // load the status report history $this->cstat->loadStatusReportViaUserID($lUserID); $displayData['lNumSReports'] = $lNumSReports = $this->cstat->lNumSReports; $displayData['sreports'] = $sreports =& $this->cstat->sreports; // load the reviews if ($lNumSReports > 0) { foreach ($sreports as $srpt) { $lSReportID = $srpt->lKeyID; $this->cstat->loadReviewsViaRptID($lSReportID, $srpt->lNumReviews, $srpt->reviewLog); } } $this->clsUser->loadSingleUserRecord($lUserID); $displayData['uRec'] =& $this->clsUser->userRec[0]; //-------------------------- // breadcrumbs //-------------------------- $displayData['pageTitle'] = anchor('aayhf/main/aayhfMenu', 'AAYHF', 'class="breadcrumb"') . ' | Weekly Report Log'; $displayData['title'] = CS_PROGNAME . ' | Weekly Report'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $displayData['mainTemplate'] = 'aayhf/aayhf_staff/status_log_view'; $this->load->vars($displayData); $this->load->view('template'); }
if ($lNumCustomForms > 0) { showCustomForms($lCID, $cForms); } // client programs if ($lNumCProgs > 0) { showClientPrograms($lCID, $lNumCProgs, $cProgs); } // pre/post tests if ($lTotTests > 0) { showPrePostTests($lCID, $ppcats); } closeClientServices(); // personalized tables showCustomClientTableInfo($strPT, $lNumPTablesAvail); // sponsorship if (bAllowAccess('showSponsors')) { showClientSponsorInfo($clsRpt, $lCID, $clsClient); } showClientStatusInfo($clsRpt, $lCID, $clsClient, $clientStatus, $lNumClientStatus); showGroupInfo($lCID, $client->strSafeName, $lNumGroups, $groupList, $inGroups, $lCntGroupMembership, CENUM_CONTEXT_CLIENT, 'cRecView'); if ($bShowEMR) { showClientMedicalInfo($clsRpt, $lCID, $clsClient, $emr); } showImageInfo(CENUM_CONTEXT_CLIENT, $lCID, $client->cv_strVocClientS . ' Images', $images, $lNumImages, $lNumImagesTot); showDocumentInfo(CENUM_CONTEXT_CLIENT, $lCID, $client->cv_strVocClientS . ' Documents', $docs, $lNumDocs, $lNumDocsTot); // showReminderBlock ($clsRem, $lCID, CENUM_CONTEXT_CLIENT); showClientXfers($clsRpt, $lCID, $clientXfers, $lNumClientXfers); showClientENPStats($clsRpt, $client); function openClientServices() { //---------------------------------------------------------------------
function editVolSkillsUpdate($lVolID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $glUserID, $gbDev, $gbVolLogin, $gVolPerms, $glVolPeopleID; $this->load->model('vols/mvol_skills', 'clsVolSkills'); if (!(bAllowAccess('dataEntryPeopleBizVol') || bAllowAccess('volJobSkills'))) { bTestForURLHack('forceFail'); return; } if ($gbVolLogin) { $this->load->model('vols/mvol', 'clsVol'); $this->load->model('people/mpeople', 'clsPeople'); $this->clsVol->loadVolRecsViaPeopleID($glVolPeopleID, true); $lVolID = $this->clsVol->volRecs[0]->lKeyID; } $lVolID = (int) $lVolID; $this->clsVolSkills->lVolID = $lVolID; $this->clsVolSkills->clearVolSkills(); if (count($_REQUEST['chkSkill']) > 0) { foreach ($_REQUEST['chkSkill'] as $lSkillID) { $this->clsVolSkills->setVolSkill((int) $lSkillID); } } if ($gbVolLogin) { $this->session->set_flashdata('msg', 'Thank you for updating your volunteer skills!'); redirect('vol_reg/job_skills/update'); } else { $this->session->set_flashdata('msg', 'Volunteer skills updated!'); redirect_VolRec($lVolID); } }
echoT(' <li style="margin-left: 20pt; padding: 0pt;"><b>Inventory Management</b> <ul style="list-style-type: square; display:inline; "> <li style="margin-left: 20pt; padding: 0pt; margin-top: 3px;">' . anchor('staff/inventory/icat/viewICats', 'Categories') . '</li> <li style="margin-left: 20pt; padding: 0pt; margin-top: 3px;">Items <ul> <li>' . anchor('staff/inventory/icat/viewICatsRemOnly', 'Removed Items') . '</li> <li>' . anchor('staff/inventory/icat/viewICatsLostOnly', 'Lost Items') . '</li> <li>' . anchor('staff/inventory/icat/itemsCheckedOutList', 'Checked-Out Items') . '</li> <li>' . anchor('staff/inventory/icat/itemsAllList', 'All Items') . '</li> </ul> <!-- <li>' . anchor('staff/inventory/reports', 'Reports') . '</li> --> </ul> </li>'); } } if (bAllowAccess('showAuctions')) { echoT(' <li style="margin-left: 20pt; padding: 0pt;"><b>Silent Auctions</b> <ul style="list-style-type: square; display:inline; "> <li style="margin-left: 20pt; padding: 0pt; margin-top: 3px;">' . anchor('auctions/auction_add_edit/addEditAuction/0', 'Add New Auction') . '</li> <li style="margin-left: 20pt; padding: 0pt; margin-top: 3px;">' . anchor('auctions/auctions/auctionEvents', 'Silent Auction Events') . '</li> <li style="margin-left: 20pt; padding: 0pt; margin-top: 3px;">' . anchor('auctions/bid_templates/main', 'Bid Sheets') . '</li> </ul> </li>'); } echoT(' <li style="margin-left: 20pt; padding: 0pt;">' . anchor('more/about/aboutDL', 'About') . '</li> <li style="margin-left: 20pt; padding: 0pt; margin-top: 7px;">' . anchor('login/signout', 'Sign Out') . '</li> </ul>');
function viewTSTRecord($lTSTID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- if (!bAllowAccess('adminOnly')) { return; } $displayData = array(); $displayData['js'] = ''; $displayData['lTSTID'] = $lTSTID = (int) $lTSTID; //------------------------- // models & helpers //------------------------- $this->load->helper('staff/link_staff'); $this->load->helper('groups/groups'); $this->load->helper('dl_util/web_layout'); $this->load->helper('staff/timesheet'); $this->load->helper('dl_util/record_view'); $this->load->helper('img_docs/link_img_docs'); $this->load->model('groups/mgroups', 'cgroups'); $this->load->model('staff/mtime_sheets', 'cts'); $this->load->model('admin/mpermissions', 'perms'); $this->load->model('admin/muser_accts', 'cusers'); //------------------------------------ // 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(); $params = array('enumStyle' => 'enpRptC'); $this->load->library('generic_rpt', $params); $this->cts->loadTimeSheetTemplateViaTSTID($lTSTID); $displayData['tst'] = $tst =& $this->cts->timeSheetTemplates[0]; $this->load->helper('js/div_hide_show'); $displayData['js'] .= showHideDiv(); //------------------------------- // projects group //------------------------------- $displayData['groupsProj'] = new stdClass(); $this->cgroups->groupMembershipViaFID(CENUM_CONTEXT_STAFF_TS_PROJECTS, $lTSTID); $displayData['groupsProj']->inGroups = $this->cgroups->arrMemberInGroups; $displayData['groupsProj']->lCntGroupMembership = $this->cgroups->lNumMemInGroups; $displayData['groupsProj']->lNumGroups = $this->cgroups->lCntActiveGroupsViaType(CENUM_CONTEXT_STAFF_TS_PROJECTS); $this->cgroups->loadActiveGroupsViaType(CENUM_CONTEXT_STAFF_TS_PROJECTS, 'groupName', $this->cgroups->strMemListIDs, false, null); $displayData['groupsProj']->groupList = $this->cgroups->arrGroupList; //------------------------------- // locations group //------------------------------- $displayData['groupsLoc'] = new stdClass(); $this->cgroups->groupMembershipViaFID(CENUM_CONTEXT_STAFF_TS_LOCATIONS, $lTSTID); $displayData['groupsLoc']->inGroups = $this->cgroups->arrMemberInGroups; $displayData['groupsLoc']->lCntGroupMembership = $this->cgroups->lNumMemInGroups; $displayData['groupsLoc']->lNumGroups = $this->cgroups->lCntActiveGroupsViaType(CENUM_CONTEXT_STAFF_TS_LOCATIONS); $this->cgroups->loadActiveGroupsViaType(CENUM_CONTEXT_STAFF_TS_LOCATIONS, 'groupName', $this->cgroups->strMemListIDs, false, null); $displayData['groupsLoc']->groupList = $this->cgroups->arrGroupList; //------------------------------- // users //------------------------------- $this->cusers->sqlWhere = ' AND (us_bAdmin OR NOT us_bVolAccount) AND NOT us_bInactive '; $this->cusers->loadUserRecords(); $userAssignments = array(); $idx = 0; foreach ($this->cusers->userRec as $uRec) { $userAssignments[$idx] = new stdClass(); $uA =& $userAssignments[$idx]; $uA->lUserID = $lUserID = $uRec->us_lKeyID; $uA->strFName = $uRec->us_strFirstName; $uA->strLName = $uRec->us_strLastName; $uA->strUserName = $uRec->us_strUserName; $uA->lTemplateAssignment = $lTA = $this->cts->lStaffTSAssignment($lUserID, $uA->strAssignedTemplateName); $uA->bGrayed = !is_null($lTA) && $lTA != $lTSTID; $uA->bCheckedAssign = !$uA->bGrayed && $lTA == $lTSTID; // $uA->bTSAdmin = $this->cts->lStaffTSAdmin($lUserID, $lTSTID); ++$idx; } $displayData['userAssignments'] =& $userAssignments; /* */ //-------------------------- // breadcrumbs //-------------------------- $displayData['title'] = CS_PROGNAME . ' | Admin'; $displayData['pageTitle'] = anchor('main/menu/admin', 'Admin', 'class="breadcrumb"') . ' | ' . anchor('admin/timesheets/view_tst_record/viewTSTList', 'Staff Time Sheet Templates', 'class="breadcrumb"') . ' | View Time Sheet Template'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $displayData['mainTemplate'] = 'admin/staff_tst_record_view'; $this->load->vars($displayData); $this->load->view('template'); }
function ts_submit($lTSLogID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $glUserID; $lTSLogID = (int) $lTSLogID; //------------------------- // models & helpers //------------------------- $this->load->model('staff/mtime_sheets', 'cts'); $this->load->helper('staff/timesheet'); $this->load->helper('dl_util/time_date'); $this->cts->loadUserTSLogByLogID($lTSLogID, $lNumLogRecs, $logRecs, false); if ($lNumLogRecs == 0) { redirect('staff/timesheets/ts_log_edit/error_tst_access'); } $logRec =& $logRecs[0]; $lTSTID = $logRec->lTimeSheetID; $lUserID = $logRec->lStaffID; $bSubmitted = !is_null($logRec->dteSubmitted); $lYear = (int) date('Y', $logRec->dteTSEntry); if ($bSubmitted) { redirect('staff/timesheets/ts_log_edit/error_tst_access'); } // if time sheet is being edited by a 3rd party, make sure they are authorized; // also, don't allow edit of submitted time sheets if ($glUserID != $lUserID) { if (!bAllowAccess('timeSheetAdmin')) { redirect('staff/timesheets/ts_log_edit/error_tst_access'); } } $bAgree = @$_POST['chkIAgree'] == 'true'; if ($bAgree) { $this->cts->submitTSLog($lTSLogID); $this->session->set_flashdata('msg', 'The ' . $logRec->enumRptPeriod . ' time sheet ' . 'beginning ' . date('l, F jS, Y', $logRec->dteTSEntry) . ' was submitted.'); redirect('staff/timesheets/ts_log/viewLog/' . $lYear . '/' . $lUserID); } else { $this->session->set_flashdata('error', 'You must check the box associated with the submission agreement. Your time sheet was <b>NOT</b> submitted.'); redirect('staff/timesheets/ts_log_edit/add_edit_ts/' . $lTSLogID); } }
function addEditReview($lReviewID, $lSRptID) { //------------------------------------------------------------------------ // //------------------------------------------------------------------------ global $glUserID, $gstrSafeName; /*---------------------------- echo(__FILE__.' '.__LINE__.'<br>'."\n"); $this->output->enable_profiler(TRUE); //-----------------------------*/ $this->load->helper('dl_util/permissions'); // in autoload if (!bAllowAccess('management')) { return ''; } $displayData = array(); $displayData['js'] = ''; $displayData['lReviewID'] = $lReviewID = (int) $lReviewID; $displayData['lSRptID'] = $lSRptID = (int) $lSRptID; $displayData['bNewReview'] = $bNewReview = $lReviewID <= 0; //------------------------------------- // models, libraries, and helpers //------------------------------------- $this->load->model('staff/mstaff_status', 'cstat'); $params = array('enumStyle' => 'terse'); $this->load->library('generic_rpt', $params); $this->load->helper('dl_util/web_layout'); $this->load->helper('staff/status_report'); $this->load->helper('js/div_hide_show'); $displayData['js'] .= showHideDiv(); // load the status report $this->cstat->loadStatusReportViaRptID($lSRptID); $displayData['sreport'] = $sreport =& $this->cstat->sreports[0]; // load the review $this->cstat->loadReviewsViaReviewID($lReviewID, $lNumReviews, $reviewLog); $displayData['mgrReview'] = $mgrReview =& $reviewLog[0]; if ($bNewReview) { $mgrReview->lKeyID = $lReviewID; $mgrReview->lStatusID = $lSRptID; $mgrReview->bReviewed = false; $mgrReview->strMgrNotes = ''; $mgrReview->strPublicNotes = ''; $mgrReview->lReviewerID = $glUserID; $mgrReview->lOriginID = $glUserID; $mgrReview->strReviewerSafeName = $gstrSafeName; } /* ------------------------------------- echo('<font class="debug">'.substr(__FILE__, strrpos(__FILE__, '\\')) .': '.__LINE__.'<br>$mgrReview <pre>'); echo(htmlspecialchars( print_r($mgrReview, true))); echo('</pre></font><br>'); // ------------------------------------- */ //------------------------- // validation rules //------------------------- $this->form_validation->set_error_delimiters('<div class="formError">', '</div>'); $this->form_validation->set_rules('txtPrivate', 'Private Review', 'trim'); $this->form_validation->set_rules('txtPublic', 'Public Review', 'trim'); $this->form_validation->set_rules('chkPublished', 'Published?', 'trim'); if ($this->form_validation->run() == FALSE) { $displayData['formData'] = new stdClass(); $this->load->library('generic_form'); $displayData['dteReviewed'] = $mgrReview->dteReviewed; $displayData['dteReviewed'] = $mgrReview->bReviewed; // first time displayed, no user data entry errors if (validation_errors() == '') { $displayData['formData']->txtPrivate = htmlspecialchars($mgrReview->strMgrNotes . ''); $displayData['formData']->txtPublic = htmlspecialchars($mgrReview->strPublicNotes . ''); $displayData['formData']->bPublished = $mgrReview->bReviewed; } else { setOnFormError($displayData); $displayData['formData']->txtPrivate = set_value('txtPrivate'); $displayData['formData']->txtPublic = set_value('txtPrivate'); $displayData['formData']->bPublished = set_value('chkPublished') == 'true'; } //-------------------------- // breadcrumbs //-------------------------- $displayData['pageTitle'] = anchor('aayhf/main/aayhfMenu', 'AAYHF', 'class="breadcrumb"') . ' | ' . anchor('staff/mgr_performance/review', 'Status Report Review', 'class="breadcrumb"') . ' | ' . anchor('staff/mgr_performance/mgrViewLog/' . $sreport->lUserID, 'Status Reports for ' . $sreport->strRptSafeName, 'class="breadcrumb"') . ' | ' . ($bNewReview ? 'Add New' : 'Edit') . ' Status Review'; $displayData['title'] = CS_PROGNAME . ' | Status Report'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $displayData['mainTemplate'] = 'aayhf/aayhf_staff/mgr_review_add_edit_view'; $this->load->vars($displayData); $this->load->view('template'); } else { $mgrReview->strMgrNotes = trim($_POST['txtPrivate']); $mgrReview->strPublicNotes = trim($_POST['txtPublic']); $mgrReview->bReviewed = $bReviewed = trim(@$_POST['chkPublished']) == 'true'; //------------------------------------ // update db tables and return //------------------------------------ $this->session->set_flashdata('msg', 'Your status report review was ' . ($bReviewed ? '<b>published</b>' : 'saved as a draft') . '.'); if ($bNewReview) { $lReviewID = $this->cstat->lAddNewStatusReview($mgrReview); } else { $this->cstat->updateStatusReview($lReviewID, $mgrReview); } redirect('staff/mgr_performance/mgrViewLog/' . $sreport->lUserID); } }
function viewBizCon($strLookupLetter, $lStartRec, $lRecsPerPage, $bShowContactNames) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- if (!bTestForURLHack('showPeople')) { return; } $strLookupLetter = urldecode($strLookupLetter); $displayData = array(); $displayData['js'] = ''; //------------------------------------------------ // 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('sponsorship/msponsorship', 'clsSpon'); $this->load->model('admin/madmin_aco', 'clsACO'); $this->load->model('biz/mbiz', 'clsBiz'); $this->load->model('donations/mdonations', 'clsGifts'); $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); //------------------------------------------------ // stripes //------------------------------------------------ $this->load->model('util/mbuild_on_ready', 'clsOnReady'); $this->clsOnReady->addOnReadyTableStripes(); $this->clsOnReady->closeOnReady(); $displayData['js'] .= $this->clsOnReady->strOnReady; $this->clsSpon->bUseDateRange = false; $displayData['strDirTitle'] = 'Business Directory'; $displayData['lNumRecsTot'] = lNumPeopleRecsViaLetter($strLookupLetter, CENUM_CONTEXT_BIZ); //$this->clsBiz->lNumBizRecords(); if (bAllowAccess('showGiftHistory')) { $this->clsGifts->bUseDateRange = false; $this->clsGifts->cumulativeOpts = new stdClass(); $this->clsGifts->cumulativeOpts->enumCumulativeSource = CENUM_CONTEXT_BIZ; } $lNumRecs = lNumPeopleRecsViaLetter($strLookupLetter, CENUM_CONTEXT_BIZ); //------------------------------------------------ // set up directory display //------------------------------------------------ if ($bShowContactNames) { $displayData['strRptTitle'] = 'Business Contact Directory'; $displayData['strRecNavTitle'] = 'Business Contact Directory: '; } else { $displayData['strRptTitle'] = 'Business/Organization Directory'; $displayData['strRecNavTitle'] = 'Business Directory: '; } $displayData['strDirLetter'] = $strLookupLetter; $displayData['strLinkBase'] = $strLinkBase = 'biz/biz_directory/' . ($bShowContactNames ? 'viewCBizName' : 'view') . '/'; $displayData['strDirTitle'] = strDisplayDirectory($strLinkBase, ' class="directoryLetters" ', $strLookupLetter, true, $lStartRec, $lRecsPerPage); //------------------------------------------------ // load biz directory page //------------------------------------------------ $strWhereExtra = $this->clsPeople->strWhereByLetter($strLookupLetter, CENUM_CONTEXT_BIZ, false); $this->clsBiz->loadBizDirectoryPage($strWhereExtra, $lStartRec, $lRecsPerPage, !$bShowContactNames, !$bShowContactNames); $displayData['lNumDisplayRows'] = $lNumBizRecs = $this->clsBiz->lNumBizRecs; $displayData['directoryRecsPerPage'] = $lRecsPerPage; $displayData['directoryStartRec'] = $lStartRec; $displayData['bizRecs'] = $this->clsBiz->bizRecs; if ($lNumBizRecs > 0) { foreach ($this->clsBiz->bizRecs as $biz) { $this->clsBiz->lBID = $lBID = $biz->lKeyID; if ($bShowContactNames) { $this->clsBiz->contactList(true, false, false, '', ''); $biz->lNumContacts = $lNumCon = $this->clsBiz->lNumContacts; if ($lNumCon > 0) { $biz->contacts = arrayCopy($this->clsBiz->contacts); } } else { $biz->lNumContacts = $this->clsBiz->lNumContacts(true, false); } } } initBizReportDisplay($displayData); if ($bShowContactNames) { $displayData['showFields']->bContactNames = true; $displayData['showFields']->bGiftSummary = $displayData['showFields']->bSponsor = $displayData['showFields']->bRemBiz = $displayData['showFields']->bContacts = false; } //------------------------------------------------ // breadcrumbs / page setup //------------------------------------------------ $displayData['mainTemplate'] = array('biz/biz_directory_view', 'biz/rpt_generic_biz_list'); $displayData['pageTitle'] = anchor('main/menu/biz', 'Businesses/Organizations', 'class="breadcrumb"') . ' | Directory'; $displayData['title'] = CS_PROGNAME . ' | Businesses'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $this->load->vars($displayData); $this->load->view('template'); }
function strLinkRem_ImgDocTag($enumContext, $lEntryID, $strTitle, $bShowIcon, $bJSRemoveCheck, $strAnchorExtra = '') { //--------------------------------------------------------------- // //--------------------------------------------------------------- if (!bAllowAccess('admin')) { return ''; } if ($bJSRemoveCheck) { $strAnchorExtra .= ' onClick="javascript:return confirm( \'Are you sure you want to remove this tag?\');" '; } return strImageLink('admin/admin_imgdoc_tags/remove/' . $enumContext . '/' . $lEntryID, $strAnchorExtra, $bShowIcon, !$bShowIcon, IMGLINK_DELETE, $strTitle); }
function setTSTAdmins() { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- if (!bAllowAccess('adminOnly')) { return; } //------------------------- // models & helpers //------------------------- $this->load->model('staff/mtime_sheets', 'cts'); $this->load->helper('staff/timesheet'); // out with the old $this->cts->removeTSAdmins(); // in with the new if (isset($_POST['chkGroup'])) { $userIDs = array(); foreach ($_POST['chkGroup'] as $lUserID) { $userIDs[] = (int) $lUserID; } $this->cts->addTSAdmins($userIDs); } $this->session->set_flashdata('msg', 'Time Sheet Administrator List updated'); redirect('admin/timesheets/view_tst_record/viewTSTList'); }
public function volRecordView($lVolID) { //------------------------------------------------------------------------- // //------------------------------------------------------------------------- global $glUserID; if (!bTestForURLHack('showPeople')) { return; } $this->load->helper('dl_util/verify_id'); verifyID($this, $lVolID, 'volunteer ID'); $displayData = array(); $displayData['lVolID'] = $lVolID = (int) $lVolID; $displayData['js'] = ''; //------------------------------------------------ // libraries / models / utilities //------------------------------------------------ $params = array('enumStyle' => 'terse'); $this->load->library('generic_rpt', $params); $this->load->library('util/dl_date_time', '', 'clsDateTime'); $this->load->model('vols/mvol', 'clsVol'); $this->load->model('vols/mvol_skills', 'clsVolSkills'); $this->load->model('vols/mvol_event_hours', 'clsVolHours'); $this->load->model('vols/mvol_event_dates_shifts', 'clsShifts'); $this->load->model('people/mpeople', 'clsPeople'); $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/madmin_aco'); $this->load->model('admin/muser_accts'); $this->load->model('sponsorship/msponsorship'); $this->load->model('donations/mdonations'); $this->load->helper('personalization/ptable'); // $this->load->helper ('dl_util/email_web'); $this->load->helper('groups/groups'); $this->load->helper('dl_util/web_layout'); $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('img_docs/img_doc_tags'); $this->load->helper('vols/vol_links'); $this->load->helper('js/div_hide_show'); $displayData['js'] .= showHideDiv(); //------------------------------------- // stripes //------------------------------------- $this->load->model('util/mbuild_on_ready', 'clsOnReady'); $this->clsOnReady->addOnReadyTableStripes(); $this->clsOnReady->closeOnReady(); $displayData['js'] .= $this->clsOnReady->strOnReady; //------------------------------- // volunteer record //------------------------------- $this->clsVol->loadVolRecsViaVolID($lVolID, true); $displayData['volRec'] = $volRec =& $this->clsVol->volRecs[0]; $displayData['lPID'] = $lPID = $volRec->lPeopleID; $this->load->model('reminders/mreminders', 'clsReminders'); $displayData['clsRem'] = $this->clsReminders; $this->clsPeople->loadPeopleViaPIDs($lPID, true, true); $displayData['contextSummary'] = $this->clsPeople->peopleHTMLSummary(0); //------------------------------- // volunteer-client associations //------------------------------- if (bAllowAccess('showClients')) { $this->clsVol->loadVolClientAssociations($lVolID, $displayData['volRec']->vca); $displayData['volRec']->lNumVolClientAssoc = count($displayData['volRec']->vca); } //------------------------------- // volunteer skills //------------------------------- $this->clsVolSkills->lVolID = $lVolID; $this->clsVolSkills->loadSingleVolSkills(); $displayData['lNumSingleVolSkills'] = $this->clsVolSkills->lNumSingleVolSkills; $displayData['singleVolSkills'] =& $this->clsVolSkills->singleVolSkills; //------------------------------- // 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_VOLUNTEER, $lVolID, $this->clsUFD, $this->perms, $acctAccess, $displayData['strFormDataEntryAlert'], $displayData['lNumPTablesAvail']); //------------------------------- // volunteer hours //------------------------------- $displayData['dTotHours'] = $this->clsVolHours->volEventHoursViaVolID($lVolID); $displayData['dTotUnHours'] = $this->clsVolHours->volUnscheduledEventHoursViaVolID($lVolID); //------------------------------- // volunteer schedule //------------------------------- $displayData['lPastShifts'] = $this->clsShifts->lNumShiftsViaVolID($lVolID, true); $displayData['lCurrentFutureShifts'] = $this->clsShifts->lNumShiftsViaVolID($lVolID, false); //------------------------------- // groups //------------------------------- $this->groups->groupMembershipViaFID(CENUM_CONTEXT_VOLUNTEER, $lVolID); $displayData['inGroups'] = $this->groups->arrMemberInGroups; $displayData['lCntGroupMembership'] = $this->groups->lNumMemInGroups; $displayData['lNumGroups'] = $this->groups->lCntActiveGroupsViaType(CENUM_CONTEXT_VOLUNTEER); $this->groups->loadActiveGroupsViaType(CENUM_CONTEXT_VOLUNTEER, 'groupName', $this->groups->strMemListIDs, false, null); $displayData['groupList'] = $this->groups->arrGroupList; //------------------------------- // images and documents //------------------------------- loadImgDocRecView($displayData, CENUM_CONTEXT_VOLUNTEER, $lVolID); //-------------------------- // breadcrumbs //-------------------------- $displayData['title'] = CS_PROGNAME . ' | View volunteer record'; $displayData['pageTitle'] = anchor('main/menu/vols', 'Volunteers', 'class="breadcrumb"') . ' | Record'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $displayData['mainTemplate'] = 'vols/vol_record_view'; $this->load->vars($displayData); $this->load->view('template'); }
function showDatesShifts($lVolID, &$eDates, $lNumDates) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; if ($lNumDates == 0) { echoT('<i>No dates have been scheduled for this event</i><br>'); return; } echoT(' <table width="100%"> <tr> <td style="width: 120pt; font-weight: bold;">Date</td> <td style="width: 180pt; font-weight: bold;">Shift</td> <td style="width: 80pt; font-weight: bold;">Scheduled</td> <td style="width: 50pt; font-weight: bold;">Logged</td> <td> </td> </tr>'); foreach ($eDates as $eDate) { $lVolEventID = $eDate->lVolEventID; $strDate = date($genumDateFormat . ' (D)', $eDate->dteEvent); if ($eDate->lNumShifts == 0) { echoT(' <tr> <td>' . $strDate . ' </td> <td colspan="3"> <i>No shifts were scheduled for this date</i> </td> </tr>'); } else { foreach ($eDate->shifts as $shift) { $lShiftID = $shift->lShiftID; $dHrsScheduled = $shift->dHrsScheduled; $dHrsWorked = $shift->dHrsWorked; if ($dHrsScheduled < 0.001) { $strScheduled = '<i>not scheduled</i>'; $strLogged = '-'; $strHrsStyle = 'text-align: center;'; } else { $strScheduled = $shift->enumHrsScheduled; $strLogged = number_format($dHrsWorked, 2); $strHrsStyle = 'text-align: right;'; if (bAllowAccess('volEditHours')) { $strLogged .= ' ' . strLinkEdit_VolEventHrsAsVol($lVolID, $lVolEventID, $lShiftID, 'Edit Volunteer Hours', true); } } echoT(' <tr class="makeStripe"> <td>' . $strDate . ' </td> <td>' . htmlspecialchars($shift->strShiftName) . ' </td> <td>' . $strScheduled . ' </td> <td style="width: 50pt;' . $strHrsStyle . '">' . $strLogged . ' </td> <td> </td> </tr>'); $strDate = ' '; } } } echoT('</table>'); }
function strLink_PDF_PackageBidSheet($lBidSheetID, $lPackageID, $strTitle, $bShowIcon, $strAnchorExtra = '') { //--------------------------------------------------------------- // //--------------------------------------------------------------- if (!bAllowAccess('showAuctions')) { return ''; } return strImageLink('auctions/bid_sheets/bidsheetViaPID/' . $lBidSheetID . '/' . $lPackageID, $strAnchorExtra, $bShowIcon, !$bShowIcon, IMGLINK_PDFSMALL, $strTitle); }
function addEdit($enumGroupType, $lGID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- if (!bAllowAccess('adminOnly')) { return; } $this->load->helper('dl_util/verify_id'); if ($lGID != '0') { verifyID($this, $lGID, 'group ID'); } $displayData = array(); $lGID = (int) $lGID; //------------------------- // models & helpers //------------------------- $this->load->model('groups/mgroups', 'clsGroups'); $this->load->helper('groups/groups'); $this->load->helper('dl_util/web_layout'); $displayData['strGroupType'] = $strGroupType = strXlateContext($enumGroupType); groupExtensionProperties($enumGroupType, $gProps); $displayData['gProps'] =& $gProps; //---------------------------- // validation rules //---------------------------- $this->form_validation->set_error_delimiters('<div class="formError">', '</div>'); $this->form_validation->set_rules('txtGroupName', $strGroupType . ' Group Name', 'trim|callback_groupNameBlankTest|callback_groupNameDupTest[' . $enumGroupType . ',' . $lGID . ']'); if ($gProps->extended) { if ($gProps->lNumBool > 0) { foreach ($gProps->bools as $bField) { $this->form_validation->set_rules($bField->strFormFN, 'Check Box', 'trim'); } } if ($gProps->lNumInt > 0) { echo __FILE__ . ' ' . __LINE__ . '<br>' . "\n"; die; } } if ($this->form_validation->run() == FALSE) { $this->load->library('generic_form'); $displayData['lGID'] = $lGID = (int) $lGID; $displayData['bNew'] = $bNew = $lGID <= 0; $displayData['enumGroupType'] = $this->clsGroups->gp_enumGroupType = $enumGroupType = htmlspecialchars($enumGroupType); if (validation_errors() == '') { $this->clsGroups->loadActiveGroupsViaType($enumGroupType, '', '', true, $lGID); $gl =& $this->clsGroups->arrGroupList[0]; $displayData['strGroupName'] = htmlspecialchars($gl->strGroupName); // set the database values for extended fields if ($gProps->extended) { if ($gProps->lNumBool > 0) { foreach ($gProps->bools as $bField) { $strFN = $bField->strDBFN; $bField->bValue = $gl->{$strFN}; } } if ($gProps->lNumInt > 0) { echo __FILE__ . ' ' . __LINE__ . '<br>' . "\n"; die; } } } else { setOnFormError($displayData); $displayData['strGroupName'] = set_value('txtGroupName'); if ($gProps->extended) { if ($gProps->lNumBool > 0) { foreach ($gProps->bools as $bField) { $bField->bValue = set_value($bField->strFormFN) == 'true'; } } if ($gProps->lNumInt > 0) { echo __FILE__ . ' ' . __LINE__ . '<br>' . "\n"; die; } } } $displayData['nav'] = $this->mnav_brain_jar->navData(); //---------------------- // set breadcrumbs //---------------------- $displayData['title'] = CS_PROGNAME . ' | Groups'; $displayData['pageTitle'] = anchor('main/menu/admin', 'Admin', 'class="breadcrumb"') . ' | ' . anchor('admin/alists/showLists', 'Lists', 'class="breadcrumb"') . ' | ' . anchor('groups/groups_view/view/' . $enumGroupType, 'Groups: ' . $strGroupType, 'class="breadcrumb"') . ' | ' . ($bNew ? 'Add New' : 'Edit'); $displayData['mainTemplate'] = 'groups/group_add_edit_view'; $this->load->vars($displayData); $this->load->view('template'); } else { $bNew = $lGID <= 0; $strGroupCat = strXlateContext($enumGroupType); $this->clsGroups->loadActiveGroupsViaType($this->clsGroups->gp_enumGroupType, '', '', true, -1); $clsList = $this->clsGroups->arrGroupList[0]; $clsList->lKeyID = $lGID; $clsList->strGroupName = xss_clean(trim($_POST['txtGroupName'])); $clsList->dteExpire = strtotime('1/1/2030'); $clsList->bTempGroup = false; $clsList->strNotes = ''; if ($gProps->extended) { if ($gProps->lNumBool > 0) { foreach ($gProps->bools as $bField) { $strFN = $bField->strDBFN; $clsList->{$strFN} = @$_POST[$bField->strFormFN] == 'true'; } } if ($gProps->lNumInt > 0) { echo __FILE__ . ' ' . __LINE__ . '<br>' . "\n"; die; } } if ($bNew) { $this->clsGroups->gp_enumGroupType = $enumGroupType; $this->session->set_flashdata('msg', $strGroupCat . ' Group added'); $this->clsGroups->lAddNewGroupParent(); } else { $this->session->set_flashdata('msg', $strGroupCat . ' Group updated'); $this->clsGroups->updateGroupParentRec(); } redirect('groups/groups_view/view/' . $enumGroupType); } }
public function contact($lPID = '', $lHID = 0) { //------------------------------------------------------------------------- // //------------------------------------------------------------------------- global $gclsChapterACO, $gbDateFormatUS, $gbVolLogin, $gVolPerms, $glVolPeopleID, $glUserID; global $gstrDuplicateWarning; $gstrDuplicateWarning = ''; if ($gbVolLogin) { $lPID = $glVolPeopleID; } $this->load->helper('dl_util/verify_id'); if ($lPID . '' != '0') { verifyID($this, $lPID, 'people ID'); } if ($lHID . '' != '0') { verifyID($this, $lHID, 'household ID'); } $displayData = array(); $displayData['formData'] = new stdClass(); $displayData['lPID'] = $lPID = (int) $lPID; $displayData['bNew'] = $bNew = $lPID <= 0; $bExistingHousehold = $lHID > 0; if ($bNew) { if (!bTestForURLHack('dataEntryPeopleBizVol')) { return; } } else { $bOkayToEdit = bAllowAccess('dataEntryPeopleBizVol') || bAllowAccess('volEditContact'); if (!$bOkayToEdit) { bTestForURLHack('forceFail'); return; } } // models associated with the people record $this->load->model('people/mpeople', 'clsPeople'); $this->load->model('admin/madmin_aco', 'clsACO'); if (!$gbVolLogin) { $this->load->model('sponsorship/msponsorship', 'clsSpon'); $this->load->model('donations/mdonations', 'clsGifts'); } if ($bNew) { $this->load->model('util/mdup_checker', 'cDupChecker'); } $this->load->helper('dl_util/time_date'); $this->load->helper('dl_util/web_layout'); // $this->load->helper('dl_util/email_web'); $this->load->library('util/dl_date_time', '', 'clsDateTime'); //-------------------------- // load people record //-------------------------- $this->clsPeople->sqlWhereExtra = " AND pe_lKeyID = {$lPID} "; if ($gbVolLogin) { $this->clsPeople->loadPeople(false, false, true); } else { $this->clsPeople->loadPeople(true, true, true); } $people = $this->clsPeople->people[0]; // validation rules $this->form_validation->set_error_delimiters('<div class="formError">', '</div>'); $this->form_validation->set_rules('txtFName', 'First Name', 'trim|required'); $this->form_validation->set_rules('txtTitle', '', 'trim'); $this->form_validation->set_rules('txtMName', '', 'trim'); $this->form_validation->set_rules('txtLName', 'Last Name', 'trim|required'); $this->form_validation->set_rules('txtPName', '', 'trim'); $this->form_validation->set_rules('txtSal', '', 'trim'); $this->form_validation->set_rules('txtAddr1', '', 'trim'); $this->form_validation->set_rules('txtAddr2', '', 'trim'); $this->form_validation->set_rules('txtCity', '', 'trim'); $this->form_validation->set_rules('txtState', '', 'trim'); $this->form_validation->set_rules('txtZip', '', 'trim'); $this->form_validation->set_rules('txtCountry', '', 'trim'); $this->form_validation->set_rules('txtNotes', '', 'trim'); $this->form_validation->set_rules('txtPhone', '', 'trim'); $this->form_validation->set_rules('txtCell', '', 'trim'); $this->form_validation->set_rules('rdoGender', '', 'trim'); $this->form_validation->set_rules('txtBDate', '', 'trim|callback_peopleRecVerifyBDateValid' . '|callback_peopleRecVerifyBDatePast'); if ($gbVolLogin) { $this->form_validation->set_rules('txtEmail', 'Email', 'trim|required|valid_email|callback_verifyUniqueUserID'); } else { $this->form_validation->set_rules('txtEmail', 'Email', 'trim|valid_email'); $this->form_validation->set_rules('rdoACO', '', 'trim'); $this->form_validation->set_rules('ddlAttrib', 'Attributed to'); } // test for duplicate people if ($bNew) { $this->form_validation->set_rules('hiddenTestDup', 'dummy', 'callback_verifyNoDups'); $displayData['bHiddenNewTestDup'] = true; } if ($bNew) { $people->lHouseholdID = $lHID; if ($lHID <= 0) { $people->strHouseholdName = '<i>new</i>'; } else { $people->strHouseholdName = $this->clsPeople->strHouseholdNameViaHID($lHID); } } if ($this->form_validation->run() == FALSE) { $displayData['js'] = ''; $this->load->library('generic_form'); $this->load->model('util/mlist_generic', 'clsList'); $this->clsList->enumListType = CENUM_LISTTYPE_ATTRIB; $displayData['strDuplicateWarning'] = $gstrDuplicateWarning; if (validation_errors() == '') { if ($bNew) { $displayData['formData']->strBDay = $displayData['formData']->txtTitle = $displayData['formData']->txtFName = $displayData['formData']->txtMName = $displayData['formData']->txtLName = $displayData['formData']->txtPName = $displayData['formData']->txtSal = $displayData['formData']->txtNotes = $displayData['formData']->txtEmail = $displayData['formData']->txtCell = ''; $displayData['formData']->enumGender = 'Unknown'; $displayData['formData']->dteMysqlBirthDate = ''; if ($bExistingHousehold) { $clsHouse = new mpeople(); $clsHouse->loadPeopleViaPIDs($lHID, false, false); $house = $clsHouse->people[0]; $displayData['formData']->txtAddr1 = htmlspecialchars($house->strAddr1); $displayData['formData']->txtAddr2 = htmlspecialchars($house->strAddr2); $displayData['formData']->txtCity = htmlspecialchars($house->strCity); $displayData['formData']->txtState = htmlspecialchars($house->strState); $displayData['formData']->txtZip = htmlspecialchars($house->strZip); $displayData['formData']->txtCountry = htmlspecialchars($house->strCountry); $displayData['formData']->txtPhone = htmlspecialchars($house->strPhone); $lACO = $house->lACO; } else { $displayData['formData']->txtAddr1 = $displayData['formData']->txtAddr2 = $displayData['formData']->txtCity = $displayData['formData']->txtState = $displayData['formData']->txtZip = $displayData['formData']->txtCountry = $displayData['formData']->txtPhone = ''; $lACO = $gclsChapterACO->lKeyID; } if (!$gbVolLogin) { $displayData['formData']->rdoACO = $this->clsACO->strACO_Radios($lACO, 'rdoACO'); $displayData['strAttribDDL'] = $this->clsList->strLoadListDDL('ddlAttrib', true, -1); } } else { $displayData['formData']->txtTitle = $people->strTitle; $displayData['formData']->txtFName = htmlspecialchars($people->strFName); $displayData['formData']->txtMName = htmlspecialchars($people->strMName); $displayData['formData']->txtLName = htmlspecialchars($people->strLName); $displayData['formData']->txtPName = htmlspecialchars($people->strPreferredName); $displayData['formData']->txtSal = htmlspecialchars($people->strSalutation); $displayData['formData']->txtNotes = htmlspecialchars($people->strNotes); $displayData['formData']->txtAddr1 = htmlspecialchars($people->strAddr1); $displayData['formData']->txtAddr2 = htmlspecialchars($people->strAddr2); $displayData['formData']->txtCity = htmlspecialchars($people->strCity); $displayData['formData']->txtState = htmlspecialchars($people->strState); $displayData['formData']->txtZip = htmlspecialchars($people->strZip); $displayData['formData']->txtCountry = htmlspecialchars($people->strCountry); $displayData['formData']->txtEmail = htmlspecialchars($people->strEmail); $displayData['formData']->txtPhone = htmlspecialchars($people->strPhone); $displayData['formData']->txtCell = htmlspecialchars($people->strCell); $displayData['formData']->enumGender = $people->enumGender; if (is_null($people->dteMysqlBirthDate)) { $displayData['formData']->strBDay = ''; } else { $displayData['formData']->strBDay = strNumericDateViaMysqlDate($people->dteMysqlBirthDate, $gbDateFormatUS); } if (!$gbVolLogin) { $displayData['formData']->rdoACO = $this->clsACO->strACO_Radios($people->lACO, 'rdoACO'); $displayData['strAttribDDL'] = $this->clsList->strLoadListDDL('ddlAttrib', true, $people->lAttributedTo); } } } else { setOnFormError($displayData); $displayData['formData']->txtTitle = set_value('txtTitle'); $displayData['formData']->txtFName = set_value('txtFName'); $displayData['formData']->txtMName = set_value('txtMName'); $displayData['formData']->txtLName = set_value('txtLName'); $displayData['formData']->txtPName = set_value('txtPName'); $displayData['formData']->txtSal = set_value('txtSal'); $displayData['formData']->txtNotes = set_value('txtNotes'); $displayData['formData']->txtAddr1 = set_value('txtAddr1'); $displayData['formData']->txtAddr2 = set_value('txtAddr2'); $displayData['formData']->txtCity = set_value('txtCity'); $displayData['formData']->txtState = set_value('txtState'); $displayData['formData']->txtZip = set_value('txtZip'); $displayData['formData']->txtCountry = set_value('txtCountry'); $displayData['formData']->txtEmail = set_value('txtEmail'); $displayData['formData']->txtPhone = set_value('txtPhone'); $displayData['formData']->txtCell = set_value('txtCell'); $displayData['formData']->enumGender = set_value('rdoGender'); $displayData['formData']->strBDay = set_value('txtBDate'); if (!$gbVolLogin) { $displayData['formData']->rdoACO = $this->clsACO->strACO_Radios(set_value('rdoACO'), 'rdoACO'); $displayData['strAttribDDL'] = $this->clsList->strLoadListDDL('ddlAttrib', true, set_value('ddlAttrib')); } } $displayData['people'] = $people; //-------------------------- // breadcrumbs //-------------------------- if ($gbVolLogin) { $displayData['pageTitle'] = anchor('people/people_record/view/' . $lPID, 'Record', 'class="breadcrumb"') . ' | Edit'; } else { $displayData['pageTitle'] = anchor('main/menu/people', 'People', 'class="breadcrumb"') . ' | ' . ($bNew ? 'Record' : anchor('people/people_record/view/' . $lPID, 'Record', 'class="breadcrumb"')) . ' | ' . ($bNew ? 'Add New' : 'Edit'); } $displayData['title'] = CS_PROGNAME . ' | People'; $displayData['nav'] = $this->mnav_brain_jar->navData(); $displayData['mainTemplate'] = 'people/people_add_edit_view'; $this->load->vars($displayData); $this->load->view('template'); } else { $this->load->model('personalization/muser_fields', 'clsUF'); $this->load->model('personalization/muser_fields_create', 'clsUFC'); $this->load->model('admin/mpermissions', 'perms'); $this->load->helper('dl_util/util_db'); $people =& $this->clsPeople->people[0]; $people->lHouseholdID = (int) $lHID; $people->strTitle = trim($_POST['txtTitle']); $people->strFName = trim($_POST['txtFName']); $people->strMName = trim($_POST['txtMName']); $people->strLName = trim($_POST['txtLName']); $people->strPreferredName = trim($_POST['txtPName']); $people->strSalutation = trim($_POST['txtSal']); $people->strNotes = trim($_POST['txtNotes']); if ($people->strPreferredName == '') { $people->strPreferredName = $people->strFName; } if ($people->strSalutation == '') { $people->strSalutation = $people->strFName; } $people->strAddr1 = trim($_POST['txtAddr1']); $people->strAddr2 = trim($_POST['txtAddr2']); $people->strCity = trim($_POST['txtCity']); $people->strState = trim($_POST['txtState']); $people->strZip = trim($_POST['txtZip']); $people->strCountry = trim($_POST['txtCountry']); if ($gbVolLogin) { $strOriginalEmail = $people->strEmail; } $people->strEmail = trim($_POST['txtEmail']); $people->strPhone = trim($_POST['txtPhone']); $people->strCell = trim($_POST['txtCell']); $people->enumGender = trim($_POST['rdoGender']); if ($gbVolLogin) { $this->load->model('admin/muser_accts', 'clsUser'); $this->clsUser->updateUserAcctViaPeopleInfo($glUserID, $people); } if (!$gbVolLogin) { $people->lACO = (int) $_POST['rdoACO']; $lAttrib = (int) $_REQUEST['ddlAttrib']; if ($lAttrib <= 0) { $people->lAttributedTo = null; } else { $people->lAttributedTo = $lAttrib; } } $strBDate = trim($_POST['txtBDate']); if ($strBDate == '') { $people->dteMysqlBirthDate = null; } else { MDY_ViaUserForm($strBDate, $lMon, $lDay, $lYear, $gbDateFormatUS); $people->dteMysqlBirthDate = strMoDaYr2MySQLDate($lMon, $lDay, $lYear); } if ($bNew) { $people->dteExpire = $people->dteMysqlDeath = null; $lPID = $this->clsPeople->lCreateNewPeopleRec(); $this->session->set_flashdata('msg', 'The people record was added'); } else { $this->clsPeople->updatePeopleRec($lPID); if ($gbVolLogin) { $this->session->set_flashdata('msg', 'Your contact information was updated.'); } else { $this->session->set_flashdata('msg', 'The people record was updated'); } } redirect('people/people_record/view/' . $lPID); } }