当前位置: 首页>>代码示例>>PHP>>正文


PHP GetStuList函数代码示例

本文整理汇总了PHP中GetStuList函数的典型用法代码示例。如果您正苦于以下问题:PHP GetStuList函数的具体用法?PHP GetStuList怎么用?PHP GetStuList使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetStuList函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unset

$tmp_REQUEST = $_REQUEST;
unset($tmp_REQUEST['include_inactive']);
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']} method=POST>";
DrawHeaderHome('<INPUT type=checkbox name=include_inactive value=Y' . ($_REQUEST['include_inactive'] == 'Y' ? " CHECKED onclick='document.location.href=\"" . PreparePHP_SELF($tmp_REQUEST) . "&include_inactive=\";'" : " onclick='document.location.href=\"" . PreparePHP_SELF($tmp_REQUEST) . "&include_inactive=Y\";'") . '>Include Inactive Students');
echo '</FORM>';
$course_period_id = UserCoursePeriod();
$course_id = DBGet(DBQuery("SELECT COURSE_ID FROM COURSE_PERIODS WHERE COURSE_PERIOD_ID='{$course_period_id}'"));
$course_id = $course_id[1]['COURSE_ID'];
$max_allowed = Preferences('ANOMALOUS_MAX', 'Gradebook') / 100;
$extra['SELECT'] = ",ga.ASSIGNMENT_ID,gt.TITLE AS TYPE_TITLE,ga.TITLE,ga.POINTS AS TOTAL_POINTS,'' AS LETTER_GRADE";
$extra['SELECT'] .= ',(SELECT POINTS FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID) AS POINTS';
$extra['SELECT'] .= ',(SELECT COMMENT FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID) AS COMMENT';
$extra['FROM'] = ",GRADEBOOK_ASSIGNMENTS ga,GRADEBOOK_ASSIGNMENT_TYPES gt";
$extra['WHERE'] = 'AND ((SELECT POINTS FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID) IS NULL AND (ga.ASSIGNED_DATE IS NULL OR CURRENT_DATE>=ga.ASSIGNED_DATE) AND (ga.DUE_DATE IS NULL OR CURRENT_DATE>=ga.DUE_DATE) OR (SELECT POINTS FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID)<0 OR (SELECT POINTS FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID)>ga.POINTS*' . $max_allowed . ') AND ((ga.COURSE_ID=\'' . $course_id . '\' AND ga.STAFF_ID=\'' . User('STAFF_ID') . '\') OR ga.COURSE_PERIOD_ID=\'' . $course_period_id . '\') AND ga.MARKING_PERIOD_ID=\'' . UserMP() . '\' AND gt.ASSIGNMENT_TYPE_ID=ga.ASSIGNMENT_TYPE_ID';
$extra['functions'] = array('POINTS' => '_makePoints');
$students_RET = GetStuList($extra);
//echo '<pre>'; var_dump($students_RET); echo '</pre>';
if (AllowUse('Grades/Grades.php')) {
    $link = array('FULL_NAME' => array('link' => "Modules.php?modname=Grades/Grades.php&include_ianctive={$_REQUEST['include_inactive']}&assignment_id=all", 'variables' => array('student_id' => 'STUDENT_ID')), 'TITLE' => array('link' => "Modules.php?modname=Grades/Grades.php&include_inactive={$_REQUEST['include_inactive']}", 'variables' => array('assignment_id' => 'ASSIGNMENT_ID', 'student_id' => 'STUDENT_ID')));
}
$columns = array('FULL_NAME' => 'Name', 'STUDENT_ID' => 'Student ID', 'POINTS' => 'Problem', 'TYPE_TITLE' => 'Category', 'TITLE' => 'Assignment', 'COMMENT' => 'Comment');
ListOutput($students_RET, $columns, 'Anomalous Grade', 'Anomalous Grades', $link, array(), array('center' => false, 'save' => false, 'search' => false));
function _makePoints($value, $column)
{
    global $THIS_RET;
    if ($value == '') {
        return '<FONT class=red>Missing</FONT>';
    } elseif ($value == '-1') {
        return '<FONT color=#00a000>Excused</FONT>';
    } elseif ($value < 0) {
        return '<FONT class=red>Negative!</FONT>';
开发者ID:26746647,项目名称:Belize-openSIS,代码行数:31,代码来源:AnomalousGrades.php

示例2: DBGet

     $RET = DBGet(DBQuery('SELECT ID FROM attendance_codes WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND (DEFAULT_CODE!=\'Y\' OR DEFAULT_CODE IS NULL)'));
     if (count($RET)) {
         $extra['WHERE'] .= 'AND ac.ID IN (';
         foreach ($RET as $code) {
             $extra['WHERE'] .= '\'' . $code['ID'] . '\',';
         }
         $extra2['WHERE'] = $extra['WHERE'] = substr($extra['WHERE'], 0, -1) . ')';
     }
 }
 $extra['WHERE'] .= ')';
 $extra2['WHERE'] .= ')';
 $extra2['SELECT'] .= ',p.PERSON_ID,p.FIRST_NAME,p.LAST_NAME,sjp.STUDENT_RELATION,pjc.TITLE,pjc.VALUE,a.PHONE,sjp.ADDRESS_ID ';
 $extra2['FROM'] .= ',address a,people p,people_join_contacts pjc,students_join_people sjp,students_join_address sja ';
 $extra2['WHERE'] .= ' AND sja.STUDENT_ID=ssm.STUDENT_ID AND sjp.STUDENT_ID=sja.STUDENT_ID AND pjc.PERSON_ID=sjp.PERSON_ID AND p.PERSON_ID=sjp.PERSON_ID AND sjp.ADDRESS_ID=a.ADDRESS_ID AND (sjp.CUSTODY=\'Y\' OR sjp.EMERGENCY=\'Y\') ';
 $extra2['group'] = array('STUDENT_ID', 'PERSON_ID');
 $contacts_RET = GetStuList($extra2);
 $columns = array();
 $extra['SELECT'] .= ',NULL AS STATE_VALUE,NULL AS PHONE';
 $extra['functions']['PHONE'] = '_makePhone';
 $extra['functions']['STATE_VALUE'] = '_makeStateValue';
 $extra['columns_before']['PHONE'] = '' . _('Contact') . '';
 $extra['columns_after']['STATE_VALUE'] = '' . _('Present') . '';
 $extra['BackPrompt'] = false;
 $extra['Redirect'] = false;
 $extra['new'] = true;
 foreach ($periods_RET as $period) {
     $extra['SELECT'] .= ',\'' . '' . '\' AS PERIOD_' . $period['PERIOD_ID'];
     $extra['functions']['PERIOD_' . $period['PERIOD_ID']] = '_makeCodePulldown';
     $extra['columns_after']['PERIOD_' . $period['PERIOD_ID']] = $period['SHORT_NAME'];
 }
 echo "<FORM action=Modules.php?modname={$_REQUEST['modname']} method=POST>";
开发者ID:SysBind,项目名称:opensis-ml,代码行数:31,代码来源:Administration_fast.php

示例3: GetStuList

     $attendance_RET = GetStuList($extra);
 }
 if ($_REQUEST['elements']['mp_absences'] == 'Y' || $_REQUEST['elements']['ytd_absences'] == 'Y') {
     // GET THE DAILY ATTENDANCE
     unset($extra);
     $extra['WHERE'] = " AND s.STUDENT_ID IN ({$st_list})";
     $extra['SELECT_ONLY'] .= "ad.SCHOOL_DATE,ad.MARKING_PERIOD_ID,ad.STATE_VALUE,ssm.STUDENT_ID";
     $extra['FROM'] .= ",ATTENDANCE_DAY ad";
     $extra['WHERE'] .= " AND ad.STUDENT_ID=ssm.STUDENT_ID AND ad.SYEAR=ssm.SYEAR AND (ad.STATE_VALUE='0.0' OR ad.STATE_VALUE='.5') AND ad.SCHOOL_DATE<='" . GetMP($last_mp, 'END_DATE') . "'";
     $extra['group'][] = 'STUDENT_ID';
     $extra['group'][] = 'MARKING_PERIOD_ID';
     //Widgets('course'); // mab - same as above
     //Widgets('gpa');
     //Widgets('class_rank');
     //Widgets('letter_grade');
     $attendance_day_RET = GetStuList($extra);
 }
 if (count($RET)) {
     $columns = array('FULL_NAME' => _('Student'), 'COURSE_TITLE' => _('Course'));
     if ($_REQUEST['elements']['teacher'] == 'Y') {
         $columns += array('TEACHER' => _('Teacher'));
     }
     if ($_REQUEST['elements']['period_absences'] == 'Y') {
         $columns['ABSENCES'] = _('Abs<BR />YTD / MP');
     }
     foreach ($_REQUEST['mp_arr'] as $mp) {
         if ($_REQUEST['elements']['percents'] == 'Y') {
             $columns[$mp . '%'] = '%';
         }
         $columns[$mp] = GetMP($mp);
     }
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:31,代码来源:FinalGrades.php

示例4: unset

     $start2 = $startr;
     $end2 = $endr;
 }
 //echo "$totalrows";
 unset($extra);
 $extra['SELECT_ONLY'] .= 'ap.COURSE_PERIOD_ID, s.STUDENT_ID, s.FIRST_NAME, s.LAST_NAME, ap.SCHOOL_DATE, cp.TITLE, cp.SHORT_NAME, ap.PERIOD_ID, sc.START_DATE, sc.END_DATE ';
 $extra['FROM'] .= ' ,attendance_period ap, course_periods cp, schedule sc ';
 //$extra['WHERE'] .= " AND ssm.student_id=s.student_id AND ap.STUDENT_ID=s.STUDENT_ID AND ap.COURSE_PERIOD_ID = cp.COURSE_PERIOD_ID AND ('".DBDate()."' BETWEEN ssm.START_DATE AND ssm.END_DATE OR ssm.END_DATE IS NULL) ";
 //$extra['WHERE'] .= " AND ssm.student_id=s.student_id AND ap.STUDENT_ID=s.STUDENT_ID AND ap.COURSE_PERIOD_ID = cp.COURSE_PERIOD_ID ";
 $extra['WHERE'] .= ' AND ap.STUDENT_ID=s.STUDENT_ID AND sc.STUDENT_ID=s.STUDENT_ID AND ap.COURSE_PERIOD_ID = cp.COURSE_PERIOD_ID AND ap.COURSE_PERIOD_ID = sc.COURSE_PERIOD_ID AND (sc.END_DATE > \'' . date('Y-m-d') . ' \' OR sc.END_DATE IS NULL OR sc.END_DATE=\'0000-00-00\' ) ';
 $extra['ORDER_BY'] = ' STUDENT_ID, COURSE_PERIOD_ID, SCHOOL_DATE';
 Widgets('course');
 Widgets('gpa');
 Widgets('class_rank');
 Widgets('letter_grade');
 $result1 = GetStuList($extra);
 DrawBC("Attendance > " . ProgramTitle());
 echo "{$delete_message}";
 //echo "<form action=Modules.php?modname=Attendance/DuplicateAttendance.php&modfunc=&search_modfunc=list&next_modname=Attendance/DuplicateAttendance.php&_openSIS_PDF=true method=POST>";
 echo "<form action=Modules.php?modname=attendance/DuplicateAttendance.php&modfunc=&search_modfunc=list&next_modname=attendance/DuplicateAttendance.php&delete=true method=POST>";
 #DrawHeader('',SubmitButton(Delete,'','class=btn_medium'));
 $num_rows = $totalrows;
 if ($num_rows > $rows_per_page) {
     $totalpages = $num_rows / $rows_per_page;
     $totalpages = ceil($totalpages);
     echo "<center><small>Page:</small> ";
     $first = 0;
     $ii = 1;
     for ($i = 0; $i < $totalpages; $i++) {
         if ($urlpage == $ii) {
             echo "<b>{$ii}</b> &nbsp;";
开发者ID:jicheng17,项目名称:fh,代码行数:31,代码来源:DuplicateAttendance.php

示例5: GetStuList

function GetStuList(&$extra = array())
{
    global $contacts_RET, $view_other_RET, $_ROSARIO;
    if ((empty($extra['SELECT_ONLY']) || mb_strpos($extra['SELECT_ONLY'], 'GRADE_ID') !== false) && !isset($extra['functions']['GRADE_ID'])) {
        $functions = array('GRADE_ID' => 'GetGrade');
    } else {
        $functions = array();
    }
    if (isset($extra['functions'])) {
        $functions += $extra['functions'];
    }
    if (!isset($extra['MP']) && !isset($extra['DATE'])) {
        $extra['MP'] = UserMP();
        $extra['DATE'] = DBDate();
    } elseif (!$extra['MP']) {
        $extra['MP'] = GetCurrentMP('QTR', $extra['DATE'], false);
    } elseif (!$extra['DATE']) {
        $extra['DATE'] = DBDate();
    }
    if (isset($_REQUEST['expanded_view']) && $_REQUEST['expanded_view'] == 'true') {
        if (!$extra['columns_after']) {
            $extra['columns_after'] = array();
        }
        $view_fields_RET = DBGet(DBQuery("SELECT cf.ID,cf.TYPE,cf.TITLE FROM CUSTOM_FIELDS cf WHERE ((SELECT VALUE FROM PROGRAM_USER_CONFIG WHERE TITLE=cast(cf.ID AS TEXT) AND PROGRAM='StudentFieldsView' AND USER_ID='" . User('STAFF_ID') . "')='Y'" . ($extra['student_fields']['view'] ? " OR cf.ID IN (" . $extra['student_fields']['view'] . ")" : '') . ") ORDER BY cf.SORT_ORDER,cf.TITLE"));
        $view_address_RET = DBGet(DBQuery("SELECT VALUE FROM PROGRAM_USER_CONFIG WHERE PROGRAM='StudentFieldsView' AND TITLE='ADDRESS' AND USER_ID='" . User('STAFF_ID') . "'"));
        $view_address_RET = $view_address_RET[1]['VALUE'];
        $view_other_RET = DBGet(DBQuery("SELECT TITLE,VALUE FROM PROGRAM_USER_CONFIG WHERE PROGRAM='StudentFieldsView' AND TITLE IN ('CONTACT_INFO','HOME_PHONE','GUARDIANS','ALL_CONTACTS') AND USER_ID='" . User('STAFF_ID') . "'"), array(), array('TITLE'));
        if (!count($view_fields_RET) && !isset($view_address_RET) && !isset($view_other_RET['CONTACT_INFO'])) {
            //modif Francois: add translation
            $extra['columns_after'] = array('CONTACT_INFO' => '<IMG SRC="assets/down_phone_button.png" width="24">', 'CUSTOM_200000000' => _('Gender'), 'CUSTOM_200000001' => _('Ethnicity'), 'ADDRESS' => _('Mailing Address'), 'CITY' => _('City'), 'STATE' => _('State'), 'ZIPCODE' => _('Zipcode')) + $extra['columns_after'];
            $select = ',ssm.STUDENT_ID AS CONTACT_INFO,s.CUSTOM_200000000,s.CUSTOM_200000001,coalesce(a.MAIL_ADDRESS,a.ADDRESS) AS ADDRESS,coalesce(a.MAIL_CITY,a.CITY) AS CITY,coalesce(a.MAIL_STATE,a.STATE) AS STATE,coalesce(a.MAIL_ZIPCODE,a.ZIPCODE) AS ZIPCODE ';
            $extra['FROM'] = " LEFT OUTER JOIN STUDENTS_JOIN_ADDRESS sam ON (ssm.STUDENT_ID=sam.STUDENT_ID AND sam.RESIDENCE='Y') LEFT OUTER JOIN ADDRESS a ON (sam.ADDRESS_ID=a.ADDRESS_ID) " . $extra['FROM'];
            $functions['CONTACT_INFO'] = 'makeContactInfo';
            $RET = DBGet(DBQuery("SELECT ID,TYPE FROM CUSTOM_FIELDS WHERE ID IN ('200000000','200000001')"), array(), array('ID'));
            // if gender and ethnicity are converted to codeds or exports type
            if ($RET['200000000'][1]['TYPE'] == 'codeds' || $RET['200000000'][1]['TYPE'] == 'exports') {
                $functions['CUSTOM_200000000'] = 'DeCodeds';
            }
            if ($RET['200000001'][1]['TYPE'] == 'codeds' || $RET['200000001'][1]['TYPE'] == 'exports') {
                $functions['CUSTOM_200000001'] = 'DeCodeds';
            }
            $extra['singular'] = 'Student Address';
            $extra['plural'] = 'Student Addresses';
            $extra2['NoSearchTerms'] = true;
            $extra2['SELECT_ONLY'] = 'ssm.STUDENT_ID,p.PERSON_ID,p.FIRST_NAME,p.LAST_NAME,sjp.STUDENT_RELATION,pjc.TITLE,pjc.VALUE,a.PHONE,sjp.ADDRESS_ID ';
            $extra2['FROM'] .= ',ADDRESS a,STUDENTS_JOIN_ADDRESS sja LEFT OUTER JOIN STUDENTS_JOIN_PEOPLE sjp ON (sja.STUDENT_ID=sjp.STUDENT_ID AND sja.ADDRESS_ID=sjp.ADDRESS_ID AND (sjp.CUSTODY=\'Y\' OR sjp.EMERGENCY=\'Y\')) LEFT OUTER JOIN PEOPLE p ON (p.PERSON_ID=sjp.PERSON_ID) LEFT OUTER JOIN PEOPLE_JOIN_CONTACTS pjc ON (pjc.PERSON_ID=p.PERSON_ID) ';
            $extra2['WHERE'] .= ' AND a.ADDRESS_ID=sja.ADDRESS_ID AND sja.STUDENT_ID=ssm.STUDENT_ID ';
            $extra2['ORDER_BY'] .= 'sjp.CUSTODY';
            $extra2['group'] = array('STUDENT_ID', 'PERSON_ID');
            // EXPANDED VIEW AND ADDR BREAKS THIS QUERY ... SO, TURN 'EM OFF
            if (!isset($_REQUEST['_ROSARIO_PDF'])) {
                $expanded_view = $_REQUEST['expanded_view'];
                $_REQUEST['expanded_view'] = false;
                $addr = $_REQUEST['addr'];
                unset($_REQUEST['addr']);
                $contacts_RET = GetStuList($extra2);
                $_REQUEST['expanded_view'] = $expanded_view;
                $_REQUEST['addr'] = $addr;
            } else {
                unset($extra2['columns_after']['CONTACT_INFO']);
            }
        } else {
            if ($view_other_RET['CONTACT_INFO'][1]['VALUE'] == 'Y' && !isset($_REQUEST['_ROSARIO_PDF'])) {
                $select .= ',ssm.STUDENT_ID AS CONTACT_INFO ';
                $extra['columns_after']['CONTACT_INFO'] = '<IMG SRC="assets/down_phone_button.png" width="24">';
                $functions['CONTACT_INFO'] = 'makeContactInfo';
                $extra2 = $extra;
                $extra2['NoSearchTerms'] = true;
                $extra2['SELECT'] = '';
                $extra2['SELECT_ONLY'] = 'ssm.STUDENT_ID,p.PERSON_ID,p.FIRST_NAME,p.LAST_NAME,sjp.STUDENT_RELATION,pjc.TITLE,pjc.VALUE,a.PHONE,sjp.ADDRESS_ID ';
                $extra2['FROM'] .= ',ADDRESS a,STUDENTS_JOIN_ADDRESS sja LEFT OUTER JOIN STUDENTS_JOIN_PEOPLE sjp ON (sja.STUDENT_ID=sjp.STUDENT_ID AND sja.ADDRESS_ID=sjp.ADDRESS_ID AND (sjp.CUSTODY=\'Y\' OR sjp.EMERGENCY=\'Y\')) LEFT OUTER JOIN PEOPLE p ON (p.PERSON_ID=sjp.PERSON_ID) LEFT OUTER JOIN PEOPLE_JOIN_CONTACTS pjc ON (pjc.PERSON_ID=p.PERSON_ID) ';
                $extra2['WHERE'] .= ' AND a.ADDRESS_ID=sja.ADDRESS_ID AND sja.STUDENT_ID=ssm.STUDENT_ID ';
                $extra2['ORDER_BY'] .= 'sjp.CUSTODY';
                $extra2['group'] = array('STUDENT_ID', 'PERSON_ID');
                $extra2['functions'] = array();
                $extra2['link'] = array();
                // EXPANDED VIEW AND ADDR BREAKS THIS QUERY ... SO, TURN 'EM OFF
                $expanded_view = $_REQUEST['expanded_view'];
                $_REQUEST['expanded_view'] = false;
                $addr = $_REQUEST['addr'];
                unset($_REQUEST['addr']);
                $contacts_RET = GetStuList($extra2);
                $_REQUEST['expanded_view'] = $expanded_view;
                $_REQUEST['addr'] = $addr;
            }
            foreach ($view_fields_RET as $field) {
                $extra['columns_after']['CUSTOM_' . $field['ID']] = $field['TITLE'];
                if ($field['TYPE'] == 'date') {
                    $functions['CUSTOM_' . $field['ID']] = 'ProperDate';
                } elseif ($field['TYPE'] == 'numeric') {
                    $functions['CUSTOM_' . $field['ID']] = 'removeDot00';
                } elseif ($field['TYPE'] == 'codeds') {
                    $functions['CUSTOM_' . $field['ID']] = 'DeCodeds';
                } elseif ($field['TYPE'] == 'exports') {
                    $functions['CUSTOM_' . $field['ID']] = 'DeCodeds';
                }
                $select .= ',s.CUSTOM_' . $field['ID'];
            }
            if ($view_address_RET) {
                $extra['FROM'] = " LEFT OUTER JOIN STUDENTS_JOIN_ADDRESS sam ON (ssm.STUDENT_ID=sam.STUDENT_ID AND sam." . $view_address_RET . "='Y') LEFT OUTER JOIN ADDRESS a ON (sam.ADDRESS_ID=a.ADDRESS_ID) " . $extra['FROM'];
//.........这里部分代码省略.........
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:101,代码来源:GetStuList.fnc.php

示例6: ListOutput

        ListOutput($standards_ret, $standards_columns, 'Effort', 'Efforts', false, false, array('search' => false, 'sort' => false));
        echo '<br>';
        if ($grade_status != 'closed' && $grade_status != 'not_set') {
            echo "<br><CENTER><INPUT class='btn_medium' type=submit value=Save onclick=formload_ajax('popform') >&nbsp;<INPUT class='btn_medium' type=button value=Close onclick='window.close()'></CENTER>";
        }
        echo "</FORM>";
    } else {
        echo "No effort found";
    }
} else {
    echo '<table align="" style="margin:5px 0 0 15px; width:100%"><tr><td>';
    echo $mps_select;
    echo '</td></tr></table>';
    $extra['SELECT'] .= ",'' AS EFFORT ";
    $extra['functions'] = array('EFFORT' => '_makeStandards');
    $all_students = GetStuList($extra);
    $columns = array('FULL_NAME' => 'Student', 'STUDENT_ID' => 'Student ID', 'EFFORT' => 'Effort Grades');
    //print_r($all_students);
    echo "<center>";
    PopTable_wo_header('header');
    echo '<div style="width:800px; overflow-x:scroll;">';
    ListOutput($all_students, $columns, 'Student', 'Students', false, false, array('yscroll' => true));
    echo '</div>';
    PopTable('footer');
    echo "</center>";
}
function _makeStandards($value, $column)
{
    // global $THIS_RET,$current_RET,$import_comments_RET,$course_RET,$tabindex;
    global $THIS_RET;
    $standard_exists = DBGet(DBQuery("SELECT COUNT(*) AS TOTAL FROM student_efforts WHERE STUDENT_ID=" . $THIS_RET['STUDENT_ID'] . " AND MARKING_PERIOD_ID='" . $_REQUEST['mp'] . "' "));
开发者ID:26746647,项目名称:openSIS,代码行数:31,代码来源:InputEffortGrades.php

示例7: DrawBC

#  This program is released under the terms of the GNU General Public License as
#  published by the Free Software Foundation, version 2 of the License.
#  See license.txt.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
include '../../Redirect_modules.php';
DrawBC("" . _('Attendance') . " > " . ProgramTitle());
$message = '<TABLE><TR><TD colspan=7 align=center>' . _('From') . ' ' . PrepareDate(DBDate(), '_min') . ' ' . _('to') . ' ' . PrepareDate(DBDate(), '_max') . '</TD></TR></TABLE>';
if (Prompt_Home(_('Confirm'), _('When do you want to recalculate the daily attendance?'), $message)) {
    $current_RET = DBGet(DBQuery('SELECT DISTINCT DATE_FORMAT(SCHOOL_DATE,\'%d-%m-%Y\') as SCHOOL_DATE FROM attendance_calendar WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\''), array(), array('SCHOOL_DATE'));
    $students_RET = GetStuList();
    $begin = mktime(0, 0, 0, MonthNWSwitch($_REQUEST['month_min'], 'to_num'), $_REQUEST['day_min'] * 1, $_REQUEST['year_min']) + 43200;
    $end = mktime(0, 0, 0, MonthNWSwitch($_REQUEST['month_max'], 'to_num'), $_REQUEST['day_max'] * 1, $_REQUEST['year_max']) + 43200;
    for ($i = $begin; $i <= $end; $i += 86400) {
        if ($current_RET[strtoupper(date('d-M-y', $i))]) {
            foreach ($students_RET as $student) {
                UpdateAttendanceDaily($student['STUDENT_ID'], date('d-M-y', $i));
            }
        }
    }
    unset($_REQUEST['modfunc']);
    DrawHeader('<table><tr><td><IMG SRC=assets/check.gif></td><td>' . _('The Daily Attendance for that timeframe has been recalculated.') . '</td></tr></table>');
}
开发者ID:SysBind,项目名称:opensis-ml,代码行数:31,代码来源:FixDailyAttendance.php

示例8: AND

     $extra['SELECT_ONLY'] = "ad.SCHOOL_DATE,ad.MARKING_PERIOD_ID,ad.STATE_VALUE,ssm.STUDENT_ID";
     $extra['FROM'] = ",ATTENDANCE_DAY ad";
     $extra['WHERE'] .= " AND ad.STUDENT_ID=ssm.STUDENT_ID AND ad.SYEAR=ssm.SYEAR AND (ad.STATE_VALUE='0.0' OR ad.STATE_VALUE='.5') AND ad.SCHOOL_DATE<='" . GetMP($last_mp, 'END_DATE') . "'";
     $extra['group'] = array('STUDENT_ID', 'MARKING_PERIOD_ID');
     $attendance_day_RET = GetStuList($extra);
 }
 if ($_REQUEST['mailing_labels'] == 'Y') {
     // GET THE ADDRESSES
     unset($extra);
     $extra['WHERE'] = " AND s.STUDENT_ID IN ({$st_list})";
     $extra['SELECT'] = 's.STUDENT_ID';
     Widgets('mailing_labels');
     $extra['SELECT_ONLY'] = $extra['SELECT'];
     $extra['SELECT'] = '';
     $extra['group'] = array('STUDENT_ID', 'ADDRESS_ID');
     $addresses_RET = GetStuList($extra);
 }
 $comment_codes_RET = DBGet(DBQuery("SELECT TITLE,COMMENT FROM REPORT_CARD_COMMENT_CODES WHERE SCHOOL_ID='" . UserSchool() . "' ORDER BY (SELECT SORT_ORDER FROM REPORT_CARD_COMMENT_CODE_SCALES WHERE ID=SCALE_ID),SORT_ORDER,ID"));
 if (count($RET)) {
     $columns = array('COURSE_TITLE' => _('Course'));
     if ($_REQUEST['elements']['teacher'] == 'Y') {
         $columns += array('TEACHER' => _('Teacher'));
     }
     if ($_REQUEST['elements']['period_absences'] == 'Y') {
         //$columns += array('ABSENCES'=>_('Abs<BR />YTD / MP'));
         $columns += array('ABSENCES' => _('Absences'));
     }
     if (count($_REQUEST['mp_arr']) > 3) {
         $mp_TITLE = 'SHORT_NAME';
     } else {
         $mp_TITLE = 'TITLE';
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:31,代码来源:ReportCards.php

示例9: ceil

            for ($i = $start; $i <= $end; $i++) {
                $index++;
                $chart['chart_data'][$index][$o] = 0;
            }
        }
        $chart['chart_data'][0][$o - 1] = $diff_max > $diff ? ceil($diff / $diff_max) * ($o - 1) : ceil($diff / $diff_max) * ($o - 2) . '+';
        $mins[$o] = ceil($diff / $diff_max) * ($o - 1);
        $extra['SELECT_ONLY'] = "CATEGORY_" . intval($_REQUEST['category_id']) . " AS TITLE," . $timeframe . " AS TIMEFRAME";
        $extra['FROM'] = ",DISCIPLINE_REFERRALS dr";
        $extra['WHERE'] = " AND dr.STUDENT_ID=ssm.STUDENT_ID AND dr.SCHOOL_ID=ssm.SCHOOL_ID AND dr.ENTRY_DATE BETWEEN '{$start_date}' AND '{$end_date}' AND CATEGORY_" . intval($_REQUEST['category_id']) . " IS NOT NULL ";
        $extra['functions'] = array('TITLE' => '_makeNumeric');
        //Widgets('all');
        //modif Francois: fix Advanced Search
        $extra['WHERE'] .= appendSQL('', $extra);
        $extra['WHERE'] .= CustomFields('where');
        $referrals_RET = GetStuList($extra);
        ksort($chart['chart_data']);
    }
    if ($_ROSARIO['SearchTerms']) {
        $chart['draw_text'][] = array('x' => 0, 'y' => 35, 'width' => $width + 200, 'height' => 100, 'h_align' => 'center', 'v_align' => 'top', 'rotation' => 0, 'text' => strip_tags(str_replace('<BR />', "\n", $_ROSARIO['SearchTerms'])), 'font' => 'Arial', 'color' => '000000', 'alpha' => 25, 'size' => 20);
    }
    if ($_REQUEST['chart_type'] != 'list') {
        //modif Francois: jqplot charts
        ?>
		<script type="text/javascript">
<?php 
        $datacolumns = 0;
        $series_labels = array();
        foreach ($chart['chart_data'] as $chart_data) {
            if ($datacolumns == 0) {
                $jsData .= 'var ticks = [';
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:31,代码来源:CategoryBreakdownTime.php

示例10: array

 }
 $columns = array('DAYS' => 'Days', 'DURATION' => 'Time', 'PERIOD_TITLE' => 'Period - Teacher', 'ROOM' => 'Room/Location', 'MARKING_PERIOD_ID' => 'Term', 'DAYS' => 'Days', 'COURSE_TITLE' => 'Course');
 $extra['SELECT'] .= ',c.TITLE AS COURSE_TITLE,p_cp.TITLE AS PERIOD_TITLE,sg.TITLE AS GRD_LVL,sr.MARKING_PERIOD_ID,cpv.DAYS, CONCAT(sp.START_TIME, " to ", sp.END_TIME) AS DURATION,r.TITLE AS ROOM';
 $extra['FROM'] .= ' LEFT OUTER JOIN schedule sr ON (sr.STUDENT_ID=ssm.STUDENT_ID),courses c, school_gradelevels sg, course_periods p_cp,course_period_var cpv,school_periods sp,rooms r ';
 $extra['WHERE'] .= ' AND cpv.PERIOD_ID=sp.PERIOD_ID AND p_cp.COURSE_PERIOD_ID=cpv.COURSE_PERIOD_ID AND cpv.ROOM_ID=r.ROOM_ID AND ssm.SYEAR=sr.SYEAR AND sr.COURSE_ID=c.COURSE_ID AND sr.COURSE_PERIOD_ID=p_cp.COURSE_PERIOD_ID AND cpv.PERIOD_ID=sp.PERIOD_ID AND ssm.GRADE_ID=sg.ID AND (\'' . $date . '\' BETWEEN sr.START_DATE AND sr.END_DATE ' . $date_extra . ')';
 if ($_REQUEST['mp_id']) {
     $extra['WHERE'] .= ' AND sr.MARKING_PERIOD_ID IN (' . GetAllMP(GetMPTable(GetMP($_REQUEST['mp_id'], 'TABLE')), $_REQUEST['mp_id']) . ')';
 }
 $extra['functions'] = array('MARKING_PERIOD_ID' => 'GetMP', 'DAYS' => '_makeDays');
 $extra['group'] = array('STUDENT_ID');
 $extra['ORDER'] = ',sp.SORT_ORDER';
 if ($_REQUEST['mailing_labels'] == 'Y') {
     $extra['group'][] = 'ADDRESS_ID';
 }
 Widgets('mailing_labels');
 $RET_stu = GetStuList($extra);
 $sel_mp = $_REQUEST['sel_mp'];
 $sql_mp_detail = 'SELECT title, start_date, end_date, parent_id, grandparent_id from marking_periods WHERE marking_period_id = \'' . $sel_mp . '\'';
 $row_mp_detail = DBGet(DBQuery($sql_mp_detail));
 $mp_string = '(s.marking_period_id=' . $sel_mp . '';
 if ($row_mp_detail['parent_id'] != -1) {
     $mp_string .= ' or s.marking_period_id=' . $row_mp_detail[1]['PARENT_ID'] . '';
 }
 if ($row_mp_detail['grandparent_id'] != -1) {
     $mp_string .= ' or s.marking_period_id=' . $row_mp_detail[1]['GRANDPARENT_ID'] . '';
 }
 # -------------------------- Date Function Start ------------------------------- #
 function cov_date($dt)
 {
     $temp_date = explode("-", $dt);
     $final_date = $temp_date[1] . '-' . $temp_date[2] . '-' . $temp_date[0];
开发者ID:jicheng17,项目名称:fenghua,代码行数:31,代码来源:StudentScheduleReport.php

示例11: GetStuList_Absence_Summary

function GetStuList_Absence_Summary(&$extra)
{
    global $contacts_RET, $view_other_RET, $_openSIS;
    $offset = 'GRADE_ID';
    if ((!$extra['SELECT_ONLY'] || strpos($extra['SELECT_ONLY'], $offset) !== false) && !$extra['functions']['GRADE_ID']) {
        $functions = array('GRADE_ID' => 'GetGrade');
    } else {
        $functions = array();
    }
    if ($extra['functions']) {
        $functions += $extra['functions'];
    }
    if (!$extra['DATE']) {
        $queryMP = UserMP();
        $extra['DATE'] = DBDate();
    } else {
        $queryMP = GetCurrentMP('QTR', $extra['DATE'], false);
    }
    if ($_REQUEST['expanded_view'] == 'true') {
        if (!$extra['columns_after']) {
            $extra['columns_after'] = array();
        }
        #############################################################################################
        //Commented as it crashing for Linux due to  Blank Database tables
        $view_fields_RET = DBGet(DBQuery('SELECT cf.ID,cf.TYPE,cf.TITLE FROM program_user_config puc,custom_fields cf WHERE puc.TITLE=cf.ID AND puc.PROGRAM=\'StudentFieldsView\' AND puc.USER_ID=\'' . User('STAFF_ID') . '\' AND puc.VALUE=\'Y\''));
        #############################################################################################
        $view_address_RET = DBGet(DBQuery('SELECT VALUE FROM program_user_config WHERE PROGRAM=\'StudentFieldsView\' AND TITLE=\'ADDRESS\' AND USER_ID=\'' . User('STAFF_ID') . '\''));
        $view_address_RET = $view_address_RET[1]['VALUE'];
        $view_other_RET = DBGet(DBQuery('SELECT TITLE,VALUE FROM program_user_config WHERE PROGRAM=\'StudentFieldsView\' AND TITLE IN (\'PHONE\',\'HOME_PHONE\',\'GUARDIANS\',\'ALL_CONTACTS\') AND USER_ID=\'' . User('STAFF_ID') . '\''), array(), array('TITLE'));
        if (!count($view_fields_RET) && !isset($view_address_RET) && !isset($view_other_RET['CONTACT_INFO'])) {
            $extra['columns_after'] = array('PHONE' => 'Phone', 'GENDER' => 'Gender', 'ETHNICITY' => 'Ethnicity', 'ADDRESS' => 'Mailing Address', 'CITY' => 'City', 'STATE' => 'State', 'ZIPCODE' => 'Zipcode') + $extra['columns_after'];
            $select = ',s.PHONE,s.GENDER,s.ETHNICITY,COALESCE(a.MAIL_ADDRESS,a.ADDRESS) AS ADDRESS,COALESCE(a.MAIL_CITY,a.CITY) AS CITY,COALESCE(a.MAIL_STATE,a.STATE) AS STATE,COALESCE(a.MAIL_ZIPCODE,a.ZIPCODE) AS ZIPCODE ';
            #$extra['FROM'] = " LEFT OUTER JOIN students_join_address sam ON (ssm.STUDENT_ID=sam.STUDENT_ID AND sam.MAILING='Y') LEFT OUTER JOIN address a ON (sam.ADDRESS_ID=a.ADDRESS_ID) ".$extra['FROM'];
            $extra['FROM'] = ' LEFT OUTER JOIN students_join_address sam ON (ssm.STUDENT_ID=sam.STUDENT_ID ) LEFT OUTER JOIN address a ON (sam.ADDRESS_ID=a.ADDRESS_ID) ' . $extra['FROM'];
            $functions['CONTACT_INFO'] = 'makeContactInfo';
            // if gender is converted to codeds type
            //$functions['CUSTOM_200000000'] = 'DeCodeds';
            $extra['singular'] = 'Student Address';
            $extra['plural'] = 'Student Addresses';
            $extra2['NoSearchTerms'] = true;
            $extra2['SELECT_ONLY'] = 'ssm.STUDENT_ID,p.PERSON_ID,p.FIRST_NAME,p.LAST_NAME,sjp.STUDENT_RELATION,pjc.TITLE,pjc.VALUE,a.PHONE,sjp.ADDRESS_ID ';
            $extra2['FROM'] .= ',address a,students_join_address sja LEFT OUTER JOIN students_join_people sjp ON (sja.STUDENT_ID=sjp.STUDENT_ID AND sja.ADDRESS_ID=sjp.ADDRESS_ID AND (sjp.CUSTODY=\'Y\' OR sjp.EMERGENCY=\'Y\')) LEFT OUTER JOIN people p ON (p.PERSON_ID=sjp.PERSON_ID) LEFT OUTER JOIN people_join_contacts pjc ON (pjc.PERSON_ID=p.PERSON_ID) ';
            $extra2['WHERE'] .= ' AND a.ADDRESS_ID=sja.ADDRESS_ID AND sja.STUDENT_ID=ssm.STUDENT_ID ';
            $extra2['ORDER_BY'] .= 'COALESCE(sjp.CUSTODY,\'N\') DESC';
            $extra2['group'] = array('STUDENT_ID', 'PERSON_ID');
            // EXPANDED VIEW AND ADDR BREAKS THIS QUERY ... SO, TURN 'EM OFF
            if (!$_REQUEST['_openSIS_PDF']) {
                $expanded_view = $_REQUEST['expanded_view'];
                $_REQUEST['expanded_view'] = false;
                $addr = $_REQUEST['addr'];
                unset($_REQUEST['addr']);
                $contacts_RET = GetStuList($extra2);
                $_REQUEST['expanded_view'] = $expanded_view;
                $_REQUEST['addr'] = $addr;
            } else {
                unset($extra2['columns_after']['CONTACT_INFO']);
            }
        } else {
            if ($view_other_RET['CONTACT_INFO'][1]['VALUE'] == 'Y' && !$_REQUEST['_openSIS_PDF']) {
                $select .= ',NULL AS CONTACT_INFO ';
                $extra['columns_after']['CONTACT_INFO'] = '<IMG SRC=assets/down_phone_button.gif border=0>';
                $functions['CONTACT_INFO'] = 'makeContactInfo';
                $extra2 = $extra;
                $extra2['NoSearchTerms'] = true;
                $extra2['SELECT'] = '';
                $extra2['SELECT_ONLY'] = 'ssm.STUDENT_ID,p.PERSON_ID,p.FIRST_NAME,p.LAST_NAME,sjp.STUDENT_RELATION,pjc.TITLE,pjc.VALUE,a.PHONE,sjp.ADDRESS_ID,COALESCE(sjp.CUSTODY,\'N\') ';
                $extra2['FROM'] .= ',address a,students_join_address sja LEFT OUTER JOIN students_join_people sjp ON (sja.STUDENT_ID=sjp.STUDENT_ID AND sja.ADDRESS_ID=sjp.ADDRESS_ID AND (sjp.CUSTODY=\'Y\' OR sjp.EMERGENCY=\'Y\')) LEFT OUTER JOIN people p ON (p.PERSON_ID=sjp.PERSON_ID) LEFT OUTER JOIN people_join_contacts pjc ON (pjc.PERSON_ID=p.PERSON_ID) ';
                $extra2['WHERE'] .= ' AND a.ADDRESS_ID=sja.ADDRESS_ID AND sja.STUDENT_ID=ssm.STUDENT_ID ';
                $extra2['ORDER_BY'] .= 'COALESCE(sjp.CUSTODY,\'N\') DESC';
                $extra2['group'] = array('STUDENT_ID', 'PERSON_ID');
                $extra2['functions'] = array();
                $extra2['link'] = array();
                // EXPANDED VIEW AND ADDR BREAKS THIS QUERY ... SO, TURN 'EM OFF
                $expanded_view = $_REQUEST['expanded_view'];
                $_REQUEST['expanded_view'] = false;
                $addr = $_REQUEST['addr'];
                unset($_REQUEST['addr']);
                $contacts_RET = GetStuList($extra2);
                $_REQUEST['expanded_view'] = $expanded_view;
                $_REQUEST['addr'] = $addr;
            }
            foreach ($view_fields_RET as $field) {
                $custom = DBGet(DBQuery('SHOW COLUMNS FROM students WHERE FIELD=\'CUSTOM_' . $field['ID'] . '\''));
                $custom = $custom[1];
                if ($custom) {
                    $extra['columns_after']['CUSTOM_' . $field['ID']] = $field['TITLE'];
                    if ($field['TYPE'] == 'date') {
                        $functions['CUSTOM_' . $field['ID']] = 'ProperDate';
                    } elseif ($field['TYPE'] == 'numeric') {
                        $functions['CUSTOM_' . $field['ID']] = 'removeDot00';
                    } elseif ($field['TYPE'] == 'codeds') {
                        $functions['CUSTOM_' . $field['ID']] = 'DeCodeds';
                    }
                    $select .= ',s.CUSTOM_' . $field['ID'];
                } else {
                    $custom_stu = DBGet(DBQuery("SELECT TYPE,TITLE FROM custom_fields WHERE ID='" . $field['ID'] . "'"));
                    $custom_stu = $custom_stu[1];
                    if ($custom_stu['TYPE'] == 'date') {
                        $functions[strtolower(str_replace(" ", "_", $custom_stu['TITLE']))] = 'ProperDate';
                    } elseif ($custom_stu['TYPE'] == 'numeric') {
//.........这里部分代码省略.........
开发者ID:26746647,项目名称:openSIS,代码行数:101,代码来源:GetStuList.fnc.php

示例12: GetStuListAttn

function GetStuListAttn(&$extra)
{
    global $contacts_RET, $view_other_RET, $_openSIS;
    if ((!$extra['SELECT_ONLY'] || strpos($extra['SELECT_ONLY'], 'GRADE_ID') !== false) && !$extra['functions']['GRADE_ID']) {
        $functions = array('GRADE_ID' => 'GetGrade');
    } else {
        $functions = array();
    }
    if ($extra['functions']) {
        $functions += $extra['functions'];
    }
    if (!$extra['DATE']) {
        $queryMP = UserMP();
        $extra['DATE'] = DBDate();
    } else {
        #	$queryMP = GetCurrentMP('QTR',$extra['DATE'],false);
        $queryMP = UserMP();
    }
    if ($_REQUEST['expanded_view'] == 'true') {
        if (!$extra['columns_after']) {
            $extra['columns_after'] = array();
        }
        #############################################################################################
        //Commented as it crashing for Linux due to  Blank Database tables
        //$view_fields_RET = DBGet(DBQuery("SELECT cf.ID,cf.TYPE,cf.TITLE FROM PROGRAM_USER_CONFIG puc,CUSTOM_FIELDS cf WHERE puc.TITLE=cf.ID AND puc.PROGRAM='StudentFieldsView' AND puc.USER_ID='".User('STAFF_ID')."' AND puc.VALUE='Y'"));
        #############################################################################################
        $view_address_RET = DBGet(DBQuery("SELECT VALUE FROM PROGRAM_USER_CONFIG WHERE PROGRAM='StudentFieldsView' AND TITLE='ADDRESS' AND USER_ID='" . User('STAFF_ID') . "'"));
        $view_address_RET = $view_address_RET[1]['VALUE'];
        $view_other_RET = DBGet(DBQuery("SELECT TITLE,VALUE FROM PROGRAM_USER_CONFIG WHERE PROGRAM='StudentFieldsView' AND TITLE IN ('CONTACT_INFO','HOME_PHONE','GUARDIANS','ALL_CONTACTS') AND USER_ID='" . User('STAFF_ID') . "'"), array(), array('TITLE'));
        if (!count($view_fields_RET) && !isset($view_address_RET) && !isset($view_other_RET['CONTACT_INFO'])) {
            $extra['columns_after'] = array('CONTACT_INFO' => '<IMG SRC=assets/down_phone_button.gif border=0>', 'gender' => 'Gender', 'ethnicity' => 'Ethnicity', 'ADDRESS' => 'Mailing Address', 'CITY' => 'City', 'STATE' => 'State', 'ZIPCODE' => 'Zipcode') + $extra['columns_after'];
            $select = ',s.STUDENT_ID AS CONTACT_INFO,s.GENDER,s.ETHNICITY,COALESCE(a.MAIL_ADDRESS,a.ADDRESS) AS ADDRESS,COALESCE(a.MAIL_CITY,a.CITY) AS CITY,COALESCE(a.MAIL_STATE,a.STATE) AS STATE,COALESCE(a.MAIL_ZIPCODE,a.ZIPCODE) AS ZIPCODE ';
            $extra['FROM'] = " LEFT OUTER JOIN STUDENTS_JOIN_ADDRESS sam ON (ssm.STUDENT_ID=sam.STUDENT_ID AND sam.MAILING='Y') LEFT OUTER JOIN ADDRESS a ON (sam.ADDRESS_ID=a.ADDRESS_ID) " . $extra['FROM'];
            $functions['CONTACT_INFO'] = 'makeContactInfo';
            // if gender is converted to codeds type
            //$functions['CUSTOM_200000000'] = 'DeCodeds';
            $extra['singular'] = 'Student Address';
            $extra['plural'] = 'Student Addresses';
            $extra2['NoSearchTerms'] = true;
            $extra2['SELECT_ONLY'] = 'ssm.STUDENT_ID,p.PERSON_ID,p.FIRST_NAME,p.LAST_NAME,sjp.STUDENT_RELATION,pjc.TITLE,pjc.VALUE,a.PHONE,sjp.ADDRESS_ID ';
            $extra2['FROM'] .= ',ADDRESS a,STUDENTS_JOIN_ADDRESS sja LEFT OUTER JOIN STUDENTS_JOIN_PEOPLE sjp ON (sja.STUDENT_ID=sjp.STUDENT_ID AND sja.ADDRESS_ID=sjp.ADDRESS_ID AND (sjp.CUSTODY=\'Y\' OR sjp.EMERGENCY=\'Y\')) LEFT OUTER JOIN PEOPLE p ON (p.PERSON_ID=sjp.PERSON_ID) LEFT OUTER JOIN PEOPLE_JOIN_CONTACTS pjc ON (pjc.PERSON_ID=p.PERSON_ID) ';
            $extra2['WHERE'] .= ' AND a.ADDRESS_ID=sja.ADDRESS_ID AND sja.STUDENT_ID=ssm.STUDENT_ID ';
            $extra2['ORDER_BY'] .= 'COALESCE(sjp.CUSTODY,\'N\') DESC';
            $extra2['group'] = array('STUDENT_ID', 'PERSON_ID');
            // EXPANDED VIEW AND ADDR BREAKS THIS QUERY ... SO, TURN 'EM OFF
            if (!$_REQUEST['_openSIS_PDF']) {
                $expanded_view = $_REQUEST['expanded_view'];
                $_REQUEST['expanded_view'] = false;
                $addr = $_REQUEST['addr'];
                unset($_REQUEST['addr']);
                $contacts_RET = GetStuList($extra2);
                $_REQUEST['expanded_view'] = $expanded_view;
                $_REQUEST['addr'] = $addr;
            } else {
                unset($extra2['columns_after']['CONTACT_INFO']);
            }
        } else {
            if ($view_other_RET['CONTACT_INFO'][1]['VALUE'] == 'Y' && !$_REQUEST['_openSIS_PDF']) {
                $select .= ',NULL AS CONTACT_INFO ';
                $extra['columns_after']['CONTACT_INFO'] = '<IMG SRC=assets/down_phone_button.gif border=0>';
                $functions['CONTACT_INFO'] = 'makeContactInfo';
                $extra2 = $extra;
                $extra2['NoSearchTerms'] = true;
                $extra2['SELECT'] = '';
                $extra2['SELECT_ONLY'] = 'ssm.STUDENT_ID,p.PERSON_ID,p.FIRST_NAME,p.LAST_NAME,sjp.STUDENT_RELATION,pjc.TITLE,pjc.VALUE,a.PHONE,sjp.ADDRESS_ID,COALESCE(sjp.CUSTODY,\'N\') ';
                $extra2['FROM'] .= ',ADDRESS a,STUDENTS_JOIN_ADDRESS sja LEFT OUTER JOIN STUDENTS_JOIN_PEOPLE sjp ON (sja.STUDENT_ID=sjp.STUDENT_ID AND sja.ADDRESS_ID=sjp.ADDRESS_ID AND (sjp.CUSTODY=\'Y\' OR sjp.EMERGENCY=\'Y\')) LEFT OUTER JOIN PEOPLE p ON (p.PERSON_ID=sjp.PERSON_ID) LEFT OUTER JOIN PEOPLE_JOIN_CONTACTS pjc ON (pjc.PERSON_ID=p.PERSON_ID) ';
                $extra2['WHERE'] .= ' AND a.ADDRESS_ID=sja.ADDRESS_ID AND sja.STUDENT_ID=ssm.STUDENT_ID ';
                $extra2['ORDER_BY'] .= 'COALESCE(sjp.CUSTODY,\'N\') DESC';
                $extra2['group'] = array('STUDENT_ID', 'PERSON_ID');
                $extra2['functions'] = array();
                $extra2['link'] = array();
                // EXPANDED VIEW AND ADDR BREAKS THIS QUERY ... SO, TURN 'EM OFF
                $expanded_view = $_REQUEST['expanded_view'];
                $_REQUEST['expanded_view'] = false;
                $addr = $_REQUEST['addr'];
                unset($_REQUEST['addr']);
                $contacts_RET = GetStuList($extra2);
                $_REQUEST['expanded_view'] = $expanded_view;
                $_REQUEST['addr'] = $addr;
            }
            foreach ($view_fields_RET as $field) {
                $extra['columns_after']['CUSTOM_' . $field['ID']] = $field['TITLE'];
                if ($field['TYPE'] == 'date') {
                    $functions['CUSTOM_' . $field['ID']] = 'ProperDate';
                } elseif ($field['TYPE'] == 'numeric') {
                    $functions['CUSTOM_' . $field['ID']] = 'removeDot00';
                } elseif ($field['TYPE'] == 'codeds') {
                    $functions['CUSTOM_' . $field['ID']] = 'DeCodeds';
                }
                $select .= ',s.CUSTOM_' . $field['ID'];
            }
            if ($view_address_RET) {
                $extra['FROM'] = " LEFT OUTER JOIN STUDENTS_JOIN_ADDRESS sam ON (ssm.STUDENT_ID=sam.STUDENT_ID AND sam." . $view_address_RET . "='Y') LEFT OUTER JOIN ADDRESS a ON (sam.ADDRESS_ID=a.ADDRESS_ID) " . $extra['FROM'];
                $extra['columns_after'] += array('ADDRESS' => ucwords(strtolower(str_replace('_', ' ', $view_address_RET))) . ' Address', 'CITY' => 'City', 'STATE' => 'State', 'ZIPCODE' => 'Zipcode');
                if ($view_address_RET != 'MAILING') {
                    $select .= ",a.ADDRESS_ID,a.ADDRESS,a.CITY,a.STATE,a.ZIPCODE,a.PHONE,ssm.STUDENT_ID AS PARENTS";
                } else {
                    $select .= ",a.ADDRESS_ID,COALESCE(a.MAIL_ADDRESS,a.ADDRESS) AS ADDRESS,COALESCE(a.MAIL_CITY,a.CITY) AS CITY,COALESCE(a.MAIL_STATE,a.STATE) AS STATE,COALESCE(a.MAIL_ZIPCODE,a.ZIPCODE) AS ZIPCODE,a.PHONE,ssm.STUDENT_ID AS PARENTS ";
                }
                $extra['singular'] = 'Student Address';
//.........这里部分代码省略.........
开发者ID:26746647,项目名称:Belize-openSIS,代码行数:101,代码来源:custom_functions.fnc.php

示例13: array

if (!$_REQUEST['LO_sort']) {
    $_REQUEST['LO_sort'] = 'DATE';
}
//$RET = DBGet(DBQuery("SELECT s.LAST_NAME||', '||s.FIRST_NAME||' '||COALESCE(s.MIDDLE_NAME,' ') AS FULL_NAME,f.AMOUNT AS DEBIT,'' AS CREDIT,f.TITLE||' '||COALESCE(f.COMMENTS,' ') AS EXPLANATION,f.ASSIGNED_DATE AS DATE,f.ID AS ID FROM BILLING_FEES f,STUDENTS s WHERE f.STUDENT_ID=s.STUDENT_ID AND f.SYEAR='".UserSyear()."' AND f.SCHOOL_ID='".UserSchool()."' AND f.ASSIGNED_DATE BETWEEN '$start_date' AND '$end_date' UNION SELECT s.LAST_NAME||', '||s.FIRST_NAME||' '||COALESCE(s.MIDDLE_NAME,' ') AS FULL_NAME,'' AS DEBIT,p.AMOUNT AS CREDIT,COALESCE(p.COMMENTS,' ') AS EXPLANATION,p.PAYMENT_DATE AS DATE,p.ID AS ID FROM BILLING_PAYMENTS p,STUDENTS s WHERE p.STUDENT_ID=s.STUDENT_ID AND p.SYEAR='".UserSyear()."' AND p.SCHOOL_ID='".UserSchool()."' AND p.PAYMENT_DATE BETWEEN '$start_date' AND '$end_date' ORDER BY DATE"),$functions);
//Widgets('all');
$extra['functions'] = array('DEBIT' => '_makeCurrency', 'CREDIT' => '_makeCurrency', 'DATE' => 'ProperDate');
$fees_extra = $extra;
$fees_extra['SELECT'] .= ",f.AMOUNT AS DEBIT,'' AS CREDIT,f.TITLE||' '||COALESCE(f.COMMENTS,' ') AS EXPLANATION,f.ASSIGNED_DATE AS DATE,f.ID AS ID";
$fees_extra['FROM'] .= ',BILLING_FEES f';
$fees_extra['WHERE'] .= " AND f.STUDENT_ID=s.STUDENT_ID AND f.SYEAR=ssm.SYEAR AND f.SCHOOL_ID=ssm.SCHOOL_ID AND f.ASSIGNED_DATE BETWEEN '{$start_date}' AND '{$end_date}'";
$RET = GetStuList($fees_extra);
$payments_extra = $extra;
$payments_extra['SELECT'] .= ",'' AS DEBIT,p.AMOUNT AS CREDIT,COALESCE(p.COMMENTS,' ') AS EXPLANATION,p.PAYMENT_DATE AS DATE,p.ID AS ID";
$payments_extra['FROM'] .= ',BILLING_PAYMENTS p';
$payments_extra['WHERE'] .= " AND p.STUDENT_ID=s.STUDENT_ID AND p.SYEAR=ssm.SYEAR AND p.SCHOOL_ID=ssm.SCHOOL_ID AND p.PAYMENT_DATE BETWEEN '{$start_date}' AND '{$end_date}'";
$payments_RET = GetStuList($payments_extra);
foreach ($payments_RET as $payment) {
    $RET[] = $payment;
}
$columns = array('FULL_NAME' => _('Student'), 'DEBIT' => _('Fee'), 'CREDIT' => _('Payment'), 'DATE' => _('Date'), 'EXPLANATION' => _('Comment'));
$link['add']['html'] = array('FULL_NAME' => '<B>' . _('Total') . '</B>', 'DEBIT' => '<b>' . Currency($totals['DEBIT']) . '</b>', 'CREDIT' => '<b>' . Currency($totals['CREDIT']) . '</b>', 'DATE' => '&nbsp;', 'EXPLANATION' => '&nbsp;');
ListOutput($RET, $columns, 'Transaction', 'Transactions', $link);
//$payments_RET = DBGet(DBQuery("SELECT s.LAST_NAME||', '||s.FIRST_NAME||' '||COALESCE(s.MIDDLE_NAME,' ') AS FULL_NAME,'' AS DEBIT,p.AMOUNT AS CREDIT,COALESCE(p.COMMENTS,' ') AS EXPLANATION,p.PAYMENT_DATE AS DATE FROM BILLING_PAYMENTS p,STUDENTS s WHERE p.STUDENT_ID=s.STUDENT_ID AND p.SYEAR='".UserSyear()."' AND p.SCHOOL_ID='".UserSchool()."' AND p.ASSIGNED_DATE BETWEEN '$start_date' AND '$end_date'"));
function _makeCurrency($value, $column)
{
    global $totals;
    $totals[$column] += $value;
    if ($value) {
        return Currency($value);
    }
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:31,代码来源:DailyTransactions.php

示例14: unset

 unset($_CENTRE['DrawHeader']);
 if ($_REQUEST['mailing_labels'] == 'Y') {
     echo '<BR><BR><BR>';
 }
 DrawHeader(Config('TITLE') . ' ' . _('Progress Report'));
 DrawHeader('</font>' . $student['FULL_NAME'] . '<font>', $student['STUDENT_ID']);
 DrawHeader($student['GRADE_ID'], GetSchool(UserSchool()));
 DrawHeader($course_title, GetMP(GetCurrentMP('QTR', DBDate())));
 DrawHeader(ProperDate(DBDate()));
 if ($_REQUEST['mailing_labels'] == 'Y') {
     echo '<BR><BR><TABLE width=100%><TR><TD width=50> &nbsp; </TD><TD>' . $student['MAILING_LABEL'] . '</TD></TR></TABLE><BR>';
 }
 $extra = $extra2;
 $extra['WHERE'] .= " AND s.STUDENT_ID='{$student['STUDENT_ID']}'";
 $student_points = $total_points = $percent_weights = array();
 $grades_RET = GetStuList($extra);
 $sum_student_points = $sum_total_points = 0;
 $sum_points = $sum_percent = 0;
 foreach ($percent_weights as $assignment_type_id => $percent) {
     $sum_student_points += $student_points[$assignment_type_id];
     $sum_total_points += $total_points[$assignment_type_id];
     $sum_points += $student_points[$assignment_type_id] * ($programconfig[User('STAFF_ID')]['WEIGHT'] == 'Y' ? $percent / $total_points[$assignment_type_id] : 1);
     $sum_percent += $programconfig[User('STAFF_ID')]['WEIGHT'] == 'Y' ? $percent : $total_points[$assignment_type_id];
 }
 if ($sum_percent > 0) {
     $sum_points /= $sum_percent;
 } else {
     $sum_points = 0;
 }
 if ($_REQUEST['by_category'] == 'Y') {
     foreach ($grades_RET as $assignment_type_id => $grades) {
开发者ID:linil,项目名称:centreSIS,代码行数:31,代码来源:ProgressReports.php

示例15: CONCAT

         if ($_REQUEST['teacher']) {
             $extra['SELECT'] .= ',(SELECT CONCAT(st.FIRST_NAME,\'' . ' ' . '\',st.LAST_NAME) FROM staff st,course_periods cp,school_periods p,schedule ss WHERE st.STAFF_ID=cp.TEACHER_ID AND cp.PERIOD_id=p.PERIOD_ID AND p.ATTENDANCE=\'' . 'Y' . '\' AND cp.COURSE_PERIOD_ID=ss.COURSE_PERIOD_ID AND ss.STUDENT_ID=s.STUDENT_ID AND ss.SYEAR=\'' . UserSyear() . '\' AND ss.MARKING_PERIOD_ID IN(' . $qtr . ') AND (ss.START_DATE<=\'' . DBDate() . '\' AND (ss.END_DATE>=\'' . DBDate() . '\' OR ss.END_DATE IS NULL)) ORDER BY p.SORT_ORDER LIMIT 1) AS TEACHER';
         }
         if ($_REQUEST['room']) {
             $extra['SELECT'] .= ',(SELECT cp.ROOM FROM course_periods cp,school_periods p,schedule ss WHERE cp.PERIOD_id=p.PERIOD_ID AND p.ATTENDANCE=\'' . 'Y' . '\' AND cp.COURSE_PERIOD_ID=ss.COURSE_PERIOD_ID AND ss.STUDENT_ID=s.STUDENT_ID AND ss.SYEAR=\'' . UserSyear() . '\' AND ss.MARKING_PERIOD_ID IN(' . $qtr . ') AND (ss.START_DATE<=\'' . DBDate() . '\' AND (ss.END_DATE>=\'' . DBDate() . '\' OR ss.END_DATE IS NULL)) ORDER BY p.SORT_ORDER LIMIT 1) AS ROOM';
         }
     }
 } else {
     if ($_REQUEST['teacher']) {
         $extra['SELECT'] .= ',(SELECT CONCAT(st.FIRST_NAME,\'' . ' ' . '\',st.LAST_NAME) FROM staff st,course_periods cp WHERE st.STAFF_ID=cp.TEACHER_ID AND cp.COURSE_PERIOD_ID=\'' . UserCoursePeriod() . '\') AS TEACHER';
     }
     if ($_REQUEST['room']) {
         $extra['SELECT'] .= ',(SELECT cp.ROOM FROM course_periods cp WHERE cp.COURSE_PERIOD_ID=\'' . UserCoursePeriod() . '\') AS ROOM';
     }
 }
 $RET = GetStuList($extra);
 if (count($RET)) {
     $skipRET = array();
     for ($i = ($_REQUEST['start_row'] - 1) * $max_cols + $_REQUEST['start_col']; $i > 1; $i--) {
         $skipRET[-$i] = array('LAST_NAME' => ' ');
     }
     $handle = PDFstart();
     $cols = 0;
     $rows = 0;
     echo "<meta charset='UTF-8'><table width=100%  border=0 style=\" font-family:Arial; font-size:12px;\" >";
     echo "<meta charset='UTF-8'><tr><td width=105>" . DrawLogo() . "</td><td  style=\"font-size:15px; font-weight:bold; padding-top:20px;\">" . GetSchool(UserSchool()) . "<div style=\"font-size:12px;\">" . _('Student Labels') . "</div></td><td align=right style=\"padding-top:20px;\">" . ProperDate(DBDate()) . "<br \\>" . _('Powered by openSIS') . "</td></tr><tr><td colspan=3 style=\"border-top:1px solid #333;\">&nbsp;</td></tr></table>";
     echo '<table width="100%" border="0" cellspacing="0" cellpadding="0" style=font-family:Arial; font-size:12px;>';
     foreach ($skipRET + $RET as $i => $student) {
         if ($cols < 1) {
             echo '<tr>';
         }
开发者ID:SysBind,项目名称:opensis-ml,代码行数:31,代码来源:StudentLabels.php


注:本文中的GetStuList函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。