示例#1
0
function makeSyearInput($value = '')
{
    $syear = '20' . GetSysYear();
    if ($value < 50) {
        $default = '20' . $value;
    } else {
        $default = '19' . $value;
    }
    if (!$value) {
        $default = $syear;
    }
    $return .= "<SELECT name=syear>";
    for ($i = $syear - 3; $i < $syear + 3; $i++) {
        $year = substr($i, 2);
        $return .= "<OPTION value={$year}" . ($default == $i ? ' SELECTED' : '') . ">" . DispYear($year) . "</OPTION>";
    }
    $return .= "</SELECT>";
    return $return;
}
示例#2
0
    PrepareSchool(SessionSchool(), '', SessionCurSchool());
    Warehouse('searchgrade');
    Warehouse('searchyear');
    echo '<TR><TD colspan=2 align=center>';
    Buttons('Find', 'Reset');
    echo '</TD></TR>';
    echo '</TABLE>';
    PopTable('footer');
}
if ($_REQUEST[modfunc] == 'list') {
    if ($_REQUEST[balance_low] > $_REQUEST[balance_high]) {
        $tmp = $_REQUEST[balance_high];
        $_REQUEST[balance_high] = $_REQUEST[balance_low];
        $_REQUEST[balance_low] = $tmp;
    }
    DrawHeader($_REQUEST[editor] . ' Balances - School Year: ' . DispYear($_REQUEST[year]) . ' as of ' . ProperDate(DBDate()));
    if ($_REQUEST[editor] == 'Student Billing') {
        $sql = "SELECT ssm.STUDENT_ID,ssm.SCHOOL,ssm.GRADE,s.FIRST_NAME,s.LAST_NAME,s.MIDDLE_NAME ";
        $sql .= ",(SELECT COALESCE((SELECT sum(AMOUNT) FROM STU_BILLING_FEES WHERE STUDENT_ID=ssm.STUDENT_ID),0) -\n\t\tCOALESCE((SELECT sum(AMOUNT) FROM STU_BILLING_ACT WHERE STUDENT_ID=ssm.STUDENT_ID AND  (LUNCH_PAYMENT!='Y' OR LUNCH_PAYMENT IS NULL) ),0)\n\t\t" . FROM_DUAL . ") as BALANCE ";
        $sql .= "FROM STU_SCHOOL_MEETS ssm,STUDENTS s\n\t\t\t\tWHERE ssm.SYEAR='{$_REQUEST['year']}' AND s.STUDENT_ID=ssm.STUDENT_ID ";
        if (($_REQUEST[balance_low] || $_REQUEST[balance_low] === '0') && ($_REQUEST[balance_high] || $_REQUEST[balance_high] === '0')) {
            $sql .= "AND (SELECT COALESCE((SELECT sum(AMOUNT) FROM STU_BILLING_ACT WHERE STUDENT_ID=ssm.STUDENT_ID),0) -\n\t\t\t\t\tCOALESCE((SELECT sum(AMOUNT) FROM STU_BILLING_FEES WHERE STUDENT_ID=ssm.STUDENT_ID),0) " . FROM_DUAL . ")\n\t\t\t\t\t BETWEEN '{$_REQUEST['balance_low']}' AND '{$_REQUEST['balance_high']}' ";
        }
        if ($_REQUEST[not_zero] == 'Y') {
            $sql .= "AND (SELECT COALESCE((SELECT sum(AMOUNT) FROM STU_BILLING_ACT WHERE STUDENT_ID=ssm.STUDENT_ID),0) -\n\t\t\t\t\tCOALESCE((SELECT sum(AMOUNT) FROM STU_BILLING_FEES WHERE STUDENT_ID=ssm.STUDENT_ID),0) " . FROM_DUAL . ")\n\t\t\t\t\t!= '0' ";
        }
        if ($_REQUEST[sch]) {
            $sql .= "AND ssm.SCHOOL='{$_REQUEST['sch']}' ";
        }
        if ($_REQUEST[grade]) {
            $sql .= "AND ssm.GRADE='{$_REQUEST['grade']}' ";
示例#3
0
 }
 if ($_REQUEST[stuid]) {
     $sql .= "AND ssm.STUDENT_ID='{$_REQUEST['stuid']}' ";
 }
 if ($_REQUEST[first]) {
     $sql .= "AND s.FIRST_NAME LIKE '" . strtoupper($_REQUEST[first]) . "%' ";
 }
 if ($_REQUEST[last]) {
     $sql .= "AND s.LAST_NAME LIKE '" . strtoupper($_REQUEST[last]) . "%' ";
 }
 $sql .= "ORDER BY s.LAST_NAME,s.FIRST_NAME,s.MIDDLE_NAME ";
 $QI = DBQuery($sql);
 $stubilling_RET = DBGet($QI, array('FIRST_NAME' => 'GetCapWords', 'LAST_NAME' => 'GetCapWords'));
 $debits_table = 'STU_BILLING_ACT_LUNCH';
 $credits_cond = " LUNCH_PAYMENT='Y' ";
 $lunch_title = '<B>Lunch Purchases and Payments</B><BR>School Year: ' . DispYear($_REQUEST[year]) . '<BR>as of ' . ProperDate(DBDate());
 $sql = "SELECT ssm.STUDENT_ID,ssm.SCHOOL,s.FIRST_NAME,s.LAST_NAME,s.MIDDLE_NAME ";
 if (($_REQUEST[balance_low] || $_REQUEST[balance_low] === '0') && ($_REQUEST[balance_high] || $_REQUEST[balance_high] === '0')) {
     $sql .= ",(SELECT COALESCE((SELECT sum(AMOUNT) FROM STU_BILLING_ACT WHERE STUDENT_ID=ssm.STUDENT_ID AND {$credits_cond}),0) -\n\t\t\t\tCOALESCE((SELECT sum(AMOUNT) FROM {$debits_table} WHERE STUDENT_ID=ssm.STUDENT_ID),0) " . FROM_DUAL . ") as BALANCE ";
 }
 $sql .= "FROM STU_SCHOOL_MEETS ssm,STUDENTS s\n\t\t\tWHERE ssm.SYEAR='{$_REQUEST['year']}' AND s.STUDENT_ID=ssm.STUDENT_ID ";
 if (($_REQUEST[balance_low] || $_REQUEST[balance_low] === '0') && ($_REQUEST[balance_high] || $_REQUEST[balance_high] === '0')) {
     $sql .= "AND (SELECT COALESCE((SELECT sum(AMOUNT) FROM STU_BILLING_ACT WHERE STUDENT_ID=ssm.STUDENT_ID AND {$credits_cond}),0) -\n\t\t\t\tCOALESCE((SELECT sum(AMOUNT) FROM {$debits_table} WHERE STUDENT_ID=ssm.STUDENT_ID),0) " . FROM_DUAL . ")\n\t\t\t\t BETWEEN '{$_REQUEST['balance_low']}' AND '{$_REQUEST['balance_high']}' ";
 }
 if ($_REQUEST[not_zero] == 'Y') {
     $sql .= "AND (SELECT COALESCE((SELECT sum(AMOUNT) FROM STU_BILLING_ACT WHERE STUDENT_ID=ssm.STUDENT_ID AND {$credits_cond}),0) -\n\t\t\t\tCOALESCE((SELECT sum(AMOUNT) FROM {$debits_table} WHERE STUDENT_ID=ssm.STUDENT_ID),0) " . FROM_DUAL . ")\n\t\t\t\t != '0' ";
 }
 if ($_REQUEST[sch]) {
     $sql .= "AND ssm.SCHOOL='{$_REQUEST['sch']}' ";
 }
 if ($_REQUEST[grade]) {
示例#4
0
			<OPTION value=with>With this Fee</OPTION>
			<OPTION value=without>Without this Fee</OPTION>
			<OPTION value=waived>With this Fee Waived</OPTION>
		</SELECT>';
    echo '</TD></TR>';
    PrepareSchool(SessionSchool(), '', SessionCurSchool());
    Warehouse('searchgrade');
    Warehouse('searchyear');
    echo '<TR><TD colspan=2 align=center>';
    Buttons('Find', 'Reset');
    echo '</TD></TR>';
    echo '</TABLE>';
    PopTable('footer');
}
if ($_REQUEST[modfunc] == 'list') {
    DrawHeader('School Year: ' . DispYear($_REQUEST[year]) . ' as of ' . ProperDate(DBDate()));
    switch ($_REQUEST[editor]) {
        case 'without':
            $not = 'NOT';
            break;
        case 'waived':
            $waived = 'AND FORGIVEN_FEE_ID IS NOT NULL';
            break;
        default:
            break;
    }
    $sql = "SELECT ssm.STUDENT_ID,ssm.SCHOOL,ssm.GRADE,s.FIRST_NAME,s.LAST_NAME,s.MIDDLE_NAME \n\t\t\tFROM STU_SCHOOL_MEETS ssm,STUDENTS s\n\t\t\tWHERE ssm.SYEAR='{$_REQUEST['year']}' AND s.STUDENT_ID=ssm.STUDENT_ID \n\t\t\t\tAND {$not} EXISTS (SELECT '' FROM STU_BILLING_FEES WHERE DEFINED_ID='{$_REQUEST['fee_id']}' {$waived})";
    if ($_REQUEST[sch]) {
        $sql .= "AND ssm.SCHOOL='{$_REQUEST['sch']}' ";
    }
    if ($_REQUEST[grade]) {