if (isset($strSponProgDDL)) {
    $attributes = array('name' => 'frmSelectProg', 'id' => 'frmSelProg');
    echoT(form_open('sponsors/spon_directory/setProg/' . ($bShowInactive ? 'true' : 'false') . '/A/0/' . $lRecsPerPage, $attributes));
    echoT($strSponProgDDL);
    echoT('
      <input type="submit" name="cmdSubmit" value="Refresh"
      style=" text-align: center; width: 70pt;"
      onclick="this.disabled=1; this.form.submit();"
      class="btn"
      onmouseover="this.className=\'btn btnhov\'"
      onmouseout="this.className=\'btn\'">');
}
echoT(form_close() . '<br>');
if ($lNumSponProgs > 0) {
    if ($lNumRecsTot > 0) {
        openUserDirectory($strDirLetter, $strLinkBase, $strImgBase, $lNumRecsTot, $directoryRecsPerPage, $directoryStartRec, $lNumDisplayRows);
    } else {
        echoT('There are no sponsors that meet your search criteria.<br>');
    }
    echoT($strLinkToggleActive);
} else {
    echoT('There are no sponsorship programs defined! Please configure your sponsorship programs.<br>');
}
function openUserDirectory($strDirLetter, &$strLinkBase, &$strImgBase, &$lTotRecs, $lRecsPerPage, $lStartRec, $lNumThisPage)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    if ($strDirLetter . '' == '') {
        $strUsers = 'All Sponsors';
    } else {
<?php

global $genumDateFormat, $glUserID;
openUserDirectory($strLinkBase, $strImgBase, $lNumRecsTot, $lNumDisplayRows);
foreach ($userList as $clsDir) {
    $lUserID = $clsDir->lUserID;
    $bInactive = $clsDir->bInactive;
    if (is_null($clsDir->dteLastLogin)) {
        $strDateLastLogin = '******';
    } else {
        $strDateLastLogin = date($genumDateFormat . ' H:i:s', $clsDir->dteLastLogin);
    }
    $strAcctType = '';
    if ($clsDir->bAdmin) {
        $strAcctType = 'Admin';
    } elseif ($clsDir->bVolAccount) {
        $strAcctType = 'Volunteer';
    } else {
        $strAcctType = 'User';
    }
    if ($clsDir->us_bDebugger) {
        $strAcctType .= ' / Debugger';
    }
    $strColor = '';
    if ($glUserID == $lUserID) {
        $strLinkRem = '&nbsp;';
    } else {
        if ($bInactive) {
            $strLinkRem = strLinkSpecial_UserActivate($lUserID, 'Activate user', true);
            $strColor = 'color: #999;font-style:italic;';
        } else {