コード例 #1
0
function _makeEndInputCodeenrl($value, $column)
{
    global $THIS_RET;
    $drop_codes = array();
    if ($THIS_RET['ID']) {
        $id = $THIS_RET['ID'];
    } else {
        $id = 'new';
    }
    $options_RET = DBGet(DBQuery('SELECT ID,TITLE AS TITLE,TYPE FROM student_enrollment_codes WHERE SYEAR=\'' . ($THIS_RET['SYEAR'] != '' ? $THIS_RET['SYEAR'] : UserSyear()) . '\'  AND (TYPE=\'Drop\' OR TYPE=\'Roll\' OR TYPE=\'TrnD\')'));
    if ($options_RET) {
        foreach ($options_RET as $option) {
            $drop_codes[$option['ID']] = $option['TITLE'];
        }
    }
    $type_RET = DBGet(DBQuery('SELECT ID, TYPE FROM student_enrollment_codes WHERE SYEAR=\'' . ($THIS_RET['SYEAR'] != '' ? $THIS_RET['SYEAR'] : UserSyear()) . '\' AND TYPE=\'TrnD\''));
    if (count($type_RET) > 0) {
        $type_id = $type_RET[1]['ID'];
    }
    $option_output = DBGet(DBQuery('SELECT ID,TITLE AS TITLE FROM student_enrollment_codes WHERE SYEAR=\'' . ($THIS_RET['SYEAR'] != '' ? $THIS_RET['SYEAR'] : UserSyear()) . '\' AND (TYPE=\'Drop\' OR TYPE=\'Roll\' OR TYPE=\'TrnE\') AND ID=\'' . $value . '\''));
    // student_enrollment select create here
    if ($THIS_RET['SYEAR'] == UserSyear()) {
        return '<TABLE class=LO_field><TR><TD>' . SelectInput_for_EndInput($THIS_RET['DROP_CODE'], 'values[student_enrollment][' . $id . '][DROP_CODE]', '', $drop_codes, $type_id, 'N/A', 'style="max-width:150;"') . '</TD></TR></TABLE>';
    } else {
        if ($value == '') {
            return "N/A";
        } else {
            return $option_output[1]['TITLE'];
        }
    }
}
コード例 #2
0
ファイル: functions.php プロジェクト: 26746647/Belize-openSIS
function _makeEndInput($value, $column)
{
    global $THIS_RET, $drop_codes;
    if ($THIS_RET['ID']) {
        $id = $THIS_RET['ID'];
    } else {
        $id = 'new';
    }
    if (!$drop_codes) {
        $options_RET = DBGet(DBQuery("SELECT ID,TITLE AS TITLE FROM STUDENT_ENROLLMENT_CODES WHERE SYEAR='" . UserSyear() . "' AND TYPE='Drop'"));
        if ($options_RET) {
            foreach ($options_RET as $option) {
                $drop_codes[$option['ID']] = $option['TITLE'];
            }
        }
    }
    // STUDENT_ENROLLMENT select create here
    return '<TABLE class=LO_field><TR><TD>' . DateInput($value, 'values[STUDENT_ENROLLMENT][' . $id . '][' . $column . ']') . '</TD><TD> - </TD><TD>' . SelectInput_for_EndInput($THIS_RET['DROP_CODE'], 'values[STUDENT_ENROLLMENT][' . $id . '][DROP_CODE]', '', $drop_codes, 'N/A', 'style="max-width:150;"') . '</TD></TR></TABLE>';
}