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


PHP Widgets函数代码示例

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


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

示例1: appendSQL

        }
        $sql = appendSQL($sql, $tmp_extra = array('NoSearchTerms' => true));
        // extra must be lvalue
        $RET = DBGet(DBQuery($sql), array(), array('STUDENT_ID', 'SHORT_DATE'));
    }
    if (count($cal_RET)) {
        foreach ($cal_RET as $value) {
            $extra['SELECT'] .= ',\'\' as _' . str_replace('-', '', $value['SCHOOL_DATE']);
            $extra['columns_after']['_' . str_replace('-', '', $value['SCHOOL_DATE'])] = ShortDate($value['SCHOOL_DATE']);
            $extra['functions']['_' . str_replace('-', '', $value['SCHOOL_DATE'])] = '_makeColor';
            $extra['link']['FULL_NAME']['link'] = "Modules.php?modname={$_REQUEST['next_modname']}&day_start={$_REQUEST['day_start']}&day_end={$_REQUEST['day_end']}&month_start={$_REQUEST['month_start']}&month_end={$_REQUEST['month_end']}&year_start={$_REQUEST['year_start']}&year_end={$_REQUEST['year_end']}&period_id={$_REQUEST['period_id']}";
            $extra['link']['FULL_NAME']['variables'] = array('student_id' => 'STUDENT_ID');
        }
    }
    Widgets('course');
    Widgets('absences');
    $extra['new'] = true;
    Search('student_id', $extra);
    echo '</FORM>';
}
function _makeColor($value, $column)
{
    global $THIS_RET, $RET, $attendance_codes;
    if ($_REQUEST['period_id']) {
        if (!$attendance_codes) {
            $attendance_codes = DBGet(DBQuery('SELECT ID,DEFAULT_CODE,STATE_CODE,SHORT_NAME FROM attendance_codes WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND TABLE_NAME=\'0\''), array(), array('ID'));
        }
        if ($attendance_codes[$RET[$THIS_RET['STUDENT_ID']][$column][1]['ATTENDANCE_CODE']][1]['DEFAULT_CODE'] == 'Y') {
            return "<TABLE bgcolor=#00FF00 cellpadding=0 cellspacing=0 width=10 class=LO_field><TR><TD>" . makeCodePulldown($RET[$THIS_RET['STUDENT_ID']][$column][1]['ATTENDANCE_CODE'], $THIS_RET['STUDENT_ID'], $column) . "</TD></TR></TABLE>";
        } elseif ($attendance_codes[$RET[$THIS_RET['STUDENT_ID']][$column][1]['ATTENDANCE_CODE']][1]['STATE_CODE'] == 'P') {
            return "<TABLE bgcolor=#FFCC00 cellpadding=0 cellspacing=0 width=10 class=LO_field><TR><TD>" . makeCodePulldown($RET[$THIS_RET['STUDENT_ID']][$column][1]['ATTENDANCE_CODE'], $THIS_RET['STUDENT_ID'], $column) . "</TD></TR></TABLE>";
开发者ID:jeffthestampede,项目名称:excelsior,代码行数:31,代码来源:DailySummary_old.php

示例2: array

    //	{
    //            $extra['extra_header_left'] .= '<TD><INPUT type=checkbox name=mp_arr[] value='.$mp['MARKING_PERIOD_ID'].'>'.$mp['SHORT_NAME'].'</TD>';
    //
    //	}
    //        $extra['extra_header_left'] .= '</TR></TABLE></TD></TABLE>';
    /*********************************************************************************/
    $extra['link'] = array('FULL_NAME' => false);
    $extra['SELECT'] = ",s.STUDENT_ID AS CHECKBOX";
    $extra['functions'] = array('CHECKBOX' => '_makeChooseCheckbox');
    $extra['columns_before'] = array('CHECKBOX' => '</A><INPUT type=checkbox value=Y name=controller checked onclick="checkAll(this.form,this.form.controller.checked,\'st_arr\');"><A>');
    $extra['options']['search'] = false;
    $extra['new'] = true;
    $extra['WHERE'] .= " AND s.STUDENT_ID IN (SELECT DISTINCT STUDENT_ID FROM student_standards)";
    Widgets('course');
    Widgets('gpa');
    Widgets('class_rank');
    Widgets('letter_grade');
    Search('student_id', $extra, 'true');
    if ($_REQUEST['search_modfunc'] == 'list') {
        echo '<BR><CENTER><INPUT type=submit class=btn_xxlarge value=\'Create Standard Report Cards for Selected Students\'></CENTER>';
        echo "</FORM>";
    }
}
function _makeChooseCheckbox($value, $title)
{
    return '<INPUT type=checkbox name=st_arr[] value=' . $value . ' checked>';
}
function _makeTeacher($teacher, $column)
{
    return substr($teacher, strrpos(str_replace(' - ', ' ^ ', $teacher), '^') + 2);
}
开发者ID:26746647,项目名称:openSIS,代码行数:31,代码来源:StandardsGradeReport.php

示例3: Widgets

#  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';
Widgets('request');
Widgets('mailing_labels');
$extra['force_search'] = true;
if (!$_REQUEST['search_modfunc'] || $_openSIS['modules_search']) {
    DrawBC("" . _('Scheduling') . " > " . ProgramTitle());
    $extra['new'] = true;
    $extra['action'] .= "&_openSIS_PDF=true&head_html=Student+Print+Request";
    $extra['pdf'] = true;
    Search('student_id', $extra);
} else {
    $columns = array('COURSE_TITLE' => '' . _('Course') . '', 'MARKING_PERIOD_ID' => '' . _('Marking Period') . '', 'WITH_TEACHER_ID' => '' . _('With Teacher') . '', 'WITH_PERIOD_ID' => '' . _('In Period') . '', 'NOT_TEACHER_ID' => '' . _('Not with Teacher') . '', 'NOT_PERIOD_ID' => '' . _('Not in Period') . '');
    $extra['SELECT'] .= ',c.TITLE AS COURSE_TITLE,c.COURSE_ID,srp.PRIORITY,srp.MARKING_PERIOD_ID,srp.WITH_TEACHER_ID,srp.NOT_TEACHER_ID,srp.WITH_PERIOD_ID,srp.NOT_PERIOD_ID';
    $extra['FROM'] .= ',courses c,schedule_requests srp';
    $extra['WHERE'] .= ' AND ssm.STUDENT_ID=srp.STUDENT_ID AND ssm.SYEAR=srp.SYEAR AND srp.COURSE_ID = c.COURSE_ID';
    $extra['functions'] += array('WITH_FULL_NAME' => '_makeExtra');
    $extra['group'] = array('STUDENT_ID');
    if ($_REQUEST['mailing_labels'] == 'Y') {
开发者ID:SysBind,项目名称:opensis-ml,代码行数:31,代码来源:PrintRequests.php

示例4: Search

    }
    Search('student_fields', is_array($extra['student_fields']) ? $extra['student_fields'] : array());
    if (User('PROFILE') == 'admin') {
        echo '<CENTER><INPUT type=checkbox name=_search_all_schools value=Y' . (Preferences('DEFAULT_ALL_SCHOOLS') == 'Y' ? ' CHECKED' : '') . '><font color=black>Search All Schools</font></CENTER><BR>';
    }
    echo '<CENTER>' . Buttons('Submit') . '</CENTER>';
    echo '</FORM>';
    PopTable('footer');
}
if (!$_REQUEST['modfunc']) {
    if (!isset($extra)) {
        $extra = array();
    }
    Widgets('user');
    if ($_REQUEST['advanced'] == 'Y') {
        Widgets('all');
    }
    $extra['WHERE'] .= appendSQL('');
    $extra['WHERE'] .= CustomFields('where');
    echo "<FORM  name=ada_from id=ada_from onSubmit='return formcheck_ada_dates();' action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&list_by_day=" . strip_tags(trim($_REQUEST[list_by_day])) . " method=POST>";
    $advanced_link = " <A HREF=Modules.php?modname={$_REQUEST['modname']}&modfunc=search&list_by_day={$_REQUEST['list_by_day']}&day_start={$_REQUEST['day_start']}&day_end={$_REQUEST['day_end']}&month_start={$_REQUEST['month_start']}&month_end={$_REQUEST['month_end']}&year_start={$_REQUEST['year_start']}&year_end={$_REQUEST['year_end']}>Advanced</A>";
    DrawHeaderHome('<table><tr><td>' . DateInputAY($start_date, 'start', 1) . '</td><td>&nbsp;&nbsp;-&nbsp;&nbsp;</td><td>' . DateInputAY($end_date, 'end', 2) . '</td><td> - </td><td>' . $advanced_link, ' : <INPUT type=submit value=Go  class=btn_medium></td></tr></table>');
    echo '</FORM>';
    if ($_REQUEST['list_by_day'] == 'true') {
        $cal_days = 1;
        $search_stu = 0;
        if ($_REQUEST['last'] != '' || $_REQUEST['first'] != '' || $_REQUEST['stuid'] != '' || $_REQUEST['altid'] != '') {
            $stu_q = 'SELECT GROUP_CONCAT(STUDENT_ID) as STUDENT_ID FROM students WHERE ';
            $stu_q .= $_REQUEST['last'] != '' ? ' LAST_NAME=\'' . $_REQUEST['last'] . '\' OR ' : '';
            $stu_q .= $_REQUEST['first'] != '' ? ' FIRST_NAME=\'' . $_REQUEST['first'] . '\' OR ' : '';
            $stu_q .= $_REQUEST['stuid'] != '' ? ' STUDENT_ID=\'' . $_REQUEST['stuid'] . '\' OR ' : '';
开发者ID:jeffthestampede,项目名称:excelsior,代码行数:31,代码来源:Percent.php

示例5: mb_substr

        }
    }
    $sql = mb_substr($sql, 0, -1) . " WHERE ID='{$_REQUEST['referral_id']}'";
    DBQuery($sql);
    unset($_REQUEST['values']);
    unset($_SESSION['_REQUEST_vars']['values']);
}
DrawHeader(ProgramTitle());
if ($_REQUEST['modfunc'] == 'remove' & AllowEdit()) {
    if (DeletePrompt(_('Referral'))) {
        DBQuery("DELETE FROM DISCIPLINE_REFERRALS WHERE ID='{$_REQUEST['id']}'");
        unset($_REQUEST['modfunc']);
    }
}
$categories_RET = DBGet(DBQuery("SELECT df.ID,du.TITLE FROM DISCIPLINE_FIELDS df,DISCIPLINE_FIELD_USAGE du WHERE df.DATA_TYPE!='textarea' AND du.SYEAR='" . UserSyear() . "' AND du.SCHOOL_ID='" . UserSchool() . "' AND du.DISCIPLINE_FIELD_ID=df.ID ORDER BY du.SORT_ORDER"));
Widgets('discipline');
$extra['SELECT'] = ',dr.*';
if (mb_strpos($extra['FROM'], 'DISCIPLINE_REFERRALS') === false) {
    $extra['FROM'] .= ',DISCIPLINE_REFERRALS dr ';
    $extra['WHERE'] .= ' AND dr.STUDENT_ID=ssm.STUDENT_ID AND dr.SYEAR=ssm.SYEAR AND dr.SCHOOL_ID=ssm.SCHOOL_ID ';
}
$extra['ORDER_BY'] = 'dr.ENTRY_DATE DESC,s.LAST_NAME,s.FIRST_NAME,s.MIDDLE_NAME';
$extra['columns_after'] = array('STAFF_ID' => _('Reporter'), 'ENTRY_DATE' => _('Incident Date'));
$extra['functions'] = array('STAFF_ID' => 'GetTeacher', 'ENTRY_DATE' => 'ProperDate');
foreach ($categories_RET as $category) {
    $extra['columns_after']['CATEGORY_' . $category['ID']] = $category['TITLE'];
    $extra['functions']['CATEGORY_' . $category['ID']] = '_make';
}
$extra['new'] = true;
//$extra['force_search'] = true;
$extra['singular'] = _('Referral');
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:31,代码来源:Referrals.php

示例6: Widgets

function Widgets($item, &$myextra = null)
{
    global $extra, $_ROSARIO, $RosarioModules;
    if (isset($myextra)) {
        $extra =& $myextra;
    }
    if (!is_array($_ROSARIO['Widgets'])) {
        $_ROSARIO['Widgets'] = array();
    }
    if (!is_array($extra['functions'])) {
        $extra['functions'] = array();
    }
    if ((User('PROFILE') == 'admin' || User('PROFILE') == 'teacher') && !$_ROSARIO['Widgets'][$item]) {
        switch ($item) {
            case 'all':
                $extra['search'] .= '<TR><TD colspan="2"><TABLE class="width-100p cellpadding-2" style="border-collapse:separate; border-spacing: 2px">';
                if ($RosarioModules['Students'] && (!$_ROSARIO['Widgets']['calendar'] || !$_ROSARIO['Widgets']['next_year'] || !$_ROSARIO['Widgets']['enrolled'] || !$_ROSARIO['Widgets']['rolled'])) {
                    //modif Francois: css WPadmin
                    $extra['search'] .= '<TR><TD colspan="2">&nbsp;<A onclick="switchMenu(\'enrollment_table\');" href="#"><IMG SRC="assets/arrow_right.gif" id="enrollment_table_arrow" height="12"> <B>' . _('Enrollment') . '</B></A><BR /><TABLE id="enrollment_table" style="display:none;" class="widefat width-100p cellspacing-0">';
                    Widgets('calendar', $extra);
                    Widgets('next_year', $extra);
                    Widgets('enrolled', $extra);
                    Widgets('rolled', $extra);
                    $extra['search'] .= '</TABLE></TD></TR>';
                }
                if ($RosarioModules['Scheduling'] && (!$_ROSARIO['Widgets']['course'] || !$_ROSARIO['Widgets']['request']) && User('PROFILE') == 'admin') {
                    $extra['search'] .= '<TR><TD colspan="2">&nbsp;<A onclick="switchMenu(\'scheduling_table\');" href="#"><IMG SRC="assets/arrow_right.gif" id="scheduling_table_arrow" height="12"> <B>' . _('Scheduling') . '</B></A><BR /><TABLE id="scheduling_table" style="display:none;" class="widefat width-100p cellspacing-0">';
                    Widgets('course', $extra);
                    //Widgets('request',$extra);
                    $extra['search'] .= '</TABLE></TD></TR>';
                }
                if ($RosarioModules['Attendance'] && !$_ROSARIO['Widgets']['absences']) {
                    $extra['search'] .= '<TR><TD colspan="2">&nbsp;<A onclick="switchMenu(\'absences_table\');" href="#"><IMG SRC="assets/arrow_right.gif" id="absences_table_arrow" height="12"> <B>' . _('Attendance') . '</B></A><BR /><TABLE id="absences_table" style="display:none;" class="widefat width-100p cellspacing-0">';
                    Widgets('absences', $extra);
                    $extra['search'] .= '</TABLE></TD></TR>';
                }
                if ($RosarioModules['Grades'] && (!$_ROSARIO['Widgets']['gpa'] || !$_ROSARIO['Widgets']['class_rank'] || !$_ROSARIO['Widgets']['letter_grade'])) {
                    $extra['search'] .= '<TR><TD colspan="2">&nbsp;<A onclick="switchMenu(\'grades_table\');" href="#"><IMG SRC="assets/arrow_right.gif" id="grades_table_arrow" height="12"> <B>' . _('Grades') . '</B></A><BR /><TABLE style="padding:5px;" id="grades_table" style="display:none;" class="widefat width-100p cellspacing-0">';
                    Widgets('gpa', $extra);
                    Widgets('class_rank', $extra);
                    Widgets('letter_grade', $extra);
                    $extra['search'] .= '</TABLE></TD></TR>';
                }
                if ($RosarioModules['Eligibility'] && (!$_ROSARIO['Widgets']['eligibility'] || !$_ROSARIO['Widgets']['activity'])) {
                    $extra['search'] .= '<TR><TD colspan="2">&nbsp;<A onclick="switchMenu(\'eligibility_table\');" href="#"><IMG SRC="assets/arrow_right.gif" id="eligibility_table_arrow" height="12"> <B>' . _('Eligibility') . '</B></A><BR /><TABLE id="eligibility_table" style="display:none;" class="widefat width-100p cellspacing-0">';
                    Widgets('eligibility', $extra);
                    Widgets('activity', $extra);
                    $extra['search'] .= '</TABLE></TD></TR>';
                }
                if ($RosarioModules['Food_Service'] && (!$_ROSARIO['Widgets']['fsa_balance'] || !$_ROSARIO['Widgets']['fsa_discount'] || !$_ROSARIO['Widgets']['fsa_status'] || !$_ROSARIO['Widgets']['fsa_barcode'])) {
                    $extra['search'] .= '<TR><TD colspan="2">&nbsp;<A onclick="switchMenu(\'food_service_table\');" href="#"><IMG SRC="assets/arrow_right.gif" id="food_service_table_arrow" height="12"> <B>' . _('Food Service') . '</B></A><BR /><TABLE id="food_service_table" style="display:none;" class="widefat width-100p cellspacing-0">';
                    Widgets('fsa_balance', $extra);
                    Widgets('fsa_discount', $extra);
                    Widgets('fsa_status', $extra);
                    Widgets('fsa_barcode', $extra);
                    $extra['search'] .= '</TABLE></TD></TR>';
                }
                if ($RosarioModules['Discipline'] && !$_ROSARIO['Widgets']['discipline']) {
                    $extra['search'] .= '<TR><TD colspan="2">&nbsp;<A onclick="switchMenu(\'discipline_table\');" href="#"><IMG SRC="assets/arrow_right.gif" id="discipline_table_arrow" height="12"> <B>' . _('Discipline') . '</B></A><BR /><TABLE id="discipline_table" style="display:none;" class="widefat width-100p cellspacing-0">';
                    Widgets('discipline', $extra);
                    $extra['search'] .= '</TABLE></TD></TR>';
                }
                if ($RosarioModules['Student_Billing'] && !$_ROSARIO['Widgets']['balance']) {
                    $extra['search'] .= '<TR><TD colspan="2">&nbsp;<A onclick="switchMenu(\'billing_table\');" href="#"><IMG SRC="assets/arrow_right.gif" id="billing_table_arrow" height="12"> <B>' . _('Student Billing') . '</B></A><BR /><TABLE id="billing_table" style="display:none;" class="widefat width-100p cellspacing-0">';
                    Widgets('balance', $extra);
                    $extra['search'] .= '</TABLE></TD></TR>';
                }
                $extra['search'] .= '</TABLE></TD></TR>';
                break;
            case 'user':
                $widgets_RET = DBGet(DBQuery("SELECT TITLE FROM PROGRAM_USER_CONFIG WHERE USER_ID='" . User('STAFF_ID') . "' AND PROGRAM='WidgetsSearch'" . (count($_ROSARIO['Widgets']) ? " AND TITLE NOT IN ('" . implode("','", array_keys($_ROSARIO['Widgets'])) . "')" : '')));
                foreach ($widgets_RET as $widget) {
                    Widgets($widget['TITLE'], $extra);
                }
                break;
            case 'course':
                if ($RosarioModules['Scheduling'] && User('PROFILE') == 'admin') {
                    if ($_REQUEST['w_course_period_id']) {
                        if ($_REQUEST['w_course_period_id_which'] == 'course') {
                            $course = DBGet(DBQuery("SELECT c.TITLE AS COURSE_TITLE,cp.TITLE,cp.COURSE_ID FROM COURSE_PERIODS cp,COURSES c WHERE c.COURSE_ID=cp.COURSE_ID AND cp.COURSE_PERIOD_ID='" . $_REQUEST['w_course_period_id'] . "'"));
                            $extra['FROM'] .= ",SCHEDULE w_ss";
                            $extra['WHERE'] .= " AND w_ss.STUDENT_ID=s.STUDENT_ID AND w_ss.SYEAR=ssm.SYEAR AND w_ss.SCHOOL_ID=ssm.SCHOOL_ID AND w_ss.COURSE_ID='" . $course[1]['COURSE_ID'] . "' AND ('" . DBDate() . "' BETWEEN w_ss.START_DATE AND w_ss.END_DATE OR w_ss.END_DATE IS NULL)";
                            if (!$extra['NoSearchTerms']) {
                                $_ROSARIO['SearchTerms'] .= '<b>' . Localize('colon', _('Course')) . ' </b>' . $course[1]['COURSE_TITLE'] . '<BR />';
                            }
                        } else {
                            $extra['FROM'] .= ",SCHEDULE w_ss";
                            $extra['WHERE'] .= " AND w_ss.STUDENT_ID=s.STUDENT_ID AND w_ss.SYEAR=ssm.SYEAR AND w_ss.SCHOOL_ID=ssm.SCHOOL_ID AND w_ss.COURSE_PERIOD_ID='" . $_REQUEST['w_course_period_id'] . "' AND ('" . DBDate() . "' BETWEEN w_ss.START_DATE AND w_ss.END_DATE OR w_ss.END_DATE IS NULL)";
                            $course = DBGet(DBQuery("SELECT c.TITLE AS COURSE_TITLE,cp.TITLE,cp.COURSE_ID FROM COURSE_PERIODS cp,COURSES c WHERE c.COURSE_ID=cp.COURSE_ID AND cp.COURSE_PERIOD_ID='" . $_REQUEST['w_course_period_id'] . "'"));
                            if (!$extra['NoSearchTerms']) {
                                $_ROSARIO['SearchTerms'] .= '<b>' . Localize('colon', _('Course Period')) . ' </b>' . $course[1]['COURSE_TITLE'] . ': ' . $course[1]['TITLE'] . '<BR />';
                            }
                        }
                    }
                    $extra['search'] .= '<TR><TD style="text-align:right; width:120px:">' . _('Course') . "</TD><TD><DIV id=course_div></DIV> <A HREF=# onclick='window.open(\"Modules.php?modname=misc/ChooseCourse.php\",\"\",\"scrollbars=yes,resizable=yes,width=800,height=400\");'>" . _('Choose') . '</A></TD></TR>';
                }
                break;
            case 'request':
                if ($RosarioModules['Scheduling'] && User('PROFILE') == 'admin') {
                    // PART OF THIS IS DUPLICATED IN PrintRequests.php
//.........这里部分代码省略.........
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:101,代码来源:Widgets.fnc.php

示例7: unset

                }
                unset($_REQUEST['modfunc']);
                unset($_REQUEST['food_service']);
                unset($_SESSION['_REQUEST_vars']['food_service']);
            }
        }
    } else {
        unset($_REQUEST['modfunc']);
        unset($_REQUEST['food_service']);
        unset($_SESSION['_REQUEST_vars']['food_service']);
    }
}
Widgets('fsa_discount');
Widgets('fsa_status');
Widgets('fsa_barcode');
Widgets('fsa_account_id');
$extra['SELECT'] .= ",coalesce(fssa.STATUS,'" . _('Active') . "') AS STATUS";
$extra['SELECT'] .= ",(SELECT BALANCE FROM FOOD_SERVICE_ACCOUNTS WHERE ACCOUNT_ID=fssa.ACCOUNT_ID) AS BALANCE";
if (!mb_strpos($extra['FROM'], 'fssa')) {
    $extra['FROM'] .= ",FOOD_SERVICE_STUDENT_ACCOUNTS fssa";
    $extra['WHERE'] .= " AND fssa.STUDENT_ID=s.STUDENT_ID";
}
$extra['functions'] += array('BALANCE' => 'red');
$extra['columns_after'] = array('BALANCE' => _('Balance'), 'STATUS' => _('Status'));
Search('student_id', $extra);
if (!$_REQUEST['modfunc'] && UserStudentID()) {
    $student = DBGet(DBQuery("SELECT s.STUDENT_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME,fssa.ACCOUNT_ID,fssa.STATUS,fssa.DISCOUNT,fssa.BARCODE,(SELECT BALANCE FROM FOOD_SERVICE_ACCOUNTS WHERE ACCOUNT_ID=fssa.ACCOUNT_ID) AS BALANCE FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fssa WHERE s.STUDENT_ID='" . UserStudentID() . "' AND fssa.STUDENT_ID=s.STUDENT_ID"));
    $student = $student[1];
    // find other students associated with the same account
    $xstudents = DBGet(DBQuery("SELECT s.STUDENT_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fssa WHERE fssa.ACCOUNT_ID='" . $student['ACCOUNT_ID'] . "' AND s.STUDENT_ID=fssa.STUDENT_ID AND s.STUDENT_ID!='" . UserStudentID() . "'" . ($_REQUEST['include_inactive'] ? '' : " AND exists(SELECT '' FROM STUDENT_ENROLLMENT WHERE STUDENT_ID=s.STUDENT_ID AND SYEAR='" . UserSyear() . "' AND (START_DATE<=CURRENT_DATE AND (END_DATE IS NULL OR CURRENT_DATE<=END_DATE)))")));
    echo '<FORM action="Modules.php?modname=' . $_REQUEST[modname] . '&modfunc=update" method="POST">';
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:31,代码来源:Accounts.php

示例8: _

     }
     $extra['extra_header_left'] .= '</TABLE>';
     $extra['extra_header_right'] = '<TABLE>';
     $extra['extra_header_right'] .= '<TR><TD align=right>' . _('Starting row') . '</TD><TD><SELECT name=start_row style="width:40px;">';
     for ($row = 1; $row <= $max_rows; $row++) {
         $extra['extra_header_right'] .= '<OPTION value="' . $row . '">' . $row;
     }
     $extra['extra_header_right'] .= '</SELECT></TD></TR>';
     $extra['extra_header_right'] .= '<TR><TD align=right>' . _('Starting column') . '</TD><TD><SELECT name=start_col style="width:40px;">';
     for ($col = 1; $col <= $max_cols; $col++) {
         $extra['extra_header_right'] .= '<OPTION value="' . $col . '">' . $col;
     }
     $extra['extra_header_right'] .= '</SELECT></TD></TR>';
     $extra['extra_header_right'] .= '</TABLE>';
 }
 Widgets('course');
 //Widgets('request');
 //Widgets('activity');
 //Widgets('absences');
 //Widgets('gpa');
 //Widgets('class_rank');
 //Widgets('letter_grade');
 //Widgets('eligibility');
 //$extra['force_search'] = true;
 $extra['link'] = array('FULL_NAME' => false);
 $extra['SELECT'] = ",s.STUDENT_ID AS CHECKBOX";
 $extra['functions'] = array('CHECKBOX' => '_makeChooseCheckbox');
 $extra['columns_before'] = array('CHECKBOX' => '</A><INPUT type=checkbox value=Y name=controller checked onclick="checkAll(this.form,this.form.controller.checked,\'st_arr\');"><A>');
 $extra['options']['search'] = false;
 $extra['new'] = true;
 Search('student_id', $extra);
开发者ID:SysBind,项目名称:opensis-ml,代码行数:31,代码来源:StudentLabels.php

示例9: mySearch

function mySearch($type, $extra = '')
{
    global $extra;
    if ($_REQUEST['search_modfunc'] == 'search_fnc' || !$_REQUEST['search_modfunc']) {
        echo '<BR>';
        PopTable('header', 'Search');
        echo "<FORM action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&modfunc=" . strip_tags(trim($_REQUEST[modfunc])) . "&search_modfunc=list&next_modname=" . strip_tags(trim($_REQUEST[next_modname])) . " method=POST>";
        echo '<TABLE border=0>';
        $RET = DBGet(DBQuery('SELECT s.STAFF_ID,CONCAT(s.LAST_NAME,\'' . ',' . '\',s.FIRST_NAME) AS FULL_NAME FROM staff s,staff_school_relationship ssr WHERE s.STAFF_ID=ssr.STAFF_ID AND s.PROFILE=\'' . 'teacher' . '\' AND position(\'' . UserSchool() . '\' IN ssr.SCHOOL_ID)>0 AND ssr.SYEAR=\'' . UserSyear() . '\' ORDER BY FULL_NAME'));
        echo '<TR><TD align=right width=120>Teacher</TD><TD>';
        echo "<SELECT name=teacher_id style='max-width:250;'><OPTION value=''>N/A</OPTION>";
        foreach ($RET as $teacher) {
            echo "<OPTION value={$teacher['STAFF_ID']}>{$teacher['FULL_NAME']}</OPTION>";
        }
        echo '</SELECT>';
        echo '</TD></TR>';
        $RET = DBGet(DBQuery('SELECT SUBJECT_ID,TITLE FROM course_subjects WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' ORDER BY TITLE'));
        echo '<TR><TD align=right width=120>Subject</TD><TD>';
        echo "<SELECT name=subject_id style='max-width:250;'><OPTION value=''>N/A</OPTION>";
        foreach ($RET as $subject) {
            echo "<OPTION value={$subject['SUBJECT_ID']}>{$subject['TITLE']}</OPTION>";
        }
        echo '</SELECT>';
        $RET = DBGet(DBQuery('SELECT PERIOD_ID,TITLE FROM school_periods WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER'));
        echo '<TR><TD align=right width=120>Period</TD><TD>';
        echo "<SELECT name=period_id style='max-width:250;'><OPTION value=''>N/A</OPTION>";
        foreach ($RET as $period) {
            echo "<OPTION value={$period['PERIOD_ID']}>{$period['TITLE']}</OPTION>";
        }
        echo '</SELECT>';
        echo '</TD></TR>';
        Widgets('course');
        echo $extra['search'];
        echo '<TR><TD colspan=2 align=center>';
        echo '<BR>';
        echo Buttons('Submit', 'Reset');
        echo '</TD></TR>';
        echo '</TABLE>';
        echo '</FORM>';
        PopTable('footer');
    } else {
        DrawHeader('', $extra['header_right']);
        DrawHeader($extra['extra_header_left'], $extra['extra_header_right']);
        if (User('PROFILE') == 'admin') {
            if ($_REQUEST['teacher_id']) {
                $where .= ' AND cp.TEACHER_ID=\'' . $_REQUEST[teacher_id] . '\'';
            }
            if ($_REQUEST['first']) {
                $where .= ' AND UPPER(s.FIRST_NAME) LIKE \'' . strtoupper($_REQUEST['first']) . '%' . '\'';
            }
            if ($_REQUEST['w_course_period_id']) {
                if ($_REQUEST['w_course_period_id_which'] == 'course') {
                    $where .= ' AND cp.COURSE_ID=(SELECT COURSE_ID FROM course_periods WHERE COURSE_PERIOD_ID=\'' . $_REQUEST['w_course_period_id'] . '\')';
                } else {
                    $where .= ' AND cp.COURSE_PERIOD_ID=\'' . $_REQUEST['w_course_period_id'] . '\'';
                }
            }
            if ($_REQUEST['subject_id']) {
                $from .= ',courses c';
                $where .= ' AND c.COURSE_ID=cp.COURSE_ID AND c.SUBJECT_ID=\'' . $_REQUEST['subject_id'] . '\'';
            }
            if ($_REQUEST['period_id']) {
                $where .= " AND cpv.PERIOD_ID='" . $_REQUEST['period_id'] . "'";
            }
            $sql = 'SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM course_periods cp,course_period_var cpv,school_periods sp' . $from . ' WHERE cp.SCHOOL_ID=\'' . UserSchool() . '\' AND cp.COURSE_PERIOD_ID=cpv.COURSE_PERIOD_ID AND cp.SYEAR=\'' . UserSyear() . '\' AND sp.PERIOD_ID=cpv.PERIOD_ID' . $where . '';
        } elseif (User('PROFILE') == 'teacher') {
            $sql = 'SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM course_periods cp,course_period_var cpv,school_periods sp WHERE cp.SCHOOL_ID=\'' . UserSchool() . '\' AND cp.SYEAR=\'' . UserSyear() . '\' AND cp.TEACHER_ID=\'' . User('STAFF_ID') . '\' AND sp.PERIOD_ID=cpv.PERIOD_ID AND cp.COURSE_PERIOD_ID=cpv.COURSE_PERIOD_ID';
        } else {
            $sql = 'SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM course_periods cp,course_period_var cpv,school_periods sp,schedule ss WHERE cp.SCHOOL_ID=\'' . UserSchool() . '\' AND cp.COURSE_PERIOD_ID=ss.COURSE_PERIOD_ID AND ss.SYEAR=\'' . UserSyear() . '\' AND ss.STUDENT_ID=\'' . UserStudentID() . '\' AND (CURRENT_DATE>=ss.START_DATE AND (ss.END_DATE IS NULL OR CURRENT_DATE<=ss.END_DATE)) AND sp.PERIOD_ID=cpv.PERIOD_ID AND cp.COURSE_PERIOD_ID=cpv.COURSE_PERIOD_ID';
        }
        $sql .= ' GROUP BY cp.COURSE_PERIOD_ID ORDER BY sp.PERIOD_ID';
        $course_periods_RET = DBGet(DBQuery($sql), array('COURSE_PERIOD_ID' => '_makeChooseCheckbox'));
        $_SESSION['count_course_periods'] = count($course_periods_RET);
        $LO_columns = array('COURSE_PERIOD_ID' => '</A><INPUT type=checkbox value=Y name=controller onclick="checkAll(this.form,this.form.controller.checked,\'cp_arr\');"><A>', 'TITLE' => 'Course Period');
        ListOutput($course_periods_RET, $LO_columns, 'Course Period', 'Course Periods');
    }
}
开发者ID:jeffthestampede,项目名称:excelsior,代码行数:77,代码来源:PrintClassPictures.php

示例10: mySearch

function mySearch($type, $extra = '')
{
    global $extra;
    if ($_REQUEST['search_modfunc'] == 'search_fnc' || !$_REQUEST['search_modfunc']) {
        echo '<BR>';
        PopTable('header', 'Search');
        echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&modfunc={$_REQUEST['modfunc']}&search_modfunc=list&next_modname={$_REQUEST['next_modname']} method=POST>";
        echo '<TABLE border=0>';
        $RET = DBGet(DBQuery("SELECT STAFF_ID,CONCAT(LAST_NAME,LAST_NAME,', ',FIRST_NAME) AS FULL_NAME FROM STAFF WHERE PROFILE='teacher' AND position('," . UserSchool() . ",' IN SCHOOLS)>0 AND SYEAR='" . UserSyear() . "' ORDER BY FULL_NAME"));
        echo '<TR><TD align=right width=120>Teacher</TD><TD>';
        echo "<SELECT name=teacher_id style='max-width:250;'><OPTION value=''>N/A</OPTION>";
        foreach ($RET as $teacher) {
            echo "<OPTION value={$teacher['STAFF_ID']}>{$teacher['FULL_NAME']}</OPTION>";
        }
        echo '</SELECT>';
        echo '</TD></TR>';
        $RET = DBGet(DBQuery("SELECT SUBJECT_ID,TITLE FROM COURSE_SUBJECTS WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' ORDER BY TITLE"));
        echo '<TR><TD align=right width=120>Subject</TD><TD>';
        echo "<SELECT name=subject_id style='max-width:250;'><OPTION value=''>N/A</OPTION>";
        foreach ($RET as $subject) {
            echo "<OPTION value={$subject['SUBJECT_ID']}>{$subject['TITLE']}</OPTION>";
        }
        echo '</SELECT>';
        $RET = DBGet(DBQuery("SELECT PERIOD_ID,TITLE FROM SCHOOL_PERIODS WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "' ORDER BY SORT_ORDER"));
        echo '<TR><TD align=right width=120>Period</TD><TD>';
        echo "<SELECT name=period_id style='max-width:250;'><OPTION value=''>N/A</OPTION>";
        foreach ($RET as $period) {
            echo "<OPTION value={$period['PERIOD_ID']}>{$period['TITLE']}</OPTION>";
        }
        echo '</SELECT>';
        echo '</TD></TR>';
        Widgets('course');
        echo $extra['search'];
        echo '<TR><TD colspan=2 align=center>';
        echo '<BR>';
        echo Buttons('Submit', 'Reset');
        echo '</TD></TR>';
        echo '</TABLE>';
        echo '</FORM>';
        PopTable('footer');
    } else {
        DrawHeader('', $extra['header_right']);
        DrawHeader($extra['extra_header_left'], $extra['extra_header_right']);
        if (User('PROFILE') == 'admin') {
            if ($_REQUEST['teacher_id']) {
                $where .= " AND cp.TEACHER_ID='{$_REQUEST['teacher_id']}'";
            }
            if ($_REQUEST['first']) {
                $where .= " AND UPPER(s.FIRST_NAME) LIKE '" . strtoupper($_REQUEST['first']) . "%'";
            }
            if ($_REQUEST['w_course_period_id']) {
                if ($_REQUEST['w_course_period_id_which'] == 'course') {
                    $where .= " AND cp.COURSE_ID=(SELECT COURSE_ID FROM COURSE_PERIODS WHERE COURSE_PERIOD_ID='" . $_REQUEST['w_course_period_id'] . "')";
                } else {
                    $where .= " AND cp.COURSE_PERIOD_ID='" . $_REQUEST['w_course_period_id'] . "'";
                }
            }
            if ($_REQUEST['subject_id']) {
                $from .= ",COURSES c";
                $where .= " AND c.COURSE_ID=cp.COURSE_ID AND c.SUBJECT_ID='" . $_REQUEST['subject_id'] . "'";
            }
            if ($_REQUEST['period_id']) {
                $where .= " AND cp.PERIOD_ID='" . $_REQUEST['period_id'] . "'";
            }
            $sql = "SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM COURSE_PERIODS cp,SCHOOL_PERIODS sp{$from} WHERE cp.SCHOOL_ID='" . UserSchool() . "' AND cp.SYEAR='" . UserSyear() . "' AND sp.PERIOD_ID=cp.PERIOD_ID{$where}";
        } elseif (User('PROFILE') == 'teacher') {
            $sql = "SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM COURSE_PERIODS cp,SCHOOL_PERIODS sp WHERE cp.SCHOOL_ID='" . UserSchool() . "' AND cp.SYEAR='" . UserSyear() . "' AND cp.TEACHER_ID='" . User('STAFF_ID') . "' AND sp.PERIOD_ID=cp.PERIOD_ID";
        } else {
            $sql = "SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM COURSE_PERIODS cp,SCHOOL_PERIODS sp,SCHEDULE ss WHERE cp.SCHOOL_ID='" . UserSchool() . "' AND cp.COURSE_PERIOD_ID=ss.COURSE_PERIOD_ID AND ss.SYEAR='" . UserSyear() . "' AND ss.STUDENT_ID='" . UserStudentID() . "' AND (CURRENT_DATE>=ss.START_DATE AND (ss.END_DATE IS NULL OR CURRENT_DATE<=ss.END_DATE)) AND sp.PERIOD_ID=cp.PERIOD_ID";
        }
        $sql .= ' ORDER BY sp.PERIOD_ID';
        $course_periods_RET = DBGet(DBQuery($sql), array('COURSE_PERIOD_ID' => '_makeChooseCheckbox'));
        $LO_columns = array('COURSE_PERIOD_ID' => '</A><INPUT type=checkbox value=Y name=controller onclick="checkAll(this.form,this.form.controller.checked,\'cp_arr\');"><A>', 'TITLE' => 'Course Period');
        ListOutput($course_periods_RET, $LO_columns, 'Course Period', 'Course Periods');
    }
}
开发者ID:SoftScape,项目名称:opensis,代码行数:76,代码来源:PrintClassPictures.php

示例11: Widgets

<?php

/**
* @file $Id: Statements.php 422 2007-02-10 22:08:22Z focus-sis $
* @package Focus/SIS
* @copyright Copyright (C) 2006 Andrew Schmadeke. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
* Focus/SIS is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.txt for copyright notices and details.
*/
Widgets('all');
Widgets('mailing_labels');
Widgets('document_template');
$extra['force_search'] = true;
if (!$_REQUEST['search_modfunc'] || $_REQUEST['search_modfunc'] == 'search' || $_FOCUS['modules_search']) {
    DrawHeader(ProgramTitle());
    $extra['new'] = true;
    $extra['action'] .= "&_FOCUS_PDF=true";
    Search('student_id', $extra);
} else {
    // For the Student Fees / Student Payments programs
    $_REQUEST['print_statements'] = true;
    if ($_REQUEST['mailing_labels'] == 'Y') {
        $extra['group'][] = 'ADDRESS_ID';
    }
    $RET = GetStuList($extra);
    if (count($RET)) {
        $handle = PDFStart();
开发者ID:SoftScape,项目名称:opensis,代码行数:31,代码来源:Statements.php

示例12: SubmitButton

     echo '<FORM action="Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=save&_ROSARIO_PDF=true" method="POST">';
     //DrawHeader('',SubmitButton('Create Reminders for Selected Students'));
     //modif Francois: add translation
     $extra['header_right'] = SubmitButton(_('Create Reminders for Selected Students'));
     $extra['extra_header_left'] = '<TABLE><TR>';
     $extra['extra_header_left'] .= '<TD style="text-align:right"><label>' . _('Estimate for year end') . '&nbsp;<INPUT type="checkbox" name="year_end" value="Y" /></label></TD>';
     $extra['extra_header_left'] .= '</TR></TABLE>';
 }
 $extra['link'] = array('FULL_NAME' => false);
 $extra['SELECT'] = ",s.STUDENT_ID AS CHECKBOX";
 $extra['functions'] = array('CHECKBOX' => '_makeChooseCheckbox');
 $extra['columns_before'] = array('CHECKBOX' => '</A><INPUT type="checkbox" value="Y" checked name="controller" onclick="checkAll(this.form,this.form.controller.checked,\'st_arr\');"><A>');
 $extra['new'] = true;
 $extra['options']['search'] = false;
 Widgets('fsa_balance_warning');
 Widgets('fsa_status');
 $extra['SELECT'] .= ',coalesce(fssa.STATUS,\'Active\') AS STATUS,fsa.BALANCE';
 $extra['SELECT'] .= ',(SELECT \'Y\' WHERE fsa.BALANCE < \'' . $warning . '\' AND fsa.BALANCE >= 0) AS WARNING';
 $extra['SELECT'] .= ',(SELECT \'Y\' WHERE fsa.BALANCE < 0 AND fsa.BALANCE >= \'' . $minimum . '\') AS NEGATIVE';
 $extra['SELECT'] .= ',(SELECT \'Y\' WHERE fsa.BALANCE < \'' . $minimum . '\') AS MINIMUM';
 if (!mb_strpos($extra['FROM'], 'fssa')) {
     $extra['FROM'] .= ',FOOD_SERVICE_STUDENT_ACCOUNTS fssa';
     $extra['WHERE'] .= ' AND fssa.STUDENT_ID=s.STUDENT_ID';
 }
 if (!mb_strpos($extra['FROM'], 'fsa')) {
     $extra['FROM'] .= ',FOOD_SERVICE_ACCOUNTS fsa';
     $extra['WHERE'] .= ' AND fsa.ACCOUNT_ID=fssa.ACCOUNT_ID';
 }
 $extra['functions'] += array('BALANCE' => 'red', 'WARNING' => 'x', 'NEGATIVE' => 'x', 'MINIMUM' => 'x');
 $extra['columns_after'] = array('BALANCE' => _('Balance'), 'STATUS' => _('Status'), 'WARNING' => _('Warning') . '<BR />&lt; ' . $warning, 'NEGATIVE' => _('Negative'), 'MINIMUM' => _('Minimum') . '<BR />' . $minimum);
 Search('student_id', $extra);
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:31,代码来源:Reminders.php

示例13: Widgets

function Widgets($item, &$myextra = null)
{
    global $extra, $_CENTRE, $CentreModules;
    if (isset($myextra)) {
        $extra =& $myextra;
    }
    if (!is_array($_CENTRE['Widgets'])) {
        $_CENTRE['Widgets'] = array();
    }
    if (!is_array($extra['functions'])) {
        $extra['functions'] = array();
    }
    if ((User('PROFILE') == 'admin' || User('PROFILE') == 'teacher') && !$_CENTRE['Widgets'][$item]) {
        switch ($item) {
            case 'all':
                $extra['search'] .= '<TR><TD colspan=2>';
                if ($CentreModules['Students'] && (!$_CENTRE['Widgets']['calendar'] || !$_CENTRE['Widgets']['next_year'] || !$_CENTRE['Widgets']['enrolled'] || !$_CENTRE['Widgets']['rolled'])) {
                    $extra['search'] .= '<A onclick="switchMenu(\'enrollment_table\');"><IMG SRC=assets/arrow_right.gif id=enrollment_table_arrow> <B>' . _('Enrollment') . '</B></A><BR><TABLE bgcolor=#f8f8f9 width=100% id=enrollment_table style="display:none;">';
                    Widgets('calendar', $extra);
                    Widgets('next_year', $extra);
                    Widgets('enrolled', $extra);
                    Widgets('rolled', $extra);
                    $extra['search'] .= '</TABLE>';
                }
                if ($CentreModules['Scheduling'] && (!$_CENTRE['Widgets']['course'] || !$_CENTRE['Widgets']['request']) && User('PROFILE') == 'admin') {
                    $extra['search'] .= '<A onclick="switchMenu(\'scheduling_table\');"><IMG SRC=assets/arrow_right.gif id=scheduling_table_arrow> <B>' . _('Scheduling') . '</B></A><BR><TABLE bgcolor=#f8f8f9 width=100% id=scheduling_table style="display:none;">';
                    Widgets('course', $extra);
                    //Widgets('request',$extra);
                    $extra['search'] .= '</TABLE>';
                }
                if ($CentreModules['Attendance'] && !$_CENTRE['Widgets']['absences']) {
                    $extra['search'] .= '<A onclick="switchMenu(\'absences_table\');"><IMG SRC=assets/arrow_right.gif id=absences_table_arrow> <B>' . _('Attendance') . '</B></A><BR><TABLE bgcolor=#f8f8f9 width=100% id=absences_table style="display:none;">';
                    Widgets('absences', $extra);
                    $extra['search'] .= '</TABLE>';
                }
                if ($CentreModules['Grades'] && (!$_CENTRE['Widgets']['gpa'] || !$_CENTRE['Widgets']['class_rank'] || !$_CENTRE['Widgets']['letter_grade'])) {
                    $extra['search'] .= '<A onclick="switchMenu(\'grades_table\');"><IMG SRC=assets/arrow_right.gif id=grades_table_arrow> <B>' . _('Grades') . '</B></A><BR><TABLE bgcolor=#f8f8f9 width=100% cellpadding=5 id=grades_table style="display:none;">';
                    Widgets('gpa', $extra);
                    Widgets('class_rank', $extra);
                    Widgets('letter_grade', $extra);
                    $extra['search'] .= '</TABLE>';
                }
                if ($CentreModules['Eligibility'] && (!$_CENTRE['Widgets']['eligibility'] || !$_CENTRE['Widgets']['activity'])) {
                    $extra['search'] .= '<A onclick="switchMenu(\'eligibility_table\');"><IMG SRC=assets/arrow_right.gif id=eligibility_table_arrow> <B>' . _('Eligibility') . '</B></A><BR><TABLE bgcolor=#f8f8f9 width=100% id=eligibility_table style="display:none;">';
                    Widgets('eligibility', $extra);
                    Widgets('activity', $extra);
                    $extra['search'] .= '</TABLE>';
                }
                if ($CentreModules['Food_Service'] && (!$_CENTRE['Widgets']['fsa_balance'] || !$_CENTRE['Widgets']['fsa_discount'] || !$_CENTRE['Widgets']['fsa_status'] || !$_CENTRE['Widgets']['fsa_barcode'])) {
                    $extra['search'] .= '<A onclick="switchMenu(\'food_service_table\');"><IMG SRC=assets/arrow_right.gif id=food_service_table_arrow> <B>' . _('Food Service') . '</B></A><BR><TABLE bgcolor=#f8f8f9 width=100% id=food_service_table style="display:none;">';
                    Widgets('fsa_balance', $extra);
                    Widgets('fsa_discount', $extra);
                    Widgets('fsa_status', $extra);
                    Widgets('fsa_barcode', $extra);
                    $extra['search'] .= '</TABLE>';
                }
                if ($CentreModules['Discipline'] && (!$_CENTRE['Widgets']['discipline'] || !$_CENTRE['Widgets']['discipline_categories'])) {
                    $extra['search'] .= '<A onclick="switchMenu(\'discipline_table\');"><IMG SRC=assets/arrow_right.gif id=discipline_table_arrow> <B>' . _('Discipline') . '</B></A><BR><TABLE bgcolor=#f8f8f9 width=100% id=discipline_table style="display:none;">';
                    Widgets('discipline', $extra);
                    Widgets('discipline_categories', $extra);
                    $extra['search'] .= '</TABLE>';
                }
                if ($CentreModules['Student_Billing'] && !$_CENTRE['Widgets']['balance']) {
                    $extra['search'] .= '<A onclick="switchMenu(\'billing_table\');"><IMG SRC=assets/arrow_right.gif id=billing_table_arrow> <B>' . _('Student Billing') . '</B></A><BR><TABLE bgcolor=#f8f8f9 width=100% id=billing_table style="display:none;">';
                    Widgets('balance', $extra);
                    $extra['search'] .= '</TABLE>';
                }
                $extra['search'] .= '</TD></TR>';
                break;
            case 'user':
                $widgets_RET = DBGet(DBQuery("SELECT TITLE FROM PROGRAM_USER_CONFIG WHERE USER_ID='" . User('STAFF_ID') . "' AND PROGRAM='WidgetsSearch'" . (count($_CENTRE['Widgets']) ? " AND TITLE NOT IN ('" . implode("','", array_keys($_CENTRE['Widgets'])) . "')" : '')));
                foreach ($widgets_RET as $widget) {
                    Widgets($widget['TITLE'], $extra);
                }
                break;
            case 'course':
                if ($CentreModules['Scheduling'] && User('PROFILE') == 'admin') {
                    if ($_REQUEST['w_course_period_id']) {
                        if ($_REQUEST['w_course_period_id_which'] == 'course') {
                            $course = DBGet(DBQuery("SELECT c.TITLE AS COURSE_TITLE,cp.TITLE,cp.COURSE_ID FROM COURSE_PERIODS cp,COURSES c WHERE c.COURSE_ID=cp.COURSE_ID AND cp.COURSE_PERIOD_ID='" . $_REQUEST['w_course_period_id'] . "'"));
                            $extra['FROM'] .= ",SCHEDULE w_ss";
                            $extra['WHERE'] .= " AND w_ss.STUDENT_ID=s.STUDENT_ID AND w_ss.SYEAR=ssm.SYEAR AND w_ss.SCHOOL_ID=ssm.SCHOOL_ID AND w_ss.COURSE_ID='" . $course[1]['COURSE_ID'] . "' AND ('" . DBDate() . "' BETWEEN w_ss.START_DATE AND w_ss.END_DATE OR w_ss.END_DATE IS NULL)";
                            if (!$extra['NoSearchTerms']) {
                                $_CENTRE['SearchTerms'] .= '<font color=gray><b>' . Localize('colon', _('Course')) . ' </b></font>' . $course[1]['COURSE_TITLE'] . '<BR>';
                            }
                        } else {
                            $extra['FROM'] .= ",SCHEDULE w_ss";
                            $extra['WHERE'] .= " AND w_ss.STUDENT_ID=s.STUDENT_ID AND w_ss.SYEAR=ssm.SYEAR AND w_ss.SCHOOL_ID=ssm.SCHOOL_ID AND w_ss.COURSE_PERIOD_ID='" . $_REQUEST['w_course_period_id'] . "' AND ('" . DBDate() . "' BETWEEN w_ss.START_DATE AND w_ss.END_DATE OR w_ss.END_DATE IS NULL)";
                            $course = DBGet(DBQuery("SELECT c.TITLE AS COURSE_TITLE,cp.TITLE,cp.COURSE_ID FROM COURSE_PERIODS cp,COURSES c WHERE c.COURSE_ID=cp.COURSE_ID AND cp.COURSE_PERIOD_ID='" . $_REQUEST['w_course_period_id'] . "'"));
                            if (!$extra['NoSearchTerms']) {
                                $_CENTRE['SearchTerms'] .= '<font color=gray><b>' . Localize('colon', _('Course Period')) . ' </b></font>' . $course[1]['COURSE_TITLE'] . ': ' . $course[1]['TITLE'] . '<BR>';
                            }
                        }
                    }
                    $extra['search'] .= "<TR><TD align=right width=120>" . _('Course') . "</TD><TD><DIV id=course_div></DIV> <A HREF=# onclick='window.open(\"Modules.php?modname=misc/ChooseCourse.php\",\"\",\"scrollbars=yes,resizable=yes,width=800,height=400\");'><SMALL>" . _('Choose') . "</SMALL></A></TD></TR>";
                }
                break;
            case 'request':
                if ($CentreModules['Scheduling'] && User('PROFILE') == 'admin') {
                    // PART OF THIS IS DUPLICATED IN PrintRequests.php
//.........这里部分代码省略.........
开发者ID:linil,项目名称:centreSIS,代码行数:101,代码来源:Widgets.fnc.php

示例14: DrawHeaderHome

    if ($request_exists) {
        DrawHeaderHome('<IMG SRC=assets/warning_button.gif>' . $request_clash . ' already have unscheduled requests');
    }
}
if (!$_REQUEST['modfunc']) {
    if ($_REQUEST['search_modfunc'] != 'list') {
        unset($_SESSION['MassSchedule.php']);
    }
    $extra['link'] = array('FULL_NAME' => false);
    $extra['SELECT'] = ",CAST(NULL AS CHAR(1)) AS CHECKBOX";
    $extra['functions'] = array('CHECKBOX' => '_makeChooseCheckbox');
    $extra['columns_before'] = array('CHECKBOX' => '</A><INPUT type=checkbox value=Y name=controller onclick="checkAll(this.form,this.form.controller.checked,\'student\');"><A>');
    $extra['new'] = true;
    Widgets('course');
    Widgets('request');
    Widgets('activity');
    Search('student_id', $extra);
    if ($_REQUEST['search_modfunc'] == 'list') {
        echo '<BR><CENTER>' . SubmitButton('Add Course to Selected Students', '', 'class=btn_xlarge onclick=\'formload_ajax("sav");\'') . '</CENTER>';
        echo "</FORM>";
    }
}
if ($_REQUEST['modfunc'] == 'choose_course') {
    //	if($_REQUEST['course_id'])
    //	{
    //		$weights_RET = DBGet(DBQuery("SELECT COURSE_WEIGHT,GPA_MULTIPLIER FROM COURSE_WEIGHTS WHERE COURSE_ID='$_REQUEST[course_id]'"));
    //		if(count($weights_RET)==1)
    //			$_REQUEST['course_weight'] = $weights_RET[1]['COURSE_WEIGHT'];
    //	}
    if (!$_REQUEST['course_period_id']) {
        include 'modules/Scheduling/CoursesforWindow.php';
开发者ID:SoftScape,项目名称:opensis,代码行数:31,代码来源:MassSchedule.php

示例15: PopTable

            echo '</TABLE>';
            echo '</FORM>';
            PopTable('footer');
            break;
    }
} else {
    if (!$_REQUEST['next_modname']) {
        $_REQUEST['next_modname'] = 'Students/Student.php';
    }
    if (User('PROFILE') == 'admin' || User('PROFILE') == 'teacher') {
        if (!isset($extra)) {
            $extra = array();
        }
        Widgets('user', $extra);
        if ($_REQUEST['advanced'] == 'Y') {
            Widgets('all', $extra);
        }
    }
    if (!$extra['NoSearchTerms']) {
        if ($_REQUEST['_search_all_schools'] == 'Y') {
            $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>' . _('Search All Schools') . '</b></span><BR />';
        }
        if ($_REQUEST['include_inactive'] == 'Y') {
            $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>' . _('Include Inactive Students') . '</b></span><BR />';
        }
    }
    if ($_REQUEST['address_group']) {
        $extra['SELECT'] .= ",coalesce((SELECT ADDRESS_ID FROM STUDENTS_JOIN_ADDRESS WHERE STUDENT_ID=ssm.STUDENT_ID AND RESIDENCE='Y' LIMIT 1),-ssm.STUDENT_ID) AS FAMILY_ID";
        $extra['group'] = $extra['LO_group'] = array('FAMILY_ID');
    }
    $extra['WHERE'] .= appendSQL('', array('NoSearchTerms' => $extra['NoSearchTerms']));
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:31,代码来源:Search.inc.php


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