}
$functions = array('ENROLLMENT_CODE' => '_makeStartInputCodeenrl', 'DROP_CODE' => '_makeEndInputCodeenrl', 'SCHOOL_ID' => '_makeSchoolInput');
unset($THIS_RET);
$student_RET_qry = 'SELECT e.SYEAR, s.FIRST_NAME,s.LAST_NAME,s.GENDER, e.ID,e.GRADE_ID,e.ENROLLMENT_CODE,e.START_DATE,e.DROP_CODE,e.END_DATE,e.END_DATE AS END,e.SCHOOL_ID,e.NEXT_SCHOOL,e.CALENDAR_ID FROM student_enrollment e,students s WHERE e.STUDENT_ID=\'' . UserStudentID() . '\' AND e.SYEAR=\'' . UserSyear() . '\' AND e.STUDENT_ID=s.STUDENT_ID ORDER BY e.START_DATE';
$RET = DBGet(DBQuery($student_RET_qry));
$not_add = false;
if (count($RET)) {
    foreach ($RET as $in => $value) {
        if ($value['DROP_CODE'] == '' || !$value['DROP_CODE']) {
            $not_add = true;
        }
    }
}
$date_counter = 1;
if ($not_add == false) {
    $link['add']['html'] = array('START_DATE' => _makeEnrollmentDates('START_DATE', $date_counter), 'ENROLLMENT_CODE' => _makeStartInputCode('', 'ENROLLMENT_CODE'), 'SCHOOL_ID' => _makeSchoolInput('', 'SCHOOL_ID'));
}
unset($THIS_RET);
$RET = DBGet(DBQuery('SELECT e.DROP_CODE as DC,e.SYEAR, s.FIRST_NAME,s.LAST_NAME,s.GENDER, e.ID,e.GRADE_ID,e.ENROLLMENT_CODE,e.START_DATE,e.DROP_CODE,e.END_DATE,e.END_DATE AS END,e.SCHOOL_ID,e.NEXT_SCHOOL,e.CALENDAR_ID FROM student_enrollment e,students s WHERE e.STUDENT_ID=\'' . UserStudentID() . '\' AND e.SYEAR<=\'' . UserSyear() . '\' AND e.SCHOOL_ID=\'' . UserSchool() . '\' AND e.STUDENT_ID=s.STUDENT_ID ORDER BY e.START_DATE'), $functions);
if (count($RET)) {
    $date_counter = $date_counter + 1;
    foreach ($RET as $in => $value) {
        if ($value['DROP_CODE'] == '' || !$value['DROP_CODE']) {
            $not_add = true;
        }
        if ($RET[$in]['DC'] != '') {
            $get_SEC = DBGet(DBQuery('SELECT TYPE FROM student_enrollment_codes WHERE ID=' . $RET[$in]['DC']));
            $get_SEC = $get_SEC[1]['TYPE'];
        } else {
            $get_SEC = '';
        }
示例#2
0
    }
}
$functions = array('START_DATE' => '_makeStartInputDateenrl', 'ENROLLMENT_CODE' => '_makeStartInputCodeenrl', 'END_DATE' => '_makeEndInputDateenrl', 'DROP_CODE' => '_makeEndInputCodeenrl', 'SCHOOL_ID' => '_makeSchoolInput');
unset($THIS_RET);
$student_RET_qry = 'SELECT e.SYEAR, s.FIRST_NAME,s.LAST_NAME,s.GENDER, e.ID,e.GRADE_ID,e.ENROLLMENT_CODE,e.START_DATE,e.DROP_CODE,e.END_DATE,e.END_DATE AS END,e.SCHOOL_ID,e.NEXT_SCHOOL,e.CALENDAR_ID FROM student_enrollment e,students s WHERE e.STUDENT_ID=\'' . UserStudentID() . '\' AND e.SYEAR=\'' . UserSyear() . '\' AND e.STUDENT_ID=s.STUDENT_ID ORDER BY e.START_DATE';
$RET = DBGet(DBQuery($student_RET_qry));
$not_add = false;
if (count($RET)) {
    foreach ($RET as $value) {
        if ($value['DROP_CODE'] == '' || !$value['DROP_CODE']) {
            $not_add = true;
        }
    }
}
if ($not_add == false) {
    $link['add']['html'] = array('START_DATE' => _makeStartInputDate('', 'START_DATE'), 'ENROLLMENT_CODE' => _makeStartInputCode('', 'ENROLLMENT_CODE'), 'SCHOOL_ID' => _makeSchoolInput('', 'SCHOOL_ID'));
}
unset($THIS_RET);
$RET = DBGet(DBQuery('SELECT e.SYEAR, s.FIRST_NAME,s.LAST_NAME,s.GENDER, e.ID,e.GRADE_ID,e.ENROLLMENT_CODE,e.START_DATE,e.DROP_CODE,e.END_DATE,e.END_DATE AS END,e.SCHOOL_ID,e.NEXT_SCHOOL,e.CALENDAR_ID FROM student_enrollment e,students s WHERE e.STUDENT_ID=\'' . UserStudentID() . '\' AND e.SYEAR<=\'' . UserSyear() . '\' AND e.STUDENT_ID=s.STUDENT_ID ORDER BY e.START_DATE'), $functions);
$columns = array('START_DATE' => 'Start Date ', 'ENROLLMENT_CODE' => 'Enrollment Code', 'END_DATE' => 'Drop Date', 'DROP_CODE' => 'Drop Code', 'SCHOOL_ID' => 'School');
$schools_RET = DBGet(DBQuery('SELECT ID,TITLE FROM schools WHERE ID!=\'' . UserSchool() . '\''));
$next_school_options = array(UserSchool() => 'Next grade at current school', '0' => 'Retain', '-1' => 'Do not enroll after this school year');
if (count($schools_RET)) {
    foreach ($schools_RET as $school) {
        $next_school_options[$school['ID']] = $school['TITLE'];
    }
}
if (!UserSchool()) {
    $user_school_RET = DBGet(DBQuery('SELECT SCHOOL_ID FROM student_enrollment WHERE STUDENT_ID=\'' . UserStudentID() . '\' LIMIT 1'));
    $_SESSION['UserSchool'] = $user_school_RET[1]['SCHOOL_ID'];
}