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


PHP AllowEdit函数代码示例

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


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

示例1: ResetButton

function ResetButton($value = 'Reset', $options = '')
{
    if (AllowEdit()) {
        return "<INPUT type=reset value='{$value}'" . ($options ? ' ' . $options : '') . '>';
    } else {
        return '';
    }
}
开发者ID:SysBind,项目名称:opensis-ml,代码行数:8,代码来源:SubmitButton.fnc.php

示例2: ResetButton

function ResetButton($value = 'Reset', $options = '')
{
    if (AllowEdit()) {
        return '<INPUT type="reset" value="' . $value . '"' . ($options ? ' ' . $options : '') . ' />';
    } else {
        return '';
    }
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:8,代码来源:SubmitButton.fnc.php

示例3: ReportsBottomButtons

/**
 * Reports module Bottom Buttons.
 * Messaging new messages note.
 *
 * @uses Bottom.php|bottom_buttons hook
 *
 * @return true if bottom button, else false.
 */
function ReportsBottomButtons()
{
    if (!User('PROFILE') === 'admin' || !AllowEdit('Reports/SavedReports.php') || !isset($_SESSION['List_PHP_SELF'])) {
        return false;
    }
    ?>
	<a href="Modules.php?modname=Reports/SavedReports.php&amp;modfunc=new" class="BottomButton">
		<img src="assets/themes/<?php 
    echo Preferences('THEME');
    ?>
/btn/download.png" />
		<span><?php 
    echo _('Save Report');
    ?>
</span>
	</a>
	<?php 
    return true;
}
开发者ID:francoisjacquet,项目名称:Reports,代码行数:27,代码来源:functions.php

示例4: TextAreaInputOrg

function TextAreaInputOrg($value, $name, $title = '', $options = '', $div = true, $divwidth = '500px')
{
    if (Preferences('HIDDEN') != 'Y') {
        $div = false;
    }
    if (AllowEdit() && !$_REQUEST['_openSIS_PDF']) {
        $value = str_replace("'", '&#39;', str_replace('"', '&rdquo;', $value));
        if (strpos($options, 'cols') === false) {
            $options .= ' cols=30';
        }
        if (strpos($options, 'rows') === false) {
            $options .= ' rows=4';
        }
        $rows = substr($options, strpos($options, 'rows') + 5, 2) * 1;
        $cols = substr($options, strpos($options, 'cols') + 5, 2) * 1;
        if ($value == '' || $div == false) {
            return "<TEXTAREA name={$name} {$options}>{$value}</TEXTAREA>" . ($title != '' ? '<BR><small>' . (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '') . '</small>' : '');
        } else {
            return "<DIV id='div{$name}'><div style='width:500px;' onclick='javascript:addHTML(\"<TEXTAREA id=textarea{$name} name={$name} {$options}>" . ereg_replace("[\n\r]", '\\u000D\\u000A', str_replace("\r\n", '\\u000D\\u000A', str_replace("'", "&#39;", $value))) . "</TEXTAREA>" . ($title != '' ? "<BR><small>" . str_replace("'", '&#39;', (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '')) . "</small>" : '') . "\",\"div{$name}\",true); document.getElementById(\"textarea{$name}\").value=unescape(document.getElementById(\"textarea{$name}\").value);'><TABLE class=LO_field height=100%><TR><TD>" . (substr_count($value, "\r\n") > $rows ? '<DIV style="overflow:auto; height:' . 15 * $rows . 'px; width:' . $cols * 10 . '; padding-right: 16px;">' . nl2br($value) . '</DIV>' : '<DIV style="overflow:auto; width:' . $divwidth . '; padding-right: 16px;">' . nl2br($value) . '</DIV>') . '</TD></TR></TABLE>' . ($title != '' ? '<BR><small>' . str_replace("'", '&#39;', (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '')) . '</small>' : '') . '</div></DIV>';
        }
    } else {
        return ($value != '' ? nl2br($value) : '-') . ($title != '' ? '<BR><small>' . (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '') . '</small>' : '');
    }
}
开发者ID:jicheng17,项目名称:fenghua,代码行数:24,代码来源:CustomFunctionsFnc.php

示例5: DBQuery

            DBQuery("DELETE FROM STAFF_EXCEPTIONS WHERE MODNAME='Students/Student.php&category_id={$_REQUEST['category_id']}'");
            $_REQUEST['modfunc'] = '';
            unset($_REQUEST['category_id']);
        }
    }
}
if (empty($_REQUEST['modfunc'])) {
    //modif Francois: fix SQL bug invalid sort order
    if (isset($error)) {
        echo $error;
    }
    // CATEGORIES
    $sql = "SELECT ID,TITLE,SORT_ORDER FROM STUDENT_FIELD_CATEGORIES ORDER BY SORT_ORDER,TITLE";
    $QI = DBQuery($sql);
    $categories_RET = DBGet($QI);
    if (AllowEdit() && $_REQUEST['id'] != 'new' && $_REQUEST['category_id'] != 'new' && ($_REQUEST['id'] || $_REQUEST['category_id'] > 4)) {
        $delete_button = '<INPUT type="button" value="' . _('Delete') . '" onClick="javascript:window.location=\'Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=delete&category_id=' . $_REQUEST['category_id'] . '&id=' . $_REQUEST['id'] . '\'" />';
    }
    // ADDING & EDITING FORM
    if ($_REQUEST['id'] && $_REQUEST['id'] != 'new') {
        $sql = "SELECT CATEGORY_ID,TITLE,TYPE,SELECT_OPTIONS,DEFAULT_SELECTION,SORT_ORDER,REQUIRED,REQUIRED,(SELECT TITLE FROM STUDENT_FIELD_CATEGORIES WHERE ID=CATEGORY_ID) AS CATEGORY_TITLE FROM CUSTOM_FIELDS WHERE ID='{$_REQUEST['id']}'";
        $RET = DBGet(DBQuery($sql));
        $RET = $RET[1];
        $title = ParseMLField($RET['CATEGORY_TITLE']) . ' - ' . ParseMLField($RET['TITLE']);
    } elseif ($_REQUEST['category_id'] && $_REQUEST['category_id'] != 'new' && $_REQUEST['id'] != 'new') {
        $sql = "SELECT TITLE,SORT_ORDER,INCLUDE,COLUMNS\n\t\t\t\tFROM STUDENT_FIELD_CATEGORIES\n\t\t\t\tWHERE ID='{$_REQUEST['category_id']}'";
        $RET = DBGet(DBQuery($sql));
        $RET = $RET[1];
        $title = ParseMLField($RET['TITLE']);
    } elseif ($_REQUEST['id'] == 'new') {
        $title = _('New Student Field');
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:31,代码来源:StudentFields.php

示例6: foreach

    if (DeletePrompt($table)) {
        foreach ($sql as $query) {
            DBQuery($query);
        }
        unset($_REQUEST['modfunc']);
    }
}
if ((!$_REQUEST['modfunc'] || $_REQUEST['modfunc'] == 'choose_course') && !$_REQUEST['course_modfunc']) {
    if ($_REQUEST['modfunc'] != 'choose_course') {
        DrawBC("" . _('Scheduling') . " > " . ProgramTitle());
    }
    $sql = "SELECT SUBJECT_ID,TITLE FROM course_subjects WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' ORDER BY TITLE";
    $QI = DBQuery($sql);
    $subjects_RET = DBGet($QI);
    if ($_REQUEST['modfunc'] != 'choose_course') {
        if (AllowEdit()) {
            $delete_button = "<INPUT type=button class=btn_medium value=" . _('Delete') . " onClick='javascript:window.location=\"for_window.php?modname={$_REQUEST['modname']}&modfunc=delete&subject_id={$_REQUEST['subject_id']}&course_id={$_REQUEST['course_id']}&course_period_id={$_REQUEST['course_period_id']}\"'> ";
        }
        // ADDING & EDITING FORM
        if ($_REQUEST['course_period_id']) {
            if ($_REQUEST['course_period_id'] != 'new') {
                $sql = "SELECT PARENT_ID,TITLE,SHORT_NAME,PERIOD_ID,DAYS,\n\t\t\t\t\t\t\t\tMP,MARKING_PERIOD_ID,TEACHER_ID,CALENDAR_ID,\n\t\t\t\t\t\t\t\tROOM,TOTAL_SEATS,DOES_ATTENDANCE,\n\t\t\t\t\t\t\t\tGRADE_SCALE_ID,DOES_HONOR_ROLL,DOES_CLASS_RANK,\n\t\t\t\t\t\t\t\tGENDER_RESTRICTION,HOUSE_RESTRICTION,CREDITS,\n\t\t\t\t\t\t\t\tHALF_DAY,DOES_BREAKOFF\n\t\t\t\t\t\tFROM course_periods\n\t\t\t\t\t\tWHERE COURSE_PERIOD_ID='{$_REQUEST['course_period_id']}'";
                $QI = DBQuery($sql);
                $RET = DBGet($QI);
                $RET = $RET[1];
                $title = $RET['TITLE'];
                $new = false;
            } else {
                $sql = "SELECT TITLE\n\t\t\t\t\t\tFROM courses\n\t\t\t\t\t\tWHERE COURSE_ID='{$_REQUEST['course_id']}'";
                $QI = DBQuery($sql);
                $RET = DBGet($QI);
开发者ID:SysBind,项目名称:opensis-ml,代码行数:31,代码来源:CoursesforWindow.php

示例7: DBGet

         $teacher_id = $course_period_RET[1]['TEACHER_ID'];
         $config_RET = DBGet(DBQuery("SELECT TITLE,VALUE FROM PROGRAM_USER_CONFIG WHERE USER_ID='{$teacher_id}' AND PROGRAM='Gradebook'"), array(), array('TITLE'));
     }
     $_REQUEST['tab_id'] = key($grade_scales_RET);
 }
 $tabs = array();
 $grade_scale_select = array();
 foreach ($grade_scales_RET as $id => $grade_scale) {
     $tabs[] = array('title' => $grade_scale[1]['TITLE'], 'link' => "Modules.php?modname={$_REQUEST['modname']}&tab_id={$id}");
     $grade_scale_select += array($id => $grade_scale[1]['TITLE']);
 }
 if ($_REQUEST['tab_id'] != 'new') {
     $sql = 'SELECT * FROM REPORT_CARD_GRADES WHERE GRADE_SCALE_ID=\'' . $_REQUEST['tab_id'] . '\' AND SYEAR=\'' . UserSyear() . '\' ORDER BY BREAK_OFF IS NOT NULL DESC,BREAK_OFF DESC, SORT_ORDER';
     $functions = array('TITLE' => 'makeGradesInput', 'BREAK_OFF' => 'makeGradesInput', 'SORT_ORDER' => 'makeGradesInput', 'GPA_VALUE' => 'makeGradesInput', 'COMMENT' => 'makeGradesInput');
     $LO_columns = array('TITLE' => 'Title', 'BREAK_OFF' => 'Breakoff', 'GPA_VALUE' => 'GPA Value', 'SORT_ORDER' => 'Order', 'COMMENT' => 'Comment');
     if (User('PROFILE') == 'admin' && AllowEdit()) {
         $functions += array('GRADE_SCALE_ID' => 'makeGradesInput');
         $LO_columns += array('GRADE_SCALE_ID' => 'Grade Scale');
     }
     $link['add']['html'] = array('TITLE' => makeGradesInput('', 'TITLE'), 'BREAK_OFF' => makeGradesInput('', 'BREAK_OFF'), 'GPA_VALUE' => makeGradesInput('', 'GPA_VALUE'), 'SORT_ORDER' => makeGradesInput('', 'SORT_ORDER'), 'COMMENT' => makeGradesInput('', 'COMMENT'));
     $link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove&tab_id={$_REQUEST['tab_id']}";
     $link['remove']['variables'] = array('id' => 'ID');
     $link['add']['html']['remove'] = button('add');
     if (User('PROFILE') == 'admin') {
         $tabs[] = array('title' => button('add'), 'link' => "Modules.php?modname={$_REQUEST['modname']}&tab_id=new");
     }
 } else {
     //BJJ modifications to $functions array and $LO_columns array to handle scale value GP_SCALE
     $sql = 'SELECT * FROM REPORT_CARD_GRADE_SCALES WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' ORDER BY SORT_ORDER,ID';
     $functions = array('TITLE' => 'makeTextInput', 'GP_SCALE' => 'makeTextInput', 'COMMENT' => 'makeTextInput', 'SORT_ORDER' => 'makeTextInput');
     $LO_columns = array('TITLE' => 'Gradescale', 'GP_SCALE' => 'Scale Value', 'COMMENT' => 'Comment', 'SORT_ORDER' => 'Sort Order');
开发者ID:SoftScape,项目名称:opensis,代码行数:31,代码来源:ReportCardGrades.php

示例8: _makeRemove

function _makeRemove($value, $column)
{
    global $THIS_RET;
    $return = '';
    if (AllowEdit()) {
        if ($THIS_RET['USAGE_ID']) {
            $return = button('remove', _('Don\'t use'), '"Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=delete_usage&id=' . $THIS_RET['USAGE_ID'] . '"');
            $return .= button('remove', _('Delete'), '"Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=delete&id=' . $THIS_RET['ID'] . '"');
        } else {
            $return = button('add', _('Use at this school'), '"Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=add_usage&id=' . $THIS_RET['ID'] . '"');
        }
    }
    return $return;
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:14,代码来源:DisciplineForm.php

示例9: _makeMultipleInput

function _makeMultipleInput($column, $name, $request = 'staff')
{
    global $value, $field, $_openSIS;
    if ((AllowEdit() || $_openSIS['allow_edit']) && !$_REQUEST['_openSIS_PDF']) {
        $field['SELECT_OPTIONS'] = str_replace("\n", "\r", str_replace("\r\n", "\r", $field['SELECT_OPTIONS']));
        $select_options = explode("\r", $field['SELECT_OPTIONS']);
        if (count($select_options)) {
            foreach ($select_options as $option) {
                $options[$option] = $option;
            }
        }
        if ($value[$column] != '') {
            echo "<DIV id='div" . $request . "[" . $column . "]'><div onclick='javascript:addHTML(\"";
        }
        echo '<TABLE border=0 cellpadding=3>';
        if (count($options) > 12) {
            echo '<TR><TD colspan=2>';
            echo '<small><FONT color=' . Preferences('TITLES') . '>' . $name . '</FONT></small>';
            if ($value[$column] != '') {
                echo '<TABLE width=100% height=7 style=\\"border:1;border-style: solid solid none solid;\\"><TR><TD></TD></TR></TABLE>';
            } else {
                echo '<TABLE width=100% height=7 style="border:1;border-style: solid solid none solid;"><TR><TD></TD></TR></TABLE>';
            }
            echo '</TD></TR>';
        }
        echo '<TR>';
        $i = 0;
        foreach ($options as $option) {
            if ($i % 2 == 0) {
                echo '</TR><TR>';
            }
            if ($value[$column] != '') {
                echo '<TD><INPUT TYPE=hidden name=' . $request . '[' . $column . '][] value=\\"\\"><INPUT type=checkbox name=' . $request . '[' . $column . '][] value=\\"' . str_replace('"', '&quot;', $option) . '\\"' . (strpos($value[$column], '||' . $option . '||') !== false ? ' CHECKED' : '') . '><small>' . $option . '</small></TD>';
            } else {
                echo '<TD><INPUT type=checkbox name=' . $request . '[' . $column . '][] value="' . str_replace('"', '&quot;', $option) . '"' . (strpos($value[$column], '||' . $option . '||') !== false ? ' CHECKED' : '') . '><small>' . $option . '</small></TD>';
            }
            $i++;
        }
        echo '</TR><TR><TD colspan=2>';
        if ($value[$column] != '') {
            echo '<TABLE width=100% height=7 style=\\"border:1;border-style: none solid solid solid;\\"><TR><TD></TD></TR></TABLE>';
        } else {
            echo '<TABLE width=100% height=7 style="border:1;border-style: none solid solid solid;"><TR><TD></TD></TR></TABLE>';
        }
        echo '</TD></TR></TABLE>';
        if ($value[$column] != '') {
            echo "\",\"div" . $request . "[" . $column . "]" . "\",true);' >" . ($value[$column] != '' ? str_replace('"', '&rdquo;', str_replace('||', ', ', substr($value[$column], 2, -2))) : '-') . "</div></DIV>";
        }
    } else {
        echo $value[$column] != '' ? str_replace('"', '&rdquo;', str_replace('||', ', ', substr($value[$column], 2, -2))) : '-<BR>';
    }
    echo '<small><FONT color=' . Preferences('TITLES') . '>' . $name . '</FONT></small>';
}
开发者ID:jicheng17,项目名称:fh,代码行数:53,代码来源:FunctionsInc.php

示例10: _makeRadioSelected

function _makeRadioSelected($value, $title)
{
    global $THIS_RET, $current_RET;
    $colors = array('P' => '#00FF00', 'A' => '#FF0000', 'H' => '#FFCC00', 'T' => '#0000FF');
    $colors1 = array('P' => '#DDFFDD', 'A' => '#FFDDDD', 'H' => '#FFEEDD', 'T' => '#DDDDFF');
    if ($current_RET[$THIS_RET['STUDENT_ID']][1]['ATTENDANCE_TEACHER_CODE'] != '') {
        if ($current_RET[$THIS_RET['STUDENT_ID']][1]['ATTENDANCE_TEACHER_CODE'] == mb_substr($title, 5)) {
            return '<TABLE style="margin:0 auto; ' . ($current_RET[$THIS_RET['STUDENT_ID']][1]['COURSE_PERIOD_ID'] == UserCoursePeriod() ? $colors[$value] ? ' background-color:' . $colors[$value] . ';' : '' : ' background-color:#000000;') . '"><TR><TD><INPUT type="radio" name="attendance[' . $THIS_RET['STUDENT_ID'] . ']" value="' . $title . '" checked /></TD></TR></TABLE>';
        } else {
            return '<TABLE style="margin:0 auto;"><TR><TD><INPUT type="radio" name="attendance[' . $THIS_RET['STUDENT_ID'] . ']" value="' . $title . '"' . (AllowEdit() ? '' : ' disabled') . '></TD></TR></TABLE>';
        }
    } else {
        return '<TABLE style="margin:0 auto; ' . ($colors1[$value] ? ' background-color:' . $colors1[$value] . ';' : '') . '"><TR><TD><INPUT type="radio" name="attendance[' . $THIS_RET['STUDENT_ID'] . ']" value="' . $title . '" checked /></TD></TR></TABLE>';
    }
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:15,代码来源:TakeAttendance.php

示例11: DBGet

        $RET = DBGet(DBQuery('SELECT FIRST_NAME,LAST_NAME,MIDDLE_NAME,NAME_SUFFIX FROM students WHERE STUDENT_ID=\'' . UserStudentID() . '\''));
    }
    $count_student_RET = DBGet(DBQuery('SELECT COUNT(*) AS NUM FROM students'));
    if ($count_student_RET[1]['NUM'] > 1) {
        DrawHeaderHome('Selected Student: ' . $RET[1]['FIRST_NAME'] . '&nbsp;' . ($RET[1]['MIDDLE_NAME'] ? $RET[1]['MIDDLE_NAME'] . ' ' : '') . $RET[1]['LAST_NAME'] . '&nbsp;' . ' (<A HREF=Side.php?student_id=new&modcat=' . clean_param($_REQUEST['modcat'], PARAM_NOTAGS) . '><font color=red>Search Again</font></A>) | <A HREF=Modules.php?modname=' . clean_param($_REQUEST['modname'], PARAM_NOTAGS) . '&search_modfunc=list&next_modname=Students/Student.php&ajax=true&bottom_back=true&return_session=true target=body>Back to Student List</A>');
    } else {
        if ($count_student_RET[1]['NUM'] == 1) {
            DrawHeaderHome('Selected Student: ' . $RET[1]['FIRST_NAME'] . '&nbsp;' . ($RET[1]['MIDDLE_NAME'] ? $RET[1]['MIDDLE_NAME'] . ' ' : '') . $RET[1]['LAST_NAME'] . '&nbsp;' . ' (<A HREF=Side.php?student_id=new&modcat=' . clean_param($_REQUEST['modcat'], PARAM_NOTAGS) . '><font color=red>Search Again</font></A>) ');
        }
    }
}
if ($_REQUEST['modfunc'] == 'add' && AllowEdit()) {
    DBQuery('INSERT INTO student_eligibility_activities (STUDENT_ID,ACTIVITY_ID,SYEAR) values(\'' . UserStudentID() . '\',\'' . $_REQUEST['new_activity'] . '\',\'' . UserSyear() . '\')');
    unset($_REQUEST['modfunc']);
}
if ($_REQUEST['modfunc'] == 'remove' && AllowEdit()) {
    if (DeletePromptMod('activity')) {
        DBQuery('DELETE FROM student_eligibility_activities WHERE STUDENT_ID=\'' . UserStudentID() . '\' AND ACTIVITY_ID=\'' . $_REQUEST['activity_id'] . '\' AND SYEAR=\'' . UserSyear() . '\'');
        unset($_REQUEST['modfunc']);
    }
}
if (UserStudentID() && !$_REQUEST['modfunc']) {
    $start_end_RET = DBGet(DBQuery('SELECT TITLE,VALUE FROM program_config WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND PROGRAM=\'eligibility\' AND TITLE IN (\'' . 'START_DAY' . '\',\'' . 'END_DAY' . '\')'));
    if (count($start_end_RET)) {
        foreach ($start_end_RET as $value) {
            ${$value}['TITLE'] = $value['VALUE'];
        }
    }
    switch (date('D')) {
        case 'Mon':
            $today = 1;
开发者ID:jicheng17,项目名称:fenghua,代码行数:31,代码来源:Student.php

示例12: ListOutputGrade

function ListOutputGrade($result, $column_names, $singular = '', $plural = '', $link = false, $group = false, $options = false, $for_window = '')
{
    if (!isset($options['save'])) {
        $options['save'] = true;
    }
    if (!isset($options['print'])) {
        $options['print'] = true;
    }
    if (!isset($options['search'])) {
        $options['search'] = true;
    }
    if (!isset($options['center'])) {
        $options['center'] = true;
    }
    if (!isset($options['count'])) {
        $options['count'] = true;
    }
    if (!isset($options['sort'])) {
        $options['sort'] = true;
    }
    if (!$link) {
        $link = array();
    }
    if (isset($_REQUEST['page'])) {
        if ($_REQUEST['list_type'] == $singular) {
            $Request_page = $_REQUEST['page'];
        }
    }
    if (!isset($options['add'])) {
        if (!AllowEdit() || $_REQUEST['_openSIS_PDF']) {
            if ($link) {
                unset($link['add']);
                unset($link['remove']);
            }
        }
    }
    // PREPARE LINKS ---
    $result_count = $display_count = count($result);
    $num_displayed = 100000;
    $extra = "page={$_REQUEST['page']}&LO_sort={$_REQUEST['LO_sort']}&LO_direction={$_REQUEST['LO_direction']}&LO_search=" . urlencode($_REQUEST['LO_search']);
    $tmp_REQUEST = $_REQUEST;
    unset($tmp_REQUEST['page']);
    unset($tmp_REQUEST['LO_sort']);
    unset($tmp_REQUEST['LO_direction']);
    unset($tmp_REQUEST['LO_search']);
    unset($tmp_REQUEST['remove_prompt']);
    unset($tmp_REQUEST['remove_name']);
    unset($tmp_REQUEST['LO_save']);
    unset($tmp_REQUEST['PHPSESSID']);
    //$PHP_tmp_SELF = PreparePHP_SELF($tmp_REQUEST);
    $PHP_tmp_SELF = str_replace('>', '', PreparePHP_SELF($tmp_REQUEST));
    // END PREPARE LINKS ---
    // UN-GROUPING
    $group_count = count($group);
    if (!is_array($group)) {
        $group_count = false;
    }
    //$side_color = Preferences('COLOR');
    $side_color = 'class=odd';
    if ($group_count && $result_count) {
        $color = 'class=even';
        $group_result = $result;
        unset($result);
        $result[0] = '';
        foreach ($group_result as $item1) {
            if ($group_count == 1) {
                if ($color == 'class=even') {
                    $color = $side_color;
                } else {
                    $color = 'class=even';
                }
            }
            foreach ($item1 as $item2) {
                if ($group_count == 1) {
                    $i++;
                    if (count($group[0]) && $i != 1) {
                        foreach ($group[0] as $column) {
                            $item2[$column] = str_replace('<!-- <!--', '<!--', '<!-- ' . str_replace('-->', '--><!--', $item2[$column])) . ' -->';
                        }
                    }
                    $item2['row_color'] = $color;
                    $result[] = $item2;
                } else {
                    if ($group_count == 2) {
                        if ($color == 'class=even') {
                            $color = $side_color;
                        } else {
                            $color = 'class=even';
                        }
                    }
                    foreach ($item2 as $item3) {
                        if ($group_count == 2) {
                            $i++;
                            if (count($group[0]) && $i != 1) {
                                foreach ($group[0] as $column) {
                                    $item3[$column] = '<!-- ' . $item3[$column] . ' -->';
                                }
                            }
                            if (count($group[1]) && $i != 1) {
                                foreach ($group[1] as $column) {
//.........这里部分代码省略.........
开发者ID:SysBind,项目名称:opensis-ml,代码行数:101,代码来源:ListOutput.fnc.php

示例13: _makeCommentsA

function _makeCommentsA($value, $column)
{
    global $THIS_RET, $current_commentsA_RET, $import_commentsA_RET, $commentsA_select, $tabindex;
    if ($import_commentsA_RET[$THIS_RET['STUDENT_ID']][$value]) {
        $select = $import_commentsA_RET[$THIS_RET['STUDENT_ID']][$value][1]['COMMENT'];
        $div = false;
    } else {
        if (!$current_commentsA_RET[$THIS_RET['STUDENT_ID']] && !$import_commentsA_RET[$THIS_RET['STUDENT_ID']] && AllowEdit()) {
            $select = Preferences('COMMENT_A', 'Gradebook');
            $div = false;
        } else {
            $select = $current_commentsA_RET[$THIS_RET['STUDENT_ID']][$value][1]['COMMENT'];
            $div = true;
        }
    }
    if (!isset($_REQUEST['_openSIS_PDF'])) {
        $return = SelectInput($select, 'values[' . $THIS_RET['STUDENT_ID'] . '][commentsA][' . $value . ']', '', $commentsA_select, 'N/A', 'tabindex=' . ($tabindex += 100), $div);
    } else {
        $return = $select != ' ' ? $select : 'o';
    }
    return $return;
}
开发者ID:26746647,项目名称:openSIS,代码行数:22,代码来源:InputFinalGrades.php

示例14: foreach

             echo '</TR>';
         }
     } else {
         if (count($info_RET)) {
             foreach ($info_RET as $info) {
                 echo '<TR>';
                 if (AllowEdit()) {
                     echo '<TD width=20>' . button('remove', '', "Modules.php?modname={$_REQUEST['modname']}&include={$_REQUEST['include']}&modfunc=delete&address_id={$_REQUEST['address_id']}&person_id={$_REQUEST['person_id']}&contact_id=" . $info['ID']) . '</TD>';
                 } else {
                     echo '<TD></TD>';
                 }
                 echo '<TD><DIV id=info_' . $info['ID'] . '><div onclick=\'addHTML("<TABLE><TR><TD>' . str_replace('"', '\\"', TextInput($info['VALUE'], 'values[people_join_contacts][' . $info['ID'] . '][VALUE]', '', '', false) . '<BR>' . str_replace("'", '&#39;', _makeAutoSelectInputX($info['TITLE'], 'TITLE', 'people_join_contacts', '', $info_options, $info['ID'], false))) . '</TD></TR></TABLE>","info_' . $info['ID'] . '",true);\'>' . $info['VALUE'] . '<BR><small><FONT color=' . ($info_options_x[$info['TITLE']] ? Preferences('TITLES') : 'blue') . '>' . $info['TITLE'] . '</FONT></small></div></DIV></TD>';
                 echo '</TR>';
             }
         }
         if (AllowEdit() && $use_contact) {
             echo '<TR>';
             echo '</TR>';
         }
     }
     echo '</TABLE>';
     echo '</TD></TR>';
     echo '</TABLE>';
     #echo '</FIELDSET>';
     echo '</TD></TR>';
     echo '</TABLE>';
     // close 3e
 } else {
     echo '<TABLE border=0><TR><TD colspan=3><table><tr><td>' . CheckboxInput($this_contact['EMERGENCY'], 'values[students_join_people][EMERGENCY]', '', 'CHECKED', $new, '<IMG SRC=assets/check.gif width=15>', '<IMG SRC=assets/x.gif width=15>') . '</TD><TD>' . _('This is an Emergency Contact') . '</TD></TR></table></TD></TR><tr><td colspan=3 class=break></td></tr>';
     echo '<TR><td style="width:120px" style=white-space:nowrap><span class=red>*</span>' . _('Relationship to Student') . '</td><td>:</td><TD>' . SelectInput($this_contact['STUDENT_RELATION'], 'values[students_join_people][STUDENT_RELATION]', '', $relation_options, 'N/A') . '</TD></TR>';
     echo '<TR><TD><span class=red>*</span>' . _('First Name') . '</td><td>:</td><TD>' . str_replace('"', '\\"', _makePeopleInput('', 'FIRST_NAME', '', 'class=cell_medium')) . '</TD></tr><tr><td ><span class=red>' . _('*') . '</span>' . _('Last Name') . '</td><td>:</td><TD>' . str_replace('"', '\\"', _makePeopleInput($this_contact['LAST_NAME'], 'LAST_NAME', '', 'class=cell_medium')) . '</TD></TR>';
开发者ID:SysBind,项目名称:opensis-ml,代码行数:31,代码来源:Address.inc.php

示例15: _makeLock

function _makeLock($value, $column)
{
    global $THIS_RET;
    if ($value == 'Y') {
        $img = 'locked';
    } else {
        $img = 'unlocked';
    }
    return '<IMG SRC=assets/' . $img . '.gif ' . (AllowEdit() ? 'onclick="if(this.src.indexOf(\'assets/locked.gif\')!=-1) {this.src=\'assets/unlocked.gif\'; document.getElementById(\'lock' . $THIS_RET['COURSE_PERIOD_ID'] . '-' . $THIS_RET['START_DATE'] . '\').value=\'\';} else {this.src=\'assets/locked.gif\'; document.getElementById(\'lock' . $THIS_RET['COURSE_PERIOD_ID'] . '-' . $THIS_RET['START_DATE'] . '\').value=\'Y\';}"' : '') . '><INPUT type=hidden name=schedule[' . $THIS_RET['COURSE_PERIOD_ID'] . '][' . $THIS_RET['START_DATE'] . '][SCHEDULER_LOCK] id=lock' . $THIS_RET['COURSE_PERIOD_ID'] . '-' . $THIS_RET['START_DATE'] . ' value=' . $value . '>';
}
开发者ID:jeffthestampede,项目名称:excelsior,代码行数:10,代码来源:ViewSchedule.php


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