if ($clsDir->bAdmin) {
     $strAcctType = 'Admin';
 } elseif ($clsDir->bVolAccount) {
     $strAcctType = 'Volunteer';
 } else {
     $strAcctType = 'User';
 }
 if ($clsDir->us_bDebugger) {
     $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>
Ejemplo n.º 2
0
function showUserRecBlock($clsRpt, $lUserID, $clsUsers, $lLabelWidth, $bAsAdmin)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $gdteNow, $glUserID, $gbVolLogin;
    if ($lUserID == $glUserID || $clsUsers->us_bInactive) {
        $strLinkDeactivate = '';
    } else {
        $strLinkDeactivate = '&nbsp;&nbsp;&nbsp;&nbsp;' . strLinkSpecial_UserDeactivate($lUserID, 'Deactivate user', true);
    }
    if (!$gbVolLogin) {
        if ($clsUsers->us_bInactive) {
            $strLinkActivate = '&nbsp;&nbsp;&nbsp;&nbsp;' . strLinkSpecial_UserActivate($lUserID, 'Activate user', true);
        } else {
            $strLinkActivate = '';
        }
    }
    if ($bAsAdmin) {
        openBlock('User Account', strLinkEdit_User($lUserID, 'Edit user record', true) . $strLinkDeactivate . $strLinkActivate);
    } else {
        openBlock('Your Account', strLinkEdit_YourAcct($lUserID, 'Edit your account record', true));
    }
    echoT($clsRpt->openReport());
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('ID:', $lLabelWidth) . $clsRpt->writeCell(str_pad($lUserID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('User Name:', $lLabelWidth) . $clsRpt->writeCell(htmlspecialchars($clsUsers->us_strUserName)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Name:', $lLabelWidth) . $clsRpt->writeCell($clsUsers->strSafeName) . $clsRpt->closeRow());
    if (!$gbVolLogin) {
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Status:', $lLabelWidth) . $clsRpt->writeCell($clsUsers->us_bInactive ? '<b>INACTIVE</b>' : 'Active') . $clsRpt->closeRow());
    }
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Address:', $lLabelWidth) . $clsRpt->writeCell($clsUsers->strAddress) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Phone:', $lLabelWidth) . $clsRpt->writeCell(htmlspecialchars($clsUsers->us_strPhone)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Cell:', $lLabelWidth) . $clsRpt->writeCell(htmlspecialchars($clsUsers->us_strCell)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Email:', $lLabelWidth) . $clsRpt->writeCell(htmlspecialchars($clsUsers->us_strEmail)) . $clsRpt->closeRow());
    $strAcctPerms = '';
    if ($clsUsers->bStandardUser && $bAsAdmin) {
        if ($clsUsers->us_bUserDataEntryPeople) {
            $strAcctPerms .= '<br>* Data Entry (people/businesses/volunteers)';
        }
        if ($clsUsers->us_bUserDataEntryGifts) {
            $strAcctPerms .= '<br>* Data Entry (donations)';
        }
        if ($clsUsers->us_bUserEditPeople) {
            $strAcctPerms .= '<br>* Edit (people/businesses/volunteers)';
        }
        if ($clsUsers->us_bUserEditGifts) {
            $strAcctPerms .= '<br>* Edit (donations)';
        }
        if ($clsUsers->us_bUserViewPeople) {
            $strAcctPerms .= '<br>* View (people/businesses/volunteers)';
        }
        if ($clsUsers->us_bUserViewGiftHistory) {
            $strAcctPerms .= '<br>* View (gift histories)';
        }
        if ($clsUsers->us_bUserViewReports) {
            $strAcctPerms .= '<br>* View (reports)';
        }
        if ($clsUsers->us_bUserAllowExports) {
            $strAcctPerms .= '<br>* Allow exports';
        }
        if ($clsUsers->us_bUserAllowSponsorship) {
            $strAcctPerms .= '<br>* Access to sponsorships';
        }
        if ($clsUsers->us_bUserAllowSponFinancial) {
            $strAcctPerms .= '<br>* Access to sponsorships financials';
        }
        if ($clsUsers->us_bUserAllowClient) {
            $strAcctPerms .= '<br>* Access to client records';
        }
        if ($clsUsers->us_bUserAllowAuctions) {
            $strAcctPerms .= '<br>* Allow access to silent auctions';
        }
        if ($clsUsers->us_bUserAllowInventory) {
            $strAcctPerms .= '<br>* Allow access to inventory management';
        }
        if ($clsUsers->us_bUserAllowGrants) {
            $strAcctPerms .= '<br>* Allow access to grants';
        }
    }
    if (!$gbVolLogin) {
        $strAcctType = '';
        if ($clsUsers->us_bAdmin) {
            $strAcctType = 'Admin';
        } elseif ($clsUsers->us_bVolAccount) {
            $strAcctType = 'Volunteer';
        } else {
            $strAcctType = 'User';
        }
        if ($clsUsers->us_bDebugger) {
            $strAcctType .= ' / Debugger';
        }
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Account Type:', $lLabelWidth) . $clsRpt->writeCell($strAcctType . $strAcctPerms) . $clsRpt->closeRow());
        if ($clsUsers->us_bVolAccount) {
            $strAccess = '';
            if ($clsUsers->us_bVolEditContact) {
                $strAccess .= '* Edit contact information<br>';
            }
            if ($clsUsers->us_bVolPassReset) {
                $strAccess .= '* Reset password<br>';
            }
            if ($clsUsers->us_bVolViewGiftHistory) {
                $strAccess .= '* View donation history<br>';
            }
            if ($clsUsers->us_bVolEditJobSkills) {
                $strAccess .= '* Update job skills<br>';
            }
            if ($clsUsers->us_bVolViewHrsHistory) {
                $strAccess .= '* View history of volunteer hours<br>';
            }
            if ($clsUsers->us_bVolAddVolHours) {
                $strAccess .= '* Add/edit volunteer hours<br>';
            }
            if ($clsUsers->us_bVolShiftSignup) {
                $strAccess .= '* Sign up for volunteer shifts<br>';
            }
            echoT($clsRpt->openRow() . $clsRpt->writeLabel('Volunteer Access:', $lLabelWidth) . $clsRpt->writeCell($strAccess) . $clsRpt->closeRow());
        }
    }
    if (!is_null($clsUsers->lPeopleID) && !$gbVolLogin) {
        $lPID = $clsUsers->lPeopleID;
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('People ID:', $lLabelWidth) . $clsRpt->writeCell(str_pad($lPID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow());
    }
    echoT($clsRpt->openRow() . $clsRpt->writeLabel('Date format:', $lLabelWidth) . $clsRpt->writeCell(date($clsUsers->us_enumDateFormat, $gdteNow)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Measurement:', $lLabelWidth) . $clsRpt->writeCell($clsUsers->us_enumMeasurePref) . $clsRpt->closeRow() . $clsRpt->closeReport());
    closeBlock();
}