function writeUserBlock($uperm) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- if ($uperm->lNumAccts == 0) { echoT('<i>There are no users in this category.</i>'); } else { echoT('<table style="width: 270pt;">'); foreach ($uperm->accounts as $acct) { $lUserID = $acct->lUserID; if ($acct->bInactive) { $strColor = 'color: #aaa;'; } else { $strColor = ''; } echoT(' <tr class="makeStripe"> <td style="width: 80pt; text-align: left; ' . $strColor . '">' . strLinkView_User($lUserID, 'View user account', true) . ' ' . strLinkEdit_User($lUserID, 'Edit user account', true) . ' ' . str_pad($lUserID, 5, '0', STR_PAD_LEFT) . ' </td> <td style="' . $strColor . '">' . htmlspecialchars($acct->strLastName . ', ' . $acct->strFirstName) . ' <i>(' . htmlspecialchars($acct->strUserName) . ')</i> </td> </tr>'); } echoT('</table>'); } }
function strLoginLogReport(&$sRpt, $lStartRec, $lRecsPerPage) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; $strLimit = " LIMIT {$lStartRec}, {$lRecsPerPage} "; $lRptUserID = $sRpt->lUserID; if ($lRptUserID <= 0) { $strUserWhere = ''; } else { $strUserWhere = " AND el_lUserID={$lRptUserID} "; } $sqlStr = "SELECT\n el_lKeyID, us_lKeyID, el_enumApp,\n UNIX_TIMESTAMP(el_dteLogDate) AS dteLog,\n el_strUserName, el_bLoginSuccessful, el_str_Remote_Addr, el_str_Remote_Host, el_str_Remote_Port,\n us_strUserName, us_strFirstName, us_strLastName\n FROM admin_usage_log\n LEFT JOIN admin_users ON el_lUserID=us_lKeyID\n WHERE 1 {$strUserWhere}\n ORDER BY el_dteLogDate DESC, el_lKeyID DESC\n {$strLimit};"; $query = $this->db->query($sqlStr); $strOut = '<table class="enpRptC"> <tr> <td class="enpRptLabel"> User </td> <td class="enpRptLabel"> User Name </td> <td class="enpRptLabel"> Date </td> <td class="enpRptLabel"> Remote Address </td> <td class="enpRptLabel"> Remote Host </td> <td class="enpRptLabel"> Remote Port </td> </tr>'; foreach ($query->result() as $row) { $bFailed = !$row->el_bLoginSuccessful || is_null($row->us_lKeyID); if ($bFailed) { $strColor = 'color: #bf0000;'; $strFailed = ' (login failed)'; } else { $strColor = 'color: #000;'; $strFailed = ''; } $lUserID = $row->us_lKeyID; if (is_null($lUserID)) { $strUserLink = ''; } else { $strUserLink = strLinkView_User($lUserID, 'View User Record', true) . ' '; } $strOut .= ' <tr class="makeStripe"> <td class="enpRpt" style="' . $strColor . '">' . $strUserLink . trim(htmlspecialchars($row->us_strFirstName . ' ' . $row->us_strLastName) . $strFailed) . ' </td> <td class="enpRpt" style="' . $strColor . '">' . htmlspecialchars($row->us_strUserName) . ' </td> <td class="enpRpt" style="' . $strColor . '">' . date($genumDateFormat . ' H:i:s', $row->dteLog) . ' </td> <td class="enpRpt" style="' . $strColor . ' text-align: center;">' . $row->el_str_Remote_Addr . ' </td> <td class="enpRpt" style="' . $strColor . ' text-align: center;">' . $row->el_str_Remote_Host . ' </td> <td class="enpRpt" style="' . $strColor . ' text-align: center;">' . $row->el_str_Remote_Port . ' </td> </tr>'; } $strOut .= '</table><br>'; return $strOut; }
public function userHTMLSummary($idx) { //----------------------------------------------------------------------- // assumes user has called $this->loadSingleUserRecord($lUserID) //----------------------------------------------------------------------- global $gdteNow, $genumDateFormat, $gbAdmin; $strOut = ''; $params = array('enumStyle' => 'terse'); $clsRpt = new generic_rpt($params); $clsRpt->setEntrySummary(); $userRec =& $this->userRec[$idx]; $lUID = $userRec->us_lKeyID; $strAcctType = ''; if ($userRec->us_bAdmin) { $strAcctType = 'Admin'; } elseif ($userRec->bVolAccount) { $strAcctType = 'Volunteer'; } else { $strAcctType = 'User'; } if ($userRec->us_bDebugger) { $strAcctType .= ' / Debugger'; } if ($gbAdmin) { $strAcctLink = strLinkView_User($lUID, 'View User Record', true) . ' '; } else { $strAcctLink = ''; } $strOut .= $clsRpt->openReport('', '') . $clsRpt->openRow(false) . $clsRpt->writeLabel('user ID:') . $clsRpt->writeCell($strAcctLink . str_pad($lUID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell($userRec->strSafeName) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('User Name:') . $clsRpt->writeCell($userRec->us_strUserName) . $clsRpt->closeRow() . $clsRpt->openRow(false) . $clsRpt->writeLabel('Account Type:') . $clsRpt->writeCell($strAcctType) . $clsRpt->closeRow(); $strOut .= $clsRpt->closeReport('<br>'); return $strOut; }
private function loadImgDocInfoViaContext($enumContext, $imgDoc, $row) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat, $glChapterID; $lFID = (int) $imgDoc->lForeignID; switch ($enumContext) { case CENUM_CONTEXT_CLIENT: $imgDoc->strNameLabel = 'Client'; $imgDoc->strName = strLinkView_ClientRecord($lFID, 'View Client Record', true) . ' ' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . ' <b>' . htmlspecialchars($row->cr_strLName . ', ' . $row->cr_strFName) . '</b>'; $imgDoc->strAddressLabel = 'Address'; $imgDoc->strAddr = strBuildAddress($row->cr_strAddr1, $row->cr_strAddr2, $row->cr_strCity, $row->cr_strState, $row->cr_strCountry, $row->cr_strZip, true); $strPhone = strPhoneCell($row->cr_strPhone, $row->cr_strCell); if ($strPhone != '') { $imgDoc->strAddr .= '<br>' . $strPhone; } break; case CENUM_CONTEXT_PEOPLE: $imgDoc->strNameLabel = 'Name'; $imgDoc->strName = strLinkView_PeopleRecord($lFID, 'View People Record', true) . ' ' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . ' <b>' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '</b>'; $imgDoc->strAddressLabel = 'Address'; $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true); $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell); if ($strPhone != '') { $imgDoc->strAddr .= '<br>' . $strPhone; } break; case CENUM_CONTEXT_LOCATION: $imgDoc->strNameLabel = 'Client Location'; $imgDoc->strName = strLinkView_ClientLocation($lFID, 'View client location', true) . ' ' . htmlspecialchars($row->cl_strLocation); break; case CENUM_CONTEXT_GRANTPROVIDER: $imgDoc->strNameLabel = 'Funder/Provider'; $imgDoc->strName = strLinkView_GrantProvider($lFID, 'View funder/provider', true) . ' ' . htmlspecialchars($row->gpr_strGrantOrg); break; case CENUM_CONTEXT_INVITEM: $imgDoc->strNameLabel = 'Inventory Item'; $imgDoc->strName = strLinkView_InventoryItem($lFID, 'View inventory item', true) . ' ' . htmlspecialchars($row->ivi_strItemName); break; case CENUM_CONTEXT_AUCTION: $imgDoc->strNameLabel = 'Silent Auction'; $imgDoc->strName = strLinkView_AuctionRecord($lFID, 'View Auction', true) . ' ' . htmlspecialchars($row->auc_strAuctionName) . ' (' . date($genumDateFormat, dteMySQLDate2Unix($row->auc_dteAuctionDate)) . ')'; break; case CENUM_CONTEXT_AUCTIONITEM: $imgDoc->strNameLabel = 'Auction Item'; $imgDoc->strName = strLinkView_AuctionItem($lFID, 'View Auction Item', true) . ' ' . 'item: ' . htmlspecialchars($row->ait_strItemName) . '<br>package: ' . htmlspecialchars($row->ap_strPackageName) . '<br>auction: ' . htmlspecialchars($row->auc_strAuctionName); break; case CENUM_CONTEXT_AUCTIONPACKAGE: $imgDoc->strNameLabel = 'Auction Package'; $imgDoc->strName = strLinkView_AuctionPackageRecord($lFID, 'View Auction Package', true) . ' ' . 'package: ' . htmlspecialchars($row->ap_strPackageName) . '<br>auction: ' . htmlspecialchars($row->auc_strAuctionName); break; case CENUM_CONTEXT_BIZ: $imgDoc->strNameLabel = 'Business/Organization Name'; $imgDoc->strName = strLinkView_BizRecord($lFID, 'View Business/Organization Record', true) . ' ' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . ' <b>' . htmlspecialchars($row->pe_strLName) . '</b>'; $imgDoc->strAddressLabel = 'Address'; $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true); $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell); if ($strPhone != '') { $imgDoc->strAddr .= '<br>' . $strPhone; } break; case CENUM_CONTEXT_SPONSORSHIP: $bBiz = (bool) $row->pe_bBiz; if ($bBiz) { $imgDoc->strNameLabel = 'Sponsor (Business/organization)'; $imgDoc->strName = strLinkView_PeopleRecord($lFID, 'View People Record', true) . ' ' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . ' <b>' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '</b>'; } else { $imgDoc->strNameLabel = 'Sponsor (Individual)'; $imgDoc->strName = strLinkView_BizRecord($lFID, 'View Business/Organization Record', true) . ' ' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . ' <b>' . htmlspecialchars($row->pe_strLName) . '</b>'; } $imgDoc->strAddressLabel = 'Address'; $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true); $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell); if ($strPhone != '') { $imgDoc->strAddr .= '<br>' . $strPhone; } break; case CENUM_CONTEXT_ORGANIZATION: $imgDoc->strNameLabel = 'Your organization'; $imgDoc->strName = strLinkView_OrganizationRecord($lFID, 'View organization record', true) . ' ' . htmlspecialchars($row->ch_strChapterName); break; case CENUM_CONTEXT_STAFF: $imgDoc->strNameLabel = 'Staff Member'; $imgDoc->strName = strLinkView_User($lFID, 'View staff member record', true) . ' ' . htmlspecialchars($row->strFirstName . ' ' . $row->strLastName); break; case CENUM_CONTEXT_VOLUNTEER: $imgDoc->strNameLabel = 'Name'; $imgDoc->strName = strLinkView_Volunteer($lFID, 'View Volunteer Record', true) . ' ' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . ' <b>' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '</b>'; $imgDoc->strAddressLabel = 'Address'; $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true); $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell); if ($strPhone != '') { $imgDoc->strAddr .= '<br>' . $strPhone; } break; default: screamForHelp($enumContext . ': image context not currently implemented<br>error on line <b> -- ' . __LINE__ . ' --</b>,<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__); break; } }
$strAcctType .= ' / Debugger'; } $strColor = ''; if ($glUserID == $lUserID) { $strLinkRem = ' '; } else { if ($bInactive) { $strLinkRem = strLinkSpecial_UserActivate($lUserID, 'Activate user', true); $strColor = 'color: #999;font-style:italic;'; } else { $strLinkRem = strLinkSpecial_UserDeactivate($lUserID, 'Deactivate user', true); } } echoT(' <tr class="makeStripe"> <td class="enpRpt" style="text-align: center; ' . $strColor . '" nowrap>' . strLinkView_User($lUserID, 'View this user\'s record', true) . str_pad($lUserID, 5, 0, STR_PAD_LEFT) . ' </td> <td class="enpRpt" style="text-align: center; ' . $strColor . '">' . $strLinkRem . ' </td> <td class="enpRpt" style="width: 150px; ' . $strColor . '"><b>' . htmlspecialchars($clsDir->us_strLastName) . '</b>, ' . htmlspecialchars($clsDir->us_strFirstName) . ' </td> <td class="enpRpt" style="width: 80px; ' . $strColor . '">' . htmlspecialchars($clsDir->us_strUserName) . ' </td> <td class="enpRpt" style="width: 120px; ' . $strColor . '">' . htmlspecialchars($clsDir->us_strEmail) . '<br>' . htmlspecialchars($clsDir->us_strPhone) . ' </td> <td class="enpRpt" style="text-align: left; width: 160px; ' . $strColor . '">' . $strDateLastLogin . ' </td> <td class="enpRpt" style="text-align: left; width: 130px; ' . $strColor . '">' . strUserGroupsBlock($lUserID, $clsDir) . ' </td> <td class="enpRpt" style="text-align: left; width: 110px; ' . $strColor . '">' . $strAcctType . '
public function loadGroupMembership($enumGroupType, $lGID) { //----------------------------------------------------------------------- // //----------------------------------------------------------------------- $this->groupMembers = array(); $this->lCntMembersInGroup = 0; $this->groupMemLabels = new stdClass(); if (is_array($lGID)) { $strGroupWhere = ' gc_lGroupID IN (' . implode(',', $lGID) . ') '; } else { $strGroupWhere = " gc_lGroupID={$lGID} "; } switch ($enumGroupType) { case CENUM_CONTEXT_BIZ: $this->groupMemLabels->strName = 'Business/Organization'; $this->groupMemLabels->strAddress = 'Address'; $this->groupMemLabels->strKey = 'Business ID'; $sqlStr = "SELECT\n gc_lForeignID AS lKeyID, gc_dteAdded,\n pe_strLName AS strName,\n CONCAT(pe_strAddr1, '\\n',\n pe_strAddr2, '\\n',\n pe_strCity, '\\n',\n pe_strState,' ', pe_strZip, ' ', pe_strCountry) AS strAddress\n FROM groups_child\n INNER JOIN people_names ON pe_lKeyID=gc_lForeignID\n WHERE {$strGroupWhere}\n AND NOT pe_bRetired\n ORDER BY pe_strLName, gc_lForeignID;"; break; case CENUM_CONTEXT_PEOPLE: $this->groupMemLabels->strName = 'Name'; $this->groupMemLabels->strAddress = 'Address'; $this->groupMemLabels->strKey = 'People ID'; $sqlStr = "SELECT\n gc_lForeignID AS lKeyID, gc_dteAdded,\n CONCAT(pe_strLName, ', ', pe_strFName) AS strName,\n CONCAT(pe_strAddr1, '\\n',\n pe_strAddr2, '\\n',\n pe_strCity, '\\n',\n pe_strState,' ', pe_strZip, ' ', pe_strCountry) AS strAddress\n FROM groups_child\n INNER JOIN people_names ON pe_lKeyID=gc_lForeignID\n WHERE {$strGroupWhere}\n AND NOT pe_bRetired\n ORDER BY pe_strLName, pe_strFName, gc_lForeignID;"; break; case CENUM_CONTEXT_CLIENT: $this->groupMemLabels->strName = 'Client'; $this->groupMemLabels->strAddress = 'Location'; $this->groupMemLabels->strKey = 'client ID'; $sqlStr = "SELECT\n gc_lForeignID AS lKeyID, gc_dteAdded,\n CONCAT(cr_strLName, ', ', cr_strFName) AS strName,\n cl_strLocation AS strAddress\n FROM groups_child\n INNER JOIN client_records ON cr_lKeyID = gc_lForeignID\n INNER JOIN client_location ON cr_lLocationID = cl_lKeyID\n WHERE {$strGroupWhere}\n AND NOT cr_bRetired\n ORDER BY cr_strLName, cr_strFName, gc_lForeignID;"; break; case CENUM_CONTEXT_SPONSORSHIP: $this->groupMemLabels->strName = 'Sponsor'; $this->groupMemLabels->strAddress = 'Address'; $this->groupMemLabels->strKey = 'sponsor ID'; $sqlStr = "SELECT\n gc_lForeignID AS lKeyID, gc_dteAdded,\n CONCAT(pe_strLName, ', ', pe_strFName) AS strName,\n CONCAT(pe_strAddr1, '\\n',\n pe_strAddr2, '\\n',\n pe_strCity, '\\n',\n pe_strState,' ', pe_strZip, ' ', pe_strCountry) AS strAddress\n FROM groups_child\n INNER JOIN sponsor ON sp_lKeyID = gc_lForeignID\n INNER JOIN people_names ON sp_lForeignID = pe_lKeyID\n WHERE {$strGroupWhere}\n AND NOT pe_bRetired\n AND NOT sp_bRetired\n ORDER BY pe_strLName, pe_strFName, gc_lForeignID;"; break; case CENUM_CONTEXT_STAFF_TS_LOCATIONS: case CENUM_CONTEXT_STAFF_TS_PROJECTS: $this->groupMemLabels->strName = 'Time Sheet Templates'; $this->groupMemLabels->strAddress = 'N/A'; $this->groupMemLabels->strKey = 'template ID'; $sqlStr = "SELECT\n gc_lForeignID AS lKeyID, gc_dteAdded,\n ts_strTSName AS strName,\n 'n/a' AS strAddress\n FROM groups_child\n INNER JOIN staff_timesheets ON ts_lKeyID = gc_lForeignID\n WHERE {$strGroupWhere}\n AND NOT ts_bRetired\n ORDER BY ts_strTSName, gc_lForeignID;"; break; case CENUM_CONTEXT_STAFF: case CENUM_CONTEXT_USER: $this->groupMemLabels->strName = 'User'; $this->groupMemLabels->strAddress = 'Address'; $this->groupMemLabels->strKey = 'user ID'; $sqlStr = "SELECT\n gc_lForeignID AS lKeyID, gc_dteAdded,\n CONCAT(us_strLastName, ', ', us_strFirstName) AS strName,\n CONCAT(us_strAddr1, '\\n',\n us_strAddr2, '\\n',\n us_strCity, '\\n',\n us_strState,' ', us_strZip, ' ', us_strCountry) AS strAddress\n FROM groups_child\n INNER JOIN admin_users ON us_lKeyID = gc_lForeignID\n -- INNER JOIN people_names ON sp_lForeignID = pe_lKeyID\n WHERE {$strGroupWhere}\n AND NOT us_bInactive\n ORDER BY us_strLastName, us_strFirstName, gc_lForeignID;"; break; case CENUM_CONTEXT_VOLUNTEER: $this->groupMemLabels->strName = 'Name'; $this->groupMemLabels->strAddress = 'Address'; $this->groupMemLabels->strKey = 'vol ID'; $sqlStr = "SELECT\n gc_lForeignID AS lKeyID, gc_dteAdded,\n CONCAT(pe_strLName, ', ', pe_strFName) AS strName,\n CONCAT(pe_strAddr1, '\\n',\n pe_strAddr2, '\\n',\n pe_strCity, '\\n',\n pe_strState,' ', pe_strZip, ' ', pe_strCountry) AS strAddress\n FROM groups_child\n INNER JOIN volunteers ON vol_lKeyID=gc_lForeignID\n INNER JOIN people_names ON pe_lKeyID=vol_lPeopleID\n WHERE {$strGroupWhere}\n AND NOT pe_bRetired\n ORDER BY pe_strLName, pe_strFName, gc_lForeignID;"; break; default: screamForHelp($enumGroupType . ': group type not yet available<br>error on <b>line:</b> ' . __LINE__ . '<br><b>file: </b>' . __FILE__ . '<br><b>function: </b>' . __FUNCTION__); break; } $query = $this->db->query($sqlStr); $this->lCntMembersInGroup = $numRows = $query->num_rows(); if ($numRows > 0) { $idx = 0; foreach ($query->result() as $row) { $this->groupMembers[$idx] = new stdClass(); $this->groupMembers[$idx]->lKeyID = $lKeyID = (int) $row->lKeyID; $this->groupMembers[$idx]->dteAdded = dteMySQLDate2Unix($row->gc_dteAdded); $this->groupMembers[$idx]->strAddress = str_replace("\n\n", "\n", $row->strAddress); $this->groupMembers[$idx]->strName = $strName = trim($row->strName); $lNameLenM1 = strlen($strName) - 1; if (substr($strName, $lNameLenM1, 1) == ',') { // business sponsorships; remove comma from name $this->groupMembers[$idx]->strName = substr($strName, 0, $lNameLenM1); } switch ($enumGroupType) { case CENUM_CONTEXT_BIZ: $this->groupMembers[$idx]->strLinkView = strLinkView_BizRecord($lKeyID, 'View business record', true, ''); break; case CENUM_CONTEXT_CLIENT: $this->groupMembers[$idx]->strLinkView = strLinkView_ClientRecord($lKeyID, 'View client record', true, ''); break; case CENUM_CONTEXT_PEOPLE: $this->groupMembers[$idx]->strLinkView = strLinkView_PeopleRecord($lKeyID, 'View people record', true, ''); break; case CENUM_CONTEXT_SPONSORSHIP: $this->groupMembers[$idx]->strLinkView = strLinkView_Sponsorship($lKeyID, 'View sponsorship record', true, ''); break; case CENUM_CONTEXT_STAFF_TS_LOCATIONS: case CENUM_CONTEXT_STAFF_TS_PROJECTS: $this->groupMembers[$idx]->strLinkView = strLinkView_TimeSheetTemplateRecord($lKeyID, 'View timesheet template', true); break; case CENUM_CONTEXT_VOLUNTEER: $this->groupMembers[$idx]->strLinkView = strLinkView_Volunteer($lKeyID, 'View volunteer record', true, ''); break; case CENUM_CONTEXT_STAFF: case CENUM_CONTEXT_USER: $this->groupMembers[$idx]->strLinkView = strLinkView_User($lKeyID, 'View user record', true, ''); break; default: screamForHelp($enumGroupType . ': group type not yet available<br>error on <b>line:</b> ' . __LINE__ . '<br><b>file: </b>' . __FILE__ . '<br><b>function: </b>' . __FUNCTION__); break; } ++$idx; } } }
public function strHTMLOneLineLink($clsSingleRem) { /*--------------------------------------------------------------------- sample call: $clsRem->loadReminders(); if ($clsRem->lNumReminders > 0){ foreach ($clsRem->reminders as $clsSingleRem){ $strRemLink = $clsRem->strHTMLOneLineLink($clsSingleRem); } } ---------------------------------------------------------------------*/ global $genumDateFormat; $enumRemType = $clsSingleRem->enumSource; $lFID = $clsSingleRem->lForeignID; switch ($enumRemType) { case CENUM_CONTEXT_PEOPLE: $people = new mpeople(); $people->lPeopleID = $lFID; $people->peopleInfoLight(); $strRemLink = 'people reminder for ' . $people->strSafeName . strLinkView_PeopleRecord($lFID, 'View people record', true); break; case CENUM_CONTEXT_BIZ: $clsBiz = new mbiz(); $clsBiz->lBID = $lFID; $clsBiz->bizInfoLight(); $strRemLink = 'business reminder for ' . $clsBiz->strSafeName . strLinkView_BizRecord($lFID, 'View business record', true); break; case CENUM_CONTEXT_CLIENT: $clsClient = new mclients(); $clsClient->loadClientsViaClientID($lFID); $strRemLink = 'client reminder for ' . $clsClient->clients[0]->strSafeName . ' ' . strLinkView_ClientRecord($lFID, 'View client record', true); break; case CENUM_CONTEXT_GIFT: $clsGifts = new mdonations(); $clsGifts->loadGiftViaGID($lFID); $gift = $clsGifts->gifts[0]; $strRemLink = 'gift reminder for ' . $gift->strACOCurSymbol . number_format($gift->gi_curAmnt, 2) . ' ' . $gift->strSafeName . ' of ' . date($genumDateFormat, $gift->gi_dteDonation) . ' ' . strLinkView_GiftsRecord($lFID, 'View gift record', true); break; case CENUM_CONTEXT_USER: $clsUser = new muser_accts(); $clsUser->loadSingleUserRecord($lFID); $user =& $clsUser->userRec[0]; $strRemLink = 'user reminder for ' . $user->strSafeName . ' ' . strLinkView_User($lFID, 'View user record', true); break; case CENUM_CONTEXT_SPONSORSHIP: $cSpon = new msponsorship(); $cSpon->sponsorInfoViaID($lFID); $strRemLink = 'sponsorship reminder for sponsor ' . $cSpon->sponInfo[0]->strSponSafeNameFL . ' ' . strLinkView_Sponsorship($lFID, 'View sponsorship record', true); break; case CENUM_CONTEXT_LOCATION: case CENUM_CONTEXT_VOLUNTEER: default: screamForHelp($enumRemType . ': Switch type not implemented</b><br>error on <b>line:</b> ' . __LINE__ . '<br><b>file:</b> ' . __FILE__ . '<br><b>function:</b> ' . __FUNCTION__); break; } return $strRemLink; }