function userTable(&$clsForm, &$utable, &$errMessages, $strSafeAttendLabel, $strSafeEnrollLabel)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $glLabelWidth, $gbInDiv, $gdivAtt;
    openBlock($utable->strTableLabel, '');
    echoT('<table class="enpView" >');
    $clsForm->strStyleExtraLabel = 'width: ' . $glLabelWidth . 'pt; padding-top: 6px;';
    if ($utable->bCProg) {
        if ($utable->bEnrollment) {
            cProgramEDefaultFields($clsForm, $utable, $errMessages, $strSafeEnrollLabel);
        } else {
            cProgramADefaultFields($clsForm, $utable, $errMessages, $strSafeAttendLabel);
        }
    }
    if (isset($utable->ufields)) {
        foreach ($utable->ufields as $ufield) {
            showUserField($clsForm, $ufield, $errMessages);
        }
    }
    echoT($clsForm->strLabelRowOneCol('<i>* Required fields</i>', 1));
    if ($gbInDiv) {
        $gdivAtt->bCloseDiv = true;
        echoT('</table>' . "\n" . strCloseBlock($gdivAtt));
        closeBlock();
    } else {
        echoT('</table>');
        closeBlock();
    }
}
function userTables(&$clsForm, $lNumTables, &$utables, &$errMessages)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $glLabelWidth;
    if ($lNumTables == 0) {
        return;
    }
    foreach ($utables as $utable) {
        $strBLabel = '<font style="font-variant: normal; font-size: 9pt;">';
        if ($utable->bMultiEntry) {
            $strBLabel .= ' <i>(adds new record)</i>';
        } else {
            $strBLabel .= ' <i>(updates existing record)</i>';
        }
        $strBLabel .= '</font>';
        openBlock(htmlspecialchars($utable->strUserTableName) . $strBLabel, '');
        echoT('<table class="enpView" >');
        $clsForm->strStyleExtraLabel = 'width: ' . $glLabelWidth . 'pt; padding-top: 6px;';
        foreach ($utable->ufields as $ufield) {
            showUserField($clsForm, $ufield, $errMessages);
        }
        echoT($clsForm->strLabelRowOneCol('<i>* Required fields</i>', 1));
        echoT('</table>');
        closeBlock();
    }
}
Ejemplo n.º 3
0
function userTables(&$clsForm, $lNumTables, &$utables, &$errMessages)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $glLabelWidth;
    if ($lNumTables == 0) {
        return;
    }
    foreach ($utables as $utable) {
        openBlock(htmlspecialchars($utable->strUserTableName), '');
        echoT('<table class="enpView" >');
        $clsForm->strStyleExtraLabel = 'width: ' . $glLabelWidth . 'pt; padding-top: 6px;';
        foreach ($utable->ufields as $ufield) {
            showUserField($clsForm, $ufield, $errMessages);
        }
        echoT($clsForm->strLabelRowOneCol('<i>* Required fields</i>', 1));
        echoT('</table>');
        closeBlock();
    }
}