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


PHP AllowUse函数代码示例

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


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

示例1: ProgramLink

function ProgramLink($modname, $title = '', $options = '')
{
    if (AllowUse($modname)) {
        $link = '<A HREF=Modules.php?modname=' . $modname . $options . '>';
    }
    if ($title) {
        $link .= $title;
    }
    if (AllowUse($modname)) {
        $link .= '</A>';
    }
    return $link;
}
开发者ID:linil,项目名称:centreSIS,代码行数:13,代码来源:AllowEdit.fnc.php

示例2: ExportLink

function ExportLink($modname, $title = '', $options = '')
{
    if (AllowUse($modname)) {
        $link = '<A HREF=ForExport.php?modname=' . $modname . $options . '>';
    }
    if ($title) {
        $link .= $title;
    }
    if (AllowUse($modname)) {
        $link .= '</A>';
    }
    return $link;
}
开发者ID:jicheng17,项目名称:fenghua,代码行数:13,代码来源:CustomFunctionsFnc.php

示例3: _

#
#  Visit the openSIS web site at http://www.opensis.com to learn more.
#  If you have question regarding this system or the license, please send
#  an email to info@os4ed.com.
#
#  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';
$modcat = _('Students');
$_REQUEST['modname'] = '';
if (AllowUse('Students/Student.php')) {
    $_REQUEST['modname'] = $_REQUEST['next_modname'] = 'Students/Student.php';
    if (User('PROFILE') == 'parent' || User('PROFILE') == 'student') {
        $_REQUEST['search_modfunc'] = 'list';
    }
}
if ($_REQUEST['modname']) {
    echo "<SCRIPT language=javascript>parent.help.location=\"Bottom.php?modcat={$modcat}&modname={$_REQUEST['modname']}\";</SCRIPT>";
    include "modules/{$_REQUEST['modname']}";
}
开发者ID:SysBind,项目名称:opensis-ml,代码行数:31,代码来源:Search.php

示例4: elseif

        } elseif ($_REQUEST['course_id']) {
            $sql .= "AND sr.COURSE_ID='{$_REQUEST['course_id']}' ";
        }
        $sql .= "AND NOT EXISTS (SELECT '' FROM SCHEDULE ss WHERE ss.COURSE_ID=sr.COURSE_ID AND ss.STUDENT_ID=sr.STUDENT_ID AND ('" . DBDate() . "' BETWEEN ss.START_DATE AND ss.END_DATE OR ss.END_DATE IS NULL))";
    } else {
        $sql = "SELECT s.LAST_NAME||', '||s.FIRST_NAME AS FULL_NAME,s.STUDENT_ID,s.CUSTOM_200000004,ssm.GRADE_ID\n\t\t\t\tFROM SCHEDULE ss,STUDENTS s,STUDENT_ENROLLMENT ssm\n\t\t\t\tWHERE ('" . DBDate() . "' BETWEEN ss.START_DATE AND ss.END_DATE OR ss.END_DATE IS NULL) AND (('" . DBDate() . "' BETWEEN ssm.START_DATE AND ssm.END_DATE OR ssm.END_DATE IS NULL)) AND s.STUDENT_ID=ss.STUDENT_ID AND s.STUDENT_ID=ssm.STUDENT_ID AND ssm.SYEAR='" . UserSyear() . "' AND ssm.SCHOOL_ID='" . UserSchool() . "' ";
        if ($_REQUEST['course_period_id']) {
            $sql .= "AND ss.COURSE_PERIOD_ID='{$_REQUEST['course_period_id']}'";
        } elseif ($_REQUEST['course_id']) {
            $sql .= "AND ss.COURSE_ID='{$_REQUEST['course_id']}'";
        }
    }
    $sql .= ' ORDER BY s.LAST_NAME,s.FIRST_NAME';
    $RET = DBGet(DBQuery($sql), array('CUSTOM_200000004' => 'ShortDate', 'GRADE_ID' => 'GetGrade'));
    $link = array();
    if (AllowUse('Scheduling/Schedule.php')) {
        $link['FULL_NAME']['link'] = "Modules.php?modname=Scheduling/Schedule.php";
        $link['FULL_NAME']['variables'] = array('student_id' => 'STUDENT_ID');
    }
    echo '<TD valign=top>';
    if ($_REQUEST['unscheduled'] == 'true') {
        ListOutput($RET, array('FULL_NAME' => _('Student'), 'GRADE_ID' => _('Grade'), 'CUSTOM_200000004' => _('Birthdate')), 'Unscheduled Student', 'Unscheduled Students', $link, array(), $LO_options);
    } else {
        ListOutput($RET, array('FULL_NAME' => _('Student'), 'GRADE_ID' => _('Grade'), 'CUSTOM_200000004' => _('Birthdate')), 'Student', 'Students', $link, array(), $LO_options);
    }
    echo '</TD>';
}
echo '</TR></TABLE>';
function calcSeats1($period, &$total_seats, &$filled_seats)
{
    if ($_REQUEST['include_child_mps']) {
开发者ID:linil,项目名称:centreSIS,代码行数:31,代码来源:ScheduleReport.php

示例5: DBGet

###########################################
#print_r($_REQUEST);
if (isset($_REQUEST['staff_id']) && $_REQUEST['staff_id'] != 'new') {
    if (User('PROFILE') == 'admin') {
        $RET = DBGet(DBQuery('SELECT FIRST_NAME,LAST_NAME FROM people WHERE STAFF_ID=\'' . $_REQUEST['staff_id'] . '\''));
        $count_staff_RET = DBGet(DBQuery('SELECT COUNT(*) AS NUM FROM people'));
        if ($count_staff_RET[1]['NUM'] > 1) {
            DrawHeaderHome('Selected User: ' . $RET[1]['FIRST_NAME'] . '&nbsp;' . $RET[1]['LAST_NAME'] . ' (<A HREF=Side.php?staff_id=new&modcat=' . $_REQUEST['modcat'] . '><font color=red>Search Again</font></A>) | <A HREF=Modules.php?modname=' . $_REQUEST['modname'] . '&search_modfunc=list&next_modname=users/User.php&ajax=true&bottom_back=true&return_session=true target=body>Back to User List</A>');
        } else {
            DrawHeaderHome('Selected User: ' . $RET[1]['FIRST_NAME'] . '&nbsp;' . $RET[1]['LAST_NAME'] . ' (<A HREF=Side.php?staff_id=new&modcat=' . $_REQUEST['modcat'] . '><font color=red>Search Again</font></A>)');
        }
    }
}
#############################################
if (User('PROFILE') != 'admin' && User('PROFILE') != 'teacher' && $_REQUEST['staff_id'] && $_REQUEST['staff_id'] != 'new') {
    if (!AllowUse()) {
        if (User('USERNAME')) {
            HackingLog();
        }
        exit;
    }
}
if ($_REQUEST['modfunc'] == 'remove_stu') {
    $delete = DeletePromptMod('student', "include=GeneralInfoInc&category_id=1&staff_id={$_REQUEST['staff_id']}");
    if ($delete == 1) {
        DBGet(DBQuery('DELETE FROM students_join_people WHERE STUDENT_ID=' . $_REQUEST['id'] . ' AND PERSON_ID=' . $_REQUEST['staff_id']));
        echo "<script>window.location.href='Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&include=GeneralInfoInc&category_id=1&staff_id={$_REQUEST['staff_id']}'</script>";
    }
} else {
    if (!$_REQUEST['include']) {
        $_REQUEST['include'] = 'GeneralInfoInc';
开发者ID:jicheng17,项目名称:fenghua,代码行数:31,代码来源:User.php

示例6: DrawHeaderHome

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>';
    } elseif ($THIS_RET['TOTAL_POINTS'] == 0) {
        return '<FONT color=#0000ff>Extra Credit</FONT>';
开发者ID:26746647,项目名称:Belize-openSIS,代码行数:31,代码来源:AnomalousGrades.php

示例7: mb_substr

        }
        $sql = mb_substr($sql, 0, -1) . " WHERE ID='" . $id . "'";
        DBQuery($sql);
    }
}
if ($_REQUEST['modfunc'] !== 'remove') {
    echo '<script src="modules/Reports/functions.js"></script>';
    echo '<script src="modules/Reports/assets/ajax.js"></script>';
    DrawHeader(ProgramTitle());
    DrawHeader('<div id="status_div">&nbsp;</div>');
    $field_categories = array('', dgettext('Reports', 'Time Values'), Config('NAME') . ' ' . _('Fields'), dgettext('Reports', 'Constants'));
    $items = array('function' => array('sum', 'average', 'count', 'max', 'min', 'average-max', 'average-min', 'sum-max', 'sum-min'), 'operator' => array('+', '-', '*', '/', '(', ')'), 'field' => array('~', _('Present'), _('Absent'), _('Enrolled'), '~', dgettext('Reports', 'Student ID')));
    // Numeric Fields.
    $numeric_RET = DBGet(DBQuery("SELECT ID,CATEGORY_ID,TITLE\n\t\tFROM CUSTOM_FIELDS\n\t\tWHERE TYPE='numeric'"), array(), array('CATEGORY_ID'));
    foreach ((array) $numeric_RET as $category_id => $fields) {
        if (AllowUse('Modules.php?modname=Students/Student.php&category_id=' . $category_id)) {
            foreach ((array) $fields as $field) {
                $items['field'][] = Config('NAME') . ': ' . $field['TITLE'];
            }
        }
    }
    // RosarioSIS?
    /*$items['field'][] = '~';
    
    	$items['field'][] = _( 'Time on Task' );
    
    	$subjects = array(
    		_( 'Math' ),
    		_( 'Language Arts' ),
    		_( 'Social Studies' ),
    		_( 'Science' ),
开发者ID:francoisjacquet,项目名称:Reports,代码行数:31,代码来源:Calculations.php

示例8: coalesce

if (UserStudentID() && (User('PROFILE') == 'admin' || User('PROFILE') == 'teacher')) {
    if (Preferences('NAME') == 'Common') {
        $sql = "SELECT coalesce(CUSTOM_200000002,FIRST_NAME)||' '||LAST_NAME AS FULL_NAME FROM STUDENTS WHERE STUDENT_ID='" . UserStudentID() . "'";
    } else {
        $sql = "SELECT FIRST_NAME||' '||coalesce(MIDDLE_NAME,' ')||' '||LAST_NAME||' '||coalesce(NAME_SUFFIX,' ') AS FULL_NAME FROM STUDENTS WHERE STUDENT_ID='" . UserStudentID() . "'";
    }
    $RET = DBGet(DBQuery($sql));
    echo '<TABLE border=0 cellpadding=0 cellspacing=0 width=100%><TR><TD bgcolor=#333366 width=19 valign=middle><A HREF=Side.php?student_id=new&modcat=' . $_REQUEST['modcat'] . '><IMG SRC=assets/x.gif height=17 border=0></A></TD><TD bgcolor=#333366><B>' . (AllowUse('Students/Student.php') ? '<A HREF=Modules.php?modname=Students/Student.php&student_id=' . UserStudentID() . ' target=body>' : '') . '<font color=#FFFFFF size=-2>' . $RET[1]['FULL_NAME'] . '</font>' . (AllowUse('Students/Student.php') ? '</A>' : '') . '</B></TD></TR></TABLE>';
}
if (UserStaffID() && (User('PROFILE') == 'admin' || User('PROFILE') == 'teacher')) {
    if (UserStudentID()) {
        echo '<IMG SRC=assets/pixel_trans.gif height=2>';
    }
    $sql = "SELECT FIRST_NAME||' '||LAST_NAME AS FULL_NAME FROM STAFF WHERE STAFF_ID='" . UserStaffID() . "'";
    $RET = DBGet(DBQuery($sql));
    echo '<TABLE border=0 cellpadding=0 cellspacing=0 width=100%><TR><TD bgcolor=' . (UserStaffID() == User('STAFF_ID') ? '#663333' : '#336633') . ' width=19 valign=middle><A HREF=Side.php?staff_id=new&modcat=' . $_REQUEST['modcat'] . '><IMG SRC=assets/x.gif height=17 border=0></A></TD><TD bgcolor=' . (UserStaffID() == User('STAFF_ID') ? '#663333' : '#336633') . '><B>' . (AllowUse('Users/User.php') ? '<A HREF=Modules.php?modname=Users/User.php&staff_id=' . UserStaffID() . ' target=body>' : '') . '<font color=#FFFFFF size=-2>' . $RET[1]['FULL_NAME'] . '</font>' . (AllowUse('Users/User.php') ? '</A>' : '') . '</B></TD></TR></TABLE>';
}
echo '<BR>';
// echo 'Locale: '.$_SESSION['locale'].'<BR>';
// Program Information
require 'Menu.php';
foreach ($_CENTRE['Menu'] as $modcat => $programs) {
    if (count($_CENTRE['Menu'][$modcat])) {
        $keys = array_keys($_CENTRE['Menu'][$modcat]);
        $menu = false;
        foreach ($keys as $key_index => $file) {
            if (!is_numeric($file)) {
                $menu = true;
                break;
            }
        }
开发者ID:linil,项目名称:centreSIS,代码行数:31,代码来源:Side.php

示例9: array

        echo "</body></html>";
    }
} else {
    if (!$fields_list) {
        if (AllowUse('users/User.php&category_id=1')) {
            $fields_list['General'] = array('FULL_NAME' => Preferences('NAME') == 'Common' ? 'Last, Common' : 'Last, First M', 'FIRST_NAME' => 'First', 'TITLE' => 'Title', 'LAST_NAME' => 'Last', 'MIDDLE_NAME' => 'Middle', 'STAFF_ID' => 'Staff Id', 'ROLLOVER_ID' => 'Last Year Id', 'SCHOOLS' => 'Schools', 'USERNAME' => 'Username', 'IS_DISABLE' => 'Disable', 'EMAIL' => 'Email ID', 'PHONE' => 'Phone', 'LAST_LOGIN' => 'Last Login', 'PROFILE' => 'User Profile');
        }
        if ($extra['field_names']) {
            $fields_list['General'] += $extra['field_names'];
        }
    }
    /*******************************************************************************/
    $categories_RET = DBGet(DBQuery('SELECT ID,TITLE FROM staff_field_categories ORDER BY SORT_ORDER'));
    $custom_RET = DBGet(DBQuery('SELECT TITLE,ID,TYPE,CATEGORY_ID FROM staff_fields ORDER BY SORT_ORDER'), array(), array('CATEGORY_ID'));
    foreach ($categories_RET as $category) {
        if (AllowUse('users/User.php&category_id=' . $category['ID'])) {
            foreach ($custom_RET[$category['ID']] as $field) {
                $title = strtolower(trim($field['TITLE']));
                if (strpos(trim($field['TITLE']), ' ') != 0) {
                    $p1 = substr(trim($field['TITLE']), 0, strpos(trim($field['TITLE']), ' '));
                    $p2 = substr(trim($field['TITLE']), strpos(trim($field['TITLE']), ' ') + 1);
                    $title = strtolower($p1 . '_' . $p2);
                }
                $fields_list[$category['TITLE']]['CUSTOM_' . $field['ID']] = $field['TITLE'];
            }
        }
    }
    echo '<TABLE><TR><TD valign="top" width="300">';
    DrawHeader("<div><a class=big_font><img src=\"themes/blue/expanded_view.png\" />Select Fields To Generate Report</a></div>", $extra['header_right']);
    PopTable_wo_header('header');
    echo '<TABLE><TR>';
开发者ID:jeffthestampede,项目名称:excelsior,代码行数:31,代码来源:UserExport.php

示例10: DBGet

             $width = $width + 52.5;
         }
         $percent = $width / 420 * 100;
         echo '<table><tr><td colspan=2><b>Please complete the setup before using the system. The following components need to be set:</b></td></tr>';
         echo '<tr><td colspan="2">' . $percent . '% complete</td></tr>';
         echo '<tr><td colspan="2" ><div style="border: 1px solid black; width:420px; height:10px;">
                             <div id="progress" style="height:10px; width:' . $width . 'px; background-color:' . ($percent <= 33 ? 'red' : ($percent <= 66 ? 'yellow' : 'green')) . ';"/>
                           </div></div></td></tr>';
         echo '<tr><td width="399px;">' . (AllowUse('schoolsetup/Calendar.php') == true ? '<a href=# style="text-decoration:none;" onClick="check_content(\'Ajax.php?modname=schoolsetup/Calendar.php\');">' : '') . 'Calendar Setup' . (AllowUse('schoolsetup/Calendar.php') == true ? '</a>' : '') . '</td><td><img src="' . ($cal_setup[1]['REC'] > 0 ? 'assets/check.gif' : 'assets/x.gif') . '" /></td></tr>';
         echo '<tr><td width="399px;">' . (AllowUse('schoolsetup/MarkingPeriods.php') == true ? '<a href=# style="text-decoration:none;" onClick="check_content(\'Ajax.php?modname=schoolsetup/MarkingPeriods.php\');">' : '') . 'Marking Period Setup' . (AllowUse('schoolsetup/MarkingPeriods.php') == true ? '</a>' : '') . '</td><td><img src="' . ($mp_setup[1]['REC'] > 1 ? 'assets/check.gif' : 'assets/x.gif') . '" /></td></tr>';
         echo '<tr><td width="399px;">' . (AllowUse('attendance/AttendanceCodes.php') == true ? '<a href=# style="text-decoration:none;" onClick="check_content(\'Ajax.php?modname=attendance/AttendanceCodes.php\');">' : '') . 'Attendance Code Setup' . (AllowUse('attendance/AttendanceCodes.php') == true ? '</a>' : '') . '</td><td><img src="' . ($att_code_setup[1]['REC'] > 0 ? 'assets/check.gif' : 'assets/x.gif') . '" /></td></tr>';
         echo '<tr><td width="399px;">' . (AllowUse('grades/ReportCardGrades.php') == true ? '<a href=# style="text-decoration:none;" onClick="check_content(\'Ajax.php?modname=grades/ReportCardGrades.php\');">' : '') . 'Grade Scale Setup' . (AllowUse('grades/ReportCardGrades.php') == true ? '</a>' : '') . '</td><td><img src="' . ($grade_scale_setup[1]['REC'] > 0 ? 'assets/check.gif' : 'assets/x.gif') . '" /></td></tr>';
         echo '<tr><td width="399px;">' . (AllowUse('students/EnrollmentCodes.php') == true ? '<a href=# style="text-decoration:none;" onClick="check_content(\'Ajax.php?modname=students/EnrollmentCodes.php\');">' : '') . 'Enrollment Code Setup' . (AllowUse('students/EnrollmentCodes.php') == true ? '</a>' : '') . '</td><td><img src="' . ($enroll_code_setup[1]['REC'] > 0 ? 'assets/check.gif' : 'assets/x.gif') . '" /></td></tr>';
         echo '<tr><td width="399px;">' . (AllowUse('schoolsetup/GradeLevels.php') == true ? '<a href=# style="text-decoration:none;" onClick="check_content(\'Ajax.php?modname=schoolsetup/GradeLevels.php\');">' : '') . 'Grade Level Setup' . (AllowUse('schoolsetup/GradeLevels.php') == true ? '</a>' : '') . '</td><td><img src="' . ($grade_level_setup[1]['REC'] > 0 ? 'assets/check.gif' : 'assets/x.gif') . '" /></td></tr>';
         echo '<tr><td width="399px;">' . (AllowUse('schoolsetup/Periods.php') == true ? '<a href=# style="text-decoration:none;" onClick="check_content(\'Ajax.php?modname=schoolsetup/Periods.php\');">' : '') . 'School Periods Setup' . (AllowUse('schoolsetup/Periods.php') == true ? '</a>' : '') . '</td><td><img src="' . ($periods_setup[1]['REC'] > 0 ? 'assets/check.gif' : 'assets/x.gif') . '" /></td></tr>';
         echo '<tr><td width="399px;">' . (AllowUse('schoolsetup/Rooms.php') == true ? '<a href=# style="text-decoration:none;" onClick="check_content(\'Ajax.php?modname=schoolsetup/Rooms.php\');">' : '') . 'Rooms Setup' . (AllowUse('schoolsetup/Rooms.php') == true ? '</a>' : '') . '</td><td><img src="' . ($rooms_setup[1]['REC'] > 0 ? 'assets/check.gif' : 'assets/x.gif') . '" /></td></tr>';
     }
 }
 //////////////// new  for incomplete marking period //////////
 $flag = 0;
 $fy_edate = DBGet(DBQuery('SELECT END_DATE, START_DATE,MARKING_PERIOD_ID FROM school_years WHERE SCHOOL_ID=' . UserSchool() . ' AND SYEAR=' . UserSyear()));
 $fuly_sdate = $fy_edate[1]['START_DATE'];
 $fuly_edate = $fy_edate[1]['END_DATE'];
 $fuly_mp_id = $fy_edate[1]['MARKING_PERIOD_ID'];
 $all_sem = DBGet(DBQuery('SELECT  MAX(END_DATE) as END_DATE ,MIN(start_date) as START_DATE  FROM school_semesters WHERE  YEAR_ID=' . $fuly_mp_id . ' AND SCHOOL_ID=' . UserSchool() . ' AND SYEAR=' . UserSyear()));
 if ($all_sem[1]['END_DATE'] != '' && $all_sem[1]['END_DATE'] != $fuly_edate || $all_sem[1]['START_DATE'] != '' && $all_sem[1]['START_DATE'] != $fuly_sdate) {
     $flag++;
 }
 $all_sem_chk = DBGet(DBQuery('SELECT  *  FROM school_semesters WHERE  YEAR_ID=' . $fuly_mp_id . ' AND SCHOOL_ID=' . UserSchool() . ' AND SYEAR=' . UserSyear()));
 foreach ($all_sem_chk as $all_sem_k => $all_sem_v) {
     $qtr_edate_chk = DBGet(DBQuery('SELECT MAX(END_DATE) AS END_DATE, MIN(START_DATE) AS START_DATE FROM school_quarters WHERE SEMESTER_ID=' . $all_sem_v['MARKING_PERIOD_ID'] . ' AND SCHOOL_ID=' . UserSchool() . ' AND SYEAR=' . UserSyear()));
开发者ID:jeffthestampede,项目名称:excelsior,代码行数:31,代码来源:Portal.php

示例11: UserStudentID

    }
    echo '</SELECT>';
}
echo '</FORM>';
if (UserStudentID() && (User('PROFILE') == 'admin' || User('PROFILE') == 'teacher')) {
    $sql = "SELECT FIRST_NAME||' '||coalesce(MIDDLE_NAME,' ')||' '||LAST_NAME||' '||coalesce(NAME_SUFFIX,' ') AS FULL_NAME FROM STUDENTS WHERE STUDENT_ID='" . UserStudentID() . "'";
    $RET = DBGet(DBQuery($sql));
    echo '<TABLE class="width-100p cellspacing-0 cellpadding-0" style="background-color:#333366;"><TR><TD><A HREF="Side.php?student_id=new&modcat=' . $_REQUEST['modcat'] . '"><IMG SRC="assets/x.png" height="17" style="vertical-align: middle;"></A></TD><TD><B>' . (AllowUse('Students/Student.php') ? '<A HREF="Modules.php?modname=Students/Student.php&student_id=' . UserStudentID() . '" target="body">' : '') . '<span style="color:white" class="size-2">' . $RET[1]['FULL_NAME'] . '</span>' . (AllowUse('Students/Student.php') ? '</A>' : '') . '</B></TD></TR></TABLE>';
}
if (UserStaffID() && (User('PROFILE') == 'admin' || User('PROFILE') == 'teacher')) {
    if (UserStudentID()) {
        echo '<div style="height:5px;"></div>';
    }
    $sql = "SELECT FIRST_NAME||' '||LAST_NAME AS FULL_NAME FROM STAFF WHERE STAFF_ID='" . UserStaffID() . "'";
    $RET = DBGet(DBQuery($sql));
    echo '<TABLE class="width-100p cellspacing-0 cellpadding-0" style="background-color:' . (UserStaffID() == User('STAFF_ID') ? '#663333' : '#336633') . ';"><TR><TD><A HREF="Side.php?staff_id=new&modcat=' . $_REQUEST['modcat'] . '"><IMG SRC="assets/x.png" height="17" style="vertical-align: middle;"></A></TD><TD><B>' . (AllowUse('Users/User.php') ? '<A HREF="Modules.php?modname=Users/User.php&staff_id=' . UserStaffID() . '" target="body">' : '') . '<span style="color:white" class="size-2">' . $RET[1]['FULL_NAME'] . '</span>' . (AllowUse('Users/User.php') ? '</A>' : '') . '</B></TD></TR></TABLE>';
}
//modif Francois: css WPadmin
echo '<BR /><div id="adminmenu">';
// Program Information
require 'Menu.php';
foreach ($_ROSARIO['Menu'] as $modcat => $programs) {
    if (count($_ROSARIO['Menu'][$modcat])) {
        $keys = array_keys($_ROSARIO['Menu'][$modcat]);
        echo '<A style="cursor: pointer;" class="menu-top" onclick="openMenu(\'' . $modcat . '\');parent.body.location=\'Modules.php?modname=' . $modcat . '/Search.php\';"><IMG SRC="assets/icons/' . $modcat . '.png" height="32" style="vertical-align:middle;">&nbsp;' . _(str_replace('_', ' ', $modcat)) . '</A><DIV id="menu_visible' . $modcat . '" class="wp-submenu" style="display:none;"></DIV>';
        echo '<DIV id="menu_hidden' . $modcat . '" style="display:none;"><TABLE class="width-100p cellspacing-0 cellpadding-0">';
        //foreach($_ROSARIO['Menu'][$modcat] as $file=>$title)
        foreach ($keys as $key_index => $file) {
            $title = $_ROSARIO['Menu'][$modcat][$file];
            if (mb_stripos($file, 'http://') !== false) {
                echo '<TR><TD><A HREF="' . $file . '" target="_blank">' . $title . '</A></TD></TR>';
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:31,代码来源:Side.php

示例12: sprintf

else document.write("' . sprintf(_('Good Evening, %s.'), User('NAME')) . '");</script>');
$welcome = sprintf(_('Welcome to %s!'), ParseMLField(Config('TITLE')));
if ($_SESSION['LAST_LOGIN']) {
    $welcome .= '<BR />&nbsp;' . sprintf(_('Your last login was <b>%s</b>.'), ProperDate(mb_substr($_SESSION['LAST_LOGIN'], 0, 10)) . mb_substr($_SESSION['LAST_LOGIN'], 10));
}
if ($_REQUEST['failed_login']) {
    //modif Francois: css WPadmin add class error for all Warning! of this file
    //	$welcome .= '<BR />&nbsp;<span style="color:red"><b>'._('Warning!').'</b></span>&nbsp;'.sprintf(_('There have been <b>%d</b> failed login attempts since your last successful login.'),$_REQUEST['failed_login']);
    $welcome .= '<BR /><div class="error"><p><IMG SRC="assets/x.png" class="alignImg">&nbsp;<span style="color:red"><b>' . _('Warning!') . '</b></span>&nbsp;' . sprintf(_('There have been <b>%d</b> failed login attempts since your last successful login.'), $_REQUEST['failed_login']) . '</p></div>';
}
switch (User('PROFILE')) {
    case 'admin':
        //DrawHeader($welcome.'<BR />&nbsp;'._('You are an <b>Administrator</b> on the system.<BR />').PHPCheck().versionCheck());
        DrawHeader($welcome . '<BR />&nbsp;' . _('You are an <b>Administrator</b> on the system.') . '<BR />' . PHPCheck());
        //modif Francois: Discipline new referrals alert
        if (AllowUse('Discipline/Referrals.php') && User('LAST_LOGIN')) {
            $extra = array();
            $extra['SELECT_ONLY'] = 'count(*) AS COUNT';
            $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 AND dr.ENTRY_DATE BETWEEN ' . "'" . User('LAST_LOGIN') . "' AND '" . DBDate() . "'";
            $disc_RET = GetStuList($extra);
            if ($disc_RET[1]['COUNT'] > 0) {
                $message = '<A HREF="Modules.php?modname=Discipline/Referrals.php&search_modfunc=list&discipline_entry_begin=' . User('LAST_LOGIN') . '&discipline_entry_end=' . DBDate() . '"><img src="assets/icons/Discipline.png" class="alignImg" /> ';
                $message .= sprintf(ngettext('%d new referral', '%d new referrals', $disc_RET[1]['COUNT']), $disc_RET[1]['COUNT']);
                $message .= '</A>';
                DrawHeader($message);
            }
        }
        //modif Francois: file attached to portal notes
        //modif Francois: fix bug Portal Notes not displayed when pn.START_DATE IS NULL
        //        $notes_RET = DBGet(DBQuery("SELECT s.TITLE AS SCHOOL,date(pn.PUBLISHED_DATE) AS PUBLISHED_DATE,'<B>'||pn.TITLE||'</B>' AS TITLE,pn.CONTENT FROM PORTAL_NOTES pn,SCHOOLS s,STAFF st WHERE pn.SYEAR='".UserSyear()."' AND pn.START_DATE<=CURRENT_DATE AND (pn.END_DATE>=CURRENT_DATE OR pn.END_DATE IS NULL) AND st.STAFF_ID='".User('STAFF_ID')."' AND (st.SCHOOLS IS NULL OR position(','||pn.SCHOOL_ID||',' IN st.SCHOOLS)>0) AND (st.PROFILE_ID IS NULL AND position(',admin,' IN pn.PUBLISHED_PROFILES)>0 OR st.PROFILE_ID IS NOT NULL AND position(','||st.PROFILE_ID||',' IN pn.PUBLISHED_PROFILES)>0) AND s.ID=pn.SCHOOL_ID AND s.SYEAR=pn.SYEAR ORDER BY pn.SORT_ORDER,pn.PUBLISHED_DATE DESC"),array('PUBLISHED_DATE'=>'ProperDate','CONTENT'=>'_formatContent'));
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:31,代码来源:Portal.php

示例13: timeTableSwitch

		}
	</script>
	<?php 
    //modif Francois: add schedule table
    ?>
	<script type="text/javascript">
		function timeTableSwitch()
		{
			if (document.getElementById("schedule_table").checked==true)
				document.getElementById("printSchedulesLink").href=document.getElementById("printSchedulesLink").href.replace('Yes','No');
			else
				document.getElementById("printSchedulesLink").href=document.getElementById("printSchedulesLink").href.replace('No','Yes');		
		}
	</script>
	<?php 
    DrawHeader((AllowUse('Scheduling/PrintSchedules.php') ? '<A href="' . $printSchedulesLinkhref . '" id="printSchedulesLink">' : '') . _('Print Schedule') . (AllowUse('Scheduling/PrintSchedules.php') ? '</A>' : '') . (AllowUse('Scheduling/PrintSchedules.php') ? ' &nbsp;<label><input type="checkbox" id="horizontalFormat" name="horizontalFormat" value="Y" onchange="horizontalFormatSwitch();" /> ' . _('Horizontal Format') . '</label>' . '<label><input name="schedule_table" type="radio" value="Yes" checked onchange="timeTableSwitch();" />&nbsp;' . _('Table') . '</label> ' . '<label><input name="schedule_table" id="schedule_table" type="radio" value="No" onchange="timeTableSwitch();" />&nbsp;' . _('List') . '</label>' : ''));
    /*
    $schedule_fields_RET = DBGet(DBQuery("SELECT cf.TITLE,s.CUSTOM_71 FROM CUSTOM_FIELDS cf,STUDENTS s WHERE s.STUDENT_ID='".UserStudentID()."' AND cf.ID='71'"));
    if($schedule_fields_RET[1]['TITLE']=='Team')
    	DrawHeader('<span style="color:gray"><b>'.$schedule_fields_RET[1]['TITLE'].': </b></span>'.$schedule_fields_RET[1]['CUSTOM_71']);
    */
    // get the fy marking period id, there should be exactly one fy marking period
    $fy_id = DBGet(DBQuery("SELECT MARKING_PERIOD_ID FROM SCHOOL_MARKING_PERIODS WHERE MP='FY' AND SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "'"));
    $fy_id = $fy_id[1]['MARKING_PERIOD_ID'];
    //modif Francois: multiple school periods for a course period
    /*$sql = "SELECT
    			s.COURSE_ID,s.COURSE_PERIOD_ID,
    			s.MARKING_PERIOD_ID,s.START_DATE,s.END_DATE,
    			extract(EPOCH FROM s.START_DATE) AS START_EPOCH,extract(EPOCH FROM s.END_DATE) AS END_EPOCH,sp.PERIOD_ID,
    			cp.PERIOD_ID,cp.MARKING_PERIOD_ID AS COURSE_MARKING_PERIOD_ID,cp.MP,cp.CALENDAR_ID,cp.TOTAL_SEATS,
    			c.TITLE,cp.COURSE_PERIOD_ID AS PERIOD_PULLDOWN,
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:31,代码来源:Schedule.php

示例14: str_replace

                                $can_edit = $exceptions_RET[$file][1]['CAN_EDIT'];
                                echo "<TR><TD></TD><TD></TD>";
                                echo '<TD>&nbsp;&nbsp;<INPUT type="checkbox" name="can_use[' . str_replace('.', '_', $file) . ']" value="true"' . ($can_use == 'Y' ? ' checked' : '') . (AllowEdit() ? '' : ' DISABLED') . '></TD>';
                                echo '<TD>&nbsp;&nbsp;&nbsp;<INPUT type="checkbox" name="can_edit[' . str_replace('.', '_', $file) . ']" value="true"' . ($can_edit == 'Y' ? ' checked' : '') . (AllowEdit() ? '' : ' DISABLED') . '></TD>';
                                echo "<TD> &nbsp; &nbsp;{$title}</TD></TR>";
                            }
                        }
                    } else {
                        echo '<TR><TD></TD><TD></TD><TD colspan="3" class="center"><b>- ' . $title . ' -</b></TD></TR>';
                    }
                }
            }
            echo '<TR><TD colspan="5" style="text-align:center; height:20px;"></TD></TR>';
        }
        echo '</TABLE>';
        PopTable('footer');
        echo '<span class="center">' . SubmitButton(_('Save')) . '</span>';
        echo '</DIV>';
        echo '</TD></TR></TABLE>';
        echo '</FORM>';
        echo '<DIV id="new_id_content" style="position:absolute;visibility:hidden;">' . _('Title') . ' <INPUT type="text" name="new_profile_title" /><BR />';
        echo _('Type') . ' <SELECT name="new_profile_type"><OPTION value="admin">' . _('Administrator') . '<OPTION value="teacher">' . _('Teacher') . '<OPTION value="parent">' . _('Parent') . '</SELECT></DIV>';
    } else {
        $profile_title = DBGet(DBQuery("SELECT TITLE FROM USER_PROFILES WHERE ID='" . $staff_RET[1]['PROFILE_ID'] . "'"));
        echo '<BR />';
        PopTable('header', _('Error'), 'width=50%');
        //modif Francois: remove ProgramLink function
        echo '<TABLE><TR><TD><IMG SRC="assets/warning_button.png" width="30"></TD><TD>' . sprintf(_('%s %s is assigned to the profile %s.'), $staff_RET[1]['FIRST_NAME'], $staff_RET[1]['LAST_NAME'], $profile_title[1]['TITLE']) . '<BR /><BR /> ' . sprintf(_('To assign permissions to this user, either change the permissions for this profile using the %s setup or change this user to a user with custom permissions by using %s.'), (AllowUse('Users/Profiles.php') ? '<A href="Modules.php?modname=Users/Profiles.php">' : '') . _('Profiles') . (AllowUse('Users/Profiles.php') ? '</A>' : ''), (AllowUse('Users/User.php') ? '<A href="Modules.php?modname=Users/User.php">' : '') . _('General Info') . (AllowUse('Users/User.php') ? '</A>' : '')) . '</TD></TR></TABLE>';
        PopTable('footer');
    }
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:31,代码来源:Exceptions.php

示例15: foreach

         foreach ($categories_RET as $category) {
             foreach ($custom_RET[$category['ID']] as $field) {
                 $fields_list['Address']['ADDRESS_' . $field['ID']] = str_replace("'", '&#39;', $field['TITLE']);
             }
         }
     }
     if ($extra['field_names']) {
         $fields_list['General'] += $extra['field_names'];
     }
 }
 /*******************************************************************************/
 $categories_RET = DBGet(DBQuery("SELECT ID,TITLE FROM STUDENT_FIELD_CATEGORIES ORDER BY SORT_ORDER"));
 $custom_RET = DBGet(DBQuery("SELECT TITLE,ID,TYPE,CATEGORY_ID FROM CUSTOM_FIELDS where system_field='Y' ORDER BY SORT_ORDER"), array(), array('CATEGORY_ID'));
 $custom_RET1 = DBGet(DBQuery("SELECT TITLE,ID,TYPE,CATEGORY_ID FROM CUSTOM_FIELDS where system_field='N' ORDER BY SORT_ORDER"), array(), array('CATEGORY_ID'));
 foreach ($categories_RET as $category) {
     if (AllowUse('Students/Student.php&category_id=' . $category['ID'])) {
         foreach ($custom_RET[$category['ID']] as $field) {
             //$fields_list[$category['TITLE']]['CUSTOM_'.$field['ID']] = str_replace("'",'&#39;',$field['TITLE']);
             $title = strtolower(trim($field['TITLE']));
             if (strpos(trim($field['TITLE']), ' ') != 0) {
                 $p1 = substr(trim($field['TITLE']), 0, strpos(trim($field['TITLE']), ' '));
                 $p2 = substr(trim($field['TITLE']), strpos(trim($field['TITLE']), ' ') + 1);
                 $title = strtolower($p1 . '_' . $p2);
             }
             //echo 'aa='.$title;
             $fields_list[$category['TITLE']][$title] = str_replace("'", '&#39;', $field['TITLE']);
         }
         foreach ($custom_RET1[$category['ID']] as $field) {
             $fields_list[$category['TITLE']]['CUSTOM_' . $field['ID']] = $field['TITLE'];
         }
     }
开发者ID:26746647,项目名称:Belize-openSIS,代码行数:31,代码来源:Export.php


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